Practice / Probability for ML

Sampling distributions and the central limit theorem: standard errors, confidence intervals and the √N rule

Ten problems on the sample mean and the central limit theorem: the mean and standard error of an average and of a sum, the sum of 100 dice with a continuity correction, a poll's margin, the sample size for a target error, a 95% confidence interval, the error of a Monte Carlo estimate, minibatch gradient noise, a sum of exponential waits, an A/B test, and a rare event where the normal approximation fails, with worked solutions and the mistakes of dividing by N instead of √N, standardizing a mean with σ, doubling the data to halve the error, adding standard errors, and trusting the normal when Np is small.

Before you start

Every number estimated from data is an average of something: a conversion rate, a validation accuracy, a Monte Carlo integral, a minibatch gradient. The sample mean is itself a random variable, and two facts describe it. Its standard deviation, the standard error, is σ/N\sigma/\sqrt N, so the error shrinks with the square root of the amount of data and not in proportion to it. And whatever the distribution of a single observation, as long as its variance is finite, the central limit theorem says the average is close to normal once NN is large. Together they turn a sample into a probability statement: how far the estimate is likely to be from the truth, how many samples a target accuracy needs, and whether a difference between two rates is bigger than the noise. These ten problems work through the standard error, the normal approximation for sums and proportions, confidence intervals, sample sizes, Monte Carlo and minibatch noise and a two-sample comparison, and end with a case where the approximation is poor. The five mistakes are the ones that give a confident wrong number.

  • x1,…,xNx_1, \dots, x_N are independent draws from one distribution with mean μ\mu and variance σ2<∞\sigma^2 < \infty. The sample mean is xˉ=1N∑nxn\bar x = \tfrac1N\sum_n x_n and the sum is SN=∑nxn=NxˉS_N = \sum_n x_n = N\bar x.
  • E[xˉ]=μ\mathbb{E}[\bar x] = \mu and Var⁡(xˉ)=σ2/N\operatorname{Var}(\bar x) = \sigma^2/N, because the variances of independent terms add and Var⁡(cX)=c2Var⁡(X)\operatorname{Var}(cX) = c^2\operatorname{Var}(X). The standard error is SE⁡=σ/N\operatorname{SE} = \sigma/\sqrt N. For the sum, E[SN]=Nμ\mathbb{E}[S_N] = N\mu and Var⁡(SN)=Nσ2\operatorname{Var}(S_N) = N\sigma^2.
  • Central limit theorem. For large NN, xˉ−μσ/N\dfrac{\bar x - \mu}{\sigma/\sqrt N} is approximately Normal(0,1)(0, 1), whatever the distribution of each xnx_n. The approximation is better for symmetric distributions and worse for skewed ones.
  • Φ\Phi is the standard normal CDF, with Φ(−z)=1−Φ(z)\Phi(-z) = 1 - \Phi(z). Useful values: Φ(1.25)=0.8944\Phi(1.25) = 0.8944, Φ(1.645)=0.95\Phi(1.645) = 0.95, Φ(1.96)=0.975\Phi(1.96) = 0.975, Φ(2)=0.9772\Phi(2) = 0.9772.
  • A proportion is the mean of Bernoulli(p)(p) variables, which have variance p(1−p)p(1 - p), so the standard error of p^\hat p is p(1−p)/N\sqrt{p(1 - p)/N}. A rule of thumb for the normal approximation is Np≥10Np \ge 10 and N(1−p)≥10N(1 - p) \ge 10.
  • A 95% confidence interval for μ\mu is xˉ±1.96 SE⁡\bar x \pm 1.96\,\operatorname{SE}, with σ\sigma replaced by the sample standard deviation ss when it is unknown and NN is large.
  • Continuity correction. When a sum of integers is approximated by a normal, P(SN≥k)P(S_N \ge k) is approximated by the normal probability above k−12k - \tfrac12.

Builds on: Variance, covariance and correlation

