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
−3−2−10123zshaded area between −z and z = 0.7540

Drag z so that the shaded area between −z and z under the standard normal curve is 0.7540. Find z to two decimals.

A = 0.7540
z =
2.Normal distributionHard
35455565758595pointsbottom 80%

The exam scores are normally distributed with mean 65 points and standard deviation 10 points. Drag the cut-off so the shaded bottom 80% is to the left of it. Find the cut-off x.

μ = 65 pointsσ = 10 points80%
x = points
3.Confidence intervalsMedium
x̄E₁ = 8.399%, n = 100x̄E₂ = ?99%, n = 900

A 99% confidence interval for a mean, based on 100 observations and a known σ, has a margin of error of 8.3. What is the margin of error E₂ if the same study uses 900 observations instead?

99%n₁ = 100E₁ = 8.3n₂ = 900
E₂ =
4.Confidence intervalsHard
μ₁ − μ₂, t(10) = 1.8120L = ?Ux̄₁ − x̄₂E90%

Two fertilisers are tested. Plot group 1: 5 plots, mean yield 83 kg, standard deviation 6 kg. Plot group 2: 7 plots, mean 78.5 kg, standard deviation 3.5 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the lower limit of the 90% confidence interval for μ₁ − μ₂.

n₁ = 5x̄₁ = 83s₁ = 6n₂ = 7x̄₂ = 78.5s₂ = 3.590%t(10) = 1.812
lower limit = kg
5.Hypothesis tests & confidence intervalsMedium
−2.3652.365t = ?df = 7

8 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 −6.25 and the standard deviation of the differences is 9.3. Find the paired test statistic t for H₀: μd = 0.

n = 8d̄ = −6.25sd = 9.3
t =
6.Hypothesis tests & confidence intervalsHard
−1.961.96z = ?

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

x₁ = 18n₁ = 120x₂ = 36n₂ = 200
z =
7.Linear regression & correlationMedium
xy121221317416511610xy246101520

The table gives 6 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 = 6Σx = 21Σy = 96Σx² = 91Σy² = 1648Σxy = 293
r =
8.Linear regression & correlationHard
xy3375407509521157xy5104050x = 8

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

n = 5x = 8
ŷ =
9.Chi-square testsMedium
no defectminormajorTotalday shift41131670night shift2891956Total692235126

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

row total = 70column total = 69N = 126
E =
10.Chi-square testsHard
yesnoTotalline 18119100line 2503080line 3372360Total16872240dfα = 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.05 whether the two variables are independent (no continuity correction). Compute the test statistic χ², then compare it with the critical value from the table.

N = 2403 × 2α = 0.05
χ² =

3Solutions

1.Normal distribution

Answer: z = 1.16

From an area back to z: Φ(z) is the area to the left of z. For a left-tail area A, find z with Φ(z) = A in the table. A right-tail area A means Φ(z) = 1 − A. A central area A between −z and z leaves (1 − A)/2 in each tail, so Φ(z) = (1 + A)/2. For a value x, use x = μ + zσ.

Area to the left of z

Φ(z) = (1 + 0.7540)/2 = 0.8770

Read the z-table backwards

Find 0.8770 inside the table and read off z.

z = 1.16

Answer

z = 1.16
2.Normal distribution

Answer: x = 73.4 points

From an area back to z: Φ(z) is the area to the left of z. For a left-tail area A, find z with Φ(z) = A in the table. A right-tail area A means Φ(z) = 1 − A. A central area A between −z and z leaves (1 − A)/2 in each tail, so Φ(z) = (1 + A)/2. For a value x, use x = μ + zσ.

Area to the left

Φ(z) = 0.8

z from the table

z ≈ 0.84

Back to the original units

x = 65 + 0.84·10 = 73.4 points

Answer

x = 73.4 points
3.Confidence intervals

Answer: E₂ = 2.767

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/2.576)·√(100/900) = 0.3333

New margin

E₂ = 8.3·0.3333 = 2.767

Answer

E₂ = 2.767
4.Confidence intervals

Answer: lower limit = −0.4482 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² = (4·6² + 6·3.5²)/10 = 21.75
sp = 4.664

Margin of error

E = 1.812·4.664·√(1/5 + 1/7) = 4.948

Interval

4.5 ± 4.948 → [−0.4482, 9.448]

Answer

lower limit = −0.4482 kg
5.Hypothesis tests & confidence intervals

Answer: t = −1.901

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 = 9.3/√8 = 3.288

Test statistic

t = −6.25/3.288 = −1.901

Answer

t = −1.901

With df = 7, the two-sided 5% critical value is 2.365; |t| is smaller, so H₀ is not rejected.

6.Hypothesis tests & confidence intervals

Answer: z = −0.6937

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̂₁ = 18/120 = 0.15
p̂₂ = 36/200 = 0.18
p̂ = 54/320 = 0.1688

Standard error under H₀

SE = √(0.1688·0.8313·(1/120 + 1/200)) = 0.04325

Test statistic

z = (0.15 − 0.18)/0.04325 = −0.6937

Answer

z = −0.6937

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

7.Linear regression & correlation

Answer: r = −0.9713

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 = 293 − 21·96/6 = −43
Sxx = 91 − 21²/6 = 17.5
Syy = 1648 − 96²/6 = 112

Correlation coefficient

r = −43/√(17.5·112) = −0.9713

Answer

r = −0.9713
8.Linear regression & correlation

Answer: ŷ = 49.8

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̄ = 35/5 = 7
ȳ = 236/5 = 47.2

Sums of squares and products

Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 104

Regression line

b = 104/40 = 2.6
a = 47.2 − 2.6·7 = 29
ŷ = 29 + 2.6·x

Prediction

ŷ = 29 + 2.6·8 = 49.8

Answer

ŷ = 49.8
9.Chi-square tests

Answer: E = 38.33

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 = 70·69/126 = 38.33

Answer

E = 38.33
10.Chi-square tests

Answer: χ² = 9.889

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: 70, 30
line 2: 56, 24
line 3: 42, 18

Chi-square statistic

χ² = (81 − 70)²/70 + (19 − 30)²/30 + (50 − 56)²/56 + (30 − 24)²/24 + (37 − 42)²/42 + (23 − 18)²/18
χ² = 9.889

Decision

df = 2, χ²crit = 5.991
9.889 > 5.991

Answer

χ² = 9.889

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

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