Skip to the content

Topics Covered

Jackknife Bootstrap Fisher Scoring Cauchy MLE Normal Confidence Limits Large-Sample Limits
On this page
  1. Section A — The Five Practicals
  2. Practical 1 — Jackknife Estimates
  3. Practical 2 — Bootstrap Estimates
  4. Practical 3 — MLE by the Method of Scoring, Cauchy Location
  5. Practical 4 — Confidence Limits for a Normal Population
  6. Practical 5 — Large-Sample Confidence Limits
  7. What the Practical Record Should Contain
About this course. STS-205 is a conventional practical in two sections: Section A, Estimation Theory — the five experiments worked here — and Section B, Multivariate Analysis, which belongs to Multivariate Analysis (STS-202) and is written with that course. Both sections are examined by hand, so every experiment below is worked with full arithmetic; R is shown only as a check, inside each Calculation.

Section A — The Five Practicals

#PracticalMethod used below
1Computation of jackknife estimatesleave-one-out, pseudo-values, bias and standard error
2Computation of bootstrap estimatescomplete enumeration of all resamples
3MLE by the scoring method for a Cauchy populationFisher scoring from the sample median
4Confidence limits for the parameters of a normal population\(t\) and \(\chi^{2}\) pivots
5Large-sample confidence limits for binomial, Poisson and exponentialasymptotic normality of the MLE

Practical 1 — Jackknife Estimates

1. Problem

For the sample \(3, 5, 7, 11, 14\), the variance is estimated by the divisor-\(n\) (biased) variance \(\hat\theta = \frac{1}{n}\sum_i (x_i - \bar x)^{2}\). Compute the jackknife estimate of its bias, the bias-corrected jackknife estimate, and the jackknife standard error.

2. Aim

To reduce the bias of an estimator and estimate its standard error by the jackknife, which leaves out one observation at a time.

3. Formula

\[ \bar{\hat\theta}_{(\cdot)} = \frac{1}{n}\sum_{i=1}^{n}\hat\theta_{(-i)}, \qquad \widehat{\text{bias}} = (n-1)\left(\bar{\hat\theta}_{(\cdot)} - \hat\theta\right), \qquad \hat\theta_{\text{jack}} = \hat\theta - \widehat{\text{bias}} = n\hat\theta - (n-1)\bar{\hat\theta}_{(\cdot)} \] \[ \tilde\theta_i = n\hat\theta - (n-1)\hat\theta_{(-i)}, \qquad \widehat{SE}_{\text{jack}} = \sqrt{\frac{1}{n(n-1)}\sum_{i=1}^{n}\left(\tilde\theta_i - \bar{\tilde\theta}\right)^{2}} \]

\(\hat\theta_{(-i)}\) is the same statistic computed with \(x_i\) omitted. The pseudo-values \(\tilde\theta_i\) average to \(\hat\theta_{\text{jack}}\), and their sample variance gives the standard error. If the bias has the form \(a_1/n + a_2/n^{2} + \cdots\), the construction cancels the \(a_1/n\) term exactly; nothing about the distribution is assumed (Unit 2, section 4).

Applying it:

  1. Compute \(\hat\theta\) on the full sample.
  2. Compute the \(n\) leave-one-out values \(\hat\theta_{(-i)}\) and their mean.
  3. Estimate the bias and correct for it.
  4. Form the pseudo-values; the standard error comes from them, not from the leave-one-out values directly.

4. Calculation

\(\bar x = 40/5 = 8\), and \(\sum_i (x_i - 8)^{2} = 25 + 9 + 1 + 9 + 36 = 80\), so \(\hat\theta = 80/5 = 16\).

omittedremaining samplemean\(\hat\theta_{(-i)}\)pseudo-value \(\tilde\theta_i = 80 - 4\hat\theta_{(-i)}\)
35, 7, 11, 149.2512.18750031.25
53, 7, 11, 148.7517.18750011.25
73, 5, 11, 148.2519.6875001.25
113, 5, 7, 147.2517.18750011.25
143, 5, 7, 116.508.75000045.00
mean15.00000020.00
\[ \widehat{\text{bias}} = (5-1)(15 - 16) = 4 \times (-1) = -4, \qquad \hat\theta_{\text{jack}} = 16 - (-4) = 20. \]

The unbiased variance is \(s^{2} = 80/(5-1) = 20\). The pseudo-values have mean \(20\), as they must, and their sample variance divided by \(n\) gives \(\widehat{SE}_{\text{jack}} = 7.925434\).