Problems

  1. ·

    Measurements have mean μ=10\mu = 10 and standard deviation σ=4\sigma = 4. For the average of N=25N = 25 of them, find E[xˉ]\mathbb{E}[\bar x], Var⁡(xˉ)\operatorname{Var}(\bar x) and the standard error. Find the mean and standard deviation of their sum.

  2. ··

    A fair die is rolled 100100 times. Use the central limit theorem to approximate the probability that the total is at least 370370.

  3. ··

    In a city where exactly half the voters favor a measure, a poll asks N=400N = 400 random voters. Find the standard error of the sample proportion p^\hat p, and approximate the probability that the poll shows 55%55\% or more in favor.

  4. ·

    A proportion is to be estimated with a standard error of at most 0.010.01, whatever the true pp is. How many samples are needed? How many for a standard error of 0.0050.005?

  5. ··

    A model's latency is measured on N=64N = 64 requests, with sample mean xˉ=52.3\bar x = 52.3 ms and sample standard deviation s=8s = 8 ms. Find a 95% confidence interval for the true mean latency, and the width of the interval with N=256N = 256 requests and the same ss.

  6. ··

    To estimate I=∫01x2 dxI = \int_0^1 x^2\,dx by Monte Carlo, draw U1,…,UN∼Uniform⁡(0,1)U_1, \dots, U_N \sim \operatorname{Uniform}(0, 1) and average Un2U_n^2. Find the mean and variance of one term, the standard error with N=10 000N = 10\,000, and the NN needed for a standard error of 0.0010.001.

  7. ··

    The gradient of a loss with respect to one weight varies across training examples with mean gg and standard deviation 33. A minibatch gradient is the average over BB examples drawn independently. Find the standard deviation of the minibatch gradient for B=32B = 32, and the batch size that halves it.

  8. ···

    A job runs 5050 independent stages, each taking an Exponential time with rate 22 per minute. Approximate the probability that the whole job takes more than 3030 minutes, and say why the exact answer is larger.

  9. ···

    An A/B test shows each version of a page to 20002000 visitors. Version A converts 10%10\% of them and version B 12%12\%. Find the standard error of the difference p^B−p^A\hat p_B - \hat p_A, the zz-statistic, and whether the difference is significant at the two-sided 5%5\% level.

  10. ···

    A defect occurs on 1%1\% of parts, independently. In a batch of N=100N = 100, find the exact probability of no defects, the Poisson approximation, and the normal approximation with a continuity correction. Which is poor, and why?

Worked solutions

Problem 1

Measurements have mean μ=10\mu = 10 and standard deviation σ=4\sigma = 4. For the average of N=25N = 25 of them, find E[xˉ]\mathbb{E}[\bar x], Var⁡(xˉ)\operatorname{Var}(\bar x) and the standard error. Find the mean and standard deviation of their sum.

  1. E[xˉ]=125∑nE[xn]=25⋅1025=10\mathbb{E}[\bar x] = \tfrac1{25}\sum_n \mathbb{E}[x_n] = \tfrac{25\cdot10}{25} = 10Linearity of expectation; independence is not needed for this part.
  2. Var⁡(xˉ)=1252∑nVar⁡(xn)=25⋅16625=1625=0.64\operatorname{Var}(\bar x) = \tfrac{1}{25^2}\sum_n\operatorname{Var}(x_n) = \tfrac{25\cdot16}{625} = \tfrac{16}{25} = 0.64Independence makes the variances add, and the factor 125\tfrac1{25} comes out squared.
  3. SE⁡=0.64=0.8=425\operatorname{SE} = \sqrt{0.64} = 0.8 = \tfrac{4}{\sqrt{25}}The standard deviation of the average is σ/N\sigma/\sqrt N.
  4. E[S25]=250\mathbb{E}[S_{25}] = 250 and Var⁡(S25)=25⋅16=400\operatorname{Var}(S_{25}) = 25\cdot16 = 400The sum is 25xˉ25\bar x, so its variance is 252⋅0.6425^2\cdot0.64.
  5. E[xˉ]=10\mathbb{E}[\bar x] = 10, Var⁡(xˉ)=0.64\operatorname{Var}(\bar x) = 0.64, SE⁡=0.8\operatorname{SE} = 0.8; the sum has mean 250250 and standard deviation 2020The sum spreads out like Nσ\sqrt N\sigma while the average tightens like σ/N\sigma/\sqrt N. Dividing by NN instead of N\sqrt N gives 0.160.16 (Mistake 1).

