Loading…

Hypothesis Tests About μ, σ Known, the P Value Approach

Statistics • Hypothesis Tests About the Mean and Proportion

View all topics

Hypothesis Tests About μ (σ Known): the p-value approach

Enter μ0, known σ, a tail type, and either raw sample data (paste from CSV) or a summary (n and x̄). The calculator computes z, the p-value, and the decision at significance level α.

Inputs

The sign in H₁ determines where “extreme” results live.
H₀ includes equality.
This is the z-test case where σ is treated as known.
Raw mode is best when you paste a column from a CSV file.
Tip: copy a column from Excel/Sheets/CSV and paste here. Separators: comma, semicolon, tab, space, new line.

Visualization

Run Calculate to see z, p-value, and shading.
Exploration controls activate after calculation.
Switch what the filled area represents.
Manual z (clamped to −4 … 4).
Drag to watch p-value / critical regions change.
Simple motion across tails.
Shaded = p-value (mode: p-value) Shaded = critical region(s) (mode: critical) Dashed = critical value(s) for α Solid = z
The curve is standard normal (mean 0, standard deviation 1). The observed test statistic z and the shaded area visualize the p-value (or the α rejection region), depending on the selected shading mode.

Results & p-value steps

Help: assumptions & what “σ known” means
This calculator applies the z-test for a population mean when the population standard deviation σ is treated as known. A normal distribution procedure is commonly used when either (a) the population is approximately normal and n is small, or (b) n is large (so the sampling distribution of x̄ is approximately normal).
Situation Typical condition What to do
Small sample + population approx normal n < 30 and distribution is close to normal (no extreme outliers) Use the normal z procedure
Large sample n ≥ 30 (sampling distribution of x̄ is usually approx normal) Use the normal z procedure
Small sample + not normal / unknown n < 30 and distribution is clearly non-normal or unknown Consider a nonparametric approach (outside this calculator)

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What does the p-value mean in a hypothesis test for a mean?

Assuming H0 is true, the p-value is the probability of getting a sample result at least as extreme as the observed one in the direction of H1. Smaller p-values indicate stronger evidence against H0.

How is the z test statistic computed when sigma is known?

The calculator uses z = (x-bar - mu0) / (sigma / sqrt(n)). This standardizes the difference between the sample mean and the null mean using the known standard error.

How is the two-tailed p-value calculated?

For a two-tailed test, the p-value is twice the tail area beyond the magnitude of the observed statistic, so it is 2 x P(Z >= |z|) under the standard normal model.

When is it reasonable to use the z test for a mean with sigma known?

It is commonly used when sigma is treated as known and either the sample size is large (often n >= 30) or the population distribution is approximately normal for smaller samples. If the population is clearly non-normal and n is small, the normal z procedure may be unreliable.

What decision rule does the calculator use with alpha?

Using the p-value approach, reject H0 if p-value <= alpha; otherwise, do not reject H0. “Do not reject” means there is not enough evidence at the chosen alpha, not that H0 is proven true.