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 kg1041 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 1041 kg. Round z to two decimals.

μ = 85 kgσ = 12 kgn = 12> 1041 kg
P =
2.Normal distributionHard
0.05 mm0D − d?

Hole diameters D are normal with mean 25.05 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.05 mm, σ = 0.015 mmshaft: μ = 25 mm, σ = 0.015 mm
P =
3.Confidence intervalsMedium
n = 12, sd​ = 1.70LUd̄ = 8.6E = ?95%

The blood pressure of 12 patients is measured before and after a treatment. The differences d = before − after (mmHg) have mean 8.6 and standard deviation 1.7. Find the margin of error E of the 95% confidence interval for the mean difference.

n = 12d̄ = 8.6sd = 1.795%t(11) = 2.201
E = mmHg
4.Confidence intervalsHard
μ₁ − μ₂, t(15) = 2.9470LU = ?x̄₁ − x̄₂E99%

Two fertilisers are tested. Plot group 1: 7 plots, mean yield 97 kg, standard deviation 4.5 kg. Plot group 2: 10 plots, mean 85.5 kg, standard deviation 2 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the upper limit of the 99% confidence interval for μ₁ − μ₂.

n₁ = 7x̄₁ = 97s₁ = 4.5n₂ = 10x̄₂ = 85.5s₂ = 299%t(15) = 2.947
upper limit = kg
5.Hypothesis tests & confidence intervalsMedium
t −2.01102.011

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

μ₀ = 500x̄ = 502s = 20n = 49
t =
6.Hypothesis tests & confidence intervalsHard
μ₀x̄c

A one-sided z test of H₀: μ = 100 against H₁: μ < 100 is done at α = 0.05 with a sample of 100; the standard deviation is known to be 25. In reality the mean is 96. Find the probability of a Type II error β in percent.

μ₀ = 100μ = 96σ = 25n = 100α = 0.05
β = %
7.Linear regression & correlationMedium
xy154269369477588697xy2466080100

The table gives 6 paired observations of x = hours studied and y = exam score. Find Pearson's correlation coefficient r.

n = 6
r =
8.Linear regression & correlationHard
xy126224322416517xy242025x = 4.5

The table gives 5 paired observations of x = car age in years and y = price in k€. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 4.5.

n = 5x = 4.5
ŷ =
9.Chi-square testsMedium
lowmediumhighTotalurban10434497rural26431281Total368656178

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

row total = 81column total = 36N = 178
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 9 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.05.

α = 0.05
χ²crit =

3Solutions

1.Normal distribution

Answer: P = 0.3085

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 = (1041 − 1020)/41.57 = 0.5

Probability

P = 1 − Φ(0.5) = 0.3085

Answer

P = 0.3085
2.Normal distribution

Answer: P = 0.9909

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.05 − 25 = 0.05 mm, σ = 0.02121 mm

Standardise

z = (0 − 0.05)/0.02121 = −2.36

Probability

P = 1 − Φ(−2.36) = 0.9909

Answer

P = 0.9909
3.Confidence intervals

Answer: E = 1.08 mmHg

Interval for a difference: estimate ± critical value × standard error. For two independent means with known σ: SE = √(σ₁²/n₁ + σ₂²/n₂) and z. With equal unknown variances: pooled s_p and t with n₁ + n₂ − 2 degrees of freedom. For paired data, work with the differences: d̄ ± t·s_d/√n.

Critical value

df = 11, t = 2.201

Margin of error

E = 2.201·1.7/√12 = 1.08

Answer

E = 1.08 mmHg
4.Confidence intervals

Answer: upper limit = 16.21 kg

Interval for a difference: estimate ± critical value × standard error. For two independent means with known σ: SE = √(σ₁²/n₁ + σ₂²/n₂) and z. With equal unknown variances: pooled s_p and t with n₁ + n₂ − 2 degrees of freedom. For paired data, work with the differences: d̄ ± t·s_d/√n.

Pooled standard deviation

sp² = (6·4.5² + 9·2²)/15 = 10.5
sp = 3.24

Margin of error

E = 2.947·3.24·√(1/7 + 1/10) = 4.706

Interval

11.5 ± 4.706 → [6.794, 16.21]

Answer

upper limit = 16.21 kg
5.Hypothesis tests & confidence intervals

Answer: t = 0.7

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 = 20/√49 = 20/7 = 2.857

Test statistic

t = (502 − 500)/2.857 = 0.7

Answer

t = 0.7
t0.025; df = 48 = 2.011

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

6.Hypothesis tests & confidence intervals

Answer: β = 51.79 %

Power of a test: power = 1 − β is the probability of rejecting H₀ when it is false. Find the cutoff x̄c from μ₀ and z_α, then compute the probability of landing beyond x̄c using the true mean: z = (x̄c − μ)/(σ/√n).

Critical sample mean

SE = 25/√100 = 2.5
x̄c = 100 − 1.645·2.5 = 95.89

z under the true mean

z = (95.89 − 96)/2.5 = −0.045

Type II error

power = P(Z < −0.045) = 48.21%
β = 100% − 48.21% = 51.79%

Answer

β = 51.79%
7.Linear regression & correlation

Answer: r = 0.9795

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̄ = 21/6 = 3.5
ȳ = 454/6 = 75.67

Sums of squares and products

Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = 140
Syy = Σ(y − ȳ)² = 1167

Correlation coefficient

r = 140/√(17.5·1167) = 0.9795

Answer

r = 0.9795
8.Linear regression & correlation

Answer: ŷ = 17.1

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
ȳ = 105/5 = 21

Sums of squares and products

Sxx = Σ(x − x̄)² = 10
Sxy = Σ(x − x̄)(y − ȳ) = −26

Regression line

b = −26/10 = −2.6
a = 21 − (−2.6)·3 = 28.8
ŷ = 28.8 − 2.6·x

Prediction

ŷ = 28.8 + (−2.6)·4.5 = 17.1

Answer

ŷ = 17.1
9.Chi-square tests

Answer: E = 16.38

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 = 81·36/178 = 16.38

Answer

E = 16.38
10.Chi-square tests

Answer: χ²crit = 14.07

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 = 9 − 1 − 1 = 7

Table

χ²crit(df = 7, α = 0.05) = 14.067

Answer

χ²crit = 14.067

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

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