Type II Error Calculator Formula
Understand the math behind the type ii error calculator. Each variable explained with a worked example.
Formulas Used
Z for Power Calculation
z_power = z_betaStandard Error
standard_error = seNon-centrality Parameter
noncentrality = (mu1 - mu0) / seEffect Size d
effect_size = (mu1 - mu0) / sigmaVariables
| Variable | Description | Default |
|---|---|---|
mu0 | Null Hypothesis Mean | 100 |
mu1 | True Mean | 105 |
sigma | Population SD | 15 |
n | Sample Size | 25 |
z_crit | Critical z (e.g., 1.96) | 1.96 |
se | Derived value= sigma / sqrt(n) | calculated |
z_beta | Derived value= z_crit - (mu1 - mu0) / se | calculated |
How It Works
Understanding Type II Error
Concept
Beta = P(fail to reject H0 | H0 is false)
Power = 1 - Beta
Type II error occurs when you fail to detect a real effect. The probability depends on the true effect size, sample size, significance level, and population variability. A negative z_beta value indicates high power (likely to detect the effect).
Worked Example
H0: mu = 100. True mu = 105. SD = 15, n = 25, z_crit = 1.96.
mu0 = 100mu1 = 105sigma = 15n = 25z_crit = 1.96
- 01SE = 15 / sqrt(25) = 15 / 5 = 3
- 02Non-centrality = (105 - 100) / 3 = 1.667
- 03z_beta = 1.96 - 1.667 = 0.293
- 04A z_beta of 0.293 corresponds to roughly beta = 0.615
- 05Power ≈ 1 - 0.615 = 0.385 (about 39%)
- 06This sample size gives low power to detect this effect
Ready to run the numbers?
Open Type II Error Calculator