liveBook · Manning

Null hypothesis

As explained in Grokking Bayes

A null hypothesis is the hypothesis assigned a designated reference role in a classical statistical test, typically representing no effect or no difference.

A null hypothesis is the baseline explanation used in a classical statistical test. It represents the idea that nothing has changed, such as a website conversion rate remaining at 10%. section 11.2

The test asks how unusual the observed data would be if the null hypothesis were true. Unusually extreme results provide evidence against that baseline. section 11.2 section 11.3

A traditional hypothesis test proceeds by:

  • Specifying a null hypothesis that defines a model for the data. section 11.3
  • Choosing a test statistic that summarizes the observed data. section 11.3
  • Calculating the probability of obtaining a result at least as extreme as the observed result under the null model. section 11.2 section 11.3
  • Rejecting the null hypothesis when the p-value falls below a chosen significance level, often 0.05. section 11.3

Website conversion experiment

Among 500 visitors shown a new design, 63 converted. The null hypothesis is H₀: r = 0.1, meaning the conversion rate remains 10%. Under that assumption, conversions follow a binomial distribution centered near 50. The right-tail probability for 63 or more conversions is the p-value. section 11.2

𝐻₀: 𝑟 = 0.1.

Use the equation to identify the baseline claim being tested: the conversion rate equals 0.1. section 11.2

N = 500
n_conversions = 63
baseline = 0.1
 
test = binomtest(
    n_conversions,         #A
    N,                     #B
    baseline,              #C
    alternative="greater"  #D
)
p_value = test.pvalue

The listing turns the website example into a binomial test with a greater-than alternative and extracts its p-value. section 11.2

How Grokking Bayes covers it

How deep it goes
Defines the null model, test statistic, tail probability, and rejection rule without developing their mathematical derivations.
Examples
Uses a 500-visitor website experiment with 63 conversions against a 10% baseline.
What it assumes
Assumes basic familiarity with binomial distributions and introduces the testing procedure through a concrete conversion example.
What you can do after
Evaluate whether observed data are unusually extreme under a specified baseline using a classical hypothesis test.
How it connects
Connects null hypotheses to binomial distributions, test statistics, p-values, significance levels, and t-tests.

Also explained in

Compare how 6 books explain null hypothesis →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Bayes. The section links point to the parts of the book it draws on.