Notes

Alternative Hypothesis

When you run an experiment or compare two models, you’re usually hoping to learn that “something changed” or “there really is a difference.” The alternative hypothesis is the formal way statistics captures that hope—carefully, so you don’t fool yourself with random noise.

What it is
In hypothesis testing, you set up two competing statements about the world:

  • The null hypothesis (H0): typically “no effect,” “no difference,” or “any observed gap is due to chance.”
  • The alternative hypothesis (H1 or Ha): what you’ll accept if the data provide strong evidence against the null—e.g., “there is an effect” or “there is a difference.”

The alternative can be two-sided (difference in either direction) or one-sided (difference in a specific direction, like “A is better than B”).

How it shows up in real decisions
Examples that mirror common data problems:

  • A/B testing: H0: conversion rates are equal; Ha: they differ (or variant B is higher).
  • Medical measurements: H0: a new device has the same mean error as the old one; Ha: mean error is lower.
  • House prices: H0: adding a garage doesn’t change average price; Ha: it increases average price.

Why it matters in AI/ML
In ML, the alternative hypothesis is the “model improvement is real” claim. When you compare two models (or a model vs. baseline), H0 often says performance differences come from sampling variability (different train/test splits, finite test sets). Tests like a t-test, McNemar’s test, or permutation tests evaluate whether the data support Ha. Without a clear alternative, p-values and significance thresholds don’t have a meaningful target.

Alternative Hypothesis (H1 or Ha) is the claim in hypothesis testing that a real effect, difference, or relationship exists in the population, contrasting with the null hypothesis (H0) of no effect. It defines what the test is trying to detect and guides the choice of test statistic, rejection region, and power. Example: in A/B testing a model change, Ha might state the new model increases mean conversion rate.

Imagine you’re tasting two brands of soda to see if one is sweeter. One idea is “they taste the same,” and the other idea is “they don’t.” In statistics, that “they don’t” idea is the alternative hypothesis.

The alternative hypothesis is the claim you’re looking for evidence to support—like “this new medicine works better” or “this ad increases clicks.” In AI and machine learning, it shows up when you test whether a change to a model or feature really improves results, rather than the difference being just random chance in the data.