Lesson 36 of 36 · Beyond basic maths (optional)

The normal distribution and hypothesis tests

Optional: z-scores, the 68–95–99.7 rule, variance rules, standard errors, confidence intervals, and the logic of hypothesis tests and Type I errors.

About 25 minutes

In this lesson

  • Convert values to z-scores and use the 68–95–99.7 rule to estimate normal probabilities.
  • Find the variance of a scaled and shifted variable, and of sums and differences of independent random variables.
  • Compute the standard error of a mean and a 95% confidence interval.
  • Run a z-test for a mean, and say what Type I errors, Type II errors and p-values do and do not mean.

The idea

Why this lesson is optional

Bocconi's current test page describes quantitative reasoning as numerical and logical problems using basic mathematics, and it publishes no topic list. A 2024 sample test on Bocconi's website, which the current page does not link to and which may not reflect today's form, included a Type I error and null-hypothesis item and asked for expected values of random variables. Nothing confirms that inferential statistics appears on the current test. Treat this lesson as extra preparation for that possibility, after the core quantitative reasoning lessons.

Expected value and variance

A random variable XX takes values with given probabilities. Its expected value μ=E(X)\mu = E(X) is the probability-weighted average of its values, and its variance is the expected squared distance from that mean, Var(X)=E[(X−μ)2]\text{Var}(X) = E\big[(X - \mu)^2\big]. The standard deviation σ\sigma is the square root of the variance, in the same units as XX.

If XX is 0, 10 or 20 with probabilities 0.2, 0.5 and 0.3, then E(X)=0+5+6=11E(X) = 0 + 5 + 6 = 11 and Var(X)=0.2×121+0.5×1+0.3×81=49\text{Var}(X) = 0.2 \times 121 + 0.5 \times 1 + 0.3 \times 81 = 49, so σ=7\sigma = 7.

Linear changes behave predictably:

E(aX+b)=aE(X)+b,Var(aX+b)=a2 Var(X).E(aX + b) = aE(X) + b, \qquad \text{Var}(aX + b) = a^2\,\text{Var}(X).

Adding bb slides every value along without spreading them, so the variance is unchanged; multiplying by aa stretches every distance by ∣a∣|a| and every squared distance by a2a^2.

For independent XX and YY, variances add, for a difference as well as a sum:

Var(X+Y)=Var(X−Y)=Var(X)+Var(Y).\text{Var}(X + Y) = \text{Var}(X - Y) = \text{Var}(X) + \text{Var}(Y).

The reason is that −Y-Y has variance (−1)2 Var(Y)=Var(Y)(-1)^2\,\text{Var}(Y) = \text{Var}(Y): subtracting a random quantity adds uncertainty. Standard deviations do not add. Independent variables with standard deviations 5 and 12 have a sum, or a difference, with standard deviation 25+144=13\sqrt{25 + 144} = 13, not 17. (Without independence a covariance term enters, which this lesson does not need.)

The normal distribution and z-scores

Many measured quantities are roughly normal: a symmetric, bell-shaped density centred on the mean μ\mu, with its spread set by σ\sigma. Probabilities are areas under the curve. Measuring in standard deviations from the mean turns any normal distribution into the standard normal, with mean 0 and standard deviation 1:

z=x−μσ.z = \frac{x - \mu}{\sigma}.

If marks have μ=70\mu = 70 and σ=8\sigma = 8, a mark of 86 has z=168=2z = \frac{16}{8} = 2, two standard deviations above the mean; a negative zz is below the mean.

The 68–95–99.7 rule

For any normal distribution, approximately:

Within Share inside Share in each tail beyond
μ±σ\mu \pm \sigma 68% 16%
μ±2σ\mu \pm 2\sigma 95% 2.5%
μ±3σ\mu \pm 3\sigma 99.7% 0.15%

The tail column comes from symmetry: if 68% lies within one standard deviation, 32% lies outside, half on each side. For a lopsided interval, add pieces measured from the mean: from μ−σ\mu - \sigma to μ\mu is 34%, from μ\mu to μ+2σ\mu + 2\sigma is 47.5%. The more exact figure for the central 95% is ±1.96σ\pm 1.96\sigma, the number used in intervals and tests.

Sample means and the standard error

The mean xˉ\bar{x} of nn independent observations, each with standard deviation σ\sigma, varies less from sample to sample than single observations do. By the variance rules, the sum has variance nσ2n\sigma^2, and dividing by nn multiplies the variance by 1n2\frac{1}{n^2}, so

Var(xˉ)=σ2n,SE=σn.\text{Var}(\bar{x}) = \frac{\sigma^2}{n}, \qquad \text{SE} = \frac{\sigma}{\sqrt{n}}.