Problem 2

A fair die is rolled 100100 times. Use the central limit theorem to approximate the probability that the total is at least 370370.

  1. One roll: μ=1+2+⋯+66=3.5\mu = \tfrac{1 + 2 + \cdots + 6}{6} = 3.5 and E[x2]=916\mathbb{E}[x^2] = \tfrac{91}{6}, so σ2=916−3.52=3512\sigma^2 = \tfrac{91}{6} - 3.5^2 = \tfrac{35}{12}1+4+9+16+25+36=911 + 4 + 9 + 16 + 25 + 36 = 91.
  2. E[S100]=350\mathbb{E}[S_{100}] = 350 and Var⁡(S100)=100⋅3512≈291.67\operatorname{Var}(S_{100}) = 100\cdot\tfrac{35}{12} \approx 291.67, so sd⁡(S100)≈17.078\operatorname{sd}(S_{100}) \approx 17.078Means and variances of independent rolls add.
  3. P(S100≥370)≈P(Z≥369.5−35017.078)=P(Z≥1.1418)P(S_{100} \ge 370) \approx P\big(Z \ge \tfrac{369.5 - 350}{17.078}\big) = P(Z \ge 1.1418)The total is an integer, so S≥370S \ge 370 is the same event as S>369.5S > 369.5; the continuity correction uses the midpoint.
  4. 1−Φ(1.1418)≈0.12681 - \Phi(1.1418) \approx 0.1268From a table or scipy.stats.norm.sf.
  5. P(S100≥370)≈0.127P(S_{100} \ge 370) \approx 0.127The exact probability, by convolving the die's distribution with itself 100100 times, is 0.12690.1269. Without the continuity correction, z=20/17.078=1.171z = 20/17.078 = 1.171 and the estimate is 0.12080.1208, noticeably worse.

Problem 3

In a city where exactly half the voters favor a measure, a poll asks N=400N = 400 random voters. Find the standard error of the sample proportion p^\hat p, and approximate the probability that the poll shows 55%55\% or more in favor.

  1. SE⁡(p^)=0.5⋅0.5400=0.520=0.025\operatorname{SE}(\hat p) = \sqrt{\dfrac{0.5\cdot0.5}{400}} = \dfrac{0.5}{20} = 0.025A proportion is a mean of Bernoulli(0.5)(0.5) variables, each with variance 0.250.25.
  2. z=0.55−0.50.025=2z = \dfrac{0.55 - 0.5}{0.025} = 2Standardize with the standard error, not with the standard deviation of one vote.
  3. P(p^≥0.55)≈1−Φ(2)≈0.0228P(\hat p \ge 0.55) \approx 1 - \Phi(2) \approx 0.0228The normal approximation is fine here: Np=N(1−p)=200Np = N(1 - p) = 200.
  4. With the continuity correction, p^≥0.55\hat p \ge 0.55 is k≥220k \ge 220 yes-votes, and P(k≥219.5)≈1−Φ(1.95)≈0.0256P(k \ge 219.5) \approx 1 - \Phi(1.95) \approx 0.0256kk has mean 200200 and standard deviation 400⋅0.25=10\sqrt{400\cdot0.25} = 10.
  5. SE⁡=0.025\operatorname{SE} = 0.025; P(p^≥0.55)≈0.023P(\hat p \ge 0.55) \approx 0.023, or 0.0260.026 with the continuity correctionThe exact binomial probability is 0.02550.0255. The usual "margin of error" of such a poll is 1.96×0.025≈4.91.96 \times 0.025 \approx 4.9 percentage points.

Problem 4

