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 to the right of z = 0.9881

Drag z so that the shaded area under the standard normal curve, to the right of z, is 0.9881. Find z to two decimals.

A = 0.9881
z =
2.Normal distributionHard
μ = 178x = ?99%

The heights of adult men are normally distributed with mean 178 cm and standard deviation 7 cm. Find the value x below which 99% of them lie (the 99th percentile).

μ = 178σ = 7P = 99%
x = cm
3.Confidence intervalsMedium
n = 16, sd​ = 4.90LU = ?d̄ = 7.8E99%

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

n = 16d̄ = 7.8sd = 4.999%t(15) = 2.947
upper limit = mmHg
4.Confidence intervalsHard
σ = 8, n = ?x̄ − Ex̄ + Ex̄E = 290%

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

σ = 8E = 290%
n =
5.Hypothesis tests & confidence intervalsMedium
−2.0932.093t = ?df = 19

Two teaching methods are compared. Group 1: 11 students, mean score 61, standard deviation 2.5. Group 2: 10 students, mean score 66, standard deviation 10. Assume equal population variances and use the pooled two-sample t test. Find the test statistic t for H₀: μ₁ = μ₂, taking the difference as x̄₁ − x̄₂ (group 1 minus group 2).

n₁ = 11x̄₁ = 61s₁ = 2.5n₂ = 10x̄₂ = 66s₂ = 10
t =
6.Hypothesis tests & confidence intervalsHard
μ₀x̄c

A one-sided z test of H₀: μ = 100 against H₁: μ < 100 is done at α = 0.01 with a sample of 36; the standard deviation is known to be 3. In reality the mean is 98.8. Find the power 1 − β of the test in percent.

μ₀ = 100μ = 98.8σ = 3n = 36α = 0.01
1 − β = %
7.Linear regression & correlationMedium
xy14531666186820852297xy15206080100

The table gives 5 paired observations of x = temperature in °C and y = ice creams sold. Their sums are given. Find Pearson's correlation coefficient r from these sums.

n = 5Σx = 90Σy = 369Σx² = 1660Σy² = 28423Σxy = 6856
r =
8.Linear regression & correlationHard
xy168518892098221132413326137xy2025100120140x = 23

The table gives 6 paired observations of x = temperature in °C and y = ice creams sold. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 23.

n = 6x = 23
ŷ =
9.Chi-square testsMedium
no defectminormajorTotalday shift264351120night shift19202160Total456372180

The contingency table shows observed counts. Compute the chi-square statistic χ² for the test of independence between the row and column variables. Do not use a continuity correction.

N = 1802 × 3
χ² =
10.Chi-square testsHard

A chi-square test of independence is carried out on a contingency table with 3 rows and 3 columns (not counting the totals). How many degrees of freedom df does the test have?

3 × 3
df =

3Solutions

1.Normal distribution

Answer: z = −2.26

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.9881 = 0.0119

Read the z-table backwards

Find 0.0119 inside the table and read off z.

z = −2.26

Answer

z = −2.26
2.Normal distribution

Answer: x = 194.3 cm

Normal distribution: convert a value x to a z-score, z = (x − μ)/σ, which counts standard deviations from the mean. A z-table (or Φ(z)) gives the area to the left of z, which is P(X < x). The area to the right is 1 − Φ(z), and the area between two values is the difference of their two areas.

z for the percentile

Φ(z) = 0.99 → z = 2.326

Back to x

x = 178 + 2.326·7 = 194.28 cm

Answer

x = 194.28 cm
3.Confidence intervals

Answer: upper limit = 11.41 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 = 15, t = 2.947

Margin of error

E = 2.947·4.9/√16 = 3.61

Interval

7.8 ± 3.61 → [4.19, 11.41]

Answer

upper limit = 11.41 mmHg
4.Confidence intervals

Answer: n = 44

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·8/2)² = 43.3

Round up

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

n = 44

Answer

n = 44
5.Hypothesis tests & confidence intervals

Answer: t = −1.608

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 ≤ α.

Pooled variance

sp² = (10·2.5² + 9·10²)/19 = 50.66
sp = 7.117

Standard error

SE = 7.117·√(1/11 + 1/10) = 3.11

Test statistic

t = (61 − 66)/3.11 = −1.608

Answer

t = −1.608

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

6.Hypothesis tests & confidence intervals

Answer: 1 − β = 52.95 %

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 = 3/√36 = 0.5
x̄c = 100 − 2.326·0.5 = 98.84

z under the true mean

z = (98.84 − 98.8)/0.5 = 0.074

Power

power = P(Z < 0.074) = 52.95%
1 − β = 52.95%

Answer

1 − β = 52.95%
7.Linear regression & correlation

Answer: r = 0.9805

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 = 6856 − 90·369/5 = 214
Sxx = 1660 − 90²/5 = 40
Syy = 28423 − 369²/5 = 1191

Correlation coefficient

r = 214/√(40·1191) = 0.9805

Answer

r = 0.9805
8.Linear regression & correlation

Answer: ŷ = 120.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̄ = 126/6 = 21
ȳ = 655/6 = 109.2

Sums of squares and products

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

Regression line

b = 407/70 = 5.814
a = 109.2 − 5.814·21 = −12.93
ŷ = −12.93 + 5.814·x

Prediction

ŷ = −12.93 + 5.814·23 = 120.8

Answer

ŷ = 120.8
9.Chi-square tests

Answer: χ² = 2.234

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

day shift: 120·45/180 = 30, 120·63/180 = 42, 120·72/180 = 48
night shift: 60·45/180 = 15, 60·63/180 = 21, 60·72/180 = 24

Chi-square statistic

χ² = (26 − 30)²/30 + (43 − 42)²/42 + (51 − 48)²/48 + (19 − 15)²/15 + (20 − 21)²/21 + (21 − 24)²/24
χ² = 2.234

Answer

χ² = 2.234

df = 2. At α = 0.05 the critical value is 5.991, so H₀ (independence) is not rejected.

10.Chi-square tests

Answer: df = 4

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 = (3 − 1)·(3 − 1) = 4

Answer

df = 4

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