= Binomial goodness-of-fit with an estimated parameter
{title2=$\widehat\theta=\frac{\sum_jjO_j}{mN}$}
For $N$ independent groups each containing $m$ independent <Bernoulli trials> with common probability $\theta$, the group count has a <binomial distribution>. If $O_j$ groups have count $j$, the <maximum-likelihood estimate> is $\widehat\theta=\sum_jjO_j/(mN)$. Form the <Pearson chi-squared statistic> using $E_j=N\binom mj\widehat\theta^j(1-\widehat\theta)^{m-j}$. With all $m+1$ categories retained, an interior true parameter, and sufficiently large expected counts, its null limit is a <chi-squared distribution> with $m-1$ <statistical degrees of freedom>: one degree is removed by the fixed total and another by fitting $\theta$. Small expected counts require care with this approximation. If categories are pooled, the fitted parameter and calibration should correspond to the pooled statistical model; simply pooling a statistic after fitting the unpooled model does not automatically give the usual chi-squared limit.
Back to article page