AP Stats Hypothesis Testing Calculator

A hypothesis test asks whether sample evidence is strong enough to reject a claim about a population mean. This page runs a one-sample z-test for a mean when the population standard deviation is known.

One-Sample Z-Test for a Mean

Enter values, then click Calculate.

Interactive visual: Live preview

Press Show live preview to redraw this chart from your calculator inputs.

What Is Hypothesis Testing?

Hypothesis testing is the formal process of deciding whether sample data give convincing evidence against a claim about a population. You start with a null hypothesis, the claim you test, and an alternative hypothesis, the claim you suspect instead. You compute a test statistic and a p-value, then reject the null hypothesis only when the p-value is small enough, usually below 0.05.

Interactive visual: See the idea

Example: x-bar = 52, mu = 50, sigma = 10, n = 36 — z = 1.20, p about 0.23, so fail to reject H0.

How to Use This Calculator

Interactive visual: Walk through it

Step 1: Open the AP Stats Hypothesis Testing Calculator calculator at the top and enter the values it asks for.

Enter the sample mean, the claimed population mean, the known population standard deviation, and the sample size. Choose α, then click Calculate. The result gives the standard error, z-statistic, two-tailed p-value, and the decision at your α. The curve shades both tails beyond |z|, which is where a two-tailed p-value comes from.

How to Calculate a One-Sample Z-Test

Interactive visual: See it on a chart

Press Update visual to redraw this chart from your calculator inputs.

Formulas: standard error SE = σ / √n, test statistic z = (x̄ − μ₀) / SE, and two-tailed p-value p = 2 × P(Z > |z|). Reject H₀ if p < α.

Worked example: x̄ = 52, μ₀ = 50, σ = 10, n = 36, α = 0.05. SE = 10 / √36 = 1.667. z = (52 − 50) / 1.667 = 1.20. Two-tailed p ≈ 0.2301. Since 0.2301 > 0.05, fail to reject H₀: the sample does not give convincing evidence that the true mean differs from 50.

Tips and Common Mistakes

Interactive visual: Mistake vs correct

Mistake: Accepting H0 as proven when you fail to reject it.

Frequently Asked Questions

Interactive visual: FAQ

Tap any question below to show or hide its answer.

What is the null hypothesis in this calculator?

H₀: μ = μ₀, the claimed population mean you entered. The alternative is two-sided: μ ≠ μ₀.

When should I use a z-test instead of a t-test?

Use a z-test when σ is known. In AP Statistics, most mean tests use a t-test because σ is rarely known.

What does the p-value mean?

Assuming H₀ is true, it is the probability of getting a sample mean at least as far from μ₀ as yours, in either direction.

Why is the decision “fail to reject” and not “accept”?

A non-significant result does not prove H₀ is true; it only means the evidence was not strong enough to reject it.

What if my z is negative?

The sign shows direction (sample mean below μ₀). For a two-tailed test, only |z| matters for the p-value.

Does a larger sample always help?

Yes, in general: larger n gives a smaller standard error, so the same difference from μ₀ produces a larger |z| and a smaller p-value.

Disclaimer: AP is a trademark of the College Board, which was not involved in this site.

Related Calculators and Guides

Keep exploring AP Statistics with calculators and guides related to this tool.

Related Calculators

Interactive visual: Tool path

Start with this tool, then follow the path through the related calculators.

Hypothesis Testing Calculator → P-Value Calculator → T-Test Calculator

Related Guides

All AP Statistics Calculators

Use any of the 25 free calculators below, no login needed. Each calculator opens on its own page with its own formula, worked example, tips, and FAQs.

AP Statistics Score Calculator Z-Score Calculator P-Value Calculator T-Test Calculator Confidence Interval Calculator Margin of Error Calculator Standard Deviation Calculator Chi-Square Calculator Binomial Distribution Calculator Normal Distribution Calculator Expected Value Calculator Hypothesis Testing Calculator Sample Size Calculator Correlation Coefficient Calculator Residual Calculator Linear Regression Calculator Two-Sample T-Test Calculator Proportion Confidence Interval Calculator Variance Calculator Geometric Distribution Calculator Percentile Calculator Degrees of Freedom Calculator Outlier Calculator R-Squared Calculator Poisson Distribution Calculator

Read the AP Statistics guides for worked examples, TI-84 steps, and exam strategy.