7
$\begingroup$

My data has following distribution:

enter image description here

I wish to determine if it is a Normal distribution, so:

> library(nortest)
Warning message:
package 'nortest' was built under R version 2.12.2 
> sf.test(y)
Error in sf.test(y) : sample size must be between 5 and 5000
> ad.test(y)
            Anderson-Darling normality test
data:  y 
A = 5487.108, p-value = Inf

> cvm.test(y)   
        Cramer-von Mises normality test
data:  y 
W = 855.7627, p-value = Inf

> pearson.test(y)    
        Pearson chi-square normality test    
data:  y 
P = 2456556, p-value < 2.2e-16

> qqnorm(y); abline(0, 1)

When I do qqnorm, I found

enter image description here

Can I conclude y does not have a normal distribution, since the p-value = INF and the qqnorm did not fit the abline?

Should I expect all these p-values close to zero or one when my distribution is in normal distribution? How about the pearson.test?

How should I interpret the numbers (A, W and P) before the p-values?

$\endgroup$
2
  • 1
    $\begingroup$ It looks like your data is truncated at zero (i.e. no values below zero occur). That excludes it from coming from a normal distribution. $\endgroup$
    – Nick Sabbe
    Commented Jun 23, 2011 at 9:54
  • 2
    $\begingroup$ An infinite $p$-value seems to hint at some problem with the numerics. $\endgroup$
    – cardinal
    Commented Jun 23, 2011 at 13:14

1 Answer 1

7
$\begingroup$

You have a very large data set (looks like over a million cases). With N this large, even the tiniest variation from normality will be highly significant. The key here is the QQ plot. It shows, as Nick pointed out, that your data are truncated. Why is this the case?

(added) I tried this:

library(nortest)
x <- rnorm(1000000)
ad.test(x)

and the p value was 0.03! But the qqnorm was very close to a straight line. I will trust my eyes over the test.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.