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
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.pvalueThe listing turns the website example into a binomial test with a greater-than alternative and extracts its p-value. section 11.2





