Skip to main content

Unit 4 Cheat Sheet: Hypothesis Testing

This cheat sheet provides a structured framework to map keywords, select the correct test, and evaluate hypotheses using the 3-method format.

info

Cycle Test Scope Note

For your upcoming cycle test, Proportion Tests and Paired Sample tt-Tests are excluded.

This cheat sheet is explicitly divided:

  • PART A: Core Means Testing (What you need to study now for the cycle test).
  • PART B: Proportions & Paired Tests (Kept for final semester exam reference).

PART A: CYCLE TEST FOCUS (Means & Independent Samples)​

1. Keyword-to-Tail Mapping​

The first step in any hypothesis test is translating the English claim into mathematical symbols to determine the direction of the test:

Question KeywordAlternative Hypothesis (H1H_1)Test DirectionRejection Region
"Is different from," "has changed," "is not equal"μ≠μ0\mu \neq \mu_0Two-TailedSplit across both tails (α/2\alpha/2)
"Is greater than," "has increased," "lasts longer"μ>μ0\mu > \mu_0Right-TailedUpper tail only (α\alpha)
"Is less than," "has decreased," "is underweight"μ<μ0\mu < \mu_0Left-TailedLower tail only (α\alpha)

(Note: The Null Hypothesis H0H_0 ALWAYS contains the equality condition: =,≤, or ≥=, \le, \text{ or } \ge.)


2. Quick-Glance Test Selection (Means)​

  • One-Sample Test (Comparing a single sample to a benchmark μ0\mu_0):

    • If n≥30n \ge 30 or σ\sigma is known   ⟹  \implies ZZ-Test SE=σn  ⟹  Zcal=xˉ−μ0SESE = \frac{\sigma}{\sqrt{n}} \implies Z_{\text{cal}} = \frac{\bar{x} - \mu_0}{SE}
    • If n<30n < 30 and σ\sigma is unknown   ⟹  \implies tt-Test (df=n−1df = n - 1) SE=sn  ⟹  tcal=xˉ−μ0SESE = \frac{s}{\sqrt{n}} \implies t_{\text{cal}} = \frac{\bar{x} - \mu_0}{SE}
  • Two-Sample Independent Test (Comparing two completely separate groups):

    • If n1,n2≥30  ⟹  n_1, n_2 \ge 30 \implies Two-Sample ZZ-Test SEdiff=s12n1+s22n2SE_{\text{diff}} = \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}
    • If n1,n2<30  ⟹  n_1, n_2 < 30 \implies Two-Sample tt-Test with Pooled Variance (df=n1+n2−2df = n_1 + n_2 - 2) sp2=∑(x1i−xˉ1)2+∑(x2i−xˉ2)2n1+n2−2s_p^2 = \frac{\sum (x_{1i} - \bar{x}_1)^2 + \sum (x_{2i} - \bar{x}_2)^2}{n_1 + n_2 - 2} SEdiff=sp2(1n1+1n2)SE_{\text{diff}} = \sqrt{s_p^2 \left( \frac{1}{n_1} + \frac{1}{n_2} \right)}
    • Test Statistic: Zcal or tcal=(xˉ1−xˉ2)−0SEdiffZ_{\text{cal}} \text{ or } t_{\text{cal}} = \frac{(\bar{x}_1 - \bar{x}_2) - 0}{SE_{\text{diff}}}

3. The 3-Method Evaluation Framework​

Regardless of whether you use a ZZ or tt test, the decision logic is always identical across these three methods:

Method 1: Critical Region Technique​

  1. Look up the critical value (ZcritZ_{\text{crit}} or tcritt_{\text{crit}}) from the table using α\alpha and dfdf (see the Statistical Tables Guide or Statistical Tables PDF).
  2. Decision Rule: Reject H0H_0 if the calculated statistic falls past the critical boundary into the tail(s):
    • Left-Tailed: Reject if Zcal<−ZcritZ_{\text{cal}} < -Z_{\text{crit}}
    • Right-Tailed: Reject if Zcal>+ZcritZ_{\text{cal}} > +Z_{\text{crit}}
    • Two-Tailed: Reject if ∣Zcal∣>Zcrit\lvert Z_{\text{cal}} \rvert > Z_{\text{crit}}

Method 2: P-Value Technique​

  1. Use the table to find the probability tail area beyond your calculated test statistic. (Multiply by 2 if it is a two-tailed test).
  2. Decision Rule: Reject H0H_0 if p-value≤αp\text{-value} \le \alpha.

Method 3: Confidence Interval Technique​

  1. Construct the (1−α)(1 - \alpha) confidence interval: xˉ±(Critical Value×SE)\bar{x} \pm (\text{Critical Value} \times SE).
  2. Decision Rule: Reject H0H_0 if the claimed parameter (μ0\mu_0, or 00 for two-sample differences) falls outside the calculated interval.

4. Worked Archetypes (Cycle Test Focus)​

Archetype 1: One-Sample ZZ-Test (Two-Tailed)​

Scenario: Claim: average sugar content is 15g15\text{g} with σ=3g\sigma = 3\text{g}. A sample of n=50n = 50 cans has mean xˉ=14g\bar{x} = 14\text{g}. Test at α=0.05\alpha = 0.05.

  1. Hypotheses: H0:μ=15H_0: \mu = 15 vs H1:μ≠15H_1: \mu \neq 15 (α/2=0.025\alpha/2 = 0.025).
  2. Standard Error & Test Statistic: SE=350≈0.4243  ⟹  Zcal=14−150.4243≈−2.36SE = \frac{3}{\sqrt{50}} \approx 0.4243 \implies Z_{\text{cal}} = \frac{14 - 15}{0.4243} \approx \mathbf{-2.36}
  3. Critical Region Method: Zcrit=±1.96Z_{\text{crit}} = \pm 1.96. Since −2.36<−1.96  ⟹  -2.36 < -1.96 \implies Reject H0H_0.
  4. P-Value Method: p=2×P(Z<−2.36)=2(0.0091)=0.0182≤0.05  ⟹  p = 2 \times P(Z < -2.36) = 2(0.0091) = 0.0182 \le 0.05 \implies Reject H0H_0.
  5. CI Method: CI95%=14±1.96(0.4243)=[13.17,14.83]\text{CI}_{95\%} = 14 \pm 1.96(0.4243) = [13.17, 14.83]. Since 15∉[13.17,14.83]  ⟹  15 \notin [13.17, 14.83] \implies Reject H0H_0.

Archetype 2: One-Sample tt-Test (One-Tailed)​

Scenario: Manufacturer claims battery life is at least 20 hours20\text{ hours}. Sample of n=30n = 30 has xˉ=18 hours\bar{x} = 18\text{ hours} and s=4 hourss = 4\text{ hours}. Test at α=0.05\alpha = 0.05.

  1. Hypotheses: H0:μ≥20H_0: \mu \ge 20 vs H1:μ<20H_1: \mu < 20 (Left-tailed, df=30−1=29df = 30 - 1 = 29).
  2. Standard Error & Test Statistic: SE=430≈0.7303  ⟹  tcal=18−200.7303≈−2.74SE = \frac{4}{\sqrt{30}} \approx 0.7303 \implies t_{\text{cal}} = \frac{18 - 20}{0.7303} \approx \mathbf{-2.74}
  3. Critical Region Method: Left-tailed tcrit=−1.699t_{\text{crit}} = -1.699. Since −2.74<−1.699  ⟹  -2.74 < -1.699 \implies Reject H0H_0.
  4. P-Value Method: p=P(t29<−2.74)=0.0052≤0.05  ⟹  p = P(t_{29} < -2.74) = 0.0052 \le 0.05 \implies Reject H0H_0.
  5. CI Method: Upper Bound=18+1.699(0.7303)=19.24 hours\text{Upper Bound} = 18 + 1.699(0.7303) = 19.24\text{ hours}. Since claimed 20>19.24  ⟹  20 > 19.24 \implies Reject H0H_0.

