Interview Q&A / Data Science

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What are Type I and Type II errors in hypothesis testing?

SHORT ANSWER

A Type I error is a false positive: rejecting a true null hypothesis, with probability alpha. A Type II error is a false negative: failing to reject a false null, with probability beta. Power is 1 - beta.

Explain it simply

Think of a smoke alarm. A Type I error is the alarm ringing when there is no fire. A Type II error is silence when there is a fire.

In a hypothesis test the null hypothesis (H0) says "nothing is going on", such as the new design has no effect.

H0 actually trueH0 actually false
Reject H0Type I error (false alarm)correct, called power
Do not reject H0correctType II error (missed effect)

You choose alpha, usually 0.05, so a Type I error happens 5% of the time when H0 is true. Beta depends on sample size, effect size and noise.

Example

A drug trial tests whether a new medicine works.

  • Type I: the trial says it works, but it does not. Patients take a useless medicine.
  • Type II: the trial says no effect, but it works. A good medicine is dropped.

Lowering alpha to 0.01 reduces false alarms but raises beta unless you increase the sample. The two errors trade off.

python
alpha, beta = 0.05, 0.20
print(round(1 - beta, 2))  # 0.8  (power)

What to say in the interview

"Type I is rejecting a true null, controlled by alpha. Type II is missing a real effect, with probability beta, and power is 1 minus beta. To reduce both at once, I need more data. Which error is worse depends on the cost: for fraud screening a missed case may cost more than a false flag."

Common mistakes

  • Thinking alpha is the probability that the null is true.

#type-1-error#type-2-error#hypothesis-testing

Related questions

Practise more Data Science questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Data Science quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.