Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Confidence Intervals | Statistical Analysis of A/B
Applied Hypothesis Testing & A/B Testing

bookConfidence Intervals

メニューを表示するにはスワイプしてください

Understanding confidence intervals is essential for interpreting the results of A/B tests. A confidence interval provides a range of values that is likely to contain the true value of a population parameter, such as a mean or proportion, with a certain level of confidence (commonly 95%). Instead of reporting only a single estimate, like the difference in conversion rates between two groups, you use a confidence interval to express the uncertainty around that estimate. This helps you understand not just the observed effect, but also the possible range of the true effect based on your data.

A confidence interval for the mean is typically calculated as:

xˉ±tsn\bar{x} \pm t^* \cdot \frac{s}{\sqrt{n}}

Where:

  • xˉ\bar{x} is the sample mean;
  • tt^* is the critical value from the t-distribution;
  • ss is the sample standard deviation;
  • nn is the sample size.

For a proportion, the confidence interval is:

p±zp(1p)np \pm z^* \cdot \sqrt{\frac{p(1-p)}{n}}

Where:

  • pp is the sample proportion;
  • zz^* is the critical value from the normal distribution;
  • nn is the sample size.

In A/B testing, confidence intervals are especially important because they help you determine whether a result is statistically significant and how much you can trust the observed difference. If the confidence interval for the difference between groups does not include zero, you have evidence that the groups are truly different at your chosen confidence level. However, if zero is within the interval, the difference may be due to random chance.

123456789101112131415161718192021
import numpy as np from scipy import stats # Confidence interval for the mean data = [12, 14, 15, 16, 14, 13, 15, 16, 17, 18] confidence = 0.95 mean = np.mean(data) sem = stats.sem(data) interval = stats.t.interval(confidence, len(data)-1, loc=mean, scale=sem) print("Confidence interval for the mean:", interval) # Confidence interval for a proportion # Suppose 200 users, 54 converted (successes) n = 200 successes = 54 p_hat = successes / n z = stats.norm.ppf(1 - (1-confidence)/2) se = np.sqrt(p_hat * (1 - p_hat) / n) lower = p_hat - z * se upper = p_hat + z * se print("Confidence interval for the proportion:", (lower, upper))
copy
question mark

How do confidence intervals help you make decisions in A/B testing experiments?

正しい答えを選んでください

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 5.  4

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 5.  4
some-alt