I have a fairly basic understanding of stats, but I generated a table for my PI with tests of significance (Fisher & Mann-Whitney-U) for categorical and continuous variables across 6 different subject groups. The first row of my table is the N (and % of total) in each group (range 20-1000). My PI is asking me for a test of significance associated with this row. It seems to me that there is no test of significance for the number of subjects in each group, because these are observed counts rather than an estimated mean, right? I suppose I could do a z test for proportions and compare [each group N]/[total N] to the Ho: Po = 1/6, to test whether the proportion of subjects in each group is equal to the expected proportion if there was a random chance of assignment to each group, but then I'd end up with a p value for each group.

This doesn't seem like a very coherent request of his, but I'm not sure how exactly to articulate why you wouldn't test for differences in the observed number of subjects in each group.


1 Answer 1


Robert, it seems to me that your PI is asking you to do a Pearson's Goodness of Fit test where the parameters are assumed to be known. You assume that each of the groups would have an equal number of expected counts. You then compare this expectation to the observed counts, and calculate a Pearson's d statistic as:

enter image description here where the Xi's are the observed counts and the Yi's are expected counts.

The D statistic is approximately chi-square distributed with t-1 degrees of freedom. Calculate the value of the observed statistic and compare it with its critical value, using a significance level and t-1 degrees of freedom, and see if you reject the null hypothesis or not. For the approximation by the chi-square distribution to be good, you'll want to make sure that no group has fewer than 5 counts.


  • $\begingroup$ Awesome, thanks for the great explanation! This sounds like exactly what I needed (and easy to calculate as well). $\endgroup$
    – Robert
    Commented Apr 10, 2020 at 1:46
  • $\begingroup$ You're welcome! Glad I could help. $\endgroup$ Commented Apr 10, 2020 at 1:48

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.