CHECK IN R
x <- c(3, 5, 7, 11, 14); n <- length(x)
biased_var <- function(v) mean((v - mean(v))^2)
th <- biased_var(x)
loo <- sapply(seq_len(n), function(i) biased_var(x[-i]))
ps  <- n * th - (n - 1) * loo            # pseudo-values
loo; ps
c(estimate = mean(ps), se = sd(ps) / sqrt(n))
var(x)                                    # 20 -- the jackknife recovered it
[1] 12.1875 17.1875 19.6875 17.1875  8.7500
[1] 31.25 11.25  1.25 11.25 45.00
 estimate        se 
20.000000  7.925434 
[1] 20

5. Result

\(\widehat{\text{bias}} = -4\), \(\hat\theta_{\text{jack}} = 20\) and \(\widehat{SE}_{\text{jack}} = 7.93\). The jackknife reproduced the unbiased variance \(s^{2} = 20\) exactly, having been told nothing about the correct divisor. This is not a coincidence — the bias of the divisor-\(n\) variance is exactly \(-\sigma^{2}/n\), of the form the jackknife is built to remove. The same four lines apply to a statistic whose bias nobody has worked out, and give a standard error where no formula exists.

Practical 2 — Bootstrap Estimates

1. Problem

For the sample \(2, 5, 11\) and the statistic \(\hat\theta = \bar x\), compute the bootstrap estimates of bias and standard error by enumerating every resample.

2. Aim

To estimate the bias and standard error of a statistic from its bootstrap distribution, computed here exactly by complete enumeration.

3. Formula

\[ \widehat{\text{bias}} = \bar{\hat\theta}^{*} - \hat\theta, \qquad \widehat{SE}_{\text{boot}} = \sqrt{\operatorname{Var}^{*}\left(\hat\theta^{*}\right)}, \qquad \operatorname{Var}^{*}\left(\bar X^{*}\right) = \frac{s_n^{2}}{n} \]

Resampling from the data, with replacement, is resampling from the empirical distribution function \(F_n\), justified by the Glivenko–Cantelli lemma (Unit 2, section 5). With \(n = 3\) there are exactly \(3^{3} = 27\) resamples, so the bootstrap distribution can be written down in full and no randomness enters; the answer is exact and reproducible in an examination.

Applying it:

  1. Compute \(\hat\theta\) on the original sample.
  2. List all \(n^{n}\) resamples and compute \(\hat\theta^{*}\) on each.
  3. The bias is the mean of the \(\hat\theta^{*}\) less \(\hat\theta\); the standard error is the square root of their variance (divisor: the number of resamples).

4. Calculation

\(\bar x = (2 + 5 + 11)/3 = 6\). Over all 27 resamples, the mean of the bootstrap means is \(\bar{\hat\theta}^{*} = 6.000000\), exactly \(\bar x\), and

\[ \operatorname{Var}^{*}\left(\bar X^{*}\right) = 4.666667, \qquad \widehat{SE}_{\text{boot}} = \sqrt{4.666667} = 2.160247. \]

The biased sample variance is \(s_n^{2} = \{(2-6)^{2} + (5-6)^{2} + (11-6)^{2}\}/3 = (16 + 1 + 25)/3 = 14\), and \(s_n^{2}/n = 14/3 = 4.666667\) — exactly the bootstrap variance. The classical \(\sqrt{s^{2}/n} = \sqrt{21/3} = 2.645751\).

CHECK IN R
s <- c(2, 5, 11)
g <- expand.grid(s, s, s)                # all 27 resamples
bm <- rowMeans(g)
c(n_resamples = nrow(g), mean = mean(bm), bias = mean(bm) - mean(s),
  var = mean((bm - mean(bm))^2), se = sqrt(mean((bm - mean(bm))^2)))
n_resamples        mean        bias         var          se 
  27.000000    6.000000    0.000000    4.666667    2.160247 

5. Result

The bootstrap bias is \(0\) — correctly, since the sample mean is unbiased — and \(\widehat{SE}_{\text{boot}} = 2.160\), against the classical 2.646. The two differ by exactly \(\sqrt{(n-1)/n} = \sqrt{2/3} = 0.8165\), negligible for realistic \(n\): for the mean the bootstrap reproduces a known formula exactly, and for a statistic with no known formula the same procedure runs unchanged.

