0
$\begingroup$

I have a data set of continuous data. From 1000 observations, the resulting dataset is only 29 rows and two columns: the range (starting point) and the count.

Pearson - Weldon crabs dataset

range count
0.5835 1
0.5875 3
0.5915 5
0.5955 2
0.5995 7
0.6035 10
0.6075 13
0.6115 19
0.6155 20
0.6195 25
0.6235 40
0.6275 31
0.6315 60
0.6355 62
0.6395 54
0.6435 74
0.6475 84
0.6515 86
0.6555 96
0.6595 85
0.6635 75
0.6675 47
0.6715 43
0.6755 24
0.6795 19
0.6835 9
0.6875 5
0.6915 0
0.6955 1

tot count = 1000 rows = 30

What test is best appropriate?

  • Pearson Chi-Square
  • Shapiro-Wilk
$\endgroup$
13
  • 2
    $\begingroup$ Shapiro-Wilk does not apply--and if you do apply it, it will tell you definitively the data are non-Normal, almost no matter what the counts are. Instead, as described at stats.stackexchange.com/a/17148/919, estimate the Normal parameters using Maximum Likelihood and apply the standard chi-squared test. BTW, if these are real data, you can see already (even without knowing what is in the remaining 24 rows) that they are non-Normal! $\endgroup$
    – whuber
    Commented Jun 23, 2022 at 20:25
  • $\begingroup$ thanks. So I cannot apply shapiro ? Even if I add a uniform jitter in every interval to simulate number approssimations ? (no the numbers are just garbage that I typed for example) $\endgroup$
    – frhack
    Commented Jun 23, 2022 at 20:29
  • 1
    $\begingroup$ Adding the jitter will affect the result of Shapiro-Wilk, making its results impossible to interpret. $\endgroup$
    – whuber
    Commented Jun 23, 2022 at 20:35
  • $\begingroup$ @whuber ok tanks, can I use your code here? Is it appropriate ? stats.stackexchange.com/questions/34882/… $\endgroup$
    – frhack
    Commented Jun 23, 2022 at 20:42
  • 1
    $\begingroup$ You need to use nlm instead of optim because there are two parameters to estimate. You also need to take care with any low-count bins: they can screw up the chi-squared approximation. Handle this by using chisq.test with its simulate.p.value option to perform this test once you have obtained the MLE and used that to compute the estimated bin counts. $\endgroup$
    – whuber
    Commented Jun 23, 2022 at 20:57

0

Your Answer

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

Browse other questions tagged or ask your own question.