Skip to main content

Chapter 6 Estimation

Introduction

Statistical inference

  • Estimation: estimating the values of specific population parameters.
  • Hypothesis testing: testing whether the value of a population parameter is equal to some specific value.

Estimation

  • Point estimation: obtaining specific values as estimates of parameters.
  • Interval estimation: specifying a range within which the parameter values are likely to fall.

Random sample

  • A random sample is a selection of some members of the population such that each member is independently chosen and has a known nonzero probability of being selected.
  • A simple random sample is a random sample in which each group member has the same probability of being selected. For ease of discussion, we use the abbreviated term “random sample” to denote a simple random sample.

Sampling distribution

The sampling distribution of a statistic is the distribution of values of that statistic (like sample mean or median), computed from all possible samples of size nn randomly selected from the same reference population.

Construction of a sampling distribution

  1. From a population of size NN, randomly select from all possible samples of size nn.
  2. Compute the statistic of interest for each sample.
  3. Create a frequency distribution of the statistic.

Example: Sampling distributions of sample mean/median/average of smallest and largest for 200 random samples of size 10 selected from the population of 1000 birthweights (100 = 100.0–101.9, etc.). Frequency distributions of of sample mean/median/average of smallest and largest are showing below.

Estimation of the Mean of a Distribution

Let X1,,XnX_1, \dots, X_n be a random sample from a population with mean μ\mu. A natural estimator to use for estimating the population mean μ\mu is the sample mean:

Xˉ=1ni=1nXi,\bar{X} = \frac{1}{n} \sum_{i=1}^{n} X_i,

which means:

E(Xˉ)=μ.E(\bar{X}) = \mu.
  • The above equation holds for any population regardless of its underlying distribution. In words, we refer to Xˉ\bar{X} as an unbiased estimator of μ\mu.
  • xˉ\bar{x} is a single realization of a random variable Xˉ\bar{X} over all possible samples of size nn that could have been selected from the population.
  • In the rest of this text, the symbol XX denotes a random variable, and xx denotes a specific realization of the random variable XX in a sample.

Why is Xˉ\bar{X} chosen rather than any of the other unbiased estimators? The reason is that if the underlying distribution of the population is normal, then it can be shown that the unbiased estimator with the smallest variance is given by Xˉ\bar{X}. Thus Xˉ\bar{X} is called the minimum variance unbiased estimator of μ\mu.

Standard error of the sample mean

Why then is it preferable to estimate parameters from large samples rather than from small ones? The intuitive reason is that the larger the sample size, the more precise an estimator Xˉ\bar{X} is.

Let X1,,XnX_1, \dots, X_n be a random sample from a population with variance σ2\sigma^2.

Var(Xˉ)=1n2Var(i=1nXi)=1n2i=1nVar(Xi)\text{Var}(\bar{X}) = \frac{1}{n^2} \text{Var}\left(\sum_{i=1}^{n} X_i\right) = \frac{1}{n^2} \sum_{i=1}^{n} \text{Var}(X_i)

Since Var(Xi)=σ2\text{Var}(X_i) = \sigma^2,

Var(Xˉ)=1n2(σ2+σ2++σ2)=1n2(nσ2)=σ2n\text{Var}(\bar{X}) = \frac{1}{n^2}(\sigma^2 + \sigma^2 + \cdots + \sigma^2) = \frac{1}{n^2}(n\sigma^2) = \frac{\sigma^2}{n}
sd(Xˉ)=σnsd(\bar{X}) = \frac{\sigma}{\sqrt{n}}

This is the standard error of the mean (sem) or standard error (se). The standard error is a quantitative measure of the variability of sample mean.

In practice, the population variance σ2\sigma^2 is rarely known. A reasonable estimator for the population variance σ2\sigma^2 is the sample variance s2s^2, thus the standard error could be estimated by s/ns/\sqrt n.

Example: Illustration of the standard error of the mean (100 = 100.0–103.9, etc.) The frequency distribution of the sample mean is plotted for 200 samples of size 1/10/30.

The spread of the frequency distribution: n=1>n=10>n=30n=1 > n=10 > n=30.

Central-Limit Theorem and Interval Estimation

Let X1,,XnX_1, \dots, X_n be a random sample from some population with mean μ\mu and variance σ2\sigma^2. Then for large nn,

Xˉ˙N(μ,σ2n)\bar{X} \dot{\sim} N\left(\mu, \frac{\sigma^2}{n}\right)

