Hypothesis Testing Calculator

Enter your sample mean, population mean (H₀), standard deviation, and sample size to run a hypothesis test. Choose between a Z-test or T-test and select your alternative hypothesis (two-tailed, left-tailed, or right-tailed). You get back the test statistic, p-value, and a clear accept/reject decision at your chosen significance level.

Use Z-test when population SD is known; T-test when it is estimated from the sample.

Select the direction of your alternative hypothesis.

The mean calculated from your sample data.

The population mean stated in the null hypothesis (H₀).

Population SD for Z-test; sample SD for T-test.

Number of observations in your sample.

The threshold probability for rejecting H₀.

Results

P-Value

--

Test Statistic (Z / T)

--

Decision

--

Degrees of Freedom

--

Standard Error

--

Test Statistic vs Critical Region

Frequently Asked Questions

What is hypothesis testing?

Hypothesis testing is a statistical method used to evaluate assumptions about a population based on sample data. It involves formulating a null hypothesis (H₀), which assumes no effect or difference, and an alternative hypothesis (H₁), which asserts the presence of an effect. The test produces a p-value that helps determine whether to reject H₀.

What is the p-value in hypothesis testing?

The p-value is the probability of observing a test result at least as extreme as the one calculated, assuming the null hypothesis is true. A small p-value (typically ≤ α) indicates strong evidence against H₀, leading you to reject it. A large p-value suggests insufficient evidence to reject H₀.

What is the significance level (α) and how do I choose it?

The significance level α is the threshold you set before conducting a test to decide when to reject H₀. Common values are 0.05 (5%), 0.01 (1%), and 0.10 (10%). A smaller α means you require stronger evidence before rejecting the null hypothesis, reducing the risk of a Type I error.

When should I use a Z-test versus a T-test?

Use a Z-test when the population standard deviation is known and the sample size is large (n ≥ 30). Use a T-test when the population standard deviation is unknown and must be estimated from the sample, or when the sample size is small (n < 30). The T-test accounts for additional uncertainty by using the t-distribution with n−1 degrees of freedom.

What is a Type I error in hypothesis testing?

A Type I error occurs when you incorrectly reject a true null hypothesis — a false positive. The probability of committing a Type I error equals the significance level α. For example, at α = 0.05, there is a 5% chance of rejecting H₀ when it is actually true.

What does 'two-tailed' versus 'one-tailed' mean?

A two-tailed test checks for a difference in either direction (μ ≠ μ₀), splitting α across both tails of the distribution. A one-tailed test is directional — left-tailed (μ < μ₀) or right-tailed (μ > μ₀) — and concentrates the rejection region in one tail. Use one-tailed tests only when you have a specific directional hypothesis before collecting data.

What is the formula for the Z-test and T-test?

Both tests use the same core formula but different distributions. Z = (x̄ − μ₀) / (σ / √n) for the Z-test, and T = (x̄ − μ₀) / (s / √n) for the T-test, where x̄ is the sample mean, μ₀ is the hypothesized mean, σ or s is the standard deviation, and n is the sample size. The resulting statistic is compared against critical values from the standard normal or t-distribution.

Why is hypothesis testing important in research?

Hypothesis testing provides a rigorous, objective framework for making decisions from data. It helps researchers and analysts determine whether observed patterns are statistically significant or likely due to random chance. This prevents overinterpreting noise and supports evidence-based conclusions in fields ranging from medicine to business analytics.

More Statistics Tools