This is the standard error of the mean. Because of the square root, quadrupling the sample halves the standard error, and cutting it to a third needs nine times the sample. For large samples xˉ\bar{x} is close to normal even when the data are not (the central limit theorem), so the rule above applies to it.

Confidence intervals

When σ\sigma is known, a 95% confidence interval for the population mean is

xˉ±1.96 σn.\bar{x} \pm 1.96\,\frac{\sigma}{\sqrt{n}}.

With n=100n = 100, σ=15\sigma = 15 and xˉ=52\bar{x} = 52, the standard error is 1.5, the margin is 1.96×1.5=2.941.96 \times 1.5 = 2.94, and the interval runs from 49.06 to 54.94. The 95% describes the method: intervals built this way contain the true mean in about 95% of samples. A higher confidence level (2.58 in place of 1.96 for 99%) or a smaller sample makes the interval wider.

The logic of a hypothesis test

A test starts from a null hypothesis H0H_0, the default claim (say, the mean is 500), and an alternative H1H_1 (the mean is not 500). Before seeing the data you fix a significance level α\alpha, often 5%. Then you ask how surprising the data would be if H0H_0 were true, measuring the gap in standard errors:

z=xˉ−μ0σ/n.z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}.

In a two-sided test at 5%, reject H0H_0 when ∣z∣>1.96|z| > 1.96; at 1%, when ∣z∣>2.58|z| > 2.58. Equivalently, a two-sided test at 5% rejects μ0\mu_0 exactly when μ0\mu_0 lies outside the 95% confidence interval.

Decision H0H_0 true H0H_0 false
Reject H0H_0 Type I error (probability α\alpha) Correct
Do not reject H0H_0 Correct Type II error

A Type I error is rejecting a null hypothesis that is true, and the significance level is the probability of making one when H0H_0 is true. A Type II error is failing to reject a false one. For a fixed sample size, lowering α\alpha makes Type I errors rarer and Type II errors more common; a larger sample can reduce both.

The p-value is the probability, computed on the assumption that H0H_0 is true, of a result at least as extreme as the one observed. If p<αp < \alpha, reject H0H_0. A p-value is not the probability that H0H_0 is true, it does not measure how large or important an effect is, and failing to reject H0H_0 does not prove it.

Worked examples

Example 1: Areas with the 68–95–99.7 rule

Delivery times are approximately normal with mean 30 minutes and standard deviation 4 minutes. About what share of deliveries take (a) longer than 34 minutes, (b) between 22 and 34 minutes?

  1. Convert to z-scores: 34 minutes gives z=34−304=1z = \frac{34 - 30}{4} = 1; 22 minutes gives z=22−304=−2z = \frac{22 - 30}{4} = -2.

  2. (a) 68% lies within one standard deviation, so 32% lies outside, half on each side: 16% above z=1z = 1.

  3. (b) Split the interval at the mean: from z=−2z = -2 to 0 is half of 95%, 47.5%; from 0 to z=1z = 1 is half of 68%, 34%. Together, 81.5%.

  4. Check (b) by subtraction: 2.5% lie below 22 minutes and 16% above 34, so 100%−2.5%−16%=81.5%100\% - 2.5\% - 16\% = 81.5\%.

Answer

About 16% take longer than 34 minutes and about 81.5% take between 22 and 34 minutes. Answering 32% for (a) counts both tails; only the upper tail is longer than 34 minutes.

Example 2: Testing a mean at two significance levels

A producer says its bags of rice weigh 500 g on average, and the standard deviation of bag weights is known to be 10 g. An inspector weighs a random sample of 25 bags and finds a mean of 495 g. Test H0:μ=500H_0: \mu = 500 against H1:μ≠500H_1: \mu \ne 500 at the 5% and at the 1% significance levels.

  1. Standard error of the mean: 1025=105=2\frac{10}{\sqrt{25}} = \frac{10}{5} = 2 g.

  2. Test statistic: z=495−5002=−2.5z = \frac{495 - 500}{2} = -2.5, so the sample mean is 2.5 standard errors below the claimed mean.

  3. At 5%: ∣z∣=2.5>1.96|z| = 2.5 > 1.96, so reject H0H_0.

  4. At 1%: 2.5<2.582.5 < 2.58, so do not reject H0H_0.

  5. Check with intervals: the 95% interval is 495±1.96×2=495±3.92495 \pm 1.96 \times 2 = 495 \pm 3.92, from 491.08 to 498.92, which excludes 500; the 99% interval is 495±2.58×2=495±5.16495 \pm 2.58 \times 2 = 495 \pm 5.16, from 489.84 to 500.16, which includes 500. Same conclusions.

Answer

Reject H0H_0 at the 5% level but not at the 1% level, so the p-value lies between 0.01 and 0.05. The tempting error is to divide by σ\sigma instead of the standard error: z=−510=−0.5z = \frac{-5}{10} = -0.5 would wrongly make 495 g look unremarkable.

