Hypothesis Testing Calculator

This hypothesis testing calculator works through a test step by step. Enter your sample summary to get the hypotheses, test statistic, p-value, critical value, confidence interval and a conclusion in words.

Checks on your data

  • Decide the hypotheses, α and tail before looking at the data. Choosing a one-tailed test after seeing the direction inflates false positives.

Results

Decision
Fail to reject H₀
p ≥ α
Test statistic t
1.8447
p-value
0.072691
Critical values
± 2.0227
Sample estimate
103.5
Standard error
1.89737
95% confidence interval
99.6622 to 107.338
Conclusion in words
At the 5% significance level, there is not sufficient evidence to conclude that μ differs from 100.
Sampling distribution under H₀: shaded = reject, line = your t
-4-2024t = 1.84
Confidence interval vs hypothesised value (100)
95% CI: 99.66 to 107.3H₀ value: 100 to 100100102104106108
Decision rules
Alternative H₁Reject H₀ ifYour result
μ ≠ 100 (two-tailed)|t| > 2.023fail to reject
μ > 100 (right)t > 1.685—
μ < 100 (left)t < -1.685—
Show step-by-step solution
  1. Step 1. State the hypotheses: H₀: μ = 100; H₁: μ ≠ 100.
  2. Step 2. Choose the significance level: α = 0.05. Test: One-sample t-test (σ unknown).
  3. Step 3. Compute the test statistic: t = (103.5 − 100) ÷ 1.89737 = 1.8447 with 39 df.
  4. Step 4. Find the p-value (two-tailed) = 0.072691 and the critical value ±2.0227.
  5. Step 5. Decide: p ≥ 0.05, fail to reject H₀. At the 5% significance level, there is not sufficient evidence to conclude that μ differs from 100.
StepsH₀/H₁, α, statistic, p-value, decision
Tests herez, t, proportion
OutputConclusion in words
Reject whenp < α

What Is Hypothesis Testing?

A hypothesis test asks whether the data give enough evidence to reject a null hypothesis. You state the null and alternative hypotheses, compute a test statistic, find the p-value, compare it with the significance level α and then state a conclusion in the context of the problem.

This calculator covers a one-sample z-test (σ known), a one-sample t-test (σ unknown) and a one-proportion z-test, with a two-tailed, left-tailed or right-tailed alternative. It lists each step, so it works as a worked solution as well as a calculator.

Below you will find the formulas, a variables table, a worked example and answers to common questions such as how to choose between z and t and how to write the conclusion.

How to Use the Hypothesis Testing Calculator

  1. Pick the test that matches your data: mean with σ unknown (most common), mean with σ known, or a proportion.
  2. Enter the sample statistics and the value claimed by the null hypothesis.
  3. Choose the alternative hypothesis (two-tailed unless there is a directional claim) and α.
  4. Follow the five steps listed under the result and read the conclusion.

Hypothesis Testing Formula

One-sample z statistic (σ known)

z=xˉ−μ0σ/nz=\frac{\bar x-\mu_0}{\sigma/\sqrt n}

One-sample t statistic (σ unknown)

t=xˉ−μ0s/n,df=n−1t=\frac{\bar x-\mu_0}{s/\sqrt n},\quad df=n-1

One-proportion z statistic

z=p^−p0p0(1−p0)/nz=\frac{\hat p-p_0}{\sqrt{p_0(1-p_0)/n}}

Hypothesis Testing Variables Explained

SymbolMeaningNotes
H₀, H₁Null and alternative hypotheses
αSignificance levelChosen before testing
z or tTest statisticDistance from H₀ in standard errors
pp-valueReject H₀ when p ≤ α
SEStandard errorDepends on the test

Hypothesis Testing Worked Example

With the example values loaded in the calculator above, the steps are:

  1. Step 1. State the hypotheses: H₀: μ = 100; H₁: μ ≠ 100.
  2. Step 2. Choose the significance level: α = 0.05. Test: One-sample t-test (σ unknown).
  3. Step 3. Compute the test statistic: t = (103.5 − 100) ÷ 1.89737 = 1.8447 with 39 df.
  4. Step 4. Find the p-value (two-tailed) = 0.072691 and the critical value ±2.0227.
  5. Step 5. Decide: p ≥ 0.05, fail to reject H₀. At the 5% significance level, there is not sufficient evidence to conclude that μ differs from 100.

Result: Decision = Fail to reject H₀; Test statistic t = 1.8447; p-value = 0.072691.

How to Read the Sample Result