A proportion is to be estimated with a standard error of at most 0.010.01, whatever the true pp is. How many samples are needed? How many for a standard error of 0.0050.005?

  1. p(1−p)≤14p(1 - p) \le \tfrac14, with equality at p=12p = \tfrac12The worst case: p(1−p)p(1 - p) is a downward parabola with its peak at 12\tfrac12.
  2. 0.25N≤0.01  ⟺  N≥0.250.0001=2500\sqrt{\dfrac{0.25}{N}} \le 0.01 \iff N \ge \dfrac{0.25}{0.0001} = 2500Square both sides and solve for NN.
  3. 0.25N≤0.005  ⟺  N≥0.250.000025=10000\sqrt{\dfrac{0.25}{N}} \le 0.005 \iff N \ge \dfrac{0.25}{0.000025} = 10000The same calculation with the smaller target.
  4. Halving the standard error multiplies NN by 44SE⁡∝1/N\operatorname{SE} \propto 1/\sqrt N, so N∝1/SE⁡2N \propto 1/\operatorname{SE}^2.
  5. N=2500N = 2500 for SE⁡≤0.01\operatorname{SE} \le 0.01, and N=10000N = 10000 for SE⁡≤0.005\operatorname{SE} \le 0.005Each extra decimal digit of accuracy costs 100100 times the data. Doubling to 50005000 gives SE⁡=0.00707\operatorname{SE} = 0.00707, not 0.0050.005 (Mistake 3).

Problem 5

A model's latency is measured on N=64N = 64 requests, with sample mean xˉ=52.3\bar x = 52.3 ms and sample standard deviation s=8s = 8 ms. Find a 95% confidence interval for the true mean latency, and the width of the interval with N=256N = 256 requests and the same ss.

  1. SE⁡≈sN=88=1\operatorname{SE} \approx \dfrac{s}{\sqrt N} = \dfrac{8}{8} = 1 msσ\sigma is unknown, so the sample standard deviation stands in for it; with N=64N = 64 that is a good approximation.
  2. xˉ±1.96 SE⁡=52.3±1.96\bar x \pm 1.96\,\operatorname{SE} = 52.3 \pm 1.961.961.96 leaves 2.5%2.5\% in each tail: Φ(1.96)=0.975\Phi(1.96) = 0.975.
  3. The interval is (50.34,54.26)(50.34, 54.26) msProcedures like this one cover the true mean in 95%95\% of samples.
  4. With N=256N = 256, SE⁡=816=0.5\operatorname{SE} = \tfrac{8}{16} = 0.5 and the half-width is 0.980.98 msFour times the requests halves the interval.
  5. (50.34,54.26)(50.34, 54.26) ms, width 3.923.92 ms; with 256256 requests the width is 1.961.96 msThe 95%95\% describes the procedure, not this particular interval: before the data are drawn, P(∣xˉ−μ∣≤1.96 SE⁡)≈0.95P(|\bar x - \mu| \le 1.96\,\operatorname{SE}) \approx 0.95. Using 1.6451.645, the one-sided 95%95\% point, gives a 90%90\% interval.

Problem 6

