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
88.75118P = ?

The IQ scores are normally distributed with mean 100 points and standard deviation 15 points. What fraction lies between 88.75 and 118 points? Give P as a decimal.

μ = 100σ = 15x1 = 88.75x2 = 118
P =
2.Normal distributionHard
557085100115130145pointsbottom 25%

The IQ scores are normally distributed with mean 100 points and standard deviation 15 points. Drag the cut-off so the shaded bottom 25% is to the left of it. Find the cut-off x.

μ = 100 pointsσ = 15 points25%
x = points
3.Confidence intervalsMedium
n = 20, sd​ = 2.10LUd̄ = −8.9E = ?90%

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

n = 20d̄ = −8.9sd = 2.190%t(19) = 1.729
E = mmHg
4.Confidence intervalsHard
p = 0.5, n = ?p̂ − Ep̂ + Ep̂E = 0.0190%

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.01?

p = 0.5E = 0.0190%
n =
5.Hypothesis tests & confidence intervalsMedium
t −1.98401.984

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

μ₀ = 75x̄ = 75.68s = 4n = 100
t =
6.Hypothesis tests & confidence intervalsHard
−1.961.96z = ?

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

x₁ = 40n₁ = 200x₂ = 27n₂ = 80
z =
7.Linear regression & correlationMedium
xy366467575679785892xy468708090

The table gives 6 paired observations of x = hours studied and y = exam score. Find the coefficient of determination r² of the least-squares line.

n = 6
r² =
8.Linear regression & correlationHard
xy264106138171019xy5105101520ŷ = 15

The table gives 5 paired observations of x = load in kN and y = extension in mm. Use the least-squares line ŷ = a + b·x. For which value x does the line predict ŷ = 15?

n = 5ŷ = 15
x =
9.Chi-square testsMedium
coughno coughTotalsmokers7921100non-smokers174360Total9664160

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 = 1602 × 2
χ² =
10.Chi-square testsHard
yesnoTotalage 18–30281240age 31–5054660age 51+621880Total14436180dfα = 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 = 1803 × 2α = 0.01
χ² =

3Solutions

1.Normal distribution

Answer: P = 0.6583

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-scores

z₁ = (88.75 − 100)/15 = −0.75
z₂ = (118 − 100)/15 = 1.2

Area between

P = Φ(1.2) − Φ(−0.75) = 0.8849 − 0.2266 = 0.6583

Answer

P = 0.6583
2.Normal distribution

Answer: x = 90 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.25

z from the table

z ≈ −0.67

Back to the original units

x = 100 − 0.67·15 = 90 points

Answer

x = 90 points
3.Confidence intervals

Answer: E = 0.8119 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 = 19, t = 1.729

Margin of error

E = 1.729·2.1/√20 = 0.8119

Answer

E = 0.8119 mmHg
4.Confidence intervals

Answer: n = 6766

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.01² = 6765

Round up

n = 6766

Answer

n = 6766
5.Hypothesis tests & confidence intervals

Answer: t = 1.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/√100 = 4/10 = 0.4

Test statistic

t = (75.68 − 75)/0.4 = 1.7

Answer

t = 1.7
t0.025; df = 99 = 1.984

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

6.Hypothesis tests & confidence intervals

Answer: z = −2.436

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̂₁ = 40/200 = 0.2
p̂₂ = 27/80 = 0.3375
p̂ = 67/280 = 0.2393

Standard error under H₀

SE = √(0.2393·0.7607·(1/200 + 1/80)) = 0.05644

Test statistic

z = (0.2 − 0.3375)/0.05644 = −2.436

Answer

z = −2.436

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

7.Linear regression & correlation

Answer: r² = 0.976

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̄ = 33/6 = 5.5
ȳ = 464/6 = 77.33

Sums of squares and products

Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = 94
Syy = Σ(y − ȳ)² = 517.3

Coefficient of determination

r² = 94²/(17.5·517.3) = 0.976

Answer

r² = 0.976

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

8.Linear regression & correlation

Answer: x = 7.212

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̄ = 30/5 = 6
ȳ = 65/5 = 13

Sums of squares and products

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

Regression line

b = 66/40 = 1.65
a = 13 − 1.65·6 = 3.1
ŷ = 3.1 + 1.65·x

Solve for x

x = (15 − 3.1)/1.65 = 7.212

Answer

x = 7.212
9.Chi-square tests

Answer: χ² = 40.11

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

smokers: 100·96/160 = 60, 100·64/160 = 40
non-smokers: 60·96/160 = 36, 60·64/160 = 24

Chi-square statistic

χ² = (79 − 60)²/60 + (21 − 40)²/40 + (17 − 36)²/36 + (43 − 24)²/24
χ² = 40.11

Answer

χ² = 40.11

df = 1. At α = 0.05 the critical value is 3.841, so H₀ (independence) is rejected.

10.Chi-square tests

Answer: χ² = 6.563

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

age 18–30: 32, 8
age 31–50: 48, 12
age 51+: 64, 16

Chi-square statistic

χ² = (28 − 32)²/32 + (12 − 8)²/8 + (54 − 48)²/48 + (6 − 12)²/12 + (62 − 64)²/64 + (18 − 16)²/16
χ² = 6.563

Decision

df = 2, χ²crit = 9.210
6.563 < 9.210

Answer

χ² = 6.563

χ² is below the critical value, so H₀ is not rejected: there is no significant evidence of a relationship.

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