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.
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 sizen randomly selected from the same reference population.
Construction of a sampling distribution
From a population of size N, randomly select from all possible samples of size n.
Compute the statistic of interest for each sample.
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.
Let X1,…,Xn be a random sample from a population with mean μ. A natural estimator to use for estimating the population mean μ is the sample mean:
Xˉ=n1i=1∑nXi,
which means:
E(Xˉ)=μ.
The above equation holds for any population regardless of its underlying distribution. In words, we refer to Xˉ as an unbiased estimator of μ.
xˉ is a single realization of a random variableXˉ over all possible samples of size n that could have been selected from the population.
In the rest of this text, the symbol X denotes a random variable, and x denotes a specific realization of the random variable X in a sample.
Why is 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ˉ. Thus Xˉ is called the minimum variance unbiased estimator of μ.
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 estimatorXˉ is.
Let X1,…,Xn be a random sample from a population with variance σ2.
Var(Xˉ)=n21Var(i=1∑nXi)=n21i=1∑nVar(Xi)
Since Var(Xi)=σ2,
Var(Xˉ)=n21(σ2+σ2+⋯+σ2)=n21(nσ2)=nσ2
sd(Xˉ)=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 is rarely known. A reasonable estimator for the population variance σ2 is the sample variance s2, thus the standard error could be estimated by s/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=30.
Let X1,…,Xn be a random sample from some population with mean μ and variance σ2. Then for large n,
Xˉ∼˙N(μ,nσ2)
even if the underlying distribution of individual observations is not normal. (∼˙ means "approximately distributed.")
Interval estimation: if μ and σ2 were known, A 100%×(1−α) CI is:
(xˉ−z1−α/2⋅ns,xˉ+z1−α/2⋅ns)
This is because:
Z=σ/nXˉ−μ
Z follows a standard normal distribution;
95% of Z values fall between −1.96 and +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). This assumes σ is known, which is rarely true in practice.
Distribution of sample mean with unknown σ: If X1,…,Xn∼N(μ,σ2) and are independent, then
S/nXˉ−μ∼tn−1
is distributed as a t distribution with (n−1)df (degrees of freedom).
The t distribution with d degrees of freedom is sometimes referred to as the td distribution.
NOTE: S means random variable of sample standard deviation.
The 100×uth percentile of a t distribution with d degrees of freedom is denoted by td,u, that is,
P(td<td,u)≡u
The difference between the t distribution and the normal distribution is greatest for small values of n (n < 30).
Confidence Interval for the Mean of a Normal Distribution
A 100%×(1−α) CI for the mean μ of a normal distribution with unknown variance is
(xˉ−tn−1,1−α/2⋅ns,xˉ+tn−1,1−α/2⋅ns)
Shorthand: xˉ±tn−1,1−α/2⋅s/n.
Derivation: start from
P(tn−1,α/2<S/nXˉ−μ<tn−1,1−α/2)=1−α
By symmetry of the t distribution, tn−1,α/2=−tn−1,1−α/2, so
P(Xˉ−tn−1,1−α/2⋅nS<μ<Xˉ+tn−1,1−α/2⋅nS)=1−α
NOTE:
S denotes the sample standard deviation as a random variable; s is its observed value.
X1,…,Xn should be normal distribution.
Confidence Interval for the Mean (Large-Sample Case)
Equation 6.7: An approximate 100%×(1−α) CI for the mean μ of a normal distribution with unknown variance is
(xˉ−z1−α/2⋅ns,xˉ+z1−α/2⋅ns)
Use only if n>200. If n≤200 and σ is known, replace s with σ.
Example: A collection of 95% CIs for the mean μ as computed from repeated samples of size 10 from the population of birthweights.
The parameter μ 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 μ will fall within a particular 95% CI.
However, we can say the following:
Over the collection of all95% CIs that could be constructed from repeated random samples of sizen, 95% will contain the parameter μ.
If our sample x1,…,xn is considered as coming from some population with mean μ and variance σ2, then how can the unknown population variance σ2 be estimated from our sample?
Definition: Let X1,…,Xn be a random sample from some population with mean μ and variance σ2. The sample variance S2 is an unbiased estimator of σ2 over all possible random samples of size n that could have been drawn from this population; that is
E(S2)=σ2
This statement holds for any underlying distribution.
Chi-square distribution: To obtain an interval estimate for σ2, chi-square distribution χi are introduced:
If G=∑i=1nXi2, where X1,…,Xn∼N(0,1) and the Xi's are independent, then G follows a chi-square distribution with n degrees of freedom (df). The distribution is denoted by χn2.
NOTE: X1,...,Xn must be standard normal distribution.
Percentiles of chi-square distribution: The uth percentile of a χd2 distribution (i.e., a chi-square distribution with ddf) is denoted by χd,u2, where P(χd2<χd,u2)≡u.
Chi-square distribution is a skewed distribution, there is no simple relationship between the upper and lower percentiles.
Let X1,…,Xn be a random sample (independent) from some population with mean μ and variance σ2. For the sample variance S2=n−11∑i=1n(Xi−Xˉ)2,
E(S2)=σ2
for any underlying distribution; S2 is an unbiased estimator of σ2.
Sampling distribution of S2: if X1,…,Xn∼N(μ,σ2), normal distribution, then
S2∼n−1σ2χn−12(chi-square distribution with n−1 df)
Equivalently, (n−1)S2/σ2∼χn−12.
A 100%×(1−α) CI for σ2 is
[χn−1,1−α/22(n−1)s2,χn−1,α/22(n−1)s2]
This CI requires a normal population. Interval estimates for σ2 perform much more poorly than for μ when the underlying distribution is not normal; use with caution in that case.
Example Estimate the prevalence of malignant melanoma in US women aged 45–54. A random sample of n=5000 women is selected; 28 have the disease.
Let Xi=1 if the ith woman has the disease, 0 otherwise (Bernoulli trial with P(Xi=1)=p). Let X=∑i=1nXi = number with the disease. Then X∼Binomial(n,p), with E(X)=np and Var(X)=npq (q=1−p).
The random variable p^ = sample proportion is
p^=n1i=1∑nXi=nX
Since p^ is a sample mean of Bernoulli trials, E(p^)=p; p^ is an unbiased estimator of p.
Variance of sample mean: For X∼Binomial(n,p),
Var(p^)=npq,se(p^)=npq
In practice, p and q are unknown, so the standard error is estimated by