To estimate I=∫01x2 dxI = \int_0^1 x^2\,dx by Monte Carlo, draw U1,…,UN∼Uniform⁡(0,1)U_1, \dots, U_N \sim \operatorname{Uniform}(0, 1) and average Un2U_n^2. Find the mean and variance of one term, the standard error with N=10 000N = 10\,000, and the NN needed for a standard error of 0.0010.001.

  1. E[U2]=∫01u2 du=13\mathbb{E}[U^2] = \int_0^1 u^2\,du = \dfrac13The estimator is unbiased: its mean is the integral.
  2. E[U4]=15\mathbb{E}[U^4] = \dfrac15, so Var⁡(U2)=15−19=445≈0.0889\operatorname{Var}(U^2) = \dfrac15 - \dfrac19 = \dfrac{4}{45} \approx 0.0889The variance shortcut, with U2U^2 as the variable.
  3. SE⁡=4/4510000≈0.00298\operatorname{SE} = \sqrt{\dfrac{4/45}{10000}} \approx 0.00298Standard deviation of one term, 0.29810.2981, over 10000=100\sqrt{10000} = 100.
  4. 4/45N≤10−6  ⟺  N≥445×106≈88 889\dfrac{4/45}{N} \le 10^{-6} \iff N \ge \dfrac{4}{45}\times10^6 \approx 88\,889Square the target.
  5. E[U2]=13\mathbb{E}[U^2] = \tfrac13, Var⁡(U2)=445\operatorname{Var}(U^2) = \tfrac{4}{45}, SE⁡≈0.0030\operatorname{SE} \approx 0.0030 at N=10 000N = 10\,000; N≈88 900N \approx 88\,900 for SE⁡=0.001\operatorname{SE} = 0.001The error of Monte Carlo shrinks like 1/N1/\sqrt N in any dimension, which is why it is used for high-dimensional integrals where grids are hopeless, and why variance reduction pays.

Problem 7

The gradient of a loss with respect to one weight varies across training examples with mean gg and standard deviation 33. A minibatch gradient is the average over BB examples drawn independently. Find the standard deviation of the minibatch gradient for B=32B = 32, and the batch size that halves it.

  1. The minibatch gradient is g^=1B∑b=1Bgb\hat g = \tfrac1B\sum_{b=1}^B g_b, with E[g^]=g\mathbb{E}[\hat g] = gAn average of unbiased per-example gradients is unbiased.
  2. sd⁡(g^)=332≈0.530\operatorname{sd}(\hat g) = \dfrac{3}{\sqrt{32}} \approx 0.530The standard error of a mean.
  3. Halving it needs B\sqrt B to double, so B=4⋅32=128B = 4\cdot32 = 1283128≈0.265\tfrac{3}{\sqrt{128}} \approx 0.265.
  4. 128128 examples cost 44 times the computation of 3232One step with B=128B = 128 costs as much as four steps with B=32B = 32, and only halves the noise.
  5. sd⁡(g^)≈0.530\operatorname{sd}(\hat g) \approx 0.530 at B=32B = 32; B=128B = 128 halves it to ≈0.265\approx 0.265This is the arithmetic behind the trade-off between batch size and number of steps. Sampling without replacement from a finite dataset makes the noise slightly smaller, by the factor (M−B)/(M−1)\sqrt{(M - B)/(M - 1)} for a dataset of MM examples.

Problem 8

A job runs 5050 independent stages, each taking an Exponential time with rate 22 per minute. Approximate the probability that the whole job takes more than 3030 minutes, and say why the exact answer is larger.

  1. One stage: mean 12\tfrac12 minute and variance 122=14\tfrac{1}{2^2} = \tfrac14For an Exponential(λ)(\lambda), the mean is 1λ\tfrac1\lambda and the variance 1λ2\tfrac{1}{\lambda^2}.
  2. The total TT has E[T]=25\mathbb{E}[T] = 25 and Var⁡(T)=12.5\operatorname{Var}(T) = 12.5, so sd⁡(T)≈3.536\operatorname{sd}(T) \approx 3.536Fifty independent stages.
  3. P(T>30)≈1−Φ(30−253.536)=1−Φ(1.414)≈0.0786P(T > 30) \approx 1 - \Phi\Big(\dfrac{30 - 25}{3.536}\Big) = 1 - \Phi(1.414) \approx 0.0786No continuity correction: TT is continuous.
  4. The exact TT has a Gamma(50,2)(50, 2) distribution, and P(T>30)=P(Poisson(60)≤49)≈0.0844P(T > 30) = P(\text{Poisson}(60) \le 49) \approx 0.0844More than 3030 minutes means at most 4949 stage completions in 3030 minutes of a rate-22 process.
  5. P(T>30)≈0.079P(T > 30) \approx 0.079 by the central limit theorem; the exact value is 0.0840.084Each exponential is skewed to the right, and 5050 terms are not quite enough to make the sum symmetric, so the right tail is heavier than the normal's.

