PSTAT 5LS – Theory-Based Inference for p (Slide Set 5)
Course Logistics and Administrative Details
- Course: PSTAT 5LS (Statistics)
- Current Topic: Theory-Based Inference for a Population Proportion (Slide Set 5)
- Lecture Timeline
- Today: Begin Slide Set 5 (Theory-Based Inference for )
- Next Time: Continue/finish Slide Set 5
- Upcoming Deadlines (Summer session examples)
- HW 2 due Tue Jul 8, 11:59 PM
- HW 3 due Mon Jul 14, 11:59 PM
- HW 4 noted on slides (exact date partially obscured)
- Office Hours
- Instructor: Tue & Thu, 2–3 PM via Zoom (encouraged to attend)
Transition: From Simulation-Based to Theory-Based Methods
- Previous slide sets used computer‐generated randomization/simulation distributions.
- Empirical finding: these simulated distributions of looked approximately normal.
- Example graphics shown
- “Buzz the dolphin” correct-button guesses ⇒ bell-shaped curve for simulated .
- Community recycling rate simulation likewise centered & symmetric.
- Insight: The empirical bell shapes hint that a mathematical normal model can replace repeated simulations once its validity is justified.
Sampling-Distribution Fundamentals
- Sampling distribution: distribution of any sample statistic (e.g., ) over all possible samples of fixed size n from the population.
- Describes shape, center, variability due solely to random sampling.
- Lets us quantify how “unusual” one observed statistic is when a null hypothesis is true.
Distribution of the Sample Proportion
- Center: (the true population proportion).
- Variability: Standard Error (SE)
- Acts as a new “ruler” for gauging how far an observed is from .
Central Limit Theorem (CLT) for Proportions
- When certain conditions are met, the sampling distribution of is approximately normal with
- Mean
- Standard deviation .
- Enables theory-based inference (z tests & CIs) rather than simulation.
Conditions Required for the Normal Approximation
1 Independence
- Observations must not influence one another.
- Usually reasonable if data came from a simple random sample.
- If sampling without replacement from a finite population of size , check the 10 % rule (sample ) to treat draws as independent.
2 Success–Failure Condition (S–F)
- Need at least 10 expected successes & 10 expected failures.
- “Success” = category of interest; “failure” = the other category.
- For confidence intervals we use : and .
- For hypothesis tests we use the null value : and .
- Rationale: when is true, the true proportion equals , so expected counts derive from , not from data.
- The cutoff “10” is empirical—balances approximation accuracy vs. practicality.
Hypothesis-Testing Framework for a Single Proportion
- State hypotheses
- Null:
- Alternative (choose
- is supplied by context, never from data.
- Check conditions (Independence & S–F as above).
- Compute test statistic (standardized ).
- Find p-value from the standard normal distribution.
- Decision: compare p-value to significance level (e.g., 0.05).
- Contextual conclusion: interpret in plain language.
Standardization and the z Test Statistic
- Formula
- Numerator: observed difference between sample and hypothesized proportions.
- Denominator: SE computed with (because under , ).
- Interpretation
- ⇒ observed lies 2 SEs above .
- Links directly to the normal curve & 68–95–99.7 rule.
Visual Recall of 68–95–99.7 Rule
- Within SE: ~68 % of statistics.
- Within SE: ~95 %.
- Within SE: ~99.7 %.
- Helps build intuition; exact p-values often require software.
Using R’s pnorm() for Normal Probabilities
- Syntax:
pnorm(q, mean = 0, sd = 1, lower.tail = TRUE)q= quantile (z-score)lower.tail = TRUE(default) ⇒ .lower.tail = FALSE⇒ P(Z > q) (right tail).
- Tail selection depends on the alternative hypothesis:
- Left-tailed (<): p-value =
pnorm(z, ... , lower.tail = TRUE). - Right-tailed (>): p-value =
pnorm(z, ... , lower.tail = FALSE). - Two-tailed (): p-value =
2 * pnorm(|z|, lower.tail = FALSE)(or multiply the smaller tail by 2).
- Left-tailed (<): p-value =
Worked Examples
1 Dolphin Communication (Buzz & Doris)
- Hypotheses: H0!: p = 0.50 \;\text{vs}\; HA!: p > 0.50.
- Data: .
- Test statistic
. - p-value (right tail)
pnorm(3.50, mean = 0, sd = 1, lower.tail = FALSE) # ≈ 0.00023
⇒ (highly significant).
2 Community Recycling Rate
- Hypotheses: .
- Data: .
- Test statistic
. - p-value (two tails)
2 * pnorm(-2.315, mean = 0, sd = 1, lower.tail = TRUE) # ≈ 0.0206
⇒ (significant at but not at stricter levels like 0.01).
Interpreting p-Values & Decisions
- Definition: p-value = probability, under , of observing a statistic as extreme or more extreme than the one obtained.
- Direction matters:
- ⇒ left tail only.
- ⇒ right tail only.
- ⇒ both tails (double the smaller tail).
- Decision rule at level
- If ⇒ Reject ⇒ result is statistically significant.
- If p > \alpha ⇒ Fail to reject ⇒ not statistically significant.
Practical & Conceptual Takeaways
- Once conditions hold, the normal model offers a fast, exact alternative to resampling.
- Checking assumptions (randomness & S–F) is not optional; violations may invalidate results.
- The SE built from reflects the variability expected under the null—a key distinction from confidence intervals.
- Software (e.g., R,
pnorm) is usually needed for precise p-values beyond simple z scores of 1, 2, 3. - Interpret findings in the context of the original research question, not just in terms of abstract numbers.