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
225 kg228 kgT = X₁ + … + X₉?

The masses of bags of cement are independent and normal with mean 25 kg and standard deviation 0.5 kg. Find the probability P that the total mass of 9 of them exceeds 228 kg. Round z to two decimals.

μ = 25 kgσ = 0.5 kgn = 9> 228 kg
P =
2.Normal distributionHard
0.03 mm0D − d?

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

hole: μ = 25.03 mm, σ = 0.02 mmshaft: μ = 25 mm, σ = 0.01 mm
P =
3.Confidence intervalsMedium
x̄E₁ = 11.799%, n = 64x̄E₂ = ?95%, n = 64

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

99%n₁ = 64E₁ = 11.795%
E₂ =
4.Confidence intervalsHard
σ = 26, n = ?x̄ − Ex̄ + Ex̄E = 290%

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

σ = 26E = 290%
n =
5.Hypothesis tests & confidence intervalsMedium
t −2.0302.03

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

μ₀ = 500x̄ = 504.3s = 15n = 36
t =
6.Hypothesis tests & confidence intervalsHard
−1.961.96z = ?

In a trial, 195 of 300 patients on treatment A recover, and 216 of 300 patients on treatment B. Using the pooled proportion, find the test statistic z for H₀: p₁ = p₂.

x₁ = 195n₁ = 300x₂ = 216n₂ = 300
z =
7.Linear regression & correlationMedium
xy1333475577699761186xy510406080

The table gives 6 paired observations of x = advertising spend in k€ and y = sales in k€. Their sums are given. Find Pearson's correlation coefficient r from these sums.

n = 6Σx = 36Σy = 368Σx² = 286Σy² = 24480Σxy = 2572
r =
8.Linear regression & correlationHard
xy25346467287610861290xy5106080x = 11

The table gives 6 paired observations of x = hours studied and y = exam score. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 11.

n = 6x = 11
ŷ =
9.Chi-square testsMedium
lowmediumhighTotalurban32261977rural12144369Total444062146

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 = 77column total = 44N = 146
E =
10.Chi-square testsHard
passfailTotalline 12080100line 2144660line 34456100Total78182260dfα = 0.05α = 0.0113.8416.63525.9919.21037.81511.34549.48813.277511.07015.086612.59216.812714.06718.475815.50720.090916.91921.6661018.30723.209

The table shows observed counts. Test at α = 0.01 whether the two variables are independent (no continuity correction). Compute the test statistic χ², then compare it with the critical value from the table.

N = 2603 × 2α = 0.01
χ² =

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 = 225 kg, σT = 0.5·√9 = 1.5 kg

Standardise

z = (228 − 225)/1.5 = 2

Probability

P = 1 − Φ(2) = 0.02275

Answer

P = 0.02275
2.Normal distribution

Answer: P = 0.9099

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.03 − 25 = 0.03 mm, σ = 0.02236 mm

Standardise

z = (0 − 0.03)/0.02236 = −1.34

Probability

P = 1 − Φ(−1.34) = 0.9099

Answer

P = 0.9099
3.Confidence intervals

Answer: E₂ = 8.902

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₁ = (1.96/2.576)·√(64/64) = 0.7609

New margin

E₂ = 11.7·0.7609 = 8.902

Answer

E₂ = 8.902
4.Confidence intervals

Answer: n = 458

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·26/2)² = 457.3

Round up

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

n = 458

Answer

n = 458
5.Hypothesis tests & confidence intervals

Answer: t = 1.72

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 = 15/√36 = 15/6 = 2.5

Test statistic

t = (504.3 − 500)/2.5 = 1.72

Answer

t = 1.72
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: z = −1.846

Hypothesis test: the test statistic = (estimate − value under H₀)/(standard error under H₀). The p-value is the probability, assuming H₀ is true, of a statistic at least as extreme as the one observed: the area in one tail for a one-sided H₁, twice the tail area for a two-sided H₁. Reject H₀ when p ≤ α.

Sample proportions

p̂₁ = 195/300 = 0.65
p̂₂ = 216/300 = 0.72
p̂ = 411/600 = 0.685

Standard error under H₀

SE = √(0.685·0.315·(1/300 + 1/300)) = 0.03793

Test statistic

z = (0.65 − 0.72)/0.03793 = −1.846

Answer

z = −1.846

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

7.Linear regression & correlation

Answer: r = 0.9957

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 = 2572 − 36·368/6 = 364
Sxx = 286 − 36²/6 = 70
Syy = 24480 − 368²/6 = 1909

Correlation coefficient

r = 364/√(70·1909) = 0.9957

Answer

r = 0.9957
8.Linear regression & correlation

Answer: ŷ = 88.07

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
ȳ = 441/6 = 73.5

Sums of squares and products

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

Regression line

b = 255/70 = 3.643
a = 73.5 − 3.643·7 = 48
ŷ = 48 + 3.643·x

Prediction

ŷ = 48 + 3.643·11 = 88.07

Answer

ŷ = 88.07
9.Chi-square tests

Answer: E = 23.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 α.

Expected count

E = 77·44/146 = 23.21

Answer

E = 23.21
10.Chi-square tests

Answer: χ² = 15.37

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

line 1: 30, 70
line 2: 18, 42
line 3: 30, 70

Chi-square statistic

χ² = (20 − 30)²/30 + (80 − 70)²/70 + (14 − 18)²/18 + (46 − 42)²/42 + (44 − 30)²/30 + (56 − 70)²/70
χ² = 15.37

Decision

df = 2, χ²crit = 9.210
15.37 > 9.210

Answer

χ² = 15.37

χ² is above the critical value, so H₀ is rejected: the variables appear to be related.

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