A practical warning. \(n^{n}\) resamples is \(27\) at \(n = 3\) but \(10^{10}\) at \(n = 10\). Enumeration is an examination device for small \(n\); for real data the resamples are drawn at random, and \(B = 1000\) or more is used with the seed recorded.

Practical 3 — MLE by the Method of Scoring, Cauchy Location

1. Problem

A sample of \(n = 7\) from Cauchy\((\theta, 1)\) is

\[ -1.94,\quad -0.44,\quad 0.10,\quad 0.72,\quad 1.35,\quad 2.18,\quad 3.91. \]

Find the maximum likelihood estimate of \(\theta\) by the method of scoring, its standard error, and an approximate 95% confidence interval.

2. Aim

To solve a likelihood equation that has no closed form, by Fisher's method of scoring.

3. Formula

\[ \ln L = -n\ln\pi - \sum_{i=1}^{n}\ln\!\left[1 + (x_i - \theta)^{2}\right], \qquad U(\theta) = \sum_{i=1}^{n}\frac{2(x_i - \theta)}{1 + (x_i - \theta)^{2}} \] \[ n I(\theta) = \frac{n}{2}, \qquad \theta^{(k+1)} = \theta^{(k)} + \frac{U\left(\theta^{(k)}\right)}{n I(\theta)}, \qquad \widehat{SE} = \frac{1}{\sqrt{n I(\theta)}} = \sqrt{\frac{2}{n}} \]

For the Cauchy there is no closed-form MLE and no useful moment estimator — Distribution Theory, Unit 1 proves the mean does not exist, so the sample mean estimates nothing. The information is \(\tfrac12\) per observation, a constant — which is what makes scoring simpler than Newton–Raphson here: the divisor never has to be recomputed.

Applying it:

  1. Start from the sample median, \(0.72\), the fourth of seven ordered values. Never start from the sample mean \(0.840000\): for a Cauchy it is not consistent for anything, and a poor start can send the iteration to a local maximum, of which the Cauchy likelihood can have several.
  2. Compute the score at the current value and add \(U/3.5\).
  3. Repeat until the score is effectively zero.
  4. Give the standard error from the information, and the interval \(\hat\theta \pm 1.96\,\widehat{SE}\).

4. Calculation

\(k\)\(\theta^{(k)}\)\(U(\theta^{(k)})\)step \(U/3.5\)\(\theta^{(k+1)}\)
00.720000−0.138266−0.0395050.680495
10.680495−0.036366−0.0103900.670105
20.670105−0.009459−0.0027030.667402
30.667402−0.002453−0.0007010.666701
40.666701−0.000635−0.0001810.666520

Each step is about \(0.26\) times the previous one, so the error falls by roughly a quarter per iteration — linear convergence, which is what scoring gives (Newton–Raphson would be quadratic but needs the observed information recomputed each time). After five iterations \(\hat\theta = 0.666520\) and the score is \(-1.66 \times 10^{-4}\), effectively zero.

\[ \widehat{SE} = \sqrt{\frac{2}{7}} = 0.5345225, \qquad 0.666520 \pm 1.96 \times 0.5345225 = 0.666520 \pm 1.0476641 = (-0.381144,\ 1.714184). \]
CHECK IN R
y <- c(-1.94, -0.44, 0.10, 0.72, 1.35, 2.18, 3.91)
score <- function(t) sum(2 * (y - t) / (1 + (y - t)^2))
th <- median(y)                           # NOT mean(y)
for (k in 1:5) th <- th + score(th) / (length(y) / 2)
c(mle = th, score = score(th), se = sqrt(2 / length(y)))
th + c(-1, 1) * 1.96 * sqrt(2 / length(y))
          mle         score            se 
 0.6665195849 -0.0001647852  0.5345224838 
[1] -0.3811445  1.7141837

5. Result

\(\hat\theta = 0.6665\), with standard error 0.5345 and approximate 95% interval \((-0.381,\ 1.714)\).

Interpretation. The MLE \(0.6665\) sits below the sample mean \(0.8400\), which the single large observation \(3.91\) has dragged upwards; the likelihood downweights it automatically, because a Cauchy expects occasional extreme values. The interval is very wide for seven observations — \(\sqrt{2/n}\) falls only as \(n^{-1/2}\), and the Cauchy is an uninformative distribution to sample from.

