One-Sample Tests
Learn to perform one-sample hypothesis tests. Master z-tests, t-tests, and proportion tests for single populations.
On This Page
Identify the parameter you are testing
One sample can answer questions about a mean, a proportion, or a distribution. These use different reference models. “One sample” describes the design, not a single universal test.
| Parameter and information | Common procedure |
|---|---|
| Numerical mean, population SD unknown | One-sample t-test |
| Numerical mean, population SD genuinely known | Mean z-test under a suitable normal model |
| Binary success proportion | Binomial test or suitable proportion z approximation |
| Category probabilities | Chi-square goodness-of-fit with adequate expected counts |
Use independent observational units and define the target population. Multiple measurements of one unit do not automatically increase the number of independent units.
Test a numerical mean
For H₀: μ = μ₀, the usual unknown-SD statistic is:
A sample of 25 packs has mean 498 g and sample SD 5 g. Test μ₀ = 500 g, two-sided. SE = 5/5 = 1 g, so t = −2, df = 24, and p ≈ 0.0569.
At α = 0.05, fail to reject. The matching 95% interval is 498 ± 2.0639, or [495.9361, 500.0639] g. It includes the target and also includes practically relevant underfilling. The decision does not demonstrate that the process meets a tolerance requirement.
The t-test calculator accepts raw observations, not these summary inputs. The confidence interval calculator accepts mean, SD, and n. Read the t-test lesson for a raw-data example you can reproduce directly.
Use a mean z-test only when σ is genuinely known and the normal model for the mean is justified. A large sample does not turn a sample SD into a known population SD.
Test a success proportion
For H₀: p = p₀, the null-model normal approximation uses:
Use p₀, not p̂, in this test denominator. A confidence interval estimates uncertainty differently and may use another method.
Suppose 76 of 200 respondents choose online delivery, and the predeclared question is whether population preference exceeds 30%:
- p̂ = 76/200 = 0.38.
- H₀: p = 0.30; H₁: p > 0.30.
- Null expected successes = 60 and failures = 140, adequate for a common introductory approximation check.
- SE₀ = √(0.30 × 0.70/200) ≈ 0.0324.
- z ≈ 2.4689; upper-tail normal p ≈ 0.0068.
This is the uncorrected normal approximation. An exact binomial test uses the binomial upper tail and gives a different p-value. State the method. The site does not currently provide a dedicated proportion-test calculator.
Use exact binomial reasoning when the approximation is poor
If a success probability under H₀ is 0.01 and n = 20, the expected number of successes is only 0.2. A normal approximation to this very discrete distribution is unreliable.
The probability of at least one success is:
An observed success is not automatically strong evidence against the null. Exact procedures still rely on independent trials with a suitable common success probability; “exact” does not fix the sampling design.
Decide the direction and report the estimate
A two-sided test asks about deviations in either direction. A one-sided test requires its direction to be justified before inspecting the result. Switching after observing the sign changes the analysis.
Report the observed mean or proportion, sample size, null value, test method, uncertainty, and limitations. A significance label alone hides whether the effect is operationally meaningful.
Practice
A proportion test has n = 100, 12 successes, and H₀: p = 0.10. Which proportion belongs in its null standard error?
Show the solution
Use 0.10, giving SE₀ = √(0.10 × 0.90/100) = 0.03. The observed proportion is 0.12, so z = 0.02/0.03 = 0.6667. An uncorrected two-sided normal approximation gives p ≈ 0.5050. Check approximation conditions and design before relying on it.
Continue learning
Compare two-sample designs, review binomial probabilities, or use test selection to identify the parameter and design first.
Did this explanation help?
Your response helps us identify lessons that need more work.