What Is Hypothesis?
A hypothesis test starts with a null hypothesis, H₀, and an alternative, H₁. You reject H₀ when the sample mean falls beyond the critical value for your significance level.
Enter the hypothesised mean, the true mean you want to detect, the standard deviation, n and α. The calculator gives the critical z and critical sample mean, the power, β and the n needed for your target power, with a chart of both sampling distributions.
The sections below explain power, Type II error and how to plan a sample size.
How to Use the Hypothesis Calculator
- Enter μ₀ and the mean you want to detect.
- Enter σ, n and α.
- Pick the alternative.
- Read the critical value, power and required n.
Hypothesis Formula
Standard error
Sample size
Hypothesis Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| μ₀ | Hypothesised mean | |
| μ₁ | True mean to detect | |
| α | Significance level | |
| β | Type II error rate |
Hypothesis Worked Example
Test μ₀ = 100 against μ₁ = 105 with σ = 15, n = 36 and α = 0.05 (two-tailed). SE = 2.5, shift = 2, critical z = 1.96, and the power is about 0.516. To reach power 0.80 you need n = 71.
With the example values loaded in the calculator above, the steps are:
- H₀: μ = 100; H₁: μ ≠ 100.
- Standard error = σ ÷ √n = 15 ÷ √36 = 2.5.
- Critical z for α = 0.05 (two-tailed) = ±1.95996, so reject H₀ when x̄ is beyond 95.1001 or 104.9.
- If the true mean is 105, the standardised shift is (105 − 100) ÷ 2.5 = 2, giving power 0.516005.
- Required n = ((z_α + z_power)·σ ÷ (μ₁ − μ₀))² = 71 (rounded up).
Result: Null hypothesis H₀ = μ = 100; Alternative hypothesis H₁ = μ ≠ 100; Power if the true mean is 105 = 0.516005; n needed for power 0.8 = 71.
Where Hypothesis Is Used
Study planning
Pick a sample size before collecting data.
Power checks
Find the chance of detecting an effect.
Teaching
See H0, H1 and critical values.
Quality control
Plan a test for a shift in the mean.
Common Hypothesis Mistakes to Avoid
- Choose the alternative before collecting data.
- Bigger n or bigger effect raises power.
- Do not lower α without checking power.
Hypothesis Terms and Definitions
- Power
- The probability of rejecting H₀ when H₁ is true.
- Type II error
- Failing to reject a false H₀, with probability β.
Hypothesis FAQs
How do I write H0 and H1?
H₀ states no effect, such as μ = μ₀; H₁ states what you want to show, such as μ ≠ μ₀, μ > μ₀ or μ < μ₀.
What is the critical value?
The cutoff on the test statistic beyond which H₀ is rejected at level α.
What is the power of a test?
The chance of correctly rejecting a false H₀.
How many samples do I need?
Enough that the standard error is small relative to the effect you want to detect; the tool gives the n for your target power.