Hypothesis tests — null distribution by simulating \(H_0\) (Topic 3)
Confidence intervals — bootstrap distribution by resampling (Topic 4)
Both are examples of a sampling distribution — a distribution showing how a statistic like \(\hat{p}\) varies across many possible samples.
These methods work, but each needs thousands of simulated samples. Today’s question: Is there a math shortcut?
Sampling Distributions Look Bell-Shaped
Across very different \(n\) and \(p\), the simulated sampling distribution of \(\hat{p}\) is bell-shaped. This isn’t a coincidence — it’s a general pattern (with one important caveat we’ll see soon).
The Normal Distribution
The bell-shaped curve is called a normal distribution.
Properties:
Symmetric and unimodal
Fully described by two parameters:
Mean (\(\mu\)) — center
Standard deviation (\(\sigma\)) — spread
Notation:\(N(\mu, \sigma)\)
Same Family, Different Parameters
Mean shifts the curve left/right; SD controls how wide it is.
Z-Scores
A Z-score measures how many standard deviations an observation sits from the mean:
Z-scores let us compare values across very different normal distributions.
Quick Z-Score Check
A class’s exam scores are approximately normal with \(\mu = 75\), \(\sigma = 8\).
Compute the Z-score for a student who scored 91. \(Z = \dfrac{91 - 75}{8} = \dfrac{16}{8} = 2.0\) — two SDs above the mean.
Compute the Z-score for a student who scored 63. \(Z = \dfrac{63 - 75}{8} = \dfrac{-12}{8} = -1.5\) — one and a half SDs below the mean.
What’s the Z-score of a student who scored exactly 75? What does that tell you? \(Z = (75 - 75)/8 = 0\). The score sits at the mean — neither above nor below. \(Z = 0\) always means “equal to the mean.”
The Standard Normal
Converting to Z-scores standardizes any normal distribution to \(N(0, 1)\).
Why this matters: one table (or one Jamovi calculator) handles every normal distribution.
68-95-99.7 Rule
68% of values fall within 1 SD of the mean
95% within 2 SDs (more precisely, 1.96)
99.7% within 3 SDs
Probabilities Are Areas Under the Curve
Key idea: the probability of getting a Z-score in some range is the area under the normal curve in that range.
The shaded area between \(Z = -1\) and \(Z = 1\) is ≈ 68% — that’s exactly the 68 in the 68-95-99.7 rule, now reframed as a probability.
SAT Scores
SAT scores are approximately normal with \(\mu = 1050\), \(\sigma = 210\).
Question: What proportion of test-takers score above 1470?
So 1470 sits 2 SDs above the mean. The next slide turns that Z-score into a probability.
SAT — The Top 2.5%
Step 2 — Use the 68-95-99.7 rule.
About 95% of scores fall between \(Z = -2\) and \(Z = 2\) (within 2 SDs of the mean). That leaves about 5%outside — split between the two tails.
The normal curve is symmetric, so each tail gets half: ≈ 2.5% above \(Z = +2\), ≈ 2.5% below \(Z = -2\).
→ About 2.5% of test-takers score above 1470.
Heights and the 68-95-99.7 Rule
US adult female heights are approximately normal with \(\mu = 64\) in, \(\sigma = 3\) in.
About what percent of women are between 61 and 67 inches tall? That range is \(\mu \pm 1\,\text{SD}\) (\(Z = -1\) to \(Z = 1\)). By 68-95-99.7, about 68%.
About what percent are between 58 and 70 inches tall? That’s \(\mu \pm 2\,\text{SD}\) (\(Z = -2\) to \(Z = 2\)) — about 95%.
A woman is 58 inches tall. Is this unusual? \(Z = (58 - 64)/3 = -2\). Only about 2.5% of women are this short or shorter — yes, unusual.
About what percent are shorter than 61 inches? \(Z = (61-64)/3 = -1\). About 16% — the 32% outside \(\mu \pm 1\,\text{SD}\) split symmetrically into 16% per tail.
When Does the Normal Model Apply?
Now back to our problem. When does the sampling distribution of \(\hat{p}\) behave like a normal distribution?
For a single proportion, \(\hat{p}\) is approximately normal when both of these technical conditions (also called validity conditions) hold:
Independence — observations are independent (random sample, sample < 10% of population)
Success-failure — at least 10 expected successes and 10 expected failures
For an H-test, “expected” is computed under \(H_0\): check \(n \cdot p_0 \geq 10\) and \(n \cdot (1-p_0) \geq 10\)
A special case of the Central Limit Theorem (CLT) — sample proportions and averages become approximately normal as \(n\) grows.
Both hold → normal model. Success-failure fails (independence OK) → simulation. Independence fails → both break down.
Standard Error
The standard error (SE) is the SD of the sampling distribution of \(\hat{p}\):
\[SE = \sqrt{\frac{p(1-p)}{n}}\]
Which \(p\) do we plug in?
Hypothesis tests: use \(p_0\) (the null value) — we’re asking “if \(H_0\) were true…”
Confidence intervals: use \(\hat{p}\) (next time, in 6b)
The Test Statistic
For an H-test, convert \(\hat{p}\) to a Z-score measuring how many SEs \(\hat{p}\) sits from \(p_0\):
\[Z = \frac{\hat{p} - p_0}{SE}\]
The p-value is the tail area of \(N(0,1)\) beyond \(Z\) — the side that matches \(H_A\).
Payday Loan Study
Background: a payday loan is a small, short-term loan due on the borrower’s next paycheck, typically with extremely high interest (often 300%+ APR). Critics worry borrowers get trapped in cycles of debt. Should the industry be more tightly regulated? The borrowers themselves are a key voice.
The data: in a national random sample of \(n = 826\) payday loan borrowers, 424 (51.3%) said they would support additional regulation of the industry.
We’ll use this single study for both 6a (hypothesis test, today) and 6b (confidence interval, next class) — two methods, two angles on the same question.
H-Test on Payday
Research question: Do a majority of payday borrowers support regulation?
Hypotheses:
\(H_0: p = 0.5\) (no majority — exactly half support)
\(H_A: p > 0.5\) (majority supports)
We’ll use \(\alpha = 0.05\) as our significance level.
Payday — Check Conditions
Independence: Random sample of borrowers. ✓
Success-failure (under \(H_0\), so use \(p_0 = 0.5\)):
So \(\hat{p}\) sits less than 1 SE above \(p_0\). Before crunching the precise tail area, let’s get a rough sense from the 68-95-99.7 rule.
Payday — Rough P-value from 68-95-99.7
By 68-95-99.7: the right tail beyond \(Z = 1\) is ≈ 16%.
The area we want includes that 16% region — so our p-value > 16%, well above \(\alpha = 0.05\). Already pointing to fail to reject\(H_0\).
Payday — Precise P-value
Precise p-value (Jamovi’s Model-Based Inference calculator, or any standard-normal table): \(0.222\).
Conclusion:\(0.222 > 0.05\). We fail to reject\(H_0\). There’s not convincing evidence that a majority of payday borrowers support the regulation. (The national random sample lets us generalize this to US payday borrowers.)
Run a Hypothesis Test
A national report places the rate of seniors with full-time jobs by graduation at 75%. Your university suspects its own rate is higher. In a random sample of \(n = 200\) recent grads, 164 report having a job by graduation (\(\hat{p} = 0.82\)). Is there evidence the true rate at your university exceeds 75%? Use \(\alpha = 0.05\).
State \(H_0\) and \(H_A\).\(H_0: p = 0.75\) vs \(H_A: p > 0.75\)
Compute SE and \(Z\).\(SE = \sqrt{\frac{0.75 \times 0.25}{200}} \approx 0.0306\). \(Z = \frac{0.82 - 0.75}{0.0306} \approx 2.29\).
P-value and decision.Right-tail area beyond \(Z = 2.29\) is about 0.011. Since \(0.011 < 0.05\), reject \(H_0\) — evidence the true employment rate is above 75%. (The random sample of recent grads lets us generalize to your university’s recent grads.)
When Conditions Are NOT Met
Scenario (back to Topic 3): A medical consultant had 3 complications in 62 surgeries. We want to test:
\[H_0: p = 0.1 \quad\text{vs}\quad H_A: p < 0.1\]
Check success-failure under \(p_0 = 0.1\):
Expected successes: \(62 \times 0.1 = 6.2\)✗
Only 6.2 expected complications — less than 10. Normal model not appropriate.
→ Fall back on simulation (our Topic 3 approach). The math shortcut isn’t always available.
Conditions Met?
For each scenario, decide whether the normal model is appropriate for a hypothesis test on \(p\).
Random sample of \(n = 50\) adults screened for a rare condition; testing whether local prevalence differs from the national 10% (\(H_0: p = 0.10\)). No. Expected positives: \(50 \times 0.10 = 5\) — fewer than 10. Fall back on simulation.
Random sample of \(n = 150\) voters polled on a ballot measure; testing whether a majority support it (\(H_0: p = 0.50\)). Yes. Expected supporters: \(150 \times 0.5 = 75\); expected opposers: 75. Both well above 10.
Convenience sample of \(n = 500\) mall shoppers asked whether they used contactless payment last visit; testing \(H_0: p = 0.30\). Watch out. Success-failure is fine — expected users: \(500 \times 0.3 = 150\), non-users: 350. But independence is questionable: shoppers often arrive in groups (couples, families) and influence each other’s payment habits. Independence is required for both the normal model and simulation, so neither gives reliable inference here.
Looking Ahead
Today: normal model gives us a math shortcut for hypothesis tests on a proportion.
Next time (6b): the same normal model gives us a math shortcut for confidence intervals — and we’ll see when the two methods agree (and when they don’t).