Unit 4002Hypothesis Testing
Your Progress
16%

⚖️ Hypothesis Testing

Has a new process actually changed the average output, or could the difference just be random sample variation? Hypothesis testing gives a formal, repeatable procedure for answering exactly that question.

Level 4 HN Engineering MathsInteractive ToolsVisual DiagramsGraded Practice
2Topics
8Worked Examples
4Eng. Cases
12Practice Qs
📋Hypotheses & z-testH₀, H₁, significance
📉t-test & ErrorsSmall samples, Type I/II
⚙️ApplicationsReal engineering
🎮Quick-Fire GameTest your speed
📝PracticeGraded questions
🎯What you will learn
State null and alternative hypotheses correctly; perform a z-test or t-test for a population mean; compare test statistics to critical values; and understand Type I and Type II errors.
💡 A hypothesis test never "proves" H₀ true — it only ever finds "insufficient evidence to reject it." That distinction matters: absence of evidence is not evidence of absence.
🧭How to use this resource
1. Read the rules banner at the top of each tab
2. Experiment with the interactive tool
3. Check the key vocabulary panel
4. Study the visual diagram, then the worked examples
📋

Hypotheses & the z-test

A structured procedure: state two competing claims, gather evidence, and decide which the data supports.

📏 The Rules — Setting Up a Test

H₀: μ = μ₀
The null hypothesis — the default "no change" claim
H₁: μ ≠ μ₀ (or <, >)
The alternative — what you suspect might actually be true
z = (x̄ − μ₀) / (σ/√n)
The test statistic when σ is known
🔧z-test CalculatorEnter x̄, μ₀, σ, n and significance level
Enter x̄, μ₀, σ, n, choose the test type, then press Calculate to see the test statistic and decision (using 5% significance)…

📖 Key Vocabulary

Null hypothesis (H₀) — the default assumption of no change or no effect, tested against the evidence.
Alternative hypothesis (H₁) — what is concluded if H₀ is rejected.
Significance level (α) — the probability of wrongly rejecting a true H₀; commonly 5% or 1%.
Critical value — the boundary z (or t) value beyond which H₀ is rejected.
−1.96 +1.96 Two-tailed test at α=5% — reject H₀ in either red region
👁️ Visual aid: if the test statistic falls in either shaded tail, the result is considered too unlikely under H₀, so H₀ is rejected.
✏️Worked Example 1 — Two-tailed z-testType: Two-tailed
Question A machine is claimed to fill bags to μ₀=50kg. A sample of 40 bags gives x̄=51.2kg, σ=3kg. Test at 5% significance whether the mean has changed.
Hypotheses H₀: μ=50, H₁: μ≠50
Test statistic z = (51.2−50)/(3/√40) = 1.2/0.4743 = 2.530
Compare Critical value for two-tailed 5% is ±1.96; |2.530| > 1.96
Answer Reject H₀ — there is significant evidence the mean fill weight has changed.
➡️Worked Example 2 — One-tailed z-testType: One-tailed
Question A supplier claims a component's mean lifetime is at least 500 hours. A sample of 36 gives x̄=490, σ=24. Test at 5% whether the mean is actually less.
Hypotheses H₀: μ=500, H₁: μ<500
Test statistic z = (490−500)/(24/√36) = −10/4 = −2.5
Compare One-tailed critical value at 5% is −1.645; −2.5 is more extreme (further left)
Answer Reject H₀ — evidence suggests the true mean lifetime is below the claimed 500 hours.
🤷Worked Example 3 — Failing to reject H₀Type: Non-significant result
Question A process should average μ₀=100. A sample of 25 gives x̄=101.5, σ=6. Test at 5% (two-tailed) whether the mean has shifted.
Test statistic z = (101.5−100)/(6/√25) = 1.5/1.2 = 1.25
Compare |1.25| < 1.96
Answer Do not reject H₀ — insufficient evidence of any real shift; the observed difference is consistent with normal sample variation.
⚙️Worked Example 4 — Engineering context (checking a spec claim)Type: Engineering
Question A cable is specified to have mean breaking strength 800N. QC samples 50 cables: x̄=793N, σ=25N. Test at 1% whether the mean is below spec.
Hypotheses H₀: μ=800, H₁: μ<800
Test statistic z = (793−800)/(25/√50) = −7/3.536 = −1.980
Compare One-tailed critical value at 1% is −2.326; −1.980 is not as extreme
Answer Do not reject H₀ at the 1% level — despite the sample mean being below spec, there isn't strong enough evidence yet to conclude the true mean is genuinely below 800N.
🧠 Common slip: using the two-tailed critical value (±1.96) for a one-tailed test, or vice versa — always match the critical value to whether H₁ uses ≠ (two-tailed) or </> (one-tailed).
📉

