This section consists of examples based on one important fact:
The sum of independent normal variables is normal.
We will prove the fact in a later section using moment generating functions. For now, we will just run a quick simulation and then see how to use the fact in examples.
mu_X = 10
sigma_X = 2
mu_Y = 15
sigma_Y = 3
x = stats.norm.rvs(mu_X, sigma_X, size=10000)
y = stats.norm.rvs(mu_Y, sigma_Y, size=10000)
s = x+y
Table().with_column('S = X+Y', s).hist(bins=20)
plt.title('$X$ is normal (10, $2^2$); $Y$ is normal (15, $3^2$) independent of $X$');
The simulation above generates 10,000 copies of where has the normal distribution with mean 10 and SD 2 and is independent of and has the normal distribution with mean 15 and SD 3. The distribution of the sum is clearly normal. You can vary the parameters and check that the distribution of the sum has the same shape, though with different labels on the axes.
To identify which normal, you have to find the mean and variance of the sum. Just use properties of the mean and variance:
If has the normal distribution, and independent of has the normal distribution, then the distribution of is normal with mean and variance .
This means that we don’t need the joint density of and to find probabilities of events determined by .
18.2.1Sums of IID Normal Variables¶
Let be i.i.d. normal with mean and variance . Let . Then the distribution of is normal with mean and variance .
This looks rather like the Central Limit Theorem but notice that there is no assumption that is large, and no approximation.
If the underlying distribution is normal, then the distribution of the i.i.d. sample sum is normal regardless of the sample size.
18.2.2The Difference of Two Independent Normal Variables¶
If is normal, then so is . So if and are independent normal variables then is normal with mean and variance given by
For example, let the heights of Persons A and B be and respectively, and suppose and are i.i.d. normal with mean 66 inches and SD 3 inches. Then the chance that Person A is more than 2 inches taller than Person B is
because is normal with mean 0 and SD inches.

mu = 0
sigma = 18**0.5
1 - stats.norm.cdf(2, mu, sigma)0.3186759441169685318.2.3Comparing Two Sample Proportions¶
A candidate is up for election. In State 1, 50% of the voters favor the candidate. In State 2, only 27% of the voters favor the candidate. A simple random sample of 1000 voters is taken in each state. You can assume that the samples are independent of each other and that there are millions of voters in each state.
Question. Approximately what is the chance that in the sample from State 1, the proportion of voters who favor the candidate is more than twice as large as the proportion in the State 2 sample?
Answer. For , let be the proportion of voters who favor the candidate in the sample from State . We want the approximate value of . By the Central Limit Theorem, both and are approximately normal. So is also approximately normal.
Now it’s just a matter of figuring out the mean and the SD.
So
mu = 0.5 - 2*0.27
var = (0.5*0.5/1000) + 4*(0.27*.73/1000)
sigma = var**0.5
1 - stats.norm.cdf(0, mu, sigma)0.1072469993885582Answer
Normal curve centered at 35, points of inflection at 35 ± 14.14