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
100 kg99.5 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 4 of them is below 99.5 kg. Round z to two decimals.

μ = 25 kgσ = 0.5 kgn = 4< 99.5 kg
P =
2.Normal distributionHard
235240245250255260265gtop 95%

The bag weights are normally distributed with mean 250 g and standard deviation 5 g. Drag the cut-off so the shaded top 95% is to the right of it. Find the cut-off x.

μ = 250 gσ = 5 g95%
x = g
3.Confidence intervalsMedium
n = 13, sd​ = 1.80LU = ?d̄ = −8.5E95%

The blood pressure of 13 patients is measured before and after a treatment. The differences d = before − after (mmHg) have mean −8.5 and standard deviation 1.8. Find the upper limit of the 95% confidence interval for the mean difference.

n = 13d̄ = −8.5sd = 1.895%t(12) = 2.179
upper limit = mmHg
4.Confidence intervalsHard
p = 0.5, n = ?p̂ − Ep̂ + Ep̂E = 0.0390%

Nothing is known in advance about the proportion of defective products. How many products n must be inspected so that a 90% confidence interval for the proportion has a margin of error of at most 0.03?

p = 0.5E = 0.0390%
n =
5.Hypothesis tests & confidence intervalsMedium
t −1.9901.99

A sample of 81 students has a mean score of 118.8 and a sample standard deviation of 4. Find the test statistic t for H₀: μ = 120.

μ₀ = 120x̄ = 118.8s = 4n = 81
t =
6.Hypothesis tests & confidence intervalsHard
σ = 12, n = ?x̄ − Ex̄ + Ex̄E = 290%

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

σ = 12E = 290%
n =
7.Linear regression & correlationMedium
xy189621113241242714930162xy202530100150

The table gives 5 paired observations of x = temperature in °C and y = ice creams sold. Find the coefficient of determination r² of the least-squares line.

n = 5
r² =
8.Linear regression & correlationHard
xy145248349455557661xy24645505560x = 2.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. A new observation (2.5, 45) is made. Find its residual e = y − ŷ.

n = 6(2.5, 45)
e =
9.Chi-square testsMedium
no defectminormajorTotalday shift3791157night shift13441572Total505326129

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

row total = 72column total = 50N = 129
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 8 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.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 = 100 kg, σT = 0.5·√4 = 1 kg

Standardise

z = (99.5 − 100)/1 = −0.5

Probability

P = Φ(−0.5) = 0.3085

Answer

P = 0.3085
2.Normal distribution

Answer: x = 241.8 g

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.05

z from the table

z ≈ −1.64

Back to the original units

x = 250 − 1.64·5 = 241.8 g

Answer

x = 241.8 g
3.Confidence intervals

Answer: upper limit = −7.412 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 = 12, t = 2.179

Margin of error

E = 2.179·1.8/√13 = 1.088

Interval

−8.5 ± 1.088 → [−9.588, −7.412]

Answer

upper limit = −7.412 mmHg
4.Confidence intervals

Answer: n = 752

Confidence interval for a proportion: p̂ ± z·√(p̂(1 − p̂)/n), where p̂ = x/n. To reach a margin E you need n ≥ z²·p(1 − p)/E², rounded up; without a prior estimate use p = 0.5, which gives the largest n.

Solve for n

n = 1.645²·0.5·0.5/0.03² = 751.7

Round up

n = 752

Answer

n = 752
5.Hypothesis tests & confidence intervals

Answer: t = −2.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 = 4/√81 = 4/9 = 0.4444

Test statistic

t = (118.8 − 120)/0.4444 = −2.7

Answer

t = −2.7
t0.025; df = 80 = 1.99

|t| > 1.99, so H₀ is rejected at the 5% level (two-sided).

6.Hypothesis tests & confidence intervals

Answer: n = 98

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 = (1.645·12/2)² = 97.42

Round up

n = 98

Answer

n = 98
7.Linear regression & correlation

Answer: r² = 0.9873

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̄ = 120/5 = 24
ȳ = 644/5 = 128.8

Sums of squares and products

Sxx = Σ(x − x̄)² = 90
Sxy = Σ(x − x̄)(y − ȳ) = 504
Syy = Σ(y − ȳ)² = 2859

Coefficient of determination

r² = 504²/(90·2859) = 0.9873

Answer

r² = 0.9873

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

8.Linear regression & correlation

Answer: e = −4.271

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
ȳ = 315/6 = 52.5

Sums of squares and products

Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = 56.5

Regression line

b = 56.5/17.5 = 3.229
a = 52.5 − 3.229·3.5 = 41.2
ŷ = 41.2 + 3.229·x

Predicted value

ŷ = 41.2 + 3.229·2.5 = 49.27

Residual

e = 45 − 49.27 = −4.271

Answer

e = −4.271

The point lies below the line.

9.Chi-square tests

Answer: E = 27.91

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 = 72·50/129 = 27.91

Answer

E = 27.91
10.Chi-square tests

Answer: χ²crit = 16.81

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 = 8 − 1 − 1 = 6

Table

χ²crit(df = 6, α = 0.01) = 16.812

Answer

χ²crit = 16.812

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

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