The t-test & Decision Errors

For small samples with unknown σ, use t instead of z — and understand the two ways a decision can go wrong.

📏 The Rules — t-test & Errors

t = (x̄ − μ₀) / (s/√n)
Same structure as z, but using sample SD s and df=n−1
Type I error
Rejecting a true H₀ (false alarm) — probability = α
Type II error
Failing to reject a false H₀ (missed detection) — probability = β
🔧t-test CalculatorEnter x̄, μ₀, s, n and the critical t-value
Enter x̄, μ₀, s, n and the critical t-value from the table, then press Calculate for the test statistic and decision…

📖 Key Vocabulary

t-test — a hypothesis test for the mean using the t-distribution, for small samples with unknown σ.
Type I error (α) — concluding there's an effect when there really isn't one (a "false positive").
Type II error (β) — missing a real effect that does exist (a "false negative").
Power of a test — 1−β, the probability of correctly detecting a real effect.
H₀ True H₀ False Reject H₀ Don't reject Type I error (α) Correct ✓ Correct ✓ Type II error (β)
👁️ Visual aid: every test decision falls into one of these four boxes — two are correct, two are errors, and reducing one type of error usually increases the other.
✏️Worked Example 1 — Full t-testType: Standard t-test
Question A batch should average μ₀=50. A sample of 12 gives x̄=48.6, s=3.5. Using critical t=2.201 (5%, df=11, two-tailed), test H₀.
Test statistic t = (48.6−50)/(3.5/√12) = −1.4/1.0104 = −1.386
Compare |−1.386| < 2.201
Answer Do not reject H₀ — no significant evidence of a change in the mean.
🚨Worked Example 2 — Identifying a Type I errorType: Type I error
Question A test rejects H₀ (concluding a process has changed) at α=5%, but the process actually hadn't changed at all. Name and explain this error.
Identify Rejecting a true H₀
Answer This is a Type I error — a "false alarm." Setting α=5% means this happens by chance in about 1 in 20 tests, purely from random sampling variation, even when nothing has really changed.
🔍Worked Example 3 — Identifying a Type II errorType: Type II error
Question A process mean has genuinely shifted, but the test fails to detect this and does not reject H₀. Name this error and suggest one way to reduce its chance.
Identify Failing to reject a false H₀
Answer This is a Type II error (β) — a "missed detection." Increasing the sample size n generally reduces β, making the test more powerful at detecting real shifts.
⚙️Worked Example 4 — Engineering context (limited prototype samples)Type: Engineering
Question A new alloy is claimed to have mean yield strength 250MPa. Only 8 samples could be tested: x̄=244, s=6. Using critical t=2.365 (5%, df=7, two-tailed), test the claim.
Test statistic t = (244−250)/(6/√8) = −6/2.121 = −2.828
Compare |−2.828| > 2.365
Answer Reject H₀ — there is significant evidence the true mean yield strength is not 250MPa, despite the small sample size, since the deviation is large relative to the sample's variability.
🧠 Common slip: assuming "do not reject H₀" means H₀ is proven true — it only means the evidence wasn't strong enough to reject it; a Type II error (missing a real effect) is always a live possibility, especially with small samples.
⚙️

Engineering Applications

Four live scenarios — each with its own calculator. Enter your own numbers.

🏭 Process Shift Detection

Detecting whether a manufacturing process mean has drifted from its target specification.

z = (x̄ − μ₀) / (σ/√n)
📟 Try it — Process Shift Test
Enter x̄, μ₀, σ and n, then press Calculate (5% two-tailed, critical z=1.96)…

🔩 Supplier Claim Verification

Testing whether a supplier's stated component specification (e.g. minimum strength) actually holds up.

One-tailed z-test: H₁: μ < μ₀
📟 Try it — Supplier Claim Test
Enter x̄, μ₀, σ and n, then press Calculate (5% one-tailed, critical z=−1.645)…

🔬 Small-Sample Material Test

With only a handful of expensive destructive tests available, the t-test is essential for a defensible conclusion.

