Statistics 2: Statistical Inference: cram pack

Formula sheets, the key method steps for every topic and 10 practice problems, with full solutions at the back.

New problemsBack to the course

In the print window, choose “Save as PDF” to keep a copy on your device.

1Formulas and methods

Normal distribution

z-score
z = (x − μ)/σ
Below x
P(X < x) = Φ(z)
Above x
P(X > x) = 1 − Φ(z)
Between
Φ(z2) − Φ(z1)
Percentile
x = μ + z·σ

Method

  1. Convert the value to a z-score: z = (x − μ)/σ.
  2. Look up Φ(z), the area to the left of z.
  3. For the area to the right use 1 − Φ(z); for an interval subtract the two left areas.
  4. For a percentile, work backwards: find z for the area, then x = μ + z·σ.

Confidence intervals

σ known
x̄ ± z·σ/√n
σ unknown
x̄ ± t·s/√n, df = n − 1
Critical z
90%: 1.645, 95%: 1.96, 99%: 2.576
Sample size
n = (z·σ/E)², rounded up

Method

  1. Decide between z (population σ known) and t (only the sample s, with n − 1 degrees of freedom).
  2. Find the critical value for the confidence level.
  3. Margin of error: E = critical value × standard deviation/√n.
  4. Interval: x̄ ± E.

Hypothesis tests & confidence intervals

z-test for a mean
z = (x̄ − μ0)/(σ/√n)
t-test for a mean
t = (x̄ − μ0)/(s/√n), df = n − 1
Two-sided at 5%
reject H0 if |z| > 1.96
Confidence interval
x̄ ± z·σ/√n

Method

  1. State H₀ and H₁ and decide whether the test is one- or two-sided.
  2. Calculate the test statistic: (x̄ − μ₀)/(σ/√n), or with s and t.
  3. Compare with the critical value, or find the p-value.
  4. Reject H₀ if the statistic is beyond the critical value (p below α), and state the conclusion in words.

Linear regression & correlation

Sums of squares
Sxx = Σ(x − x̄)² = Σx² − (Σx)²/n, Sxy = Σxy − ΣxΣy/n
Slope
b = Sxy/Sxx
Intercept
a = ȳ − b·x̄
Correlation
r = Sxy/√(SxxSyy)
Residual
e = y − ŷ

Chi-square tests

Test statistic
χ² = Σ(O − E)²/E
Goodness of fit
E = n·p, df = k − 1 − (estimated parameters)
Independence
E = row total × column total / grand total, df = (r − 1)(c − 1)
Critical values (α = 0.05)
df 1: 3.841, 2: 5.991, 3: 7.815, 4: 9.488
Decision
reject H0 if χ² > χ²crit

2Practice problems

1.Normal distributionMedium
1020 kg1103 kgT = X₁ + … + X₁₂?

The masses of passengers with luggage are independent and normal with mean 85 kg and standard deviation 12 kg. Find the probability P that the total mass of 12 of them exceeds 1103 kg. Round z to two decimals.

μ = 85 kgσ = 12 kgn = 12> 1103 kg
P =
2.Normal distributionHard
μ = 100x = ?97.5%

The IQ scores are normally distributed with mean 100 points and standard deviation 15 points. Find the value x below which 97.5% of them lie (the 97.5th percentile).

μ = 100σ = 15P = 97.5%
x = points
3.Confidence intervalsMedium
x̄E₁ = 3.990%, n = 64x̄E₂ = ?99%, n = 64

A 90% confidence interval for a mean, based on 64 observations and a known σ, has a margin of error of 3.9. What is the margin of error E₂ of a 99% interval from the same data?

90%n₁ = 64E₁ = 3.999%
E₂ =
4.Confidence intervalsHard
σ = 18, n = ?x̄ − Ex̄ + Ex̄E = 190%

The population standard deviation is 18. How large a sample n do you need so that a 90% confidence interval for the mean has a margin of error of at most 1?

σ = 18E = 190%
n =
5.Hypothesis tests & confidence intervalsMedium
−2.4472.447t = ?df = 6