Problem 9

An A/B test shows each version of a page to 20002000 visitors. Version A converts 10%10\% of them and version B 12%12\%. Find the standard error of the difference p^B−p^A\hat p_B - \hat p_A, the zz-statistic, and whether the difference is significant at the two-sided 5%5\% level.

  1. Var⁡(p^A)=0.10⋅0.902000=4.5×10−5\operatorname{Var}(\hat p_A) = \dfrac{0.10\cdot0.90}{2000} = 4.5\times10^{-5} and Var⁡(p^B)=0.12⋅0.882000=5.28×10−5\operatorname{Var}(\hat p_B) = \dfrac{0.12\cdot0.88}{2000} = 5.28\times10^{-5}The variance of each proportion, with the observed rates in place of the unknown ones.
  2. Var⁡(p^B−p^A)=4.5×10−5+5.28×10−5=9.78×10−5\operatorname{Var}(\hat p_B - \hat p_A) = 4.5\times10^{-5} + 5.28\times10^{-5} = 9.78\times10^{-5}The two groups are independent, so the variances add, even for a difference.
  3. SE⁡=9.78×10−5≈0.00989\operatorname{SE} = \sqrt{9.78\times10^{-5}} \approx 0.00989The square root comes after the adding.
  4. z=0.12−0.100.00989≈2.02z = \dfrac{0.12 - 0.10}{0.00989} \approx 2.02The difference in units of its standard error.
  5. SE⁡≈0.0099\operatorname{SE} \approx 0.0099, z≈2.02z \approx 2.02: significant at 5%5\%, since ∣z∣>1.96|z| > 1.96 (two-sided p≈0.043p \approx 0.043)Only just. Adding the two standard errors instead of the variances gives 0.01400.0140 and z=1.43z = 1.43 (Mistake 4).

Problem 10

A defect occurs on 1%1\% of parts, independently. In a batch of N=100N = 100, find the exact probability of no defects, the Poisson approximation, and the normal approximation with a continuity correction. Which is poor, and why?

  1. P(k=0)=0.99100≈0.3660P(k = 0) = 0.99^{100} \approx 0.3660Each of the 100100 parts must be good.
  2. Poisson with λ=Np=1\lambda = Np = 1: P(k=0)≈e−1≈0.3679P(k = 0) \approx e^{-1} \approx 0.3679For a rare event in many trials, the binomial is close to a Poisson with the same mean.
  3. Normal: mean 11, standard deviation 100⋅0.01⋅0.99≈0.995\sqrt{100\cdot0.01\cdot0.99} \approx 0.995, and P(k≤0.5)≈Φ(0.5−10.995)=Φ(−0.5025)≈0.3077P(k \le 0.5) \approx \Phi\big(\tfrac{0.5 - 1}{0.995}\big) = \Phi(-0.5025) \approx 0.3077Continuity correction: k=0k = 0 is everything below 0.50.5.
  4. Np=1Np = 1, far below the rule of thumb of 1010The distribution of kk is piled up at 00 and 11 with a long right tail, nothing like a bell curve, and the normal also puts probability on negative counts.
  5. Exact 0.36600.3660, Poisson 0.36790.3679, normal 0.30770.3077; the normal is poor because Np=1Np = 1The central limit theorem is a statement about large NN for a fixed distribution; when pp shrinks as NN grows the limit is the Poisson, not the normal.

Where this goes wrong

1. Dividing σ by N instead of √N

The average of NN values is the sum divided by NN, so its spread is divided by NN too.

  1. σ=4\sigma = 4 and N=25N = 25, as in Problem 1Right so far.
  2. “The average divides everything by NN, including the standard deviation.”Dividing by NN divides the standard deviation of the sum by NN, but the sum's standard deviation is Nσ=20\sqrt N\sigma = 20, not NσN\sigma.
  3. SE⁡=425=0.16\operatorname{SE} = \tfrac{4}{25} = 0.16Five times too small. Var⁡(xˉ)=σ2/N=0.64\operatorname{Var}(\bar x) = \sigma^2/N = 0.64, so SE⁡=0.8\operatorname{SE} = 0.8. An interval built on 0.160.16 would claim far more precision than 2525 measurements can give.

