#!/usr/bin/env python3
# Source: q6-experimentation.html
import math
se = math.sqrt(0.80**2 / 50_000 + 0.80**2 / 50_000)   # standard error of the difference
diff = 0.212 - 0.200                                   # 0.012, a 6% lift
z = diff / se                                          # 0.012 / 0.00506 = 2.37
ci = (diff - 1.96 * se, diff + 1.96 * se)              # (0.0021, 0.0219)
# p is about 0.018. The interval excludes zero, so we reject H0.
