One Proportion
Math 115
So far we’ve learned to describe data:
Now we learn to make inferences:
Examples:
In statistics, we use \(\hat{}\) (called a “hat”) to indicate an estimate from our sample:
\(p\) = Population parameter (what we want to know)
\(\hat{p}\) = Sample statistic (what we can calculate)
Example: If 12 students prefer online classes in a sample of 50:
Even when the population proportion \(p\) is fixed, different samples give different proportions (different values of \(\hat{p}\)).
Example: If the true proportion of left-handed people is \(p=0.13\) (13%)…
This natural variation is called sampling variability
When we observe something unusual in our sample:
Is it a real effect, or just due to chance?
Hypothesis testing helps us answer this question
Context: Some organ donors work with a medical consultant who helps them through the surgery process.
Known fact: The national complication rate for liver donor surgeries is 10%
Claim: One consultant claims her patients have a lower complication rate
Data: Out of 62 surgeries she assisted,3 resulted in complications:
Question: Is this evidence of a truly lower rate?
\(p\) = Population parameter (what we want)
\(\hat{p}\) = Sample statistic (what we can calculate)
Question: Is this evidence that \(p<0.1\)?
How do we explain the consultant’s low complication rate?
Explanation 1: The consultant is no different from the national average
Explanation 2: The consultant truly has a lower complication rate
How do we decide which is more plausible?
Strategy: Start by assuming there’s nothing special going on
This is like a courtroom:
The null hypothesis represents the skeptical position:
\[H_0: p = 0.10\]
Key idea: The null hypothesis typically represents “no effect” or “no difference”
Courtroom parallel: \(H_0\) = presumption of innocence
The alternative hypothesis represents the claim we want to test:
\[H_A: p < 0.10\]
Medical Consultant Example:
| In words | In symbols | |
|---|---|---|
| \(H_0\) | Consultant’s rate equals national average | \(p = 0.10\) |
| \(H_A\) | Consultant’s rate is lower than national average | \(p < 0.10\) |
Important:
Assume \(H_0\) is true (consultant rate = 10%)
Simulate what we’d expect to see under this assumption
Compare our observed data to these simulations
Decide:
Question: If \(H_0\) is true, what values of \(\hat{p}\) should we expect?
Answer: We need the null distribution
How do we get it? Simulation!
Imagine a spinner:
To simulate one sample under \(H_0\):
Try the interactive simulation:
Each dot = one simulated sample proportion under \(H_0\)
Red dashed line = our observed value (\(\hat{p} = 0.048\))
From our 100 simulations:
Our question: Is \(\hat{p} = 0.048\) unusually low, or just normal variation?
Is this unusual enough to reject \(H_0\)? Let’s do more simulations for a clearer picture…
Histogram of 1000 simulated proportions under \(H_0\)
This time 111 out of 1000 simulated values are at or below 0.048.
P-value = Probability of observing our result (or more extreme) if \(H_0\) is true
Interpretation: How likely is it to see a sample proportion of 0.048 or less if the true rate is 0.10?
Courtroom parallel: P-value = strength of prosecution’s evidence
Understanding “More Extreme”
“More extreme” means in the direction of \(H_A\):
From our 1000 simulations:
\[\text{P-value} = \frac{111}{1000} = 0.111\]
About 11.1% of simulations produced a result as extreme as (or more extreme than) what we observed
Watch Out: Three Different “p” Terms!
Don’t confuse these three:
They all use the letter “p” but mean completely different things!
How would the p-value change with different observed results?
Suppose the consultant still had 62 surgeries, but…
| Observed complications | \(\hat{p}\) | Expected p-value |
|---|---|---|
| 1 complication | 0.016 | Very small (≈0.01) |
| 3 complications | 0.048 | 0.11 (our actual result) |
| 6 complications | 0.097 | Large (≈0.57) |
| 7 complications | 0.113 | Large (≈0.72) |
Pattern: Lower \(\hat{p}\) → smaller p-value → stronger evidence against \(H_0\) (why?)
P-value \(\approx\) 0.111 means:
“If the consultant truly has the same 10% complication rate as the national average, there is about an 11% chance of observing 3 or fewer complications in 62 surgeries.”
Is this surprising?
To make decisions, we set a significance level (\(\alpha\)) in advance
Common choice: \(\alpha = 0.05\) (5%)
Decision rule:
Courtroom parallel: \(\alpha\) = standard for “beyond reasonable doubt”
Our results:
Comparison:
Conclusion:
We fail to reject \(H_0\) at the \(\alpha = 0.05\) level.
The data do not provide convincing evidence that the consultant has a lower complication rate than the national average.
Important distinctions:
| What we CAN say | What we CANNOT say |
|---|---|
| Data don’t provide strong evidence against \(H_0\) | \(H_0\) is true |
| 10% is a plausible value for the consultant’s rate | Consultant’s rate is exactly 10% |
| We can’t rule out that the consultant is average | Consultant is definitely not better |
“Fail to reject” ≠ “Accept”
The consultant might have a lower rate — we just don’t have enough evidence to conclude that
Courtroom parallel: “Not guilty” ≠ “innocent”
Scenario: Researchers want to know if dogs understand human cues.
Data: In 10 trials Harley the dog was presented with two bowls of food when a person participating in the research pointed toward one of those bowls,
Question: Is this evidence dogs understand human cues? That is did Harley understand which bowl was being pointed to or did he just get lucky?
Let’s work through this together…
Step 1: Identify the parameter
Step 2: State the hypotheses
Step 3: Calculate sample statistic
Step 5: Physical simulation
Step 6: Simulate 1000 samples under \(H_0\)
Step 7: Calculate the p-value
Your conclusions:
Decision (using \(\alpha = 0.05\)): Decide whether to reject \(H_0\)
Interpretation: Which is correct?
Summary of the process:
State hypotheses: \(H_0\) and \(H_A\)
Collect data: Calculate observed statistic (\(\hat{p}\))
Simulate null distribution: What would we see if \(H_0\) were true?
Calculate p-value: How extreme is our observation?
Make decision: Compare p-value to \(\alpha\)
State conclusion: In context of the original question