Hypothesis Test Calculator
Perform z-tests, t-tests, and two-sample tests with step-by-step solutions and p-values
Drag & drop or click to add images or PDF
What is Hypothesis Testing?
Hypothesis testing is a formal statistical procedure for deciding whether sample data provide sufficient evidence to reject a claim about a population parameter.
The Two Hypotheses
- Null hypothesis : the default claim — assumes no effect, no difference, or a specific parameter value (e.g., ).
- Alternative hypothesis (or ): the claim you want to support — can be two-sided (), left-tailed (), or right-tailed ().
The Logic
Assume is true. Compute how extreme the sample result is if were true — this probability is the p-value. A very small p-value means the data would be highly unlikely under , so we reject in favor of .
Significance Level
is the threshold for rejection. The most common choices are (5%) and (1%). If , you reject .
Type I and Type II Errors
| Decision | is true | is false |
|---|---|---|
| Reject | Type I error (false positive), prob. | Correct (power ) |
| Fail to reject | Correct (prob. ) | Type II error (false negative), prob. |
Common Hypothesis Tests
One-Sample Z-Test (known )
Tests whether the population mean equals a specified value when the population standard deviation is known:
Compare to a standard normal critical value (e.g., for two-sided ).
One-Sample T-Test (unknown )
The most common test in practice — uses the sample standard deviation :
Compare to a t-distribution critical value. For large , the t-distribution approaches the standard normal.
Two-Sample T-Test
Tests whether two independent population means are equal:
Degrees of freedom are estimated with the Welch–Satterthwaite approximation when is not assumed.
Z-Test for a Proportion
Tests whether a population proportion equals a specified value :
Valid when and .
Critical Values Quick Reference
| Test type | ||
|---|---|---|
| Two-sided z | ||
| Right-tailed z | ||
| Left-tailed z |
Step-by-Step Hypothesis Testing Procedure
Follow these five steps for any hypothesis test:
-
State the hypotheses: Write and in terms of the population parameter. Identify the tail direction (two-sided, left, or right).
-
Choose the test and check conditions: Pick the appropriate test statistic (z or t). Verify sample size conditions (normality, independence).
-
Compute the test statistic: Plug in the sample values.
-
Find the p-value: Using the test statistic and the sampling distribution, compute the probability of observing a result at least as extreme as yours under . For two-sided tests, double the one-tail area.
-
State the conclusion: If , reject — the data provide statistically significant evidence for . Otherwise, fail to reject (this is NOT the same as accepting ).
Examples
Frequently Asked Questions
A result is statistically significant when the p-value is below the chosen significance level α. It means the observed result would be unlikely to occur by chance alone if the null hypothesis were true — it does NOT measure the practical importance or size of the effect.
A two-tailed test checks for differences in either direction (H_a: μ ≠ μ_0) and splits α across both tails. A one-tailed test is directional (H_a: μ > μ_0 or H_a: μ < μ_0) and puts all of α in one tail. Use a one-tailed test only when you have a strong a priori reason to expect a particular direction.
The p-value is the probability of observing a test statistic at least as extreme as the one computed, assuming H_0 is true. A small p-value means the observed data are inconsistent with H_0. It is NOT the probability that H_0 is true.
Use a z-test when the population standard deviation σ is known. Use a t-test (far more common) when σ is unknown and you estimate it with the sample standard deviation s. For large samples (n ≥ 30), the distinction matters less because the t-distribution closely approximates the normal.
Related Solvers
Related Guides
Try AI-Math for Free
Get step-by-step solutions to any math problem. Upload a photo or type your question.
Start Solving