Example 3: Mean and variance of a combination

XX and YY are independent, with E(X)=10E(X) = 10, Var(X)=4\text{Var}(X) = 4, E(Y)=6E(Y) = 6 and Var(Y)=9\text{Var}(Y) = 9. Find the expected value, variance and standard deviation of W=3X−2Y+5W = 3X - 2Y + 5.

  1. Expected values pass straight through: E(W)=3×10−2×6+5=30−12+5=23E(W) = 3 \times 10 - 2 \times 6 + 5 = 30 - 12 + 5 = 23.

  2. The constant 5 moves WW without spreading it, so it adds nothing to the variance.

  3. Coefficients are squared: Var(3X)=9×4=36\text{Var}(3X) = 9 \times 4 = 36 and Var(−2Y)=(−2)2×9=36\text{Var}(-2Y) = (-2)^2 \times 9 = 36.

  4. By independence the variances add, even though YY enters with a minus sign: Var(W)=36+36=72\text{Var}(W) = 36 + 36 = 72, so the standard deviation is 72=62≈8.49\sqrt{72} = 6\sqrt{2} \approx 8.49.

Answer

E(W)=23E(W) = 23, Var(W)=72\text{Var}(W) = 72 and the standard deviation is 62≈8.56\sqrt{2} \approx 8.5. Copying the signs and coefficients into the variance, 3×4−2×9+5=−13 \times 4 - 2 \times 9 + 5 = -1, gives a negative variance, which is impossible and flags the error.

Common traps

  • Adding standard deviations, or subtracting variances

    For independent variables the variances add, for sums and differences alike; standard deviations do not. Square the standard deviations, add, and take the square root at the end.

  • Using σ where the standard error belongs

    Questions about a sample mean need the spread of the mean, σn\frac{\sigma}{\sqrt{n}}, not the spread of single values, σ\sigma. Using σ\sigma makes the test statistic far too close to zero and the interval far too wide.

  • Doubling the sample to halve the error

    The standard error falls with n\sqrt{n}, not with nn. Halving it needs four times the sample; cutting it to a third needs nine times.

  • Reading the p-value as the chance that the null is true

    A p-value of 0.03 says that, if H0H_0 were true, data at least this extreme would occur about 3% of the time. It is not a 3% chance that H0H_0 is true, and a large p-value does not prove H0H_0.

  • Mixing up Type I and Type II

    Type I is a false alarm: rejecting a true null hypothesis, with probability α\alpha. Type II is a miss: keeping a false one. Tie Type I to the decision "reject" and you will not swap them.

Check yourself

Answer each question before you open its answer.

Question 1: An interval away from the mean

Quantitative reasoning: normal distribution

Monthly electricity bills in a town are approximately normal with mean €80 and standard deviation €10. About what percentage of bills are between €90 and €100?

  1. A.13.5%
  2. B.16%
  3. C.27%
  4. D.47.5%
Show the answer

Answer: A. 13.5%

Working

In z-scores, €90 is z=1z = 1 and €100 is z=2z = 2. From the mean to z=2z = 2 is half of 95%, 47.5%; from the mean to z=1z = 1 is half of 68%, 34%. The band between them is 47.5%−34%=13.5%47.5\% - 34\% = 13.5\%. Check: 16% of bills are above €90 and 2.5% above €100, and 16%−2.5%=13.5%16\% - 2.5\% = 13.5\%.

Why the other options are wrong

  • B. This is the share of all bills above €90; it includes the 2.5% of bills above €100.
  • C. This is the share between one and two standard deviations from the mean on both sides; the question asks only about bills above the mean.
  • D. This is the share between the mean and €100; it also counts the bills from €80 to €90.

What carries over

Convert both ends to z-scores, then build the area from pieces measured from the mean.

Question 2: Cutting the standard error

Quantitative reasoning: sampling

A survey of 100 customers estimates mean monthly spending with a standard error of €6. If the standard deviation of spending stays the same, about how many customers are needed for a standard error of €2?

  1. A.300
  2. B.400
  3. C.900
  4. D.3,600
Show the answer

Answer: C. 900

Working

SE=σn\text{SE} = \frac{\sigma}{\sqrt{n}}, so 6=σ100=σ106 = \frac{\sigma}{\sqrt{100}} = \frac{\sigma}{10} and σ=60\sigma = 60. For SE=2\text{SE} = 2: 60n=2\frac{60}{\sqrt{n}} = 2, so n=30\sqrt{n} = 30 and n=900n = 900. Check by ratio: the standard error must fall by a factor of 3, so the sample must grow by 32=93^2 = 9, and 100×9=900100 \times 9 = 900.

