Testing Binomial Models Using Chi-Square Goodness-of-Fit

Apply the chi-square goodness-of-fit procedure to test whether observed count data are consistent with a binomial distribution, both when the success probability pp is specified and when it must be estimated from the data.

Step 1 of 157%

Tutorial

Binomial Goodness-of-Fit: Setup and Expected Counts

Suppose we repeat an experiment NN times, where each repetition consists of nn independent Bernoulli sub-trials and we record the total number of successes. We want to test whether that count follows a binomial distribution Bin(n,p)\text{Bin}(n,p).

For each value i=0,1,,n,i = 0, 1, \ldots, n, let OiO_i denote the observed number of repetitions yielding exactly ii successes. Under H0 ⁣:XBin(n,p),H_0\!: X \sim \text{Bin}(n,p), the expected count in category ii is

Ei=NP(X=i)=N(ni)pi(1p)ni.E_i = N \cdot P(X = i) = N \binom{n}{i} p^i (1-p)^{n-i}.

For example, with n=2,n=2, p=0.5,p=0.5, and N=40,N=40,

E0=40(0.5)2=10,E1=402(0.5)(0.5)=20,E2=40(0.5)2=10.\begin{align*} E_0 &= 40 \cdot (0.5)^2 = 10, \\ E_1 &= 40 \cdot 2(0.5)(0.5) = 20, \\ E_2 &= 40 \cdot (0.5)^2 = 10. \end{align*}

The expected counts always sum to N,N, since the binomial probabilities sum to 1.1.

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle