haya.Learning made clear
Unit VIII · Statistics, operations and operations research
11 min readConcept sheetMCQ · pick the test and compute the statistic

Hypothesis testing: z, t, F and chi-square tests

Set H₀ and H₁, fix α, compute the statistic, compare with the critical value. Type I error: rejecting a true H₀. Type II error: accepting a false H₀.

Level of significance (α)P(Type I error), usually 5% or 1%. Confidence level = 1 − α
β and powerβ = P(Type II error); the power of a test = 1 − β
Critical z valuesTwo-tailed: 1.96 (5%), 2.58 (1%). One-tailed: 1.645 (5%), 2.33 (1%)
Chi-square dfIndependence: (r − 1)(c − 1). Goodness of fit: k − 1, less one more for each estimated parameter

Procedure for testing a hypothesis

  1. 1★
    State the null hypothesis H₀ (no difference, no effect) and the alternative H₁.
    H₁ decides one-tailed or two-tailed
  2. 2
    Choose the level of significance α, e.g. 5%.
  3. 3
    Choose the test and its statistic (z, t, F or χ²) to suit the data and sample size.
  4. 4
    Find the critical value or region from tables for α and the degrees of freedom.
  5. 5
    Compute the test statistic from the sample.
  6. 6★
    Decide: reject H₀ if the computed value falls in the critical region (or the p-value is below α); otherwise do not reject it.
  7. 7
    State the conclusion in plain words.

★ one-way, controls the pace

Type I and Type II errors

DecisionH₀ is trueH₀ is false
Reject H₀Type I error (α): a false alarmCorrect decision; probability = power (1 − β)
Do not reject H₀Correct decision; probability 1 − αType II error (β): a missed effect

Which test when

TestUse it whenStatisticDegrees of freedom
z testLarge sample (n > 30) or σ known; means or proportionsz = (x̄ − μ) ÷ (σ ÷ √n)None needed (normal table)
t test (W. S. Gosset, 'Student', 1908)Small sample (n ≤ 30) and σ unknown; one mean, two means or paired datat = (x̄ − μ) ÷ (s ÷ √n)n − 1 for one sample (or n pairs); n₁ + n₂ − 2 for two independent samples
F test (R. A. Fisher; named by Snedecor)Equality of two variances; the basis of ANOVA for three or more meansF = larger variance ÷ smaller variance(n₁ − 1, n₂ − 1), numerator sample first
Chi-square (Karl Pearson, 1900)Goodness of fit; independence of attributes; a single varianceχ² = Σ(O − E)² ÷ Ek − 1, or (r − 1)(c − 1)

Parametric vs non-parametric tests

ParametricAssume a distribution (usually normal) and interval or ratio data. Examples: z, t, F and ANOVA.
Non-parametric (distribution-free)Make no assumption about the population's shape and suit nominal or ordinal data. Examples: chi-square test of independence, sign test, Mann-Whitney U, Wilcoxon signed-rank, Kruskal-Wallis H, run test, Spearman's rank correlation.

Mann-Whitney U and Kruskal-Wallis H are the non-parametric cousins of the two-sample t test and one-way ANOVA.

Worked example 1: z test for a mean

Problem

A packaging firm claims its tea packets weigh 500 g on average, with σ = 12 g. A sample of 36 packets has a mean of 496 g. Test the claim at 5% and at 1% (two-tailed).

Working
  1. H₀: μ = 500 g; H₁: μ ≠ 500 g.
  2. Standard error = σ ÷ √n = 12 ÷ √36 = 12 ÷ 6 = 2.
  3. z = (496 − 500) ÷ 2 = −2, so |z| = 2.
  4. At 5%, 2 > 1.96: reject H₀. At 1%, 2 < 2.58: do not reject H₀.
Answer

|z| = 2. The mean weight differs significantly from 500 g at the 5% level but not at the 1% level.

Worked example 2: one-sample t test

Problem

Nine salespersons made a mean of 52 calls a week, with sample SD s = 6. Is this significantly different from the target of 48 at 5%? (t for 8 df, two-tailed 5% = 2.306)

Working
  1. H₀: μ = 48. n = 9 is small and σ is unknown, so use t with df = 9 − 1 = 8.
  2. Standard error = s ÷ √n = 6 ÷ 3 = 2.
  3. t = (52 − 48) ÷ 2 = 2.0.
  4. 2.0 < 2.306, so do not reject H₀.
Answer

t = 2.0 with 8 df; the difference is not significant at 5%.

Worked example 3: chi-square test of independence

Problem

A survey of 100 shoppers: 30 men and 20 women prefer buying online; 20 men and 30 women prefer stores. Is preference independent of gender at 5%? (χ² for 1 df at 5% = 3.841)

Working
  1. Row totals: men 50, women 50. Column totals: online 50, store 50. N = 100.
  2. Each expected frequency E = row total × column total ÷ N = 50 × 50 ÷ 100 = 25.
  3. χ² = (30 − 25)²/25 + (20 − 25)²/25 + (20 − 25)²/25 + (30 − 25)²/25 = 1 + 1 + 1 + 1 = 4.0.
  4. df = (2 − 1)(2 − 1) = 1. Since 4.0 > 3.841, reject H₀.
Answer

χ² = 4.0 > 3.841, so preference is associated with gender at the 5% level.

How NET asks this

NET asks which test fits a situation (small sample and unknown σ → t; two variances → F; attributes → χ²), the meaning of Type I and Type II errors, critical values and degrees of freedom, and short z or χ² calculations.

Exam angle

Typical MCQ: “n = 16, x̄ = 53, s = 4 and H₀: μ = 50. Find t and its df.” t = (53 − 50) ÷ (4 ÷ √16) = 3 ÷ 1 = 3, with df = 15. Trap: dividing by n instead of √n, or using df = 16.

Typical MCQ: “What is the critical z for a two-tailed test at 5%?” ±1.96. Trap: 1.645 is the one-tailed 5% value.

Typical MCQ: “What is the power of a test?” 1 − β: the probability of rejecting H₀ when it is false. Trap: confusing it with 1 − α, the confidence level.

Remember it

Type I = false alarm (convicting an innocent H₀); Type II = missed catch (freeing a guilty H₀). Small sample and unknown σ → t; two variances → F; counts in a table → χ².