A tag such as (C2 + C3) after a title names the Core Concepts parts the problem draws on, so
you know where to look back.
Was Berkeley biased against women? In autumn 1973, 4,526 people applied to the six largest graduate departments of the University of California, Berkeley. The university’s own records (which classify applicants as men and women) show that 44.5% of the men were admitted, but only 30.4% of the women.
Admitted
Refused
Applied
Admitted (%)
Men
1,198
1,493
2,691
44.5%
Women
557
1,278
1,835
30.4%
Total
1,755
2,771
4,526
38.8%
The counts are the published totals from Bickel, Hammel and O’Connell’s study in Science (1975). Before you learn any method, make a prediction. Nothing is scored.
Predict first · not scored
Is this gap evidence that the university was biased against women?
The gap is 14 percentage points. Whether it says anything about the university depends on three questions this lesson answers one at a time. Could a gap this size arise by chance (C7)? How strong is the link (C9)? And what happens when you look inside the departments, where the admission decisions were actually made (C10)?
The tool is the chi-square test of independence. It compares the counts you observed with the counts you would expect if the two variables had nothing to do with each other, and asks whether the difference is too large to be chance.
After this lesson, you will be able to:
Read a two-way table by comparing row percentages, and build the table of expected counts a no-link world would produce.
Compute the chi-square statistic and its degrees of freedom, and decide with the chi-square table at a stated significance level.
Check that every expected count is at least 5, and say what to do when one is not.
Measure the strength of a link with Cramér’s V, and explain why a significant result need not be a strong one.
State a conclusion as association, not causation, unless the study design supports more.
Choose between a chi-square test and correlation or regression from the types of the two variables.
Section 2: Prerequisites
▾
A tag such as (C2 + C3) after a title names the Core Concepts parts the problem draws on, so
you know where to look back.
What you need coming in, and why it matters today:
Variable types (L-DS-1): a categorical variable places each person in a group; a quantitative one measures an amount. Numbers that only label a group (a postal code, a jersey number) are categorical. Today both variables are categorical.
Independent events (L-PR-2): and are independent when . That one rule builds today’s expected counts.
The five-step test (L-INF-5): hypotheses, conditions, test statistic, p-value or critical value, conclusion in context. Every test today follows it.
The decision rule (L-INF-5, L-INF-6): reject when . Failing to reject is not accepting: a large p-value means “not enough evidence”, never “no effect”.
Quick check: can you recall these?
A survey asks each student whether they smoke () and whether they exercise weekly (). If smoking and exercise were independent, which statement would hold?
A survey records each respondent’s postal code (for example, H2X 1Y4) to study shopping habits by area. What kind of variable is the postal code?
A researcher has 40 students’ daily screen time: h and h. She tests whether the mean differs from a benchmark of 6.5 h, with no direction in mind. Which hypotheses are correct?
Bridge to today: In L-INF-5 and L-INF-6, named one number (a mean or a proportion ), and the test could look in either tail. Today is a claim about a whole table: “the two variables are independent”. The statistic adds up squared gaps between observed and expected counts, so it can only be large, and the test is always right-tailed.
Section 3: Core Concepts
▾
A tag such as (C2 + C3) after a title names the Core Concepts parts the problem draws on, so
you know where to look back.
Eleven concepts, in four groups:
C1–C2: what “no link” looks like in a table, and the expected counts it predicts.
C3–C5: the statistic , its degrees of freedom, and when the test may run.
C6–C8: the five steps, the decision, and how to word the conclusion (Berkeley, part 1).
C9–C11: strength (Berkeley, part 2), association versus cause (Berkeley, part 3), and when to use a χ² test rather than correlation.
C1 — Reading a Two-Way Table
A contingency table (also called a two-way table) counts how a sample splits on two categorical variables at once. Rows are the groups of one variable, columns the groups of the other, and each cell holds an observed count.
Contingency Table
A table with rows and columns whose cells hold observed counts. The row totals, column totals and grand total are its margins.
Two variables are independent (not linked) when knowing a person’s row tells you nothing about their column. In a table, that means every row splits in the same proportions.
Colour key for this lesson’s figures: a dashed black line is always a reference to compare with (the split a no-link world would show, or a critical value); orange is always evidence against “no link” (a cell’s contribution to , or a p-value area). In the Berkeley figures, blue is men and green is women.
Try it before the figure. Both tables below cross-classify adults by whether they own a car and whether they have a pet. Which table shows no link?
Predict first · not scored
Table P
Has a pet
No pet
Car owner
24
56
No car
36
84
Table Q
Has a pet
No pet
Car owner
40
40
No car
60
40
Which table shows no link between owning a car and having a pet?
Figure 1: Each bar is one row of the table, as wide as its share of the sample and split
by where that row's people fall. The dashed lines show how the whole sample splits. With no
link, every bar splits at the dashed lines, whatever the counts.
Table P is the one with no link. Its counts are very unequal (84 against 24), but 30% of car owners and 30% of non-owners have a pet: the rows split the same way, so the tiles line up with the dashed line. Table Q looks even, yet 50% of one row and 60% of the other have a pet. Reading a table means comparing row percentages, not looking for equal cells.
“No link” does not mean “equal counts”. A table can have very unequal cells and no link at all, as long as every row splits in the same proportions. Under independence the expected counts follow the margins, and margins are rarely equal.
C2 — Expected Counts: The No-Link Table
If the two variables were independent, the chance that a person lands in row and column would be the product of the two separate chances, as in L-PR-2: . Estimate each chance by its share of the sample and multiply by :
Expected Count
The count a cell would hold if the two variables were independent, given the table’s margins:
Mini-example (Berkeley): 2,691 men applied and 1,755 people were admitted, out of 4,526.
If sex and admission were unrelated, about 1,043 men would have been admitted. The records show 1,198.
In the figure, the whole sample is a square. The column shares cut it one way and the row shares the other, so each rectangle’s area is a product of two shares, which is exactly the expected count. Before you click: in the “Unequal rows” preset, which cell has the largest expected count, and why?
Figure 2: Each rectangle's area is its expected count if the two variables were
unrelated: the row share times the column share times n, the product rule for independent events
from L-PR-2. Two perpendicular cuts multiply; they can never add. Select a cell to see its
product, and show the observed counts to see where the real table departs from the no-link
table.
The largest expected count sits where the largest row meets the largest column: area is row share times column share. Check your work: the expected counts in each row add up to that row’s total, and each column to its column total.
C3 — The Chi-Square Statistic
Chi-Square Test Statistic
Each cell adds its squared gap from the no-link table, scaled by what that cell expected. , and only when every equals its .
Dividing by matters: a gap of 10 is large in a cell that expected 20 and small in a cell that expected 1,000. A large means the table is far from what no link would produce.
Two slips in the formula: forgetting to square, (the positive and negative gaps then cancel), and dividing by the observed count, . The denominator is : the reference is the no-link table.
Beyond the rule: for tables some software applies Yates’ continuity correction, which subtracts 0.5 from each before squaring and gives a slightly smaller . This lesson uses the uncorrected formula, so a calculator may differ a little on a table.
The heatmap breaks into its cells and stacks them against the critical value. Before you open it: in the 3×3 preset, which cell do you think contributes most to ? Then look at the Berkeley preset.
Table
Selected
Decision
Figure 3: The darker a cell, the more it adds to χ², (O − E)²/E. The bar on the right
stacks the cells; when it passes the dashed critical value (α = 0.05), the test rejects. Select
a cell to see its share. A large count whose O is close to its E adds almost nothing. Berkeley's
counts are the published 1973 totals (Bickel, Hammel & O'Connell, 1975).
In the 3×3 preset the four corners carry the association; the centre cell, where , adds nothing. In the Berkeley table the women-admitted cell alone carries about 36% of : 557 women were admitted where no link predicts about 712.
C4 — Degrees of Freedom
Degrees of Freedom for a Test of Independence
where is the number of rows and the number of columns. A table has , a table , a table .
Where does the formula come from? Try it first: a 2×3 table has its row totals and column totals fixed. How many cells can you fill in freely before the totals force the rest?
Chosen freely
Forced by the totals
A 2 by 3 table with fixed totals: two cells are chosen freely, four are forced
Library
Home
Café
Row total
First year
41free
37free
19= 97 − 41 − 37
97
Upper year
47= 88 − 41
67= 104 − 37
27= 46 − 19
141
Column total
88
104
46
238
2 free choices, everything else forced: df = (2 − 1)(3 − 1) = 2, not n − 1 =
237 and not the 6 cells.
Figure 4: Once the row and column totals are fixed, choose two cells of the first row
and every other cell is forced. The free cells form a block of (r − 1) × (c − 1) cells: that
count is the degrees of freedom. (Survey of 238 students: year of study and main study place.)
Once you choose two cells of the first row, the third is forced by the row total, and the whole second row is forced by the column totals. The free cells form an block, so , not and not the number of cells.
Even Pearson got this wrong. Karl Pearson, who invented the χ² test in 1900, used the wrong degrees of freedom for tables; R. A. Fisher showed in 1922 that the right count is .
C5 — Conditions for the Test
Before computing , check two things:
Independent observations from a random process: a random sample (each person counted once), or random assignment in an experiment.
Every expected count is at least 5. Compute all the values; if any is below 5, the chi-square curve misstates the p-value.
The condition is on the expected counts, not the observed ones. A cell can hold and still be fine if its is at least 5, and a table with every can still fail when a rare category gives some .
When an expected count is below 5, do not run the test as it stands. Either combine categories that genuinely belong together (neighbouring age groups, say), which changes the question, so report it; or use an exact test, such as Fisher’s exact test for a table, which computes the p-value without the chi-square curve.
Beyond the rule: “every ” is the cautious rule this course uses. Cochran’s more permissive guideline allows the test when no is below 1 and at most 20% of the cells have .
C6 — The Five Steps for a Test of Independence
The structure is the one from L-INF-5:
Step
Action
1
: the two variables are independent in the population. : they are not independent. Choose before looking at the data.
2
Check the conditions: a random process, and every expected count at least 5.
3
Compute and .
4
Compare with the critical value , or find the right-tail p-value.
5
Decide, and state the conclusion in context.
There is no two-sided or left-sided version: only a large is evidence against independence.
C7 — Critical Values and p-Values
The chi-square table gives the critical value , which cuts off a right-tail area of :
Chi-Square Distribution Table
Critical values (χ²) for given degrees of freedom (df) and upper tail probability (p).
Chi-Square Distribution Table
df \ p
0.995
0.99
0.975
0.95
0.90
0.10
0.05
0.025
0.01
0.005
1
0.000
0.000
0.001
0.004
0.016
2.706
3.841
5.024
6.635
7.879
2
0.010
0.020
0.051
0.103
0.211
4.605
5.991
7.378
9.210
10.597
3
0.072
0.115
0.216
0.352
0.584
6.251
7.815
9.348
11.345
12.838
4
0.207
0.297
0.484
0.711
1.064
7.779
9.488
11.143
13.277
14.860
5
0.412
0.554
0.831
1.145
1.610
9.236
11.070
12.833
15.086
16.750
6
0.676
0.872
1.237
1.635
2.204
10.645
12.592
14.449
16.812
18.548
7
0.989
1.239
1.690
2.167
2.833
12.017
14.067
16.013
18.475
20.278
8
1.344
1.646
2.180
2.733
3.490
13.362
15.507
17.535
20.090
21.955
9
1.735
2.088
2.700
3.325
4.168
14.684
16.919
19.023
21.666
23.589
10
2.156
2.558
3.247
3.940
4.865
15.987
18.307
20.483
23.209
25.188
11
2.603
3.053
3.816
4.575
5.578
17.275
19.675
21.920
24.725
26.757
12
3.074
3.571
4.404
5.226
6.304
18.549
21.026
23.337
26.217
28.300
13
3.565
4.107
5.009
5.892
7.042
19.812
22.362
24.736
27.688
29.819
14
4.075
4.660
5.629
6.571
7.790
21.064
23.685
26.119
29.141
31.319
15
4.601
5.229
6.262
7.261
8.547
22.307
24.996
27.488
30.578
32.801
16
5.142
5.812
6.908
7.962
9.312
23.542
26.296
28.845
32.000
34.267
17
5.697
6.408
7.564
8.672
10.085
24.769
27.587
30.191
33.409
35.718
18
6.265
7.015
8.231
9.390
10.865
25.989
28.869
31.526
34.805
37.156
19
6.844
7.633
8.907
10.117
11.651
27.204
30.144
32.852
36.191
38.582
20
7.434
8.260
9.591
10.851
12.443
28.412
31.410
34.170
37.566
39.997
21
8.034
8.897
10.283
11.591
13.240
29.615
32.671
35.479
38.932
41.401
22
8.643
9.542
10.982
12.338
14.041
30.813
33.924
36.781
40.289
42.796
23
9.260
10.196
11.689
13.091
14.848
32.007
35.172
38.076
41.638
44.181
24
9.886
10.856
12.401
13.848
15.659
33.196
36.415
39.364
42.980
45.559
25
10.520
11.524
13.120
14.611
16.473
34.382
37.652
40.646
44.314
46.928
26
11.160
12.198
13.844
15.379
17.292
35.563
38.885
41.923
45.642
48.290
27
11.808
12.879
14.573
16.151
18.114
36.741
40.113
43.195
46.963
49.645
28
12.461
13.565
15.308
16.928
18.939
37.916
41.337
44.461
48.278
50.993
29
13.121
14.256
16.047
17.708
19.768
39.087
42.557
45.722
49.588
52.336
30
13.787
14.953
16.791
18.493
20.599
40.256
43.773
46.979
50.892
53.672
40
20.707
22.164
24.433
26.509
29.051
51.805
55.758
59.342
63.691
66.766
50
27.991
29.707
32.357
34.764
37.689
63.167
67.505
71.420
76.154
79.490
60
35.534
37.485
40.482
43.188
46.459
74.397
79.082
83.298
88.379
91.952
70
43.275
45.442
48.758
51.739
55.329
85.527
90.531
95.023
100.425
104.215
80
51.172
53.540
57.153
60.391
64.278
96.578
101.879
106.629
112.329
116.321
90
59.196
61.754
65.647
69.126
73.291
107.565
113.145
118.136
124.116
128.299
100
67.328
70.065
74.222
77.929
82.358
118.498
124.342
129.561
135.807
140.169
Decision rule: reject when , which is the same as . Otherwise, fail to reject. At the critical values for to 4 are about 3.841, 5.991, 7.815 and 9.488.
Predict before the figure: as goes from 1 to 4, does the critical value rise or fall? Then press the Berkeley button.
Critical value
p-value
Decision
Figure 5: The chi-square curve for the chosen degrees of freedom. The dashed line is the
critical value at α = 0.05; the orange area beyond the observed statistic is its p-value. The
curve lives only on positive values and the test uses only the right tail. Berkeley's χ² ≈ 92.2
lies far beyond the edge of the axis.
The critical value rises with : a bigger table has more cells, so it piles up more by chance, and more is needed to call a pattern unusual.
Berkeley, part 1. The pooled table is , so and the critical value is 3.841. Its statistic is , so far into the tail that the curve cannot show it: . Chance cannot explain a gap like this. That settles one question, and only one.
C8 — Wording the Conclusion
A conclusion has four parts: the decision, how strong the evidence is, the two variables in context, and what the design allows.
A conclusion, built part by part (Berkeley, pooled):
” is above the critical value 3.841, so we reject . There is enough evidence of an association between applicant sex and admission in these records. Because these are observational records, the association does not by itself show why the rates differ.”
If had been below the critical value: “we fail to reject ; there is not enough evidence of an association”, never “the variables are independent”.
After failing to reject, do not write “the variables are independent”. The data are compatible with independence, but a weak link in a small sample can easily go undetected. Write “not enough evidence of an association”.
After rejecting, do not write “one variable causes the other” unless the study randomly assigned one of them. A chi-square test detects association; in an observational study a lurking variable, or causation running the other way, can produce the same table.
C9 — Cramér’s V: How Strong?
A tiny p-value says the link is unlikely to be chance. It does not say the link is strong: with a large sample, even a weak link gives a huge . Cramér’s V measures strength on a scale from 0 to 1, whatever the sample size.
Cramér's V
Strength
Negligible
Small
Medium
Large
For any table with two rows or two columns, and . These bands (Cohen’s guidelines) are approximate, and are meant for ; for larger tables they shift down (Challenge 2).
Do not forget the square root. alone is not V, and it understates the strength.
Predict first: a survey of 200 people gives and . If the survey were doubled to 400 people with the same percentages, what happens to ? To ?
Figure 6: The percentages in the table are held fixed; only the sample size changes. Top:
χ² (the evidence) grows in proportion to n and crosses the critical value. Bottom, on its own
axis: Cramér's V (the strength) does not move. A significant result can mean a strong link, or
just a large sample.
Doubling doubles but leaves where it was: grows with the sample, while describes the table’s shape. With a negligible link (48% against 52%), crosses the critical value at about : “significant” then only means “the sample was large”.
Berkeley, part 2.: a real but small association. The enormous came from the large number of applicants, not from a strong link.
C10 — Association Is Not Causation
A significant says the two variables are associated in the population, if the conditions hold. It does not say which one, if either, causes the other. Three explanations can produce the same table:
Cause: one variable affects the other. Only a randomized experiment can show this directly.
A lurking variable: a third variable affects both. Hot weather raises both ice-cream sales and the number of swimmers.
Reverse causation: the “effect” drives the “cause”. Students who are already struggling sign up for tutoring, so tutoring and failing go together.
A lurking variable can even reverse a pattern when groups are pooled. This is Simpson’s paradox, and it is what happened at Berkeley. Decide before you look: in which of the six departments do you expect the biggest gap against women?
MenWomenDot area: number of applicants
Berkeley 1973 admission rates by department (published totals)
Group
Men applied
Men admitted
Women applied
Women admitted
Chi-square (df = 1)
All six
2691
44.5%
1835
30.4%
92.21
Dept A
825
62.1%
108
82.4%
17.25
Dept B
560
63.0%
25
68.0%
0.25
Dept C
325
36.9%
593
34.1%
0.75
Dept D
417
33.1%
375
34.9%
0.30
Dept E
191
27.7%
393
23.9%
1.00
Dept F
373
5.9%
341
7.0%
0.38
Share of applications to departments A and B: 51.5% of men, 7.2% of women.
Figure 7: Admission rates of men and women at Berkeley in 1973, pooled over the six
largest departments and inside each one. Dot area shows how many applied. Inside the departments
the pooled gap vanishes or reverses: most women applied to departments that admitted few
applicants of either sex. Data: published totals from Bickel, Hammel & O'Connell (1975),
Science 187, 398–404 (R's UCBAdmissions).
Berkeley, part 3. Inside the departments the gap disappears. Women’s admission rates were higher than men’s in four of the six departments. Only Department A shows a significant difference (,), and it favours women: 82% against 62%. The pooled gap comes from where people applied: 51.5% of the men but only 7.2% of the women applied to Departments A and B, which admitted most of their applicants, while most women applied to departments that admitted few applicants of either sex. Department was a lurking variable. The study found no evidence of bias against women in departments’ decisions (if anything, a small difference in their favour); it raised a different question, about why women applied where they did.
C11 — Chi-Square or Correlation? Choosing the Analysis
A χ² test needs two categorical variables. Correlation and regression (L-REG-1 to L-REG-3) need two quantitative ones. So the first question is about the variables, not the method. Try it before the figure: a survey records each customer’s postal code and the grocery chain they prefer. Which analysis fits, and why?
Bold border: this lesson's boxes
Gold bar, “new”: a question no earlier lesson asked
⓪ One variable or two? newhow many does the question link?
one variable →go to ①
two variables →ask what type each one is
For two variables What type is each variable? newa postal code is a category, not a number
both categorical →χ² test of independence, both categorical · L-REG-4
both quantitative →r and regression, both quantitative · L-REG-1 to L-REG-3
one of each →Not this module: one of each kind
① Estimate or test a claim? is there a claimed value to test?
estimate →Interval (L-INF-2 to L-INF-4), no H₀, SE from the data
test a claim →go to ②
② Mean or proportion? measured amount vs. yes/no count
mean μ →go to ③ for a mean
proportion p →go to ③ for a proportion
For a mean ③ Is σ known? not “is n small?”
σ known →z-test for μ, SE = σ/√n
s only →t-test for μ, SE = s/√n, df = n − 1
either test →then ④
For a proportion ③ np₀ ≥ 10 and n(1 − p₀) ≥ 10? counts from the claim p₀, not p̂
yes →z-test for p, SE = √(p₀(1 − p₀)/n)
no →Stop: too few expected counts
Both mean tests ④ Shape OK for this n? look for strong skew or outliers when n is small
OK →run the test
not OK →Stop: collect more data or use another method
Figure 8:
Which procedure? Start at ⓪: how many variables does the question link? One variable
leads to the four questions of L-INF-3 to L-INF-6; two variables lead to their types. A
number that only labels a group, such as a postal code, is a category. A stop means the
methods of this course do not apply as they stand.
Both are categorical: the postal code names an area, so a χ² test of independence fits. A number in the data is not enough to make a variable quantitative; ask whether its arithmetic means anything.
Section 4: Worked Examples
▾
A tag such as (C2 + C3) after a title names the Core Concepts parts the problem draws on, so
you know where to look back.
Example 1 — Fully Worked: Smoking and Exercise (2×2)
A health researcher draws a simple random sample of 100 adults and asks whether smoking status and exercise are independent, at .
Exercises
Does not exercise
Row total
Smoker
15
35
50
Non-smoker
25
25
50
Column total
40
60
100
I notice the column totals are unequal (40 against 60), so the expected counts will differ by column even though the rows are the same size. Comparing rows: 30% of smokers exercise against 50% of non-smokers.
Step 1 — Hypotheses:
: smoking status and exercise are independent in the population.
: they are not independent.
Step 2 — Conditions and expected counts:
The non-smoker row has the same totals, so its expected counts are also 20 and 30. The sample is random and every .
Step 3 — Statistic and degrees of freedom:
.
Step 4 — Critical value:, and ().
Step 5 — Conclusion: We reject . There is enough evidence at the 0.05 level of an association between smoking and exercise in this population. The data come from a survey, so they do not show that smoking causes people to exercise less.
Strength:
A small association.
Example 2 — Commuting by Age (2×3, Unequal Totals)
A city surveys a random sample of 260 commuters about their main way to work. Test at whether age group and travel mode are associated.
Car
Transit
Bike or walk
Row total
Under 35
52
61
27
140
35 and over
74
38
8
120
Column total
126
99
35
260
Compute every expected count, check the condition, then find , and the decision. Every total is different, so every cell needs its own expected count.
Pause and write. Record your answer and reasoning on paper or in your notes before continuing. Even if you are unsure, committing your thinking helps you see what you understood and what you need to revisit.
Show Solution
Expected counts, , to two decimals:
Car
Transit
Bike or walk
Under 35
67.85
53.31
18.85
35 and over
58.15
45.69
16.15
For example, . The smallest is , and the sample is random: the test may run.
Contributions, to three decimals:
Car
Transit
Bike or walk
Under 35
3.701
1.110
3.528
35 and over
4.318
1.295
4.116
Adding the unrounded contributions gives (the rounded ones add to 18.068; either is fine). , and .
Since , we reject (). There is enough evidence of an association between age group and main way to work. The biggest contributions are in the car and bike columns: younger commuters bike or walk more and drive less than no link would predict. This is a survey, so it shows association, not that age causes the choice.
: a small association.
Example 3 — Cramér’s V from a Reported Result
A report gives for a table with . Compute and classify it.
Pause and write. Record your answer and reasoning on paper or in your notes before continuing. Even if you are unsure, committing your thinking helps you see what you understood and what you need to revisit.
Show Solution
This falls in the medium band ().
Example 4 — Find the Error: A Test That Should Not Have Run
A researcher reports the following analysis of a random sample of 50 people.
Outcome A
Outcome B
Row total
Group 1
3
2
5
Group 2
27
18
45
Column total
30
20
50
” with , so . We fail to reject : the variables are independent.”
Identify both errors.
Pause and write. Record your answer and reasoning on paper or in your notes before continuing. Even if you are unsure, committing your thinking helps you see what you understood and what you need to revisit.
Show Solution
Error 1 — the test should not have run. and , both below 5. The chi-square approximation is unreliable here: combine categories (if Group 1 can sensibly join another group) or use Fisher’s exact test.
Error 2 — “independent”. Even a valid test that fails to reject only gives “not enough evidence of an association”. With 5 people in Group 1, almost any link would go undetected.
Section 5: Guided Practice
▾
A tag such as (C2 + C3) after a title names the Core Concepts parts the problem draws on, so
you know where to look back.
Each item gives feedback as you go. The tables here have round totals; from Section 6 on they will not.
Problem 1 — Reading a Two-Way Table (C1)
Problem 2 — Fill In the No-Link Table (C2)
Complete the table
Fill in the table a no-link world would produce
Fill in every empty cell, then check the whole table once. The cells depend on one another.
Problem 3 — May the Test Run? How Many Degrees of Freedom? (C4 + C5)
Problem 4 — Reading the Chi-Square Table (C7)
Use the chi-square table for each question.
Chi-Square Distribution Table
Critical values (χ²) for given degrees of freedom (df) and upper tail probability (p).
Chi-Square Distribution Table
df \ p
0.995
0.99
0.975
0.95
0.90
0.10
0.05
0.025
0.01
0.005
1
0.000
0.000
0.001
0.004
0.016
2.706
3.841
5.024
6.635
7.879
2
0.010
0.020
0.051
0.103
0.211
4.605
5.991
7.378
9.210
10.597
3
0.072
0.115
0.216
0.352
0.584
6.251
7.815
9.348
11.345
12.838
4
0.207
0.297
0.484
0.711
1.064
7.779
9.488
11.143
13.277
14.860
5
0.412
0.554
0.831
1.145
1.610
9.236
11.070
12.833
15.086
16.750
6
0.676
0.872
1.237
1.635
2.204
10.645
12.592
14.449
16.812
18.548
7
0.989
1.239
1.690
2.167
2.833
12.017
14.067
16.013
18.475
20.278
8
1.344
1.646
2.180
2.733
3.490
13.362
15.507
17.535
20.090
21.955
9
1.735
2.088
2.700
3.325
4.168
14.684
16.919
19.023
21.666
23.589
10
2.156
2.558
3.247
3.940
4.865
15.987
18.307
20.483
23.209
25.188
11
2.603
3.053
3.816
4.575
5.578
17.275
19.675
21.920
24.725
26.757
12
3.074
3.571
4.404
5.226
6.304
18.549
21.026
23.337
26.217
28.300
13
3.565
4.107
5.009
5.892
7.042
19.812
22.362
24.736
27.688
29.819
14
4.075
4.660
5.629
6.571
7.790
21.064
23.685
26.119
29.141
31.319
15
4.601
5.229
6.262
7.261
8.547
22.307
24.996
27.488
30.578
32.801
16
5.142
5.812
6.908
7.962
9.312
23.542
26.296
28.845
32.000
34.267
17
5.697
6.408
7.564
8.672
10.085
24.769
27.587
30.191
33.409
35.718
18
6.265
7.015
8.231
9.390
10.865
25.989
28.869
31.526
34.805
37.156
19
6.844
7.633
8.907
10.117
11.651
27.204
30.144
32.852
36.191
38.582
20
7.434
8.260
9.591
10.851
12.443
28.412
31.410
34.170
37.566
39.997
21
8.034
8.897
10.283
11.591
13.240
29.615
32.671
35.479
38.932
41.401
22
8.643
9.542
10.982
12.338
14.041
30.813
33.924
36.781
40.289
42.796
23
9.260
10.196
11.689
13.091
14.848
32.007
35.172
38.076
41.638
44.181
24
9.886
10.856
12.401
13.848
15.659
33.196
36.415
39.364
42.980
45.559
25
10.520
11.524
13.120
14.611
16.473
34.382
37.652
40.646
44.314
46.928
26
11.160
12.198
13.844
15.379
17.292
35.563
38.885
41.923
45.642
48.290
27
11.808
12.879
14.573
16.151
18.114
36.741
40.113
43.195
46.963
49.645
28
12.461
13.565
15.308
16.928
18.939
37.916
41.337
44.461
48.278
50.993
29
13.121
14.256
16.047
17.708
19.768
39.087
42.557
45.722
49.588
52.336
30
13.787
14.953
16.791
18.493
20.599
40.256
43.773
46.979
50.892
53.672
40
20.707
22.164
24.433
26.509
29.051
51.805
55.758
59.342
63.691
66.766
50
27.991
29.707
32.357
34.764
37.689
63.167
67.505
71.420
76.154
79.490
60
35.534
37.485
40.482
43.188
46.459
74.397
79.082
83.298
88.379
91.952
70
43.275
45.442
48.758
51.739
55.329
85.527
90.531
95.023
100.425
104.215
80
51.172
53.540
57.153
60.391
64.278
96.578
101.879
106.629
112.329
116.321
90
59.196
61.754
65.647
69.126
73.291
107.565
113.145
118.136
124.116
128.299
100
67.328
70.065
74.222
77.929
82.358
118.498
124.342
129.561
135.807
140.169
(a) What is ?
(b) What is ?
(c) A test gives with . What is the decision at , and at ?
(d) For with , between which two right-tail areas does the p-value lie?
Problem 5 — The Full Five-Step Test
Section 6: Independent Practice
▾
A tag such as (C2 + C3) after a title names the Core Concepts parts the problem draws on, so
you know where to look back.
From here on you work first and get help after. Totals are untidy, so expected counts carry decimals; the significance level changes from problem to problem and is stated before the data; and sometimes the test may not run at all. Steps open if you ask for them.
Problem 1 — Is There a Link? (C2–C7)
Problem 2 — What May the Report Say? (C7 + C8 + C10)
Read how the data were collected: it decides the last blank.
Build the Conclusion
Build the conclusion
Choose a phrase for each blank so that the sentence states the correct conclusion.
Problem 3 — Find the Error (C3–C8)
A second analysis, this time of its conclusion:
Problem 4 — How Strong? (C9)
Problem 5 — Which Analysis Fits? (C11)
Sort into groups
Which analysis does each question call for?
Sort each research question by the analysis it calls for. Classify both variables first: a number that only labels a group is categorical.
Drag an item into its group, or select it and then choose the group. On a keyboard: select an item and press the group’s number (1–3); 0 sends it back to Unsorted. Each item also has its own “move” buttons.
Unsorted Drop here
Every item is sorted.
Problem 6 — Association or Cause? (C10)
Problem 7 — Pooled or Split? (C10)
Problem 8 — Synthesis: Physical Activity and Stress
A wellness director reads the result and says: “The test is significant, so we should require vigorous exercise for every high-stress employee.” Build the reply.
Build the Conclusion
What the result supports
Choose a phrase for each blank so that the sentence states the correct conclusion.
Mixed Review — Retrieval from Earlier Lessons
These problems draw on earlier lessons. Attempting them without re-reading is the point: retrieval strengthens memory more than re-reading does.
Review Problem 1 — z-Test for a Mean (L-INF-5)
Review Problem 2 — Proportion Test (L-INF-6)
Section 7: Mastery Check
▾
A tag such as (C2 + C3) after a title names the Core Concepts parts the problem draws on, so
you know where to look back.
Question 1 — Feynman Test
A colleague says: “We ran a chi-square test and got a highly significant result (). The association between the two variables is therefore very strong.”
In a short paragraph, explain what is wrong with this reasoning and what they should report instead.
Pause and write. Record your answer and reasoning on paper or in your notes before continuing. Even if you are unsure, committing your thinking helps you see what you understood and what you need to revisit.
Compare with a model answer
A small p-value is evidence against independence, assuming the design and conditions are sound. It says nothing about the strength of the association. grows in proportion to the sample size, so with a large sample even a negligible association produces a tiny p-value (Figure 6). The colleague should report Cramér’s V beside the p-value: Berkeley’s pooled table had but , a small association.
Question 2 — Expected Counts, and May the Test Run?
Complete the table
Expected counts
Fill in every empty cell, then check the whole table once. The cells depend on one another.
A different table: check the condition yourself.
Question 3 — The Statistic and Its Degrees of Freedom
Question 4 — The Conclusion
Build the Conclusion
Build the conclusion
Choose a phrase for each blank so that the sentence states the correct conclusion.
Question 5 — Which Analysis?
Self-Assessment
Still confusedReady for the Boss Fight
If you are below the midpoint, return to C1 and C2 in Section 3, then redo Guided Practice Problems 2 and 3: the no-link table, and whether the test may run. If you are in the middle, revisit C3 and C4 (the statistic and its degrees of freedom), then retry Mastery Questions 3 and 4 with a fresh table. If you are near the upper end, choose a Boss Fight path and write out your whole attempt before opening any step.
Section 8: Boss Fight
▾
A tag such as (C2 + C3) after a title names the Core Concepts parts the problem draws on, so
you know where to look back.
Choose one of two equally demanding missions. Neither tells you which method to use: choosing the tool is part of the fight. Each starts with your own complete attempt; open the steps only if you need to find where it went wrong. Lose, and the rematch brings fresh numbers.
🏛️ The Admissions Audit
A college’s admission gap, pooled and by programme. Is it bias, and where?
🔎 The Fact-Checker
Three claims land on your desk. Find what each one gets wrong, and fix it.
🏛️ The Admissions Audit
Context: the college is fictional and its records are generated, so no real institution is judged on invented numbers. The puzzle has the same shape as Berkeley’s.
A second college. The tests have been run; write the audit line.
Build the Conclusion
The audit line
Choose a phrase for each blank so that the sentence states the correct conclusion.
Then, on paper: go back to your prediction in the Introduction. Which of the three questions (chance, strength, where the gap is) did it answer, and which did the departments answer?
Compare with a model answer
The pooled gap at Berkeley was not chance (,) but the association was small (), and the question “biased?” could only be answered inside the departments, where the decisions were made. There, women’s rates were as high as men’s or higher, and only Department A showed a significant gap, in women’s favour. The pooled gap came from who applied where. “I can’t tell yet” was the honest first answer: a pooled table cannot locate a gap, and records alone cannot prove or rule out bias in individual decisions.
🔎 The Fact-Checker
Context: each claim, survey and number is generated for this exercise. Your job is to find what each claim gets wrong and fix it.
Claim 1.
Claim 2.
Claim 3.
Build the Conclusion
The line the fact-check may print
Choose a phrase for each blank so that the sentence states the correct conclusion.
Then, on paper: which question did you ask first for each claim, and which clue in the claim answered it?
Compare with a model answer
Claim 1: “What type is each variable?” The numbers were codes for categories, so meant nothing and the table needed a χ² test. Claim 2: “How strong is it?” A huge sample makes even a negligible link significant; Cramér’s V below 0.1 says “real but tiny”, not “strong”. Claim 3: “How were the data collected?” An observational survey can show association, but a lurking variable or reverse causation can produce the same table, so it cannot show cause.
Section 9: Challenge Problems
▾
A tag such as (C2 + C3) after a title names the Core Concepts parts the problem draws on, so
you know where to look back.
Optional stretch. These cold-transfer problems go beyond the lesson objectives.
Challenge 1 — The Same Percentages, a Bigger Survey
Among smokers 30% exercise; among non-smokers, 50%. Keep those percentages and scale the survey up. Fill in and for each sample size (three decimals). The first row is done.
Complete the table
Same percentages, four sample sizes
Fill in every empty cell, then check the whole table once. The cells depend on one another.
On paper: what does this tell you about using , or its p-value, as a measure of how strong a link is?
Compare with a model answer
measures evidence, and evidence grows with the amount of data: quadruple the sample and quadruples, even though the link is exactly as strong as before. Strength must be read from Cramér’s V, which stays at 0.204. Always report both.
Challenge 2 — A 3×3 Table and Two Ways to Read V
A sociologist draws a simple random sample of 300 adults, without replacement, from a population of more than 3,000 and classifies each by highest degree (High school / Bachelor’s / Graduate) and job sector (Public / Private / Nonprofit).
Public
Private
Nonprofit
Row total
High school
60
25
5
90
Bachelor’s
60
50
10
120
Graduate
30
25
35
90
Column total
150
100
50
300
(a) State and .(b) Compute all nine expected counts and check the condition. (c) Find .(d) Compute .(e) Decide at .(f) Compute Cramér’s V and read it two ways: with the standard bands 0.1 / 0.3 / 0.5, and with the bands for , roughly 0.07 / 0.21 / 0.35.
Show Solution
(a): degree and job sector are independent in the population. : they are not.
(b) Every total is different, so each cell needs its own count, for example :
Public
Private
Nonprofit
High school
45
30
15
Bachelor’s
60
40
20
Graduate
45
30
15
The sample is random and under 10% of the population; the smallest expected count is 15. The test may run.
(c).
(d) The contributions are 5.000, 0.833, 6.667 / 0.000, 2.500, 5.000 / 5.000, 0.833, 26.667. Adding the exact values:
(e), and is far beyond it: reject . The Graduate/Nonprofit cell (35 observed, 15 expected) carries half of .
(f), so
With the standard bands, 0.296 is small. With the bands for , it is medium. Same data, two readings: a report should say which convention it uses.
Challenge 3 — The Lady Tasting Tea
In the 1920s a colleague of the statistician R. A. Fisher claimed she could taste whether milk had been poured into the cup before the tea or after. Fisher used the claim to design a test: 8 cups, 4 of each kind, served in random order, and she is told there are 4 of each. Suppose she labels all 8 correctly.
(a) Lay out the results as a table (true order × her answer). What are the expected counts under “she is guessing”? May a χ² test run?
(b) If she were guessing, she would simply be choosing 4 of the 8 cups to call “milk first”. What is the probability she picks exactly the right 4? (Counting, L-PR-3.)
(c) What do you conclude at ?
Pause and write. Record your answer and reasoning on paper or in your notes before continuing. Even if you are unsure, committing your thinking helps you see what you understood and what you need to revisit.
Show Solution
(a) Every row and column total is 4, so every expected count is , below 5. A χ² test may not run: this is exactly the case for an exact test.
(b) There are equally likely ways to choose 4 cups, and only one is entirely right:
(c): guessing is an unlikely explanation, so there is evidence she can tell the difference. This is Fisher’s exact test, from his 1935 book The Design of Experiments.
Beyond the Lesson — Independence or Homogeneity?
The same arithmetic answers two slightly different questions. If you draw one sample and classify each person on two variables, you are testing independence: are the variables related in the population? If you fix the group sizes by design (say, 100 adults under 40 and 100 adults 40 and over) and compare how each group splits, you are testing homogeneity: do the groups have the same distribution? The expected counts, , and the decision rule are identical; only the wording of the hypotheses and the conclusion changes. Tables with equal, round group totals (like Example 1’s 50 smokers and 50 non-smokers) usually come from the second design.
Section 10: Solutions Reference
▾
A tag such as (C2 + C3) after a title names the Core Concepts parts the problem draws on, so
you know where to look back.
Complete solutions for Sections 5–9 are on the solutions page, with every expected count, every statistic and the reasoning behind each decision.
If you’re stuck: re-read the relevant Core Concept. Build the no-link table first (C2): every expected count is row total times column total over . Check that every is at least 5 before computing anything else (C5). Read the critical value in the row and the column of the stated (C4, C7). Report strength with V (C9), and claim cause only when the design assigned one variable at random (C10).
Quick-Reference Formulas
Formula
Purpose
Expected count if the variables were independent
Test statistic; always ; right-tailed
Degrees of freedom
Cramér’s V: strength, from 0 to 1
Common Pitfalls
Pitfall
What goes wrong
Correction
“No link = equal counts”
Expecting every cell to hold divided by the number of cells
Under independence each row splits like the column totals:
Conditions skipped
The test is run with an expected count below 5
Compute every first; combine categories or use an exact test
O and E swapped
The denominator is always
Wrong df
or the number of cells
Significant = strong
Reading the p-value as strength
Report Cramér’s V beside it
Independence claimed
“The variables are independent” after failing to reject
“Not enough evidence of an association”
Causation claimed
“A causes B” from an observational table
Association only, unless one variable was randomly assigned