7 employees take a typing test before and after a training course. For each person the difference d = after − before (words per minute) is recorded. The mean difference is 8.07 and the standard deviation of the differences is 6.1. Find the paired test statistic t for H₀: μd = 0.

n = 7d̄ = 8.07sd = 6.1
t =
6.Hypothesis tests & confidence intervalsHard
σ = 10, n = ?x̄ − Ex̄ + Ex̄E = 299%

How large must a sample be so that the 99% confidence interval for a mean has a margin of error of at most 2? The standard deviation is 10. Find the smallest sample size n.

σ = 10E = 299%
n =
7.Linear regression & correlationMedium
xy122220318415516xy241520

The table gives 5 paired observations of x = car age in years and y = price in k€. Their sums are given. Find Pearson's correlation coefficient r from these sums.

n = 5Σx = 15Σy = 91Σx² = 55Σy² = 1689Σxy = 256
r =
8.Linear regression & correlationHard
xy24345566787410911297xy510406080100x = 5

The table gives 6 paired observations of x = advertising spend in k€ and y = sales in k€. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 5.

n = 6x = 5
ŷ =
9.Chi-square testsMedium
yesnoTotalmen7050120women602080Total13070200

The contingency table shows observed counts. Compute the chi-square statistic χ² for the test of independence between the row and column variables. Do not use a continuity correction.

N = 2002 × 2
χ² =
10.Chi-square testsHard

A chi-square goodness-of-fit test checks whether counts in 5 categories follow a Poisson distribution whose mean is estimated from the same data. How many degrees of freedom df does the test have?

k = 5
df =

3Solutions

1.Normal distribution

Answer: P = 0.02275

Sums and differences of normal variables: if X and Y are independent and normal, X + Y and X − Y are normal too. Means add or subtract: E(X ± Y) = μX ± μY. Variances always add, also for a difference: Var(X ± Y) = σX² + σY², so σ = √(σX² + σY²). Standard deviations never add directly. The total of n independent items with the same distribution has mean n·μ and standard deviation σ·√n. Then standardise as usual: z = (x − mean)/σ and read Φ(z).

Distribution of the total

μT = 1020 kg, σT = 12·√12 = 41.57 kg

Standardise

z = (1103 − 1020)/41.57 = 2

Probability

P = 1 − Φ(2) = 0.02275

Answer

P = 0.02275
2.Normal distribution

Answer: x = 129.4 points

Normal distribution: convert a value x to a z-score, z = (x − μ)/σ, which counts standard deviations from the mean. A z-table (or Φ(z)) gives the area to the left of z, which is P(X < x). The area to the right is 1 − Φ(z), and the area between two values is the difference of their two areas.

z for the percentile

Φ(z) = 0.975 → z = 1.96

Back to x

x = 100 + 1.96·15 = 129.4 points

Answer

x = 129.4 points
3.Confidence intervals

Answer: E₂ = 6.107

Confidence interval for a mean: x̄ ± margin of error. With a known population σ the margin is z·σ/√n; with only the sample standard deviation s, use t with n − 1 degrees of freedom: t·s/√n. Critical values: z = 1.645 (90%), 1.96 (95%), 2.576 (99%). To get a margin E or smaller, you need n ≥ (z·σ/E)², rounded up.

Ratio of margins

E₂/E₁ = (2.576/1.645)·√(64/64) = 1.566

New margin

E₂ = 3.9·1.566 = 6.107

Answer

E₂ = 6.107
4.Confidence intervals

Answer: n = 877

Confidence interval for a mean: x̄ ± margin of error. With a known population σ the margin is z·σ/√n; with only the sample standard deviation s, use t with n − 1 degrees of freedom: t·s/√n. Critical values: z = 1.645 (90%), 1.96 (95%), 2.576 (99%). To get a margin E or smaller, you need n ≥ (z·σ/E)², rounded up.

Solve for n

n = (1.645·18/1)² = 876.8

Round up

A sample size is a whole number, and rounding down would make the margin too large.

n = 877

Answer

n = 877
5.Hypothesis tests & confidence intervals

Answer: t = 3.5

Testing a mean: the test statistic measures how many standard errors the sample mean lies from the value claimed in H₀: z = (x̄ − μ₀)/(σ/√n) when σ is known, t = (x̄ − μ₀)/(s/√n) when it is estimated from the sample. A confidence interval is x̄ ± (critical value)·(standard error).