A sample of 40 with a mean of 103.5 and a standard deviation of 12 is tested against μ₀ = 100. The standard error is 1.897, so t = 3.5 ÷ 1.897 = 1.845. The two-tailed p-value is 0.0727, which is above 0.05, so you fail to reject H₀. The 95% interval, 99.66 to 107.34, contains 100, which agrees with that decision.

The result is borderline: it would be significant at α = 0.10 but not at 0.05. Failing to reject does not show that the mean is 100. It means this sample is not enough evidence to say otherwise, and a larger sample might well settle the question.

The five steps of a hypothesis test

  • State the null hypothesis H₀ (a claim of no effect or no difference) and the alternative H₁.
  • Choose the significance level α before seeing the data.
  • Compute the test statistic that measures how far the sample is from H₀ in standard-error units.
  • Find the p-value (or compare with the critical value).
  • Decide: reject H₀ if p < α; otherwise fail to reject, and state the conclusion in the context of the problem.

Choosing the right test

Which test fits?
SituationTestTool
Mean, σ unknown, any nt-testThis calculator, or t-test calculator for raw data and two groups
Mean, σ known (rare)z-testThis calculator
Share of successes vs a claimed shareOne-proportion z-testThis calculator
Two meansTwo-sample t-testt-test calculator
Two proportions (A/B test)Two-proportion z-testStatistical significance calculator
Counts in categoriesChi-squareChi-square calculator
Three or more meansANOVAANOVA calculator

Wording conclusions correctly

Say “reject H₀” or “fail to reject H₀”, never “accept H₀”. Failing to reject means the data did not provide sufficient evidence, not that the null is proven. State the result in terms of the original claim, mention α, and give an effect estimate or interval. Statistical significance is not the same as practical importance.

Sample wording
ResultConclusion
p < αThere is sufficient evidence at the α level to conclude that …
p ≥ αThere is not sufficient evidence at the α level to conclude that …

Conditions to check

  • The sample is random and observations are independent (sample under 10% of the population).
  • For a mean with small n: the population is roughly normal, or n is at least about 30.
  • For a proportion: np₀ and n(1 − p₀) are both at least 10.
  • Outliers are checked and explained.

Where Hypothesis Testing Is Used

One-sample tests

Test a mean or a proportion against a hypothesised value.

Reading the decision

See the statistic, p-value, critical values and the conclusion in words.

Confidence interval

Read the matching 95% interval for the estimate.

Learning

Follow the standard five steps of a test.

Common Hypothesis Testing Mistakes to Avoid

  • Write H₀ and H₁ in terms of parameters (μ, p), not sample statistics.
  • Pick one- or two-tailed before looking at the data.
  • Use t unless the population σ is truly known.
  • A confidence interval gives more information than the decision alone.

Hypothesis Testing Terms and Definitions

Null hypothesis H₀
The default claim of no effect or no difference.
Alternative hypothesis H₁
The claim you look for evidence of.
Test statistic
A standardised measure of how far the sample is from H₀.
p-value
The probability of a result at least this extreme if H₀ is true.

Hypothesis Testing FAQs

What is hypothesis testing?

A method for using sample data to decide whether there is enough evidence to reject a claim about a population.

What are the null and alternative hypotheses?

The null is the claim of no effect; the alternative is what you seek evidence for. For example H₀: μ = 100 against H₁: μ ≠ 100.

When do I reject the null hypothesis?

When the p-value is below the significance level α, or equivalently when the test statistic is beyond the critical value.

What is the difference between a z-test and a t-test?

A z-test needs a known population standard deviation. A t-test estimates it from the sample and uses the heavier-tailed t distribution.

What does “fail to reject” mean?

The sample did not provide enough evidence against H₀. It does not prove H₀ is true.

How do I choose between one-tailed and two-tailed?

Use two-tailed unless the research question is explicitly directional and was set before data collection.

Does a confidence interval agree with the test?

Yes. A two-sided test at level α rejects H₀ exactly when the hypothesised value lies outside the (1 − α) confidence interval.

What is the difference between a p-value and alpha?

Alpha is the threshold you set before the test, often 0.05. The p-value is computed from your data. If p ≤ alpha you reject the null hypothesis.

When do I use a one-tailed test versus a two-tailed test?

Use one-tailed only when you decided before seeing the data that the effect can only go in one direction. Otherwise use two-tailed. A one-tailed p-value is half the two-tailed one for the same statistic.

Does a significant result mean the effect is large?

No. With a big sample a tiny effect can be significant. Look at the effect size and the confidence interval as well as the p-value.

What does failing to reject the null mean?

It means the data did not give enough evidence against it. It does not prove the null is true; the study may simply lack power.

Related calculators

Last updated 2026-11-09. See our disclaimer.