PSTAT 5LS – Theory-Based Inference for a Population Proportion

Course Logistics and Housekeeping

  • Course: PSTAT 5LS – Theory-Based Inference for p (Slide Set 5)
  • Today’s topic: Introduction to theory-based inference for a population proportion p
  • Next time: Continuation of the same topic
  • Upcoming homework deadlines
    • HW 2 due Tue Jul 8 @ 11:59 PM
    • HW 3 due Mon Jul 14 @ 11:59 PM
    • (HW 4 appears on slides but due date not shown: “F <118”)
  • Office-hours reminder
    • Instructor OH: Tue & Thu 2–3 PM via Zoom
    • Encouragement: “Visit us in office hours!”

Bridging Simulation & Theory

  • Previous slide set used simulation (randomization & bootstrap) to approximate sampling distributions.
  • Empirical observation: these simulated sampling distributions looked nearly normal.
    • Example 1 (dolphin communication): histogram of simulated proportion of correct guesses.
    • Example 2 (community recycling): histogram of simulated proportion of recyclers.
  • Take-away: the normal pattern hints that theory (specifically the Central Limit Theorem) can describe \hat p’s behaviour without repeated simulation.

Sampling Distributions

  • Definition: A sampling distribution is the distribution of a statistic (e.g., sample proportion \hat p or sample mean \bar x) over all possible random samples of fixed size $n$ from the population.
    • Describes shape, centre, and variability attributable purely to random sampling.
    • Knowing this distribution lets us judge how “unusual” any observed statistic is when H_0 is true.

Distribution of the Sample Proportion \hat p

  • Mean (centre): E(\hat p)=p (the true population proportion).
  • Standard deviation (variability), termed standard error (SE):
    SE = \sqrt{ \dfrac{p(1-p)}{n} }
    • Acts as a new “ruler” to quantify how far an observed \hat p is from the hypothesised mean.

Central Limit Theorem (CLT) for Proportions

  • When conditions are met, the sampling distribution of \hat p is approximately normal:
    \hat p \sim N\Bigl(\, p,\,\dfrac{p(1-p)}{n} \Bigr).
  • Importance: Allows analytic (theory-based) inference instead of computational simulation.

Conditions Required for Normal Approximation

  1. Independence (a.k.a. Randomness) Condition
    • Individual observations must not influence each other.
    • Usually satisfied by a simple random sample (SRS) or well-designed randomised study.
    • If sampling without replacement, ensure population is at least 10× larger than sample.
  2. Success–Failure Condition
    • Expected counts—not necessarily observed counts—must include at least 10 successes and 10 failures.
    • For inference on p we check:
    np \ge 10 \quad\text{and}\quad n(1-p) \ge 10.
    • For hypothesis tests we substitute p0 (value posited by H0) because under H0 we assume p=p0.
    • The threshold “10” is chosen empirically: ensures normal curve approximates the true distribution well enough.

Using the Normal Model in Hypothesis Testing

  • Unknown true p → plug in hypothesised p0 when computing SE during a test. SE{H0} = \sqrt{ \dfrac{p0(1-p_0)}{n} }
  • This substitution keeps calculations self-consistent with the null model.

Formal Steps for a Proportion Hypothesis Test

  1. State hypotheses
    • Null: H0 : p = p0
    • Alternative: HA : p < p0,\; p\ne p0, \text{ or } p > p0 (direction dictated by research question before seeing data).
  2. Check conditions (independence + success–failure using p_0).
  3. Compute test statistic (z-score):
    z = \dfrac{\hat p - p0}{\sqrt{\dfrac{p0(1-p_0)}{n}}}.
  4. Find p-value
    • Use normal distribution areas; tail(s) chosen according to H_A.
  5. Decision
    • Compare p-value to significance level \alpha (commonly 0.05).
    • p-value \le \alpha → reject H0 (result is “statistically significant”). • p-value > \alpha → fail to reject H0 (not significant).
  6. Contextual conclusion
    • Translate statistical outcome to plain language relating to the study subject.

Interpreting the z Test Statistic

  • z measures distance of observed \hat p from p_0 in standard-error units.
    • Example: z=2 means observation lies 2 SEs above hypothesised mean.
  • Link to Empirical (68-95-99.7) Rule:
    • |z|≈1 → ordinary; |z|≈2 → somewhat unusual; |z|≈3 → very rare under H_0.
    • For non-integer z, exact areas require technology.

Computing Areas with R’s pnorm()

  • Syntax: pnorm(q, mean = 0, sd = 1, lower.tail = TRUE)
    q = z-score (quantile).
    lower.tail = TRUE returns P(Z \le q), FALSE returns P(Z > q).
  • Tail selection depends on H_A:
    • Left-tailed (

Worked Examples

1. Dolphin Communication (Doris & Buzz)

  • Hypotheses:
    H0: p = 0.50 \quad vs. \quad HA: p > 0.50.
  • Data: n=16,\; \hat p = 15/16 = 0.9375.
  • Test statistic:
    z = \dfrac{0.9375 - 0.50}{\sqrt{\dfrac{0.50\times 0.50}{16}}} = 3.50.
  • p-value (right tail):
    pnorm(3.50, mean = 0, sd = 1, lower.tail = FALSE) → 0.0002326291.
  • Interpretation: Extremely small p-value → strong evidence dolphins / Buzz perform better than chance.

2. Community Recycling Rate

  • Hypotheses:
    H0: p = 0.70 \quad vs. \quad HA: p \ne 0.70.
  • Data: n=800,\; \hat p = 530/800 = 0.6625.
  • Test statistic:
    z = \dfrac{0.6625 - 0.70}{\sqrt{\dfrac{0.70\times 0.30}{800}}} = -2.315.
  • p-value (two-tailed):
    2*pnorm(-2.315, mean = 0, sd = 1, lower.tail = TRUE) → 0.020613.
  • Interpretation: At \alpha=0.05, result is statistically significant (p ≈ 0.021 < 0.05); observed recycling proportion differs from 70% (specifically, it is lower).

Visual Memory Aids

  • Normal curve with mean p_0 labelled at centre, tick marks at \pm SE, \pm2SE, \pm3SE.
    • Approx. 68% within ±1 SE, 95% within ±2 SE, 99.7% within ±3 SE.
    • Extreme regions (tails) correspond to p-value areas.

Tail Direction Summary

  • Alternative HA dictates tail(s) used: • p < p0 → left tail.
    • p > p0 → right tail. • p \ne p0 → both tails (double smaller area).

Decision Table (α-Level Rule)

  • If p-value ≤ \alpha ⇒ Reject H_0 ⇒ “statistically significant.”
  • If p-value > \alpha ⇒ Fail to reject H_0 ⇒ “not statistically significant.”

Ethical & Practical Considerations (implicit reminders)

  • Independence assumption critical; violating it invalidates SE & p-values.
  • Choosing H_A direction must come before examining data to avoid bias.
  • Success–failure rule ensures ethical communication of uncertainty: prevents overstating evidence when normal approx. is unreliable.
  • Real-world relevance: findings (e.g., dolphin cognition, community recycling) can inform environmental or cognitive research initiatives.

Connections to Earlier Material

  • Builds directly on earlier simulation-based inference: both aim to quantify sampling variability.
  • Standardised statistic z is analogue to earlier randomisation-distribution counts of “how far from center” but now parameterised by theoretical SE.