Standard error of the mean difference

SE = 6.1/√7 = 2.306

Test statistic

t = 8.07/2.306 = 3.5

Answer

t = 3.5

With df = 6, the two-sided 5% critical value is 2.447; |t| is larger, so H₀ is rejected.

6.Hypothesis tests & confidence intervals

Answer: n = 166

Testing a mean: the test statistic measures how many standard errors the sample mean lies from the value claimed in H₀: z = (x̄ − μ₀)/(σ/√n) when σ is known, t = (x̄ − μ₀)/(s/√n) when it is estimated from the sample. A confidence interval is x̄ ± (critical value)·(standard error).

Solve for n

n = (2.576·10/2)² = 165.9

Round up

n = 166

Answer

n = 166
7.Linear regression & correlation

Answer: r = −0.9387

Least-squares regression: with x̄ and ȳ the means, Sxx = Σ(x − x̄)², Syy = Σ(y − ȳ)² and Sxy = Σ(x − x̄)(y − ȳ), the line ŷ = a + b·x has slope b = Sxy/Sxx and intercept a = ȳ − b·x̄, so it always passes through (x̄, ȳ). Pearson's correlation coefficient r = Sxy/√(Sxx·Syy) lies between −1 and 1; r² is the fraction of the variation in y explained by the line.

Centred sums

Sxy = 256 − 15·91/5 = −17
Sxx = 55 − 15²/5 = 10
Syy = 1689 − 91²/5 = 32.8

Correlation coefficient

r = −17/√(10·32.8) = −0.9387

Answer

r = −0.9387
8.Linear regression & correlation

Answer: ŷ = 60.17

Least-squares regression: with x̄ and ȳ the means, Sxx = Σ(x − x̄)², Syy = Σ(y − ȳ)² and Sxy = Σ(x − x̄)(y − ȳ), the line ŷ = a + b·x has slope b = Sxy/Sxx and intercept a = ȳ − b·x̄, so it always passes through (x̄, ȳ). Pearson's correlation coefficient r = Sxy/√(Sxx·Syy) lies between −1 and 1; r² is the fraction of the variation in y explained by the line.

Means

x̄ = 42/6 = 7
ȳ = 427/6 = 71.17

Sums of squares and products

Sxx = Σ(x − x̄)² = 70
Sxy = Σ(x − x̄)(y − ȳ) = 385

Regression line

b = 385/70 = 5.5
a = 71.17 − 5.5·7 = 32.67
ŷ = 32.67 + 5.5·x

Prediction

ŷ = 32.67 + 5.5·5 = 60.17

Answer

ŷ = 60.17
9.Chi-square tests

Answer: χ² = 5.861

Chi-square tests: compare observed counts O with the counts E expected under H₀ using χ² = Σ(O − E)²/E. Goodness of fit: E = n·p for each category, df = k − 1 (minus one more for each parameter estimated from the data). Independence in an r × c table: E = row total × column total / grand total, df = (r − 1)(c − 1). Reject H₀ when χ² exceeds the critical value for the chosen α.

Expected counts

men: 120·130/200 = 78, 120·70/200 = 42
women: 80·130/200 = 52, 80·70/200 = 28

Chi-square statistic

χ² = (70 − 78)²/78 + (50 − 42)²/42 + (60 − 52)²/52 + (20 − 28)²/28
χ² = 5.861

Answer

χ² = 5.861

df = 1. At α = 0.05 the critical value is 3.841, so H₀ (independence) is rejected.

10.Chi-square tests

Answer: df = 3

Chi-square tests: compare observed counts O with the counts E expected under H₀ using χ² = Σ(O − E)²/E. Goodness of fit: E = n·p for each category, df = k − 1 (minus one more for each parameter estimated from the data). Independence in an r × c table: E = row total × column total / grand total, df = (r − 1)(c − 1). Reject H₀ when χ² exceeds the critical value for the chosen α.

Degrees of freedom

df = 5 − 1 − 1 = 3

Answer

df = 3

ExamProblems · examproblems.com/courses/statistics-2-inference