2
$\begingroup$

I have been trying to establish whether I could model my data, a set of 90 observations, using the normal distribution. I have tried the Shapiro-Wilk and the Anderson-Darling tests but each came back with a different result.

Anderson-Darling normality test

data: x A = 0.6994, p-value = 0.06555

Shapiro-Wilk normality test

data: x W = 0.9645, p-value = 0.0154

If we are to use the strong 1% significance level, the null of normality cannot be rejected in either case. Using the 5% size, however, we see that the SW test rejects the null while the AD one narrowly accepts it.

The results are conflicting and I do not know on which to place my trust. If I knew the power of each test, I could make up my mind so is there perhaps a way to obtain the power functions in R? The Normal distribution is easy to work with and it would make sense in my case seeing that my observations are test scores but I do not want to make farfetched assumptions.

I also have to say that personally, I am not convinced that the underlying distribution is normal. Please take a look at the histogram below, upon which I have fitted a normal distribution with the same mean and standard deviation.

enter image description here

It does not seem to be a good match. Below is the normal qq plot:

enter image description here

There is a hint of linearity but there are also a lot of outliers. As far as I know, the Shapiro-Wilk test is based on order statistics and it does not support the normality hypothesis.

If we were to reject the normality of my data, then what would be an acceptable distribution here? Note that we are looking for a negatively skewed one.

All suggestions are welcome. Thank you.

EDIT: This is my vector of observations in ascending order, i.e. the 89 order statistics, in case anyone wants to test it further:

sort(x)

19 32 37 37 37 42 42 45 45 45 46 46 46 47 47 48 48 50 51 54 55 55 55 55 55 55 55 56 56 56 56 57 57 58 58 58 60 60 60 60 61 61 62 62 62 62 62 62 62 62 62 62 63 63 63 65 65 65 66 66 67 67 67 67 68 68 68 68 70 70 71 71 71 72 72 75 75 76 76 77 77 77 77 77 78 78 78 80 81

$\endgroup$
13
  • 1
    $\begingroup$ @PeterFlom It is test scores, so discrete values. I have posted the normal qq plot as well. Feel free to take a look. Thank you. $\endgroup$
    – JohnK
    Commented Jan 7, 2014 at 11:48
  • 2
    $\begingroup$ OK, then if the values are discrete (and not very numerous, e.g. 50, 60, 70 etc) then you may want to look at some discrete distributions. If the values range from 50 to 100 with many levels (e.g. 50, 62, 64, 71 etc) then a continuous distribution may be fine. I don't know of one that will fit better than the normal, but other people here may. $\endgroup$
    – Peter Flom
    Commented Jan 7, 2014 at 12:15
  • 2
    $\begingroup$ John, in that case you are asking perhaps the most extensively discussed question on our site. A search on normality+test turns up several thousand posts! The top hits look relevant. If you sort by votes, you will quickly find this thread: stats.stackexchange.com/questions/2492, which I recommend. To narrow the search include "Kolmogorov" and/or "Shapiro" among the keywords. To broaden it, perform analogous Google searches (which may turn up comments: much of this discussion has occurred in comments). $\endgroup$
    – whuber
    Commented Jan 7, 2014 at 15:29
  • 3
    $\begingroup$ There are loads of procedures to fit distributions to data, because different problems and situations require different versions of "best" when it comes to fitting. The right version to employ depends on your ultimate purpose, which brings us right back to my original question: why are you doing this? $\endgroup$
    – whuber
    Commented Jan 7, 2014 at 15:49
  • 4
    $\begingroup$ A great review of goodness-of-fit tests was published in 1974 by M. A. Stephens in JASA, EDF statistics for goodness of fit and some comparisons. It is still well worth reading as an introduction to the subject, for its survey of effective tests, and for its power studies. $\endgroup$
    – whuber
    Commented Jan 7, 2014 at 16:10

2 Answers 2

5
$\begingroup$

You may want to take a look at this question: Is normality testing 'essentially useless'? Answers discuss the Shapiro-Wilk test, particularly the accepted answer, which includes a simulation test.

Your problem may be different than most if you're not concerned with the distribution for the sake of meeting another planned analysis' assumptions though. Fitting a normal distribution to your data may only prompt you to ignore its peculiarities if they're small enough. If there isn't another analysis you need to perform that assumes normality, rather than trying to fit a known distribution to yours, you might consider describing your distribution in terms of its skewness and kurtosis, and add confidence intervals if you like (but consider relevant precautions in doing so).

$\endgroup$
0
$\begingroup$

The fly in the ointment seems to be that the data is in integer format suggesting a discrete distribution rather than a continuous one. Ignoring that problem and using the FindDistribution routine in Mathematica, it would seem that the best three single distributions (i.e., baring mixture distributions) from the set of possible continuous distributions for TargetFunctions consisting of BetaDistribution, CauchyDistribution, ChiDistribution, ChiSquareDistribution, ExponentialDistribution, ExtremeValueDistribution, FrechetDistribution, GammaDistribution, GumbelDistribution, HalfNormalDistribution, InverseGaussianDistribution, LaplaceDistribution, LevyDistribution, LogisticDistribution, LogNormalDistribution, MaxwellDistribution, NormalDistribution, ParetoDistribution, RayleighDistribution, StudentTDistribution, UniformDistribution, WeibullDistribution, HistogramDistribution are:

                                     PearsonChiSquare   CramerVonMises   BIC     AIC      HQIC      LogLikelihood   ComplexityError Internal    Score
NormalDistribution[60.1584,12.8297]  0.006103           0.4287          -7.877   -7.864   -7.885    -3.909          2.,3.909        -7.893      -7.893
WeibullDistribution[5.70531,65.0624] 0.3212             0.7483          -7.818   -7.805   -7.826    -3.879          2.,3.879        -7.899      -7.899
LogisticDistribution[60.952,7.12212] 0.2039             0.7964          -7.872   -7.859   -7.88     -3.906          2.,3.906        -7.969      -7.969

One of the problems of using continuous distributions to emulate integers is that the test statistics evaluate to exact numbers such that the integers have to be floated to calculate answers. In this case, for the normal distribution fit:

                    Statistic   P-Value
Anderson-Darling    0.699211    0.0664431
Baringhaus-Henze    0.418751    0.246541
Cramér-von Mises    0.105401    0.0939213
Jarque-Bera ALM     7.82865     0.0432369
Mardia Combined     7.82865     0.0432369
Mardia Kurtosis     1.00984     0.312573
Mardia Skewness     5.88896     0.0152361
Pearson Chi^2       20.4045     0.0256508
Shapiro-Wilk        0.964452    0.0153961

You would get entirely different answers if the search were restricted to discrete distributions, so, what's the case here?

$\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.