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

Ready to run the numbers?

Open Type I Error Calculator