Wiki Page, Math 13 - Perez Sandbox : Module 27 - Chi-Square Test of Independence (3 of 3)

Wiki Page
2026-01-17T21:15:47-08:00

Comment: The Effect of Sample Size on Chi-Square

With other hypothesis tests, we have seen that sample size can affect the P-value and our conclusion. This is also true for Chi-square.

To illustrate this idea, we multiplied all of the counts in the Oklahoma gender and driving after drinking data by 3.

ORIGINAL DATA

Drank alcohol in last 2 hours? | Yes | No | Totals
Male | 77 | 404 | 481
Female | 16 | 122 | 138
Totals | 93 | 526 | 619

DATA x3

Drank alcohol in last 2 hours? | Yes | No | Totals
Male | 231 | 1212 | 1443
Female | 48 | 366 | 414
Totals | 279 | 1578 | 1857

Now let's examine what impact this has on expected counts. First, let's look at the conditional percentages.

ORIGINAL DATA: Conditional Percent

Drank alcohol in last 2 hours? | Yes | No | Totals

Male

77/481
16.0%

404/481
84.0%

481

Female

16/138
11.6%

122/138
88.4%

138

Totals | 93 | 526 | 619

DATA x3: Conditional Percents

Drank alcohol in last 2 hours? | Yes | No | Totals

Male

231/1443
16.0%

1212/1443
84.0%

1443

Female

48/414
11.6%

366/414
88.4%

414

Totals | 279 | 1578 | 1857

Notice that the conditional percentages do not change, so the new “data” shows the same relationship between gender and drinking before driving.

We used technology to find the expected counts and the chi-square test statistic for the original data and the data multiplied by 3. Here are our results.

ORIGINAL DATA: Expected count

Drank alcohol in last 2 hours? | Yes | No | Totals

Male

77
72.27

404
408.73

481

Female

16
20.73

122
117.27

138

Totals | 93 | 526 | 619

Chi-Square Test (ORIGINAL DATA)

Statistic | DF | Value | P-value
Chi-square | 1 | 1.6365641 | 0.2008

The chi-square value for the original data is 1.64 and the P-value is 0.2008, which is not statistically significant.

DATA x3: Expected Counts

Drank alcohol in last 2 hours? | Yes | No | Totals

Male

231
216.8

1212
1226.2

1443

Female

48
62.2

366
351.8

414

Totals | 279 | 1578 | 1857

Chi-Square Test (DATA x3)

Statistic | DF | Value | P-value
Chi-square | 1 | 4.9096923 | 0.0267

Notice that multiplying the observed counts by 3 also triples the expected counts and the chi-square value. This increase in the chi-square value from 1.64 to 4.91 gives a statistically significant P-value of 0.0267 (from the original 0.2008), which changes our conclusion. With this larger sample, the evidence is strong enough to reject the null hypothesis. We conclude that gender is associated with drinking alcohol before driving. The variables are dependent for drivers under the age of 21 in Oklahoma. With this sample size, the data provides evidence in support of the Oklahoma law that forbids sale of 3.2% beer to males and permits it to females with the goal of improving traffic safety.

What’s the point? We see once again that sample size affects the P-value in a hypothesis test. This means that a small sample may not detect a relationship that exists between two categorical variables in a population. Conversely, a large sample may indicate that a relationship is statistically significant on the basis of differences in observed and expected counts that are not important in a practical sense.