MaizePrepSTATS 250
Exam 3 · Lec 22

Chi-square inference

Compare observed and expected counts to test population independence.

25 minDraft

Key ideas

Independence null

The population conditional distribution of one categorical variable is the same across categories of the other. The alternative is some association.

Expected counts

Counts implied by independence and the observed marginal totals, calculated separately for every cell.

Cell contribution

Squared observed-minus-expected difference divided by expected count. All contributions are nonnegative, and their sum is the chi-square statistic.

Course count condition

The lecture summary requires at least 80% of expected counts to exceed 5 and none below 1. Use independent observations from a suitable random sample; repeated records of the same person are not independent cases.

Formulas

Expected count
Eij=ni+n+jnE_{ij}=\frac{n_{i+}n_{+j}}{n}
Use counts, not rounded percentages.
Statistic and degrees of freedom
χ2=∑(O−E)2E,df=(r−1)(c−1)\chi^2=\sum\frac{(O-E)^2}{E},\qquad df=(r-1)(c-1)
Large values support association; p is the right-tail area.

Which procedure?

Both variables categorical and population association is the target
Chi-square test of independence, if design and expected-count conditions hold.
Expected counts fail the course guideline
Do not rely on the usual chi-square approximation; seek an appropriate alternative procedure.
Worked example

Newsletter format and renewal

A random sample of 100 subscribers is classified by newsletter format and renewal. Interpret the Pearson test without a continuity correction. This is an original example with composed R output.

tab <- matrix(c(30, 20, 20, 30), nrow = 2, byrow = TRUE)
# rows: Print, Digital; columns: Renew, Do not renew
chisq.test(tab, correct = FALSE)

        Pearson's Chi-squared test

data:  tab
X-squared = 4, df = 1, p-value = 0.0455
# Expected counts: 25 in each cell
  1. Each expected count is (50×50)/100 = 25, so the count condition holds.

  2. Each cell contributes (5 squared)/25 = 1, totaling 4.

  3. p = 0.0455 gives strong evidence of a population association.

  4. Renewal is 30/50 = 60% for Print and 20/50 = 40% for Digital in the sample. These proportions describe the direction; chi-square itself has no sign.

Answer

There is strong evidence of an association between newsletter format and renewal in the subscriber population. The observational design does not establish a causal format effect.

Three-question check

1
Lec 22

For a 3-by-4 table, chi-square df is:

2
Lec 22

A cell has row total 40, column total 30, and n = 120. Its expected count is:

3
Lec 22

Which count condition matches the course summary?

MaizePrep is an independent study resource. It is not affiliated with, sponsored by, or endorsed by the University of Michigan. Course names and numbers are used only to describe which class the material covers. Every practice question is original, written in the style of the course.