How this instrument works
Hypothesis testing is the formal process of checking whether a sample's result is surprising enough, given a stated assumption about the population, to conclude that assumption is probably wrong. The assumption being tested — the null hypothesis — is usually a claim like 'the true population mean is mu0.' This calculator runs the standard one-sample z-test version of that check: it converts your sample mean into a z-statistic measuring how many standard errors it sits from the hypothesized mean, then compares that statistic against a critical value for your chosen significance level to reach an explicit decision.
The z-statistic is z = (x̄ − mu0) / (sigma / √n) — the gap between your sample mean and the hypothesized mean, scaled by the standard error of the mean. A z-statistic far from zero (in either direction) means your sample mean landed somewhere the null hypothesis says is unlikely. 'Far enough' is defined by the critical value, a fixed threshold looked up for your chosen two-tailed significance level (10%, 5%, or 1%): if the absolute value of z exceeds that threshold, the calculator rejects the null hypothesis; otherwise it fails to reject it.
This instrument uses a fixed table of critical values tied to a chosen significance level, feeding directly into a full accept/reject decision on a stated test — a decision-workflow calculator, not a general-purpose lookup tool. This site's separate critical-value instrument serves the opposite need: it accepts any significance level in between and returns the matching critical z-value on its own, without requiring a full test's worth of sample data or producing a final decision. Use hypothesis-testing when you have an actual sample to test against a claim; use critical-value when you just need a threshold number for a given alpha.
- Enter your sample's average into Sample mean (x-bar).
- Enter the value being tested against into Hypothesized population mean (mu0).
- Enter the population's known standard deviation into Population standard deviation (sigma).
- Enter how many observations are in your sample into Sample size (n).
- Choose your Significance level (two-tailed) — 10%, 5%, or 1% — from the dropdown.
- Read z-statistic, Critical z-value, and Reject the null hypothesis? for the full result and decision.
Worked example — a factory fill-weight check
A factory's filling machine is supposed to fill bags to a mean of 100 grams, with a known population standard deviation of 15 grams from historical process data. A quality check samples 25 bags and finds a sample mean of 105 grams. Enter 105 into Sample mean (x-bar), 100 into Hypothesized population mean (mu0), 15 into Population standard deviation (sigma), 25 into Sample size (n), and choose 5% for Significance level.
z-statistic = (105−100)/(15/√25) = 5/3 ≈ 1.6667. Critical z-value at the 5% two-tailed level reads 1.9600. Since |1.6667| is less than 1.9600, Reject the null hypothesis? reads 0 (no) — the sample mean, while higher than the target, isn't far enough from 100 grams to conclude the machine's true average has actually drifted, at this significance level and sample size.
Questions
What does 'fail to reject the null hypothesis' actually mean?
It means the sample data isn't surprising enough, at the chosen significance level, to conclude the hypothesized value is wrong — it is not the same as proving the null hypothesis true. In the worked example, failing to reject 'the true mean is 100 grams' doesn't confirm the mean is exactly 100; it just means a sample mean of 105 from 25 bags isn't unusual enough evidence against that claim, given the known variability in fill weights.
How is this different from this site's critical-value calculator?
Critical-value is a general-purpose lookup: give it any significance level (alpha) between 0 and 0.5, and it returns the matching one-tailed and two-tailed critical z-values on their own, with no sample data required. Hypothesis-testing is a complete decision workflow: it takes an actual sample mean, hypothesized mean, standard deviation, and sample size, computes the z-statistic, looks up the critical value for one of three fixed significance levels, and returns an explicit reject/fail-to-reject verdict. Use critical-value when you just need a threshold number; use hypothesis-testing when you have a real test to run.
Why only three significance-level choices instead of any value?
10%, 5%, and 1% are by far the most commonly used significance levels in applied statistics and cover the overwhelming majority of real hypothesis tests, so this calculator's decision workflow offers them directly as a dropdown. If you need a critical value at some other significance level, this site's critical-value instrument accepts any alpha in between and returns the matching z-value on its own.
What if I don't know the population's true standard deviation?
A z-test assumes sigma is known, typically from a large historical data set or a well-established measurement process. If you only have an estimate of the standard deviation from your sample itself, and especially with a small sample, a t-test is generally the more appropriate and more conservative choice, since it accounts for the extra uncertainty introduced by estimating sigma rather than knowing it outright.
Does rejecting the null hypothesis prove the alternative is true?
No — rejecting the null hypothesis means the evidence is strong enough, at your chosen significance level, to conclude the hypothesized value is probably wrong, but a rejection decision itself carries the same fixed false-positive rate as the significance level chosen: at alpha = 0.05, roughly 5% of tests on a true null hypothesis will still reject it purely by chance. A single test's rejection is evidence, not certainty.