even if the underlying distribution of individual observations is not normal. (˙\dot{\sim} means "approximately distributed.")

Interval estimation: if μ\mu and σ2\sigma^2 were known, A 100%×(1α)100\% \times (1 - \alpha) CI is:

(xˉz1α/2sn, xˉ+z1α/2sn)\left( \bar{x} - z_{1-\alpha/2} \cdot \frac{s}{\sqrt{n}},\ \bar{x} + z_{1-\alpha/2} \cdot \frac{s}{\sqrt{n}} \right)

This is because:

Z=Xˉμσ/nZ = \frac{\bar{X} - \mu}{\sigma / \sqrt{n}}

ZZ follows a standard normal distribution; 95% of ZZ values fall between 1.96-1.96 and +1.96+1.96 (the 2.5th and 97.5th percentiles). 95% of all such sample means will fall within the interval (μ1.96 σ/n),(μ+1.96 σ/n)(\mu - 1.96\ \sigma / \sqrt n), (\mu + 1.96\ \sigma / \sqrt n). This assumes σ\sigma is known, which is rarely true in practice.

tt Distribution

Distribution of sample mean with unknown σ\sigma: If X1,,XnN(μ,σ2)X_1, \dots, X_n \sim N(\mu, \sigma^2) and are independent, then

XˉμS/ntn1\frac{\bar{X} - \mu}{S / \sqrt{n}} \sim t_{n-1}

is distributed as a tt distribution with (n1)df(n - 1) df (degrees of freedom). The tt distribution with dd degrees of freedom is sometimes referred to as the tdt_d distribution.

NOTE: SS means random variable of sample standard deviation.

The 100×u100 \times uth percentile of a tt distribution with dd degrees of freedom is denoted by td,ut_{d,u}, that is,

P(td<td,u)uP(t_d < t_{d,u}) \equiv u

The difference between the tt distribution and the normal distribution is greatest for small values of nn (nn < 30).

Confidence Interval for the Mean of a Normal Distribution

A 100%×(1α)100\% \times (1 - \alpha) CI for the mean μ\mu of a normal distribution with unknown variance is

(xˉtn1,1α/2sn, xˉ+tn1,1α/2sn)\left( \bar{x} - t_{n-1,\, 1-\alpha/2} \cdot \frac{s}{\sqrt{n}},\ \bar{x} + t_{n-1,\, 1-\alpha/2} \cdot \frac{s}{\sqrt{n}} \right)

Shorthand: xˉ±tn1,1α/2s/n\bar{x} \pm t_{n-1,\, 1-\alpha/2} \cdot s/\sqrt{n}.

Derivation: start from

P(tn1,α/2<XˉμS/n<tn1,1α/2)=1αP\left(t_{n-1,\, \alpha/2} < \frac{\bar{X} - \mu}{S/\sqrt{n}} < t_{n-1,\, 1-\alpha/2}\right) = 1 - \alpha

By symmetry of the tt distribution, tn1,α/2=tn1,1α/2t_{n-1,\, \alpha/2} = -t_{n-1,\, 1-\alpha/2}, so

P(Xˉtn1,1α/2Sn<μ<Xˉ+tn1,1α/2Sn)=1αP\left(\bar{X} - t_{n-1,\, 1-\alpha/2} \cdot \frac{S}{\sqrt{n}} < \mu < \bar{X} + t_{n-1,\, 1-\alpha/2} \cdot \frac{S}{\sqrt{n}}\right) = 1 - \alpha

NOTE:

  • SS denotes the sample standard deviation as a random variable; ss is its observed value.
  • X1,,XnX_1, \dots, X_n should be normal distribution.

Confidence Interval for the Mean (Large-Sample Case)

Equation 6.7: An approximate 100%×(1α)100\% \times (1 - \alpha) CI for the mean μ\mu of a normal distribution with unknown variance is

(xˉz1α/2sn, xˉ+z1α/2sn)\left( \bar{x} - z_{1-\alpha/2} \cdot \frac{s}{\sqrt{n}},\ \bar{x} + z_{1-\alpha/2} \cdot \frac{s}{\sqrt{n}} \right)

Use only if n>200n > 200. If n200n \le 200 and σ\sigma is known, replace ss with σ\sigma.

Example: A collection of 95% CIs for the mean μ\mu as computed from repeated samples of size 10 from the population of birthweights.

The parameter μ\mu is a fixed unknown constant. How can we state that the probability that it lies within some specific interval is, for example, 95%? The boundaries of the interval depend on the sample mean and sample variance and vary from sample to sample. (see the above picture) Therefore, we cannot say there is a 95% chance that the parameter μ\mu will fall within a particular 95% CI.

