Skip to main content

Hypothesis Testing Calculator

Perform hypothesis testing with Z-test and t-test

Calculate Hypothesis Test

How to Use

  1. Select the test type (Z-test or t-test)
  2. Choose your alternative hypothesis (two-tailed, left-tailed, or right-tailed)
  3. Enter sample mean, population mean, standard deviation, and sample size
  4. Set your significance level (typically 0.05)
  5. Click calculate to see test statistic, critical value, and p-value

What is Hypothesis Testing?

Hypothesis testing is a statistical method used to make decisions about population parameters based on sample data. It involves formulating a null hypothesis (H₀) and an alternative hypothesis (H₁), then using sample data to determine which hypothesis is more likely to be true.

The process helps researchers determine whether observed differences or relationships in data are statistically significant or could have occurred by chance.

Z-Test vs T-Test

TestWhen to UseRequirements
Z-TestPopulation standard deviation known, or large sample (n > 30)Known population σ or n > 30
t-TestPopulation standard deviation unknown, small sampleUnknown population σ, any sample size

Types of Alternative Hypotheses

  • Two-Tailed: Tests if parameter differs from hypothesized value (μ ≠ μ₀)
  • Left-Tailed: Tests if parameter is less than hypothesized value (μ < μ₀)
  • Right-Tailed: Tests if parameter is greater than hypothesized value (μ > μ₀)

Interpreting Results

P-Value Interpretation:

  • If p-value ≤ α: Reject null hypothesis (statistically significant)
  • If p-value > α: Fail to reject null hypothesis (not statistically significant)
  • Common significance levels: α = 0.05 (5%), 0.01 (1%), 0.10 (10%)

Test Statistic vs Critical Value:

  • Two-tailed: Reject if |test statistic| > critical value
  • Left-tailed: Reject if test statistic < critical value
  • Right-tailed: Reject if test statistic > critical value

Common Mistakes to Avoid

  • Confusing 'fail to reject' with 'accept' the null hypothesis
  • Using Z-test when population standard deviation is unknown
  • Choosing significance level after seeing results
  • Ignoring assumptions (normality, independence, random sampling)
  • Confusing statistical significance with practical significance
  • Multiple testing without correction

Frequently Asked Questions

What's the difference between p-value and significance level?
The significance level (α) is chosen before the test and represents the threshold for rejecting the null hypothesis. The p-value is calculated from your data and represents the probability of obtaining results as extreme as observed, assuming the null hypothesis is true. If p-value ≤ α, you reject the null hypothesis.
When should I use a one-tailed vs two-tailed test?
Use a two-tailed test when you want to detect any difference from the hypothesized value (either higher or lower). Use a one-tailed test only when you have a strong theoretical reason to expect the difference in a specific direction. Two-tailed tests are more conservative and commonly used.
What does 'fail to reject' mean?
Failing to reject the null hypothesis means there isn't sufficient evidence in your sample data to conclude that the null hypothesis is false. It does NOT mean the null hypothesis is true—only that you don't have enough evidence to reject it at your chosen significance level.
Can I use a Z-test with a small sample?
Generally, no. Z-tests assume either that the population standard deviation is known or that the sample size is large enough (typically n > 30) for the Central Limit Theorem to apply. For small samples with unknown population standard deviation, use a t-test instead.

Related Calculators

statistics
Degree of Freedom Calculator

Calculate degrees of freedom for statistical tests

statistics
Binomial Distribution Calculator

Calculate binomial probabilities, expected value, and variance for discrete trials.

statistics
Absolute Deviation Calculator

Calculate mean or median absolute deviation to measure data spread