Practical 4 — Confidence Limits for a Normal Population

1. Problem

A sample of \(n = 16\) from \(N(\mu, \sigma^{2})\), with both parameters unknown, has \(\bar x = 24.5\) and \(s = 3.2\). Find 95% confidence limits for \(\mu\), \(\sigma^{2}\) and \(\sigma\).

2. Aim

To find exact confidence limits for the mean and the variance of a normal population from the t and chi-square pivots.

3. Formula

\[ \frac{\bar X - \mu}{S/\sqrt n} \sim t_{n-1} \;\Rightarrow\; \bar x \pm t_{n-1,\,0.025}\frac{s}{\sqrt n}, \qquad \frac{(n-1)S^{2}}{\sigma^{2}} \sim \chi^{2}_{n-1} \;\Rightarrow\; \left(\frac{(n-1)s^{2}}{\chi^{2}_{n-1,\,0.025}},\ \frac{(n-1)s^{2}}{\chi^{2}_{n-1,\,0.975}}\right) \]

Applying it:

  1. Compute the standard error \(s/\sqrt n\).
  2. Read \(t_{15,\,0.025}\) and form the interval for \(\mu\).
  3. Read the two 2.5% points of \(\chi^{2}_{15}\) and form the interval for \(\sigma^{2}\).
  4. Take square roots for \(\sigma\), which is legitimate because the transformation is monotone.

4. Calculation

\[ \frac{s}{\sqrt n} = \frac{3.2}{4} = 0.8000. \]

\(t_{15,\,0.025} = 2.131449\) (check: \(P(|t_{15}| > 2.131449) = 0.050000\)), so

\[ 24.5 \pm 2.131449 \times 0.8 = 24.5 \pm 1.7052 = (22.7948,\ 26.2052). \]

The 2.5% points of \(\chi^{2}_{15}\) are \(6.262\) and \(27.488\), and \((n-1)s^{2} = 15 \times 10.24 = 153.6\), so

\[ \sigma^{2}: \left(\frac{153.6}{27.488},\ \frac{153.6}{6.262}\right) = (5.5879,\ 24.5289), \qquad \sigma: \left(\sqrt{5.5879},\ \sqrt{24.5289}\right) = (2.3639,\ 4.9527). \]
CHECK IN R
nn <- 16; xb <- 24.5; s4 <- 3.2
round(xb + c(-1, 1) * qt(0.975, nn - 1) * s4 / sqrt(nn), 4)       # mu
round((nn - 1) * s4^2 / qchisq(c(0.975, 0.025), nn - 1), 4)       # sigma^2
round(sqrt((nn - 1) * s4^2 / qchisq(c(0.975, 0.025), nn - 1)), 4) # sigma
[1] 22.7948 26.2052
[1]  5.5878 24.5284
[1] 2.3639 4.9526

R uses the exact percentage points of \(\chi^{2}_{15}\), 6.262138 and 27.488393, and so prints 5.5878 and 24.5284 (and 4.9526 for \(\sigma\)); the table's three-decimal points, 6.262 and 27.488, give the 5.5879 and 24.5289 of the hand working. The difference is rounding only.

5. Result

With 95% confidence, \(22.79 < \mu < 26.21\), \(5.59 < \sigma^{2} < 24.53\) and \(2.36 < \sigma < 4.95\).

Interpretation. The interval for \(\mu\) is symmetric and narrow; the one for \(\sigma\) is neither, running from \(0.74\) to \(1.55\) times the estimate \(s = 3.2\). Sixteen observations locate a mean well and a standard deviation poorly, and any report that quotes \(s\) without an interval is hiding that.

Practical 5 — Large-Sample Confidence Limits

1. Problem

Find approximate 95% confidence limits for: (a) a binomial \(p\), with \(x = 88\) successes in \(n = 400\) trials; (b) a Poisson \(\lambda\), with \(132\) events observed over \(50\) units of exposure; (c) an exponential rate \(\theta\), with \(n = 100\) and \(\bar x = 4.8\).

2. Aim

To find large-sample confidence limits from the asymptotic normality of the maximum likelihood estimator.

3. Formula

\[ \hat\theta \ \dot\sim\ N\!\left(\theta,\ \frac{1}{n I(\theta)}\right) \;\Longrightarrow\; \hat\theta \pm 1.96\,\widehat{SE}, \qquad \widehat{SE} = \frac{1}{\sqrt{n I(\hat\theta)}} \] \[ I(p) = \frac{1}{p(1-p)}, \qquad I(\lambda) = \frac{1}{\lambda}, \qquad I(\theta) = \frac{1}{\theta^{2}} \]

