Hypothesis Test Calculator
Run a one-sample z- or t-test for a population mean. Enter your data or summary statistics and a hypothesized mean to get the test statistic, p-value, and a clear reject / fail-to-reject decision.
p = 0.3434 ≥ 0.05: not enough evidence to reject the null hypothesis.
- Sample mean
- 5.0700
- Std. error
- 0.0700
- df
- 9
- n
- 10
Test statistic & rejection area
p = 0.3434How to use this calculator
- Enter raw data, or switch to summary statistics and type the sample mean, standard deviation, and size.
- Enter the hypothesized mean (μ₀) from your null hypothesis.
- Choose the alternative hypothesis (two-tailed, right-tailed, or left-tailed) and your significance level α.
- Read the test statistic, p-value, and the reject / fail-to-reject decision, with the rejection area shaded on the chart.
What is hypothesis testing?
Hypothesis testing is a procedure for deciding whether sample data provides enough evidence to reject a claim about a population. You start with a null hypothesis (H₀), usually a statement of “no effect” or “no difference,” and an alternative hypothesis (H₁) that you are testing for.
- H₀ (null): the population mean equals the hypothesized value, μ = μ₀.
- H₁ (alternative): the mean is different, greater, or less than μ₀, depending on your test.
The steps of a hypothesis test
- State the null and alternative hypotheses.
- Choose a significance level α (commonly 0.05).
- Compute the test statistic from your sample.
- Find the p-value for that statistic under the null hypothesis.
- Reject H₀ if the p-value is less than α; otherwise fail to reject it.
Z-test vs. t-test
Use a z-test when the population standard deviation is known (or the sample is very large); the test statistic is compared to the standard normal distribution. Use a t-test when the population standard deviation is unknown and estimated from the sample; the statistic follows the t-distribution with n − 1 degrees of freedom.
One-sample t statisticInterpreting the decision
Frequently asked questions
What is the difference between the null and alternative hypothesis?
The null hypothesis (H₀) is the default claim of no effect or no difference, such as μ = μ₀. The alternative hypothesis (H₁) is what you are testing for — that the mean is different from, greater than, or less than μ₀.
When do I reject the null hypothesis?
Reject the null hypothesis when the p-value is less than your significance level α (for example, p < 0.05). This means the observed result would be unlikely if the null hypothesis were true.
Should I use a one-tailed or two-tailed test?
Use a two-tailed test when you are testing for any difference from μ₀. Use a one-tailed test only when you have a specific directional prediction — that the mean is greater than, or less than, the hypothesized value.
What is a test statistic?
A test statistic measures how far your sample result is from the null hypothesis, in standard-error units. For a one-sample test of a mean it is (x̄ − μ₀) divided by the standard error, and it is compared to the z or t distribution.