Type I Error Calculator Formula

Understand the math behind the type i error calculator. Each variable explained with a worked example.

Formulas Used

Family-wise Error Rate

familywise_error = 1 - pow(1 - alpha, k)

FW Error Rate (%)

fw_pct = (1 - pow(1 - alpha, k)) * 100

Bonferroni-Corrected Alpha

bonferroni = alpha / k

P(No Error in 1 Test)

single_correct = 1 - alpha

Variables

VariableDescriptionDefault
alphaSignificance Level (alpha)0.05
kNumber of Tests5

How It Works

Understanding Type I Error

Formula

Family-wise Error Rate = 1 - (1 - alpha)^k

Bonferroni Correction: alpha_corrected = alpha / k

A Type I error occurs when you reject a true null hypothesis (false positive). When performing multiple tests, the probability of at least one false positive increases rapidly. The Bonferroni correction divides alpha by the number of tests to control the family-wise error rate.

Worked Example

You run 5 independent tests at alpha = 0.05. What is the chance of at least one false positive?

alpha = 0.05k = 5
  1. 01P(no error in 1 test) = 1 - 0.05 = 0.95
  2. 02P(no error in all 5) = 0.95^5 = 0.7738
  3. 03P(at least 1 error) = 1 - 0.7738 = 0.2262
  4. 04Family-wise error rate = 22.6%
  5. 05Bonferroni correction: 0.05 / 5 = 0.01 per test

Frequently Asked Questions

What is the multiple comparisons problem?

When you perform many statistical tests, the chance of at least one false positive grows. With 20 tests at alpha = 0.05, you expect about one false positive even if all null hypotheses are true. Corrections like Bonferroni address this.

Is the Bonferroni correction too conservative?

Yes, it is known to be conservative (reduces power). Alternatives like Holm-Bonferroni, Benjamini-Hochberg (FDR control), or Tukey's HSD may be more powerful while still controlling error rates.

What is the difference between Type I and Type II error?

Type I = false positive (rejecting a true null). Type II = false negative (failing to reject a false null). Alpha controls Type I rate; power = 1 - beta controls Type II rate.

Ready to run the numbers?

Open Type I Error Calculator