2. Standardizing a mean with σ

The zz-score of a single observation is reused for an average.

  1. Measurements have μ=10\mu = 10 and σ=4\sigma = 4, and xˉ\bar x averages N=25N = 25 of themRight so far: Problem 1.
  2. “P(xˉ>11)P(\bar x > 11): z=11−104=0.25z = \tfrac{11 - 10}{4} = 0.25.”The step that causes the mistake: 44 is the spread of one measurement; the average has spread 0.80.8.
  3. P(xˉ>11)≈1−Φ(0.25)≈0.4013P(\bar x > 11) \approx 1 - \Phi(0.25) \approx 0.4013That is the chance that a single measurement exceeds 1111. For the average, z=10.8=1.25z = \tfrac{1}{0.8} = 1.25 and P(xˉ>11)≈1−0.8944=0.1056P(\bar x > 11) \approx 1 - 0.8944 = 0.1056.

3. Doubling the data to halve the error

The error is assumed to shrink in proportion to the amount of data.

  1. N=2500N = 2500 gives SE⁡≤0.01\operatorname{SE} \le 0.01 for a proportionRight so far: Problem 4.
  2. “Twice the data, half the error.”The error is proportional to 1/N1/\sqrt N, not 1/N1/N.
  3. N=5000N = 5000 gives SE⁡≤0.005\operatorname{SE} \le 0.0050.25/5000≈0.00707\sqrt{0.25/5000} \approx 0.00707: doubling the data cuts the error only by 2\sqrt2. Halving it needs four times the data, N=10 000N = 10\,000.

4. Adding standard errors instead of variances

The standard error of a difference of two independent estimates is taken as the sum of their standard errors.

  1. SE⁡(p^A)=4.5×10−5≈0.00671\operatorname{SE}(\hat p_A) = \sqrt{4.5\times10^{-5}} \approx 0.00671 and SE⁡(p^B)=5.28×10−5≈0.00727\operatorname{SE}(\hat p_B) = \sqrt{5.28\times10^{-5}} \approx 0.00727Right so far: Problem 9.
  2. “SE⁡(p^B−p^A)=0.00671+0.00727=0.01397\operatorname{SE}(\hat p_B - \hat p_A) = 0.00671 + 0.00727 = 0.01397.”Standard deviations do not add; variances of independent quantities do.
  3. z=0.020.01397≈1.43z = \tfrac{0.02}{0.01397} \approx 1.43, so the difference is not significantThe standard error is 4.5×10−5+5.28×10−5≈0.00989\sqrt{4.5\times10^{-5} + 5.28\times10^{-5}} \approx 0.00989 and z≈2.02z \approx 2.02, which is significant at 5%5\%. Adding standard errors always overstates the noise, here enough to reverse the conclusion.

5. The normal approximation when Np is small

The central limit theorem is applied to every binomial count.

  1. k∼Binomial⁡(100,0.01)k \sim \operatorname{Binomial}(100, 0.01), with mean 11 and standard deviation 0.9950.995Right so far: Problem 10.
  2. “100100 trials is a large sample, so kk is approximately normal.”What matters is the expected number of successes, Np=1Np = 1, not the number of trials.
  3. P(k=0)≈Φ(−0.5025)≈0.3077P(k = 0) \approx \Phi(-0.5025) \approx 0.3077The exact value is 0.99100≈0.36600.99^{100} \approx 0.3660, and the Poisson approximation e−1≈0.3679e^{-1} \approx 0.3679 is far closer. The normal also gives P(k≤−0.5)=Φ(−1.51)≈0.066P(k \le -0.5) = \Phi(-1.51) \approx 0.066 to counts below zero.

Print this set: sampling-distributions-and-the-central-limit-theorem.pdf (problems, answers, and worked solutions on separate pages).