All three cases use the asymptotic normality of the MLE from Unit 2, with the information evaluated at the estimate because \(\theta\) is unknown.

Applying it:

  1. Write down \(I(\theta)\) and the MLE.
  2. Substitute \(\hat\theta\) and take the reciprocal square root of \(nI\).
  3. Form \(\hat\theta \pm 1.96\,\widehat{SE}\).

4. Calculation

(a) Binomial. \(\hat p = 88/400 = 0.22\); \(\widehat{SE} = \sqrt{\hat p(1 - \hat p)/n} = \sqrt{0.22 \times 0.78/400}\). The numerator is \(0.1716\), so \(\widehat{SE} = \sqrt{0.000429} = 0.020712\) and

\[ 0.22 \pm 1.96 \times 0.020712 = (0.179404,\ 0.260596). \]

(b) Poisson.

\[ \hat\lambda = \frac{132}{50} = 2.64, \qquad \widehat{SE} = \sqrt{\frac{\hat\lambda}{n}} = \sqrt{\frac{2.64}{50}} = \sqrt{0.0528} = 0.2297825, \] \[ 2.64 \pm 1.96 \times 0.2297825 = 2.64 \pm 0.4503737 = (2.189626,\ 3.090374). \]

(c) Exponential.

\[ \hat\theta = \frac{1}{\bar x} = 0.2083333, \qquad \widehat{SE} = \frac{\hat\theta}{\sqrt n} = \frac{0.2083333}{10} = 0.0208333, \] \[ 0.2083333 \pm 1.96 \times 0.0208333 = 0.2083333 \pm 0.0408333 = (0.167500,\ 0.249167). \]

A check worth doing, and what it reveals. The mean \(1/\theta\) can be handled either way. Directly, \(\widehat{SE}(\bar X) = \bar x/\sqrt n = 0.48\), giving \(4.8 \pm 1.96 \times 0.48 = (3.859200,\ 5.740800)\). Inverting that interval and reversing the endpoints gives \((0.174192,\ 0.259121)\) for \(\theta\) — not the same as the interval in (c), which was \((0.167500,\ 0.249167)\).

CHECK IN R
ph <- 88/400;  ph + c(-1, 1) * 1.96 * sqrt(ph * (1 - ph) / 400)   # (a)
lh <- 132/50;  lh + c(-1, 1) * 1.96 * sqrt(lh / 50)             # (b)
tb <- 1/4.8;   tb + c(-1, 1) * 1.96 * tb / sqrt(100)            # (c)
rev(1 / (4.8 + c(-1, 1) * 1.96 * 0.48))                         # (c) on the 1/theta scale
[1] 0.1794039 0.2605961
[1] 2.189626 3.090374
[1] 0.1675000 0.2491667
[1] 0.1741918 0.2591211

5. Result

95% limits: (a) \(0.179 < p < 0.261\); (b) \(2.19 < \lambda < 3.09\); (c) \(0.1675 < \theta < 0.2492\).

Interpretation. The discrepancy found in (c) is real and instructive. A confidence interval is not invariant under a non-linear transformation: building it on the \(\theta\) scale and building it on the \(1/\theta\) scale give different answers, because the normal approximation is being made at different places. Both are valid to the same asymptotic order, and they agree as \(n\) grows — here they overlap over most of their length. The point estimate is invariant, by property (M1) of the MLE in Unit 2; the interval is not. Which scale to work on is decided by where the normal approximation is better, and for a positive parameter that is usually the log scale.

What the Practical Record Should Contain

FOR EACH EXPERIMENT
  1. 1. Problem — the data as given, and what is to be found.
  2. 2. Aim — in one line.
  3. 3. Formula — the estimator or pivot, written down before any number is computed, with the distribution it follows and why, and the steps that apply it.
  4. 4. Calculation — every intermediate quantity (leave-one-out values, pseudo-values, each iteration of the scoring method, the standard error before the interval), then an independent check: the jackknife against \(s^{2}\), the bootstrap against \(\sqrt{s_n^{2}/n}\), the final score against zero, the interval's coverage against the table, and R.
  5. 5. Result — the conclusion in words, including what the width of an interval says about how much the data have determined.