However, we can say the following: Over the collection of all 95% CIs that could be constructed from repeated random samples of size nn, 95% will contain the parameter μ\mu.

Estimation of the variance of a distribution

In Chapter 2, the sample variance was defined as

s2=1n1i=1n(xixˉ)2s^2 = \frac{1}{n-1} \sum_{i=1}^{n} (x_i - \bar{x})^2

If our sample x1,,xnx_1, \dots, x_n is considered as coming from some population with mean μ\mu and variance σ2\sigma^2, then how can the unknown population variance σ2\sigma^2 be estimated from our sample?

Definition: Let X1,,XnX_1, \dots, X_n be a random sample from some population with mean μ\mu and variance σ2\sigma^2. The sample variance S2S^2 is an unbiased estimator of σ2\sigma^2 over all possible random samples of size nn that could have been drawn from this population; that is

E(S2)=σ2E(S^2) = \sigma^2

This statement holds for any underlying distribution.

Chi-square distribution

Chi-square distribution: To obtain an interval estimate for σ2\sigma^2, chi-square distribution χi\chi_i are introduced: If G=i=1nXi2G = \sum_{i=1}^{n} X_i^2, where X1,,XnN(0,1)X_1, \dots, X_n \sim N(0,1) and the XiX_i's are independent, then GG follows a chi-square distribution with nn degrees of freedom (dfdf). The distribution is denoted by χn2\chi_n^2. NOTE: X1,...,XnX_1, ..., X_n must be standard normal distribution. Percentiles of chi-square distribution: The uuth percentile of a χd2\chi^2_d distribution (i.e., a chi-square distribution with ddfd df) is denoted by χd,u2\chi^2_{d,u}, where P(χd2<χd,u2)uP(\chi^2_d < \chi^2_{d,u}) \equiv u.

Chi-square distribution is a skewed distribution, there is no simple relationship between the upper and lower percentiles.

Interval Estimation

Assume X1,,XnN(μ,σ2)X_1, \dots, X_n \sim N(\mu,\sigma^2), the sampling distribution of S2S^2:

S2σ2χn12n1S^2 \sim \frac{\sigma^2 \chi^2_{n-1}}{n-1}

Zi=(Xiμ)/σN(0,1)Z_i = (X_i - \mu)/\sigma \sim N(0,1), then i=1nZi2χn2\sum_{i=1}^{n} Z_i^2 \sim \chi_n^2:

i=1nZi2=i=1n(Xiμ)2σ2χn2(chi-square distribution with n df)\sum_{i=1}^{n} Z_i^2 = \sum_{i=1}^{n} \frac{(X_i - \mu)^2}{\sigma^2} \sim \chi_n^2 \quad \text{(chi-square distribution with } n \text{ df)}

Because we usually don’t know μ\mu, we estimate μ\mu by Xˉ\bar{X}, there's proof that:

i=1n(XiXˉ)2σ2χn12.\sum_{i=1}^{n} \frac{(X_i - \bar{X})^2}{\sigma^2} \sim \chi_{n-1}^2.

Because (n1)S2=i=1n(XiXˉ)2(n-1) S^2 = \sum_{i=1}^{n} (X_i - \bar{X})^2, thus we have

(n1)S2σ2χn12\frac{(n-1)S^2}{\sigma^2} \sim \chi^2_{n-1}

After rewrite, we have the distribution of sample variance as:

S2σ2n1χn12.S^2 \sim \frac{\sigma^2}{n-1} \chi^2_{n-1}.

Interval estimation: A 100%×(1α)100\% \times (1 - \alpha) CI for σ2\sigma^2 is

[(n1)s2χn1,1α/22, (n1)s2χn1,α/22]\left[ \frac{(n-1)s^2}{\chi^2_{n-1,\, 1-\alpha/2}},\ \frac{(n-1)s^2}{\chi^2_{n-1,\, \alpha/2}} \right]

Derivation: From S2σ2χn12n1S^2 \sim \dfrac{\sigma^2 \chi^2_{n-1}}{n-1},

P(σ2χn1,α/22n1<S2<σ2χn1,1α/22n1)=1αP\left( \frac{\sigma^2 \chi^2_{n-1,\, \alpha/2}}{n-1} < S^2 < \frac{\sigma^2 \chi^2_{n-1,\, 1-\alpha/2}}{n-1} \right) = 1 - \alpha