Why the other options are wrong

  • A. Treats the standard error as inversely proportional to nn; it is inversely proportional to n\sqrt{n}, so a third of the error needs nine times the sample.
  • B. Applies the four-times rule for halving the error, but here the error must fall to a third; quadrupling the sample only takes it to €3.
  • D. Multiplies the sample by 62=366^2 = 36, squaring the old standard error instead of the ratio 62=3\frac{6}{2} = 3.

What carries over

The standard error falls with the square root of the sample size, so divide it by k by multiplying n by k squared.

Question 3: Spread of a combination

Quantitative reasoning: random variables

XX and YY are independent random variables with Var(X)=1\text{Var}(X) = 1 and Var(Y)=4\text{Var}(Y) = 4. What is the standard deviation of 3X−2Y+103X - 2Y + 10?

  1. A.1
  2. B.5
  3. C.7
  4. D.25
Show the answer

Answer: B. 5

Working

Var(3X−2Y+10)=32×1+(−2)2×4=9+16=25\text{Var}(3X - 2Y + 10) = 3^2 \times 1 + (-2)^2 \times 4 = 9 + 16 = 25; the constant 10 adds nothing. The standard deviation is 25=5\sqrt{25} = 5. Check: 3X3X has standard deviation 3 and 2Y2Y has standard deviation 4, and for independent variables these combine as 32+42=5\sqrt{3^2 + 4^2} = 5.

Why the other options are wrong

  • A. Subtracts the scaled standard deviations, 2×2−3×12 \times 2 - 3 \times 1; the minus sign in front of YY does not reduce the spread, and standard deviations do not combine by adding or subtracting.
  • C. Adds the scaled standard deviations, 3×1+2×23 \times 1 + 2 \times 2; for independent variables it is the variances that add.
  • D. This is the variance; the standard deviation is its square root.

What carries over

Square the coefficients, add the variances whatever the signs, ignore constants, and take the square root last.

Question 4: Reading a test result

Quantitative reasoning: hypothesis tests

A food producer tests H0H_0: the mean weight of its packs is 250 g, against H1H_1: the mean is not 250 g, at the 5% significance level. The test gives a p-value of 0.03. Which statement is correct?

  1. A.There is a 3% probability that H0H_0 is true.
  2. B.H0H_0 is not rejected, because the p-value is below 5%.
  3. C.H0H_0 is rejected; if H0H_0 is in fact false, this decision is a Type II error.
  4. D.H0H_0 is rejected; if H0H_0 is in fact true, this decision is a Type I error.
Show the answer

Answer: D. H0H_0 is rejected; if H0H_0 is in fact true, this decision is a Type I error.

Working

Since 0.03<0.050.03 < 0.05, H0H_0 is rejected at the 5% level. A Type I error is rejecting a true null hypothesis, so if the mean really is 250 g, this rejection is a Type I error. The p-value says that, if H0H_0 were true, results at least this far from 250 g would turn up about 3% of the time; it does not give the probability that H0H_0 is true. Rejecting a false H0H_0 is correct, and a Type II error can only happen when H0H_0 is not rejected.

Why the other options are wrong

  • A. A p-value is computed on the assumption that H0H_0 is true: it is the probability of data at least this extreme under H0H_0, not the probability of H0H_0 itself.
  • B. Reverses the rule: a p-value below the significance level is the signal to reject H0H_0.
  • C. Rejecting a false null hypothesis is the right decision; a Type II error is failing to reject a false one.

What carries over

Reject when p is below the significance level; a Type I error rejects a true null, a Type II error keeps a false one.

Key points

  • z=x−μσz = \frac{x - \mu}{\sigma}; about 68%, 95% and 99.7% of a normal distribution lie within 1, 2 and 3 standard deviations of the mean.

  • Var(aX+b)=a2 Var(X)\text{Var}(aX + b) = a^2\,\text{Var}(X), and for independent variables the variances add, for sums and differences alike.

  • The standard error of a mean is σn\frac{\sigma}{\sqrt{n}}: quadrupling the sample halves it.

  • A 95% confidence interval is xˉ±1.96σn\bar{x} \pm 1.96\frac{\sigma}{\sqrt{n}}; a two-sided test at 5% rejects μ0\mu_0 exactly when it lies outside that interval.

  • Reject H0H_0 when p<αp < \alpha; a Type I error rejects a true null hypothesis and has probability α\alpha.

All questions here are original and written for UniExamer; none comes from the test maker.

Written by the UniExamer team with AI assistance. Every worked example and check question was re-solved by an independent checker before publication. No subject expert has reviewed this lesson yet. If you find a mistake, write to support@uniexamer.com.

Poćwicz ten temat

Nowe pytania z tej umiejętności, z rozwiązaniami. Ćwiczenia wymagają Single Exam Pass lub Plus.