Math · Introductory statistics · Worked example
Run a one-sample t-test
A filling machine should put 500 mL in each bottle. A random sample of 25 bottles has mean 497.2 mL and standard deviation 6 mL. Test H₀: μ = 500 against Hₐ: μ ≠ 500 at α = 0.05.
Check the conditions
The bottles were sampled at random and measured independently, and fill volumes are roughly normal.
Compute t
The standard error is 6/√25 = 1.2, and the mean sits 2.8 mL below the claim.
Find the p-value
With 24 degrees of freedom, a t at least 2.333 from 0 in either direction has probability about 0.0283.
Decide
0.0283 ≤ 0.05, so reject H₀: the mean fill differs from 500 mL. The 95% interval, 497.2 ± 2.064 × 1.2, runs from about 494.72 to 499.68 mL and excludes 500 as well.
Result
t ≈ −2.33 and p ≈ 0.028: reject H₀ at the 5% level. The machine appears to underfill on average.
Your turn
Test H₀: μ = 50 against Hₐ: μ ≠ 50 when n = 16, x̄ = 52.3 and s = 6.4.
Show the answer and explanation
t ≈ 1.44 with 15 degrees of freedom and p ≈ 0.17: fail to reject H₀.
The standard error is 6.4/4 = 1.6, so t = 2.3/1.6 ≈ 1.44. A two-sided p of about 0.17 is above 0.05.
Keep exploring
In Statistics, Distributions with t ≈ −2.333, 24 degrees of freedom and two tails gives p ≈ 0.0283. With the left tail only, p halves to about 0.0142.
Return to the concept →Sources and scope
Authored study material. Tool results depend on the stated inputs and model assumptions.
Try in the workspace
Open the example inputs, change a value and keep a useful result on your board.
Find the p-value in Statistics Check t in Math Open worked example on a board Confidence interval in Math ReferenceYour existing work stays on this device. Examples open as editable copies.