t = (x̄ − μ₀) / (s/√n)
📟 Try it — Small-Sample t-test
Enter x̄, μ₀, s, n and critical t, then press Calculate…

🚦 Setting Inspection Sensitivity

Choosing between α levels (5% vs 1%) reflects a trade-off between catching real problems and tolerating false alarms.

Lower α → harder to reject H₀ → fewer false alarms, more missed detections
📟 Try it — Significance Level Comparator
Enter the test statistic, then press Compare against 5% (1.96) and 1% (2.576) two-tailed critical values…
🎮

Quick-Fire Hypothesis Testing Game

12 questions on hypotheses, tests and errors. How many can you get?

⚡ Hypothesis Testing Challenge

Score: 0Question: 1/12Streak: 0🔥
Press Start to begin!
📝

Practice Questions

Graded from warm-up to challenge. Use z-critical=1.96 (two-tailed 5%), 1.645 (one-tailed 5%) where needed.

🥉 Q1–4 Warm-up🥈 Q5–8 Standard🥇 Q9–12 Challenge
Question 1 🥉2 marks
State the null hypothesis for testing whether a machine's mean output has changed from 200 units.
H₀: μ = 200
Question 2 🥉2 marks
A Type I error means…
Rejecting a true H₀ (a false alarm)
Question 3 🥉2 marks
A Type II error means…
Failing to reject a false H₀ (a missed detection)
Question 4 🥉2 marks
For x̄=52, μ₀=50, σ=4, n=25, find the z test statistic.
(52−50)/(4/√25) = 2/0.8 = 2.5
Question 5 🥈4 marks
Using z=2.5 from Q4, decide (two-tailed, 5%, critical=1.96) whether to reject H₀.
|2.5| > 1.96
Reject H₀ — significant evidence of a change
Question 6 🥈4 marks
For x̄=98, μ₀=100, σ=5, n=16, find z and decide (two-tailed, 5%).
z=(98−100)/(5/√16)=−2/1.25=−1.6
|−1.6|<1.96
Do not reject H₀
Question 7 🥈3 marks
A one-tailed test at 5% has critical value −1.645. Explain when this critical value (rather than ±1.96) should be used.
When H₁ specifies a direction (μ<μ₀ or μ>μ₀), not just μ≠μ₀ — a one-tailed test puts the entire 5% rejection region in one tail rather than splitting it across two.
Question 8 🥈4 marks
For a t-test with n=10, s=4, x̄=47, μ₀=50 and critical t=2.262 (5%, df=9), find t and the decision.
t=(47−50)/(4/√10)=−3/1.265=−2.372
|−2.372|>2.262
Reject H₀
Question 9 🥇5 marks
A supplier claims minimum breaking strength 600N. A sample of 45 gives x̄=590, σ=30. Test at 5% (one-tailed, critical z=−1.645) whether the claim is overstated.
H₀:μ=600, H₁:μ<600
z=(590−600)/(30/√45)=−10/4.472=−2.236
−2.236<−1.645
Reject H₀ — the claim appears overstated
Question 10 🥇5 marks
A new alloy sample (n=9) gives x̄=305, s=8, tested against claimed μ₀=310 using critical t=2.306 (5%, df=8, two-tailed). Find t and the decision.
t=(305−310)/(8/√9)=−5/2.667=−1.875
|−1.875|<2.306
Do not reject H₀ — insufficient evidence of a difference from 310
Question 11 🥇5 marks
Explain, using α and β, why reducing the significance level from 5% to 1% (to reduce false alarms) typically increases the risk of missed detections.
Lowering α means moving the rejection region further into the tails (needing a larger test statistic to reject H₀)
This makes it harder to reject H₀ even when it's false, which directly increases β (Type II error) — the two error types trade off against each other for fixed sample size.
Question 12 🥇5 marks
A QC test on 60 units gives x̄=24.7, testing against a spec target of μ₀=25, with σ=1.2. Test at 1% (two-tailed, critical z=2.576) and comment on the result relative to the 5% conclusion.
z=(24.7−25)/(1.2/√60)=−0.3/0.1549=−1.937
At 1%: |−1.937|<2.576 → do not reject H₀
At 5% (critical 1.96): |−1.937|<1.96 also → do not reject either — the conclusion is the same at both levels here, though it would have been a close call at 5%.
SkillLondon

SkillLondon · Unit 4002 Engineering Mathematics · Hypothesis Testing · Level 4 HN Engineering Maths