UNIHIVE

Study Hub UNIPORT ENG 301

ENG 301 · Engineering Mathematics IV (Probability and Statistics)

Hypothesis testing

Null and alternative hypotheses, errors of type I and II, z and t tests for means, tests for proportions, p-values, and the chi-square goodness-of-fit test.

Our notes

2 min read

The idea

  1. State H₀ (no change, the claim being tested: μ = 30) and H₁ (μ ≠ 30, μ < 30 or μ > 30).
  2. Choose the significance level α (often 0.05).
  3. Compute a test statistic from the sample.
  4. Compare with the critical value (or compute the p-value).
  5. Reject H₀ if the statistic falls in the rejection region (or p < α); otherwise fail to reject.
  6. State the conclusion in words.

Errors

H₀ trueH₀ false
Reject H₀Type I error (probability α)correct (power = 1 − β)
Don't rejectcorrectType II error (probability β)

Raising the sample size lowers β for a fixed α.

Tests for a mean

  • σ known or n large: z = (x̄ − μ₀)/(σ/√n).
  • σ unknown, small n, normal data: t = (x̄ − μ₀)/(s/√n), n − 1 degrees of freedom.

Worked example. A supplier claims cement cubes reach 30 MPa. A sample of 36 gives x̄ = 29.1 MPa; σ = 2.4 MPa (known from past records). Test H₀: μ = 30 against H₁: μ < 30 at α = 0.05.
z = (29.1 − 30)/(2.4/6) = −0.9/0.4 = −2.25. One-tailed critical value −1.645. Since −2.25 < −1.645, reject H₀: the strength is below the claim. p-value = P(Z < −2.25) = 1 − 0.9878 = 0.012.
Worked example (t). 10 bolts: x̄ = 10.12 mm, s = 0.15 mm; nominal 10.00 mm. t = 0.12/(0.15/√10) = 0.12/0.0474 = 2.53; two-tailed critical t(0.025, 9) = 2.262. Reject H₀: the mean differs from nominal (recalibrate the machine).

Two means and proportions

  • Two independent means (large samples): z = (x̄₁ − x̄₂)/√(s₁²/n₁ + s₂²/n₂). For small samples with equal variances, a pooled t test.
  • Paired data (before and after on the same items): test the mean of the differences with a t test.
  • Proportion: z = (p̂ − p₀)/√(p₀(1 − p₀)/n).

Worked example. A process should give at most 5% defectives; 18 of 200 sampled are defective: p̂ = 0.09; z = (0.09 − 0.05)/√(0.05 × 0.95/200) = 0.04/0.0154 = 2.60 > 1.645: reject H₀; the process is out of control.

Chi-square goodness of fit

χ² = Σ (O − E)²/E with (number of classes − 1 − estimated parameters) degrees of freedom. Tests whether data follow a model (Poisson arrivals, a fair die, equal failures per shift).
Worked example. Failures by shift: 30, 20, 10 (total 60). If equally likely, E = 20 each. χ² = (100 + 0 + 100)/20 = 10.0; critical χ²(0.05, 2) = 5.99. Reject H₀: failures are not spread evenly across shifts (check the night shift).

Computers

Spreadsheets and packages (Excel's Data Analysis tool, R, Python, MATLAB, SPSS, Minitab) do these tests; you still need to choose the right test and read the output.

Exams usually ask: set up hypotheses; type I and II errors and power; one- and two-tailed z and t tests; tests for proportions and two means; p-values; chi-square goodness of fit.

Common mistake: writing "we accept H₀" or "H₀ is proved". A test can only reject H₀ or fail to reject it; not rejecting means the data are not strong enough evidence against it.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All ENG 301 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.