Archetype 3: Two-Sample Independent ZZ-Test​

Scenario: Battery A (n1=50,xˉ1=280h,s1=20hn_1 = 50, \bar{x}_1 = 280\text{h}, s_1 = 20\text{h}) vs Battery B (n2=40,xˉ2=260h,s2=25hn_2 = 40, \bar{x}_2 = 260\text{h}, s_2 = 25\text{h}). Test if Battery A lasts longer at α=0.05\alpha = 0.05.

  1. Hypotheses: H0:μA≤μBH_0: \mu_A \le \mu_B vs H1:μA>μBH_1: \mu_A > \mu_B (Right-tailed, α=0.05\alpha = 0.05).
  2. Standard Error & Test Statistic: SEdiff=20250+25240=8+15.625≈4.8606SE_{\text{diff}} = \sqrt{\frac{20^2}{50} + \frac{25^2}{40}} = \sqrt{8 + 15.625} \approx 4.8606 Zcal=280−2604.8606≈+4.11Z_{\text{cal}} = \frac{280 - 260}{4.8606} \approx \mathbf{+4.11}
  3. Decision: Zcrit=+1.645Z_{\text{crit}} = +1.645. Since +4.11>+1.645  ⟹  +4.11 > +1.645 \implies Reject H0H_0. Battery A lasts significantly longer.

PART B: EXCLUDED FROM CYCLE TEST (Proportions & Paired Tests)​

warning

Excluded from Upcoming Cycle Test

The following tests are explicitly excluded from your current cycle test. They are documented here solely for your comprehensive semester exam reference.

1. Proportion Tests (Categorical Data)​

Always uses the ZZ-Distribution.

  • One-Sample Proportion (pp vs p0p_0): SE0=p0q0n  ⟹  Zcal=p^−p0SE0SE_0 = \sqrt{\frac{p_0 q_0}{n}} \implies Z_{\text{cal}} = \frac{\hat{p} - p_0}{SE_0}

  • Two-Sample Proportion (p1p_1 vs p2p_2):

    • First, calculate the pooled proportion (pˉ\bar{p}): pˉ=x1+x2n1+n2,qˉ=1−pˉ\bar{p} = \frac{x_1 + x_2}{n_1 + n_2}, \quad \bar{q} = 1 - \bar{p}
    • Then calculate standard error and ZcalZ_{\text{cal}}: SEpool=pˉqˉ(1n1+1n2)  ⟹  Zcal=p^1−p^2SEpoolSE_{\text{pool}} = \sqrt{\bar{p}\bar{q} \left( \frac{1}{n_1} + \frac{1}{n_2} \right)} \implies Z_{\text{cal}} = \frac{\hat{p}_1 - \hat{p}_2}{SE_{\text{pool}}}

2. Paired Sample tt-Test​

Used when two measurements are taken on the same subjects (e.g., Before and After a program):

  1. Reduce to One Sample: Calculate differences for each pair: d=After−Before(or Before−After)d = \text{After} - \text{Before} \quad (\text{or } \text{Before} - \text{After})
  2. Calculate Metrics of Differences:
    • Mean of differences: dˉ=∑dn\bar{d} = \frac{\sum d}{n}
    • Standard deviation of differences: sd=∑(d−dˉ)2n−1s_d = \sqrt{\frac{\sum (d - \bar{d})^2}{n - 1}}
  3. Execute as a One-Sample tt-Test: SEdˉ=sdnSE_{\bar{d}} = \frac{s_d}{\sqrt{n}} tcal=dˉ−0SEdˉ(with df=n−1)t_{\text{cal}} = \frac{\bar{d} - 0}{SE_{\bar{d}}} \quad (\text{with } df = n - 1)