Split into two inequalities and solve for σ2\sigma^2:

(n1)S2χn1,1α/22<σ2<(n1)S2χn1,α/22\frac{(n-1)S^2}{\chi^2_{n-1,\, 1-\alpha/2}} < \sigma^2 < \frac{(n-1)S^2}{\chi^2_{n-1,\, \alpha/2}}

So

P[(n1)S2χn1,1α/22<σ2<(n1)S2χn1,α/22]=1αP\left[ \frac{(n-1)S^2}{\chi^2_{n-1,\, 1-\alpha/2}} < \sigma^2 < \frac{(n-1)S^2}{\chi^2_{n-1,\, \alpha/2}} \right] = 1 - \alpha

Replacing S2S^2 with the observed s2s^2 gives the CI above.

A short summary

Interval estimation of mean μ\mu

Let X1,,XnX_1, \dots, X_n be a random sample (independent) from some population with mean μ\mu and variance σ2\sigma^2. For the sample mean Xˉ=1ni=1nXi\bar{X} = \frac{1}{n} \sum_{i=1}^{n} X_i,

E(Xˉ)=μVar(Xˉ)=σ2n\begin{aligned} E(\bar{X}) &= \mu \\ \text{Var}(\bar{X}) &= \frac{\sigma^2}{n} \end{aligned}

For large nn, the central-limit theorem for the sample mean gives

Xˉ˙N(μ,σ2n).\bar{X} \dot{\sim} N\left(\mu, \frac{\sigma^2}{n}\right).

Interval estimation for the mean μ\mu:

  • σ2\sigma^2 known: a 100%×(1α)100\% \times (1 - \alpha) CI is
    (xˉz1α/2σn, xˉ+z1α/2σn)\left( \bar{x} - z_{1-\alpha/2} \cdot \frac{\sigma}{\sqrt{n}},\ \bar{x} + z_{1-\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} \right)
    Shorthand: xˉ±z1α/2σ/n\bar{x} \pm z_{1-\alpha/2} \cdot \sigma/\sqrt{n}. Based on Z=(Xˉμ)/(σ/n)N(0,1)Z = (\bar{X} - \mu)/(\sigma/\sqrt{n}) \sim N(0,1).
  • σ2\sigma^2 unknown, normal population: if X1,,XnN(μ,σ2)X_1, \dots, X_n \sim N(\mu, \sigma^2), then
    XˉμS/ntn1, t distribution with (n1)df \frac{\bar{X} - \mu}{S / \sqrt{n}} \sim t_{n-1}, \text{ $t$ distribution with $(n - 1) df$ }
    A 100%×(1α)100\% \times (1 - \alpha) CI is
    (xˉtn1,1α/2sn, xˉ+tn1,1α/2sn)\left( \bar{x} - t_{n-1,\, 1-\alpha/2} \cdot \frac{s}{\sqrt{n}},\ \bar{x} + t_{n-1,\, 1-\alpha/2} \cdot \frac{s}{\sqrt{n}} \right)
    Shorthand: xˉ±tn1,1α/2s/n\bar{x} \pm t_{n-1,\, 1-\alpha/2} \cdot s/\sqrt{n}.
  • σ2\sigma^2 unknown, large sample (n>200n > 200): an approximate 100%×(1α)100\% \times (1 - \alpha) CI is
    (xˉz1α/2sn, xˉ+z1α/2sn)\left( \bar{x} - z_{1-\alpha/2} \cdot \frac{s}{\sqrt{n}},\ \bar{x} + z_{1-\alpha/2} \cdot \frac{s}{\sqrt{n}} \right)
    Shorthand: xˉ±z1α/2s/n\bar{x} \pm z_{1-\alpha/2} \cdot s/\sqrt{n}.

Interval estimation of variance σ2\sigma^2

Let X1,,XnX_1, \dots, X_n be a random sample (independent) from some population with mean μ\mu and variance σ2\sigma^2. For the sample variance S2=1n1i=1n(XiXˉ)2S^2 = \frac{1}{n-1} \sum_{i=1}^{n} (X_i - \bar{X})^2,

E(S2)=σ2E(S^2) = \sigma^2

for any underlying distribution; S2S^2 is an unbiased estimator of σ2\sigma^2.

Sampling distribution of S2S^2: if X1,,XnN(μ,σ2)X_1, \dots, X_n \sim N(\mu, \sigma^2), normal distribution, then

