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
750 g764.8 gX + Y?

X is normal with mean 250 g and standard deviation 4 g; Y is independent and normal with mean 500 g and standard deviation 9 g. Find the probability P that X + Y is more than 764.8 g. Round z to two decimals.

μX = 250, σX = 4μY = 500, σY = 9X + Y > 764.8 g
P =
2.Normal distributionHard
0.02 mm0D − d?

Hole diameters D are normal with mean 25.02 mm and standard deviation 0.015 mm. Shaft diameters d are independent and normal with mean 25 mm and standard deviation 0.015 mm. A randomly chosen shaft fits when D − d > 0. Find the probability P that it fits. Round z to two decimals.

hole: μ = 25.02 mm, σ = 0.015 mmshaft: μ = 25 mm, σ = 0.015 mm
P =
3.Confidence intervalsMedium
n = 15, s = 11.5L = ?Ux̄ = 62E99%

A sample of 15 items has mean 62 and standard deviation s = 11.5. The population is roughly normal. Find the lower limit of the 99% confidence interval for the mean.

n = 15x̄ = 62s = 11.599%t(14) = 2.977
lower limit =
4.Confidence intervalsHard
σ = 39, n = ?x̄ − Ex̄ + Ex̄E = 190%

The population standard deviation is 39. 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?

σ = 39E = 190%
n =
5.Hypothesis tests & confidence intervalsMedium
t −2.0302.03

A sample of 36 students has a mean score of 501.4 and a sample standard deviation of 5. Find the test statistic t for H₀: μ = 500.

μ₀ = 500x̄ = 501.4s = 5n = 36
t =
6.Hypothesis tests & confidence intervalsHard
z −2.57602.576

A sample of 64 measurements has mean 201.2. The population standard deviation is 4. Find the upper limit U of the 99% confidence interval for the mean.

x̄ = 201.2σ = 4n = 6499%
U =
7.Linear regression & correlationMedium
xy128226322416517xy242025

The table gives 5 paired observations of x = car age in years and y = price in k€. Find the coefficient of determination r² of the least-squares line.

n = 5
r² =
8.Linear regression & correlationHard
xy16631881208422982410726120xy20256080100120ŷ = 103

The table gives 6 paired observations of x = temperature in °C and y = ice creams sold. Use the least-squares line ŷ = a + b·x. For which value x does the line predict ŷ = 103?

n = 6ŷ = 103
x =
9.Chi-square testsMedium
lowmediumhighTotalurban4510964rural33322590Total784234154

The contingency table shows observed counts. For a chi-square test of independence, find the expected count E for the cell “urban, low”.

row total = 64column total = 78N = 154
E =
10.Chi-square testsHard
dfα = 0.05α = 0.0113.8416.63525.9919.21037.81511.34549.48813.277511.07015.086612.59216.812714.06718.475815.50720.090916.91921.6661018.30723.209

A chi-square goodness-of-fit test checks whether counts in 4 categories follow a Poisson distribution whose mean is estimated from the same data. Using the table, find the critical value χ²crit at significance level α = 0.01.

α = 0.01
χ²crit =

3Solutions

1.Normal distribution

Answer: P = 0.06681

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 sum

μ = 750 g, σ = √(4² + 9²) = 9.849 g

Standardise

z = (764.8 − 750)/9.849 = 1.5

Upper tail

P = 1 − Φ(1.5) = 1 − 0.9332 = 0.06681

Answer

P = 0.06681
2.Normal distribution

Answer: P = 0.8264

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 difference

μ = 25.02 − 25 = 0.02 mm, σ = 0.02121 mm

Standardise

z = (0 − 0.02)/0.02121 = −0.94

Probability

P = 1 − Φ(−0.94) = 0.8264

Answer

P = 0.8264
3.Confidence intervals

Answer: lower limit = 53.16

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.

Critical value

df = n − 1 = 14, t = 2.977

Margin of error

E = 2.977·11.5/√15 = 8.84

Interval

62 ± 8.84 → [53.16, 70.84]

Answer

lower limit = 53.16
4.Confidence intervals

Answer: n = 4116

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·39/1)² = 4116

Round up

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

n = 4116

Answer

n = 4116
5.Hypothesis tests & confidence intervals

Answer: t = 1.68

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

SE = 5/√36 = 5/6 = 0.8333

Test statistic

t = (501.4 − 500)/0.8333 = 1.68

Answer

t = 1.68
t0.025; df = 35 = 2.03

|t| < 2.03, so H₀ is not rejected at the 5% level (two-sided).

6.Hypothesis tests & confidence intervals

Answer: U = 202.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).

Margin of error

E = 2.576·4/√64 = 1.288

Interval limit

U = 201.2 + 1.288 = 202.5

Answer

U = 202.5
7.Linear regression & correlation

Answer: r² = 0.9078

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̄ = 15/5 = 3
ȳ = 109/5 = 21.8

Sums of squares and products

Sxx = Σ(x − x̄)² = 10
Sxy = Σ(x − x̄)(y − ȳ) = −32
Syy = Σ(y − ȳ)² = 112.8

Coefficient of determination

r² = −32²/(10·112.8) = 0.9078

Answer

r² = 0.9078

About 90.78% of the variation in y is explained by the line.

8.Linear regression & correlation

Answer: x = 23.01

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̄ = 126/6 = 21
ȳ = 553/6 = 92.17

Sums of squares and products

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

Regression line

b = 377/70 = 5.386
a = 92.17 − 5.386·21 = −20.93
ŷ = −20.93 + 5.386·x

Solve for x

x = (103 − (−20.93))/5.386 = 23.01

Answer

x = 23.01
9.Chi-square tests

Answer: E = 32.42

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 count

E = 64·78/154 = 32.42

Answer

E = 32.42
10.Chi-square tests

Answer: χ²crit = 9.21

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 = 4 − 1 − 1 = 2

Table

χ²crit(df = 2, α = 0.01) = 9.210

Answer

χ²crit = 9.210

Reject H₀ if the computed χ² is larger than this value.

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