Topic 8.1: Introducing Statistics: Are My Results Unexpected?
Expected Counts, Building the Chi-Square Statistic, and Using Simulation to Judge Surprising Results
Video Follow-Along Worksheet
↻ Already did this one? It stays open even after it’s checked off — just change any answer and click ✓ Check Answers again (no need to Reset). ✨ Grade with AI only ever raises your grade. Make sure you’re signed in so your changes save.
Learning Objectives:
Determine whether observed counts in categorical data are consistent with expected counts due to random variation.
Compute expected counts from a null model for a one-way table.
Explain why the chi-square statistic uses squared differences divided by expected counts.
Use simulation to judge whether an observed chi-square value is surprising.
Interpret a large P-value in context for a goodness-of-fit situation.
Essential Knowledge:
Unit 6 focused on success-failure data, but Unit 8 studies categorical variables with more than two categories.
Expected counts come from the model being tested, such as a fair die with equally likely outcomes.
Observed minus expected differences cannot simply be added because positive and negative values cancel.
Squaring differences keeps contributions positive and gives larger discrepancies more weight.
Dividing by the expected count makes the discrepancy relative to what was expected.
The chi-square statistic summarizes the overall mismatch between observed and expected counts.
A simulated sampling distribution helps estimate a P-value and decide whether the result is surprising.
Key Vocabulary
Observed Counts
The actual frequencies recorded in each category from the sample.
Expected Counts
The frequencies we would predict in each category if the null model is true.
One-Way Table
A table that summarizes counts for one categorical variable across several categories.
Random Variation
Natural sample-to-sample differences that occur by chance even when the model is correct.
Chi-Square Statistic
A measure of overall discrepancy found by adding (Observed minus Expected) squared divided by Expected for all categories.
Good Fit
A description of data that match the expected counts closely enough to be believable under the model.
Simulation
Generating many random samples under the null model to see what kinds of results are typical.
Sampling Distribution
The distribution of a statistic, such as chi-square, from many repeated random samples.
P-value
The probability, assuming the model is true, of getting a result at least as extreme as the observed one.
Weighted Die
A die whose outcomes are not all equally likely.
Video 1: Introducing Significance for Categorical Counts
[0:15 – 7:04]
1.[0:15]
This lesson introduces significance testing for the distribution of proportions for one variable.
2.[0:32]
We want to know whether observed counts are consistent with expected counts due to random .
3.[0:41]
Unit 8 goes beyond success-failure data to categorical variables with more than two .
Context — Fair Die or Weighted Die?[1:10 – 1:39]
While playing a role-playing game, you notice a 10-sided die has been rolling high numbers for a while. You roll the die 100 times and record the results to decide whether the die could be weighted.
Result
1
2
3
4
5
6
7
8
9
10
Observed
7
11
7
11
9
8
12
10
13
12
4.[1:10]
For a fair 10-sided die, each outcome should have probability .
5.[1:53]
In 100 rolls, the expected count for each result is .
6.[1:53]
If the die is fair, the 10 categories should be represented .
7.[2:23]
When we add all the values in the Obs − Exp row, the total is .
8.[2:23]
That total is not a useful overall measure because positive and negative differences each other out.
9.[2:55]
Using absolute values gives a total of , but that total still depends heavily on the sample .
10.[3:15]
Squaring the differences keeps all contributions positive and gives more weight to differences.
11.[3:15]
For these die results, the sum of the squared differences is .
Building the Chi-Square Statistic[3:47 – 4:06]
Start with each category's discrepancy: Observed minus Expected.
Square each difference so every contribution is positive.
Divide each squared difference by the expected count to make the discrepancy relative.
Add the ratios: χ2 = ∑ ((Obs − Exp)2 / Exp).
12.[3:47]
To make each contribution relative to what was expected, divide by the count.
13.[4:06]
The final sum of these ratios is called the statistic.
14.[4:06]
For the die data in the lesson, the chi-square statistic is .
15.[4:19]
To judge whether 4.2 is surprising, the applet generates many random samples assuming the die is .
Simulation Logic[4:19 – 6:45]
Assume the null model is true: the 10-sided die is fair.
Generate many random samples of 100 rolls from that fair die model.
Compute a chi-square statistic for each simulated sample.
Estimate the P-value with the proportion of simulated chi-square values at least as large as the observed one.
16.[4:34]
The dotplot of simulated chi-square values builds a sampling .
17.[6:45]
We estimate the P-value by finding the proportion of simulated chi-square values than or equal to 4.2.
18.[6:45]
The applet reported 932/1023, or about .
19.[6:45]
A chi-square value of 4.2 is not very if the die is fair.
20.[6:45]
The simulation evidence suggests the die is probably weighted.
21.[7:04]
These results are a good to the expected counts from a fair die.
Key Takeaways
[Summary]
Expected counts come from the model being tested, such as 10 expected rolls in each category for a fair 10-sided die.
Raw observed-minus-expected differences are not enough because they cancel when added.
The chi-square statistic adds relative squared discrepancies to summarize how far observed counts are from expected counts.
Simulation shows what chi-square values are typical if the model is true.
A large P-value means the data are not unusual under the model, so random variation is a reasonable explanation.
Reflection Questions
[AI-Graded]
R1.Explain how the chi-square statistic is built for the 10-sided die example. Include the expected counts for a fair die, why adding Obs − Exp is not enough, why the differences are squared and divided by expected count, the value χ2 = 4.2, and what a larger chi-square value would mean.
R2.Explain how the simulation is used to decide whether the die results are surprising. Describe the fair-die model, what the sampling distribution represents, how the P-value is estimated, the approximate P-value, and the conclusion about whether the die seems weighted.
Exit Ticket
A gamer rolls a 10-sided die 100 times and gets frequencies 7, 11, 7, 11, 9, 8, 12, 10, 13, and 12 for results 1 through 10. Assume a fair die has probability 1/10 for each result, and a simulation shows that χ2 values of 4.2 or greater occurred in 932 out of 1023 simulated samples.
(a) State the expected count for each outcome and explain why adding Obs − Exp is not a good overall measure of discrepancy.
(b) Describe how to compute the chi-square statistic and identify the observed value.
(c) Explain what the simulation distribution represents and estimate the P-value.
(d) Decide whether the results are surprising if the die is fair and state a conclusion about whether the die seems weighted.
(e) Explain what the large P-value says about random variation in this setting.
Class Responses (Esc to close)
Click a "Class" button next to a question to see responses.