S2σ2n1χn12(chi-square distribution with n1 df)S^2 \sim \frac{\sigma^2}{n-1} \chi^2_{n-1} \quad \text{(chi-square distribution with } n-1 \text{ df)}

Equivalently, (n1)S2/σ2χn12(n-1)S^2 / \sigma^2 \sim \chi^2_{n-1}.

A 100%×(1α)100\% \times (1 - \alpha) CI for σ2\sigma^2 is

[(n1)s2χn1,1α/22, (n1)s2χn1,α/22]\left[ \frac{(n-1)s^2}{\chi^2_{n-1,\, 1-\alpha/2}},\ \frac{(n-1)s^2}{\chi^2_{n-1,\, \alpha/2}} \right]

This CI requires a normal population. Interval estimates for σ2\sigma^2 perform much more poorly than for μ\mu when the underlying distribution is not normal; use with caution in that case.

Point estimation of a binomial parameter pp

Example Estimate the prevalence of malignant melanoma in US women aged 45–54. A random sample of n=5000n = 5000 women is selected; 28 have the disease.

Let Xi=1X_i = 1 if the iith woman has the disease, 00 otherwise (Bernoulli trial with P(Xi=1)=pP(X_i = 1) = p). Let X=i=1nXiX = \sum_{i=1}^{n} X_i = number with the disease. Then XBinomial(n,p)X \sim \text{Binomial}(n, p), with E(X)=npE(X) = np and Var(X)=npq\text{Var}(X) = npq (q=1pq = 1 - p).

The random variable p^\hat{p} = sample proportion is

p^=1ni=1nXi=Xn\hat{p} = \frac{1}{n}\sum_{i=1}^{n} X_i = \frac{X}{n}

Since p^\hat{p} is a sample mean of Bernoulli trials, E(p^)=pE(\hat{p}) = p; p^\hat{p} is an unbiased estimator of pp.

Variance of sample mean: For XBinomial(n,p)X \sim \text{Binomial}(n, p),

Var(p^)=pqn,se(p^)=pqn\text{Var}(\hat{p}) = \frac{pq}{n}, \quad se(\hat{p}) = \sqrt{\frac{pq}{n}}

In practice, pp and qq are unknown, so the standard error is estimated by

se^(p^)=p^q^n,q^=1p^\widehat{se}(\hat{p}) = \sqrt{\frac{\hat{p}\hat{q}}{n}}, \quad \hat{q} = 1 - \hat{p}

Interval estimation of pp

According to central-limit theorem, for larger nn:

p^˙N(p,pqn).\hat{p} \dot{\sim} N\left(p, \frac{pq}{n}\right).

Approximate interval estimation : start from

P(pz1α/2pqn<p^<p+z1α/2pqn)=1αP\left(p - z_{1-\alpha/2} \sqrt{\frac{pq}{n}} < \hat{p} < p + z_{1-\alpha/2} \sqrt{\frac{pq}{n}}\right) = 1 - \alpha

Split into two inequalities. An exact CI for pp would require solving a quadratic in pp; instead, approximate pq/n\sqrt{pq/n} by p^q^/n\sqrt{\hat{p}\hat{q}/n}:

pz1α/2p^q^n<p^andp^<p+z1α/2p^q^np - z_{1-\alpha/2} \sqrt{\frac{\hat{p}\hat{q}}{n}} < \hat{p} \quad \text{and} \quad \hat{p} < p + z_{1-\alpha/2} \sqrt{\frac{\hat{p}\hat{q}}{n}}

Rearrange to isolate pp:

p^z1α/2p^q^n<p<p^+z1α/2p^q^n\hat{p} - z_{1-\alpha/2} \sqrt{\frac{\hat{p}\hat{q}}{n}} < p < \hat{p} + z_{1-\alpha/2} \sqrt{\frac{\hat{p}\hat{q}}{n}}

So an approximate 100%×(1α)100\% \times (1 - \alpha) CI for pp is

(p^z1α/2p^q^n, p^+z1α/2p^q^n)\left( \hat{p} - z_{1-\alpha/2} \sqrt{\frac{\hat{p}\hat{q}}{n}},\ \hat{p} + z_{1-\alpha/2} \sqrt{\frac{\hat{p}\hat{q}}{n}} \right)

Shorthand: p^±z1α/2p^q^/n\hat{p} \pm z_{1-\alpha/2} \sqrt{\hat{p}\hat{q}/n}. This method of interval estimation should only be used if np^q^5n\hat{p}\hat{q} \geq 5.

Still need to re read this chapter again.