On this page
6.2 Sampling distributions
In this topic, we will study the sampling distributions associated with the main statistical models.
Definition 2.1
A random sample of $n$ elements of a population is represented by random variables $X_1,X_2,\ldots,X_n$, in which each $X_i$, with $i = 1,2,\ldots,n$ represents an element of the sample. Se $X_i$ and $X_j$ are independent and have the same probability function (or probability density function), for all $i\neq j$, we say that the sample elements are independent and equally distributed (i.i.d).
Definition 2.2
Be $X_1,X_2,\ldots,X_n$ a random sample i.i.d. in size $n$ of a population and be $T(x_1,x_2,\ldots,x_n)$ a real or vector function whose domain includes the sample space of $(X_1,X_2,\ldots,X_n)$. In this case, we say that the random variable or vector $Y = T(x_1,x_2,\ldots,x_n)$ is called statistics. The probability distribution of the Y statistic is called sampling distribution of Y. A statistic associated with some population parameter is also called estimator.
Example 2.1
Be $X_1,X_2,\ldots,X_n$ a random sample from a population. The sample mean is the arithmetic mean of the sample values. The sample mean is a statistic denoted by $\overline{X}$, that is,
$$\overline{X}=\frac{X_1+\ldots+X_n}{n}=\frac{1}{n}\sum_{i=1}^n X_i.$$
The sampling variance is the statistic defined by
$$s^2=\frac{1}{n-1}\sum_{i=1}^n(X_i-\overline{X})^2$$
and the sample standard deviation is the statistic defined by
$$s=\sqrt{\frac{1}{n-1}\sum_{i=1}^n(X_i-\overline{X})^2}.$$
Motivation
The population average $\mu$ represents the average of all individuals or objects being studied. But generally, not all individuals can be measured. In general, only a sample of all individuals is available to us and the average based on this sample, $\overline{X}$, is used to estimate the population mean $\mu$. A problem of fundamental importance is knowing whether the sample mean $\overline{X}$ is a good estimator of the population mean $\mu$. Similarly, when we calculate the sample standard deviation, $s$, can this value be considered a good estimate of the population standard deviation?
Example 2.2
Consider an urn with 5 balls, where each ball has a number with the numbers 1 to 5. Removing a ball from the urn, be $X$ the random variable that assumes the number of the ball. Using resampling with replacement, what is the sampling distribution of the mean $\overline{X}$?
Let us initially consider a single withdrawal $X_1$ of the ballot box. As we have a single withdrawal, the average $\overline{X} = X_1$. With this we have to
| $ \mathbb{P}(\overline{X}=1) $ | 0,2 |
| $ \mathbb{P}(\overline{X}=2) $ | 0,2 |
| $ \mathbb{P}(\overline{X}=3) $ | 0,2 |
| $ \mathbb{P}(\overline{X}=4) $ | 0,2 |
| $ \mathbb{P}(\overline{X}=5) $ | 0,2 |
Table 6.2.1: Probabilities of removing the ball from the urn
Figure 6.2.1: Bar chart for the sample mean probability function $\overline{X}$
So for a sample size $n=1$, we have that the sampling distribution of the mean has the same distribution as the random variable $X$.
Now consider two independent withdrawals with replacement, $X_1$ and $X_2$. Table 6.3 below shows all possible values for the sample mean $\overline{X}$, considering the withdrawals $X_1$ and $X_2$.
| $X_{2}$ \ $X_{1}$ | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 1 | 1,5 | 2 | 2,5 | 3 |
| 2 | 1,5 | 2 | 2,5 | 3 | 3,5 |
| 3 | 2 | 2,5 | 3 | 3,5 | 4 |
| 4 | 2,5 | 3 | 3,5 | 4 | 4,5 |
| 5 | 3 | 3,5 | 4 | 4,5 | 5 |
Table 6.2.2: Averages for each possible event with two balls being removed from the urn
In this way, we have to
| $ \mathbb{P}(\overline{X}=1) $ | 1/25 |
| $ \mathbb{P}(\overline{X}=1,5) $ | 2/25 |
| $ \mathbb{P}(\overline{X}=2) $ | 3/25 |
| $ \mathbb{P}(\overline{X}=2,5) $ | 4/25 |
| $ \mathbb{P}(\overline{X}=3) $ | 5/25 |
| $ \mathbb{P}(\overline{X}=3,5) $ | 4/25 |
| $ \mathbb{P}(\overline{X}=4) $ | 3/25 |
| $ \mathbb{P}(\overline{X}=4,5) $ | 2/25 |
| $ \mathbb{P}(\overline{X}=5) $ | 1/25 |
Table 6.2.3: Probabilities of values for the sample mean $\overline{X}$
That is, we have the following bar chart for the probability function of the sample mean $\overline{X}$.
Figure 6.2.2: Bar graph of the distribution of $\overline{X}$
Considering 3 independent withdrawals and replacement, we have the following graph for the sample mean probability function $\overline{X}$
Figure 6.2.3: Bar graph of the distribution of $\overline{X}$
In the following sections we will see that, the larger the sample size, the distribution of the sample mean tends towards a normal distribution with mean $\mathbb{E}(\overline{X})=\mathbb{E}(X)$ and variance $\text{Var}(\overline{X})= \ \text{Var}(X)/n$.
With an analogous procedure, we can obtain the sampling distributions of other statistics of interest. For example, let’s consider in the same previous example, two withdrawals from the ballot box with replacement and study the sampling distribution of the standard deviation $s$. Table 6.5 below shows all possible values for the standard deviation $s$, considering the withdrawals $X_1$ and $X_2$.
| $X_{2}$ \ $X_{1}$ | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 0 | 0,7071 | 1,4142 | 2,1213 | 2,8284 |
| 2 | 0,7071 | 0 | 0,7071 | 1,4142 | 2,1212 |
| 3 | 1,4142 | 0,7071 | 0 | 0,7071 | 1,4142 |
| 4 | 2,1213 | 1,4142 | 0,7071 | 0 | 0,7171 |
| 5 | 2,8284 | 2,1213 | 1,4142 | 0,7071 | 0 |
Table 6.2.4: Standard deviation values $s$ of each possible event with two balls being removed from the urn
In this way, we have to
| $ \mathbb{P}(s=0) $ | $ 5/25 $ |
| $ \mathbb{P}(s=0,7071) $ | $ 8/25 $ |
| $ \mathbb{P}(s=1,4142) $ | $ 6/25 $ |
| $ \mathbb{P}(s=2,1213) $ | $ 4/25 $ |
| $ \mathbb{P}(s=2,8284) $ | $ 2/25 $ |
Table 6.2.5: Probabilities of values for the standard deviation $s$
Figure 6.2.4: Bar graph of the distribution of $s$
6.2.1 Weak Law of Large Numbers and Central Limit Theorem
Be $f(\cdot,\theta)$ probability density function of a random variable $X$ whose expected value is denoted by $\mu$. Suppose we want to estimate $\mu$. However, in any real problem, we can only observe a finite number of values of the random variable $X$. Is it then that, using only a finite number of values of $X$ (a random sample of size $n$), we can make reliable inferences about $\mathbb{E}(X)$? The answer is yes, and this is what we will see as an application of weak law of large numbers.
The weak law of large numbers states that for any two sufficiently small numbers $\epsilon$ and $\delta$, with $\epsilon \ > \ 0$ and $0 \ < \ \delta \ < \ 1$, there is an integer $n$ such that, if a random sample of size $n$ or greater than $n$ is obtained from $f$, the sample mean is “close” to $\mu$ with probability greater than or equal to $1 - \delta$.
6.2.1.1 Weak Law of Large Numbers
Be $f(\cdot)$ a density function with mean $\mu$ and variance $\sigma^2$ and be $\overline{X}$ the sample mean of a random variable of size $n$ with density function $f$. Be $\epsilon$ and $\delta$ any two specified numbers that satisfy $\epsilon \ > \ 0$ and $0 \ < \ \delta \ < \ 1$. Se $n$ is any integer greater than $\frac{\sigma^2}{\epsilon^2\delta}$, then
$$\mathbb{P}[-\epsilon \ < \ \overline{X}-\mu \ < \epsilon]\geq 1-\delta.$$
That is, the probability of the distance from the mean estimate to the mean $\mu$ be less than a certain $\epsilon \ > \ 0$ is greater than or equal to $1-\delta$.
Demo
We know that from Chebshev’s Inequality,
$$\mathbb{P}(g(X)\geq k)\leq \frac{\mathbb{E}(g(x))}{k}$$
for everyone $k \ > \ 0$, for every random variable $X$ and every non-negative function $g$. Equivalently, we have
$$\mathbb{P}(g(x) \ < \ k)\geq 1-\frac{\mathbb{E}(g(X))}{k}.$$
Let’s take $g(X)=(\overline{X}-\mu)^2$ and $k = \epsilon^2$. So
$$\mathbb{P}[-\epsilon \ < \ \overline{X}-\mu \ < \epsilon]=\mathbb{P}[|\overline{X}-\mu| \ < \ \epsilon]=\mathbb{P}[|\overline{X}-\mu|^2 \ < \ \epsilon^2].$$
But
$$\mathbb{P}[|\overline{X}-\mu|^2 \ < \ \epsilon^2]\geq 1-\frac{\mathbb{E}(\overline{X}-\mu)^2}{\epsilon^2}=1-\frac{(1/n)\sigma^2}{\epsilon^2}\geq 1-\delta.$$
6.2.1.2 Central Limit Theorem
Assuming that the data has a normal distribution is highly convenient, both from a theoretical and computational point of view. But this leaves a fundamentally important problem: under what circumstances is it reasonable to assume that the normal distribution can be used? Gauss worked on this problem for a long time, but it is a result of Laplace that is used today. Announced in 1810, Laplace called this result Central Limit Theorem, which says that under the assumption of random sampling, when the sample size increases, the probability distribution of the sample mean approaches a normal distribution with mean $\mu$ and variance $\sigma^2/n$, that is, if the sample size is large enough, we can assume that the sample mean has a normal distribution.
Central Limit Theorem
Be $f$ a density with average $\mu$ and variance $\sigma^2$. Be $\overline{X}$ the sample mean of a random sample of size $n$ of $f$. So, the distribution of the random variable $Z_n$ defined by
$$Z_n=\frac{\overline{X}-E(\overline{X})}{\sqrt{Var(\overline{X})}}=\frac{\overline{X}-\mu}{\sigma/\sqrt{n}}.$$
approaches the standard normal distribution when $n$ tends to infinity. In other words, $Z_n$ has an approximately normal distribution with a mean $0$ and variance $1$ when $n$ tends to infinity.
$$Z_{n} \sim \mathcal{N}(0,1) \quad \text{quando } n \to \infty$$
Thus, the central limit theorem tells us that the limiting distribution of $Z_n$ is a standard normal distribution or that $\overline{X}$ is asymptotically distributed as a normal distribution with mean $\mu$ and variance $\sigma^2/n$. The most impressive thing about the central limit theorem is the fact that nothing is said about the density function $f$. In other words, whatever the distribution function, as long as it has finite variance, $Z_n$ will have an approximately normal distribution for sufficiently large samples.
6.2.2 Sampling distribution of a binomial random variable
The notion of a sampling distribution is perhaps easier to explain and illustrate when we work with the binomial distribution.
To illustrate, suppose we want to determine the proportion of adults over the age of 40 who suffer from arthritis. Therefore, we can define a random variable $X$ in the following way
$$ X = \begin{cases} 1, & \text{se o indivíduo é portador de artrite} \cr 0, & \text{se o indivíduo não é portador de artrite} \end{cases} $$
Therefore, we have that X is a discrete variable, with a Bernoulli distribution such that
$$\mu=\mathbb{E}(X)=p, \quad \sigma^2= \ \text{Var}(X)=p(1-p).$$
A random sample was taken $X_1, X_2, \ldots, X_n$ no size replacement $n$ of this population, and indicating $Y_n$ the total number of individuals with arthritis in this sample, we know that
$$Y_n\sim \ \hbox{Binomial}(n,p)$$
i.e.
$$\mathbb{P}(Y_n = k) = \binom{n}{k} p^k (1 - p)^{n - k}$$
Figure 6.2.5: Statistical Inference Flowchart with a binomial distribution sample
Let’s define by $\hat{p}$ the proportion of individuals with arthritis, that is,
$$\hat{p}=\frac{Y_n}{n}.$$
So, we have to
$$\mathbb{P}(Y_n=k)=\mathbb{P}(\frac{Y_n}{n}=\frac{k}{n})=\mathbb{P}(\hat{p}=\frac{k}{n}),$$
that is, the sampling distribution of $\hat{p}$ is obtained from the distribution of $Y_n$. We observe that
$$Y_n=X_1+X_2+\ldots+X_n$$
where each $X_i$ has a Bernoulli distribution with mean $\mu = p$ and variance $\sigma^2 = p(1-p)$ with $p$ unknown and $X_i$ is independent of $X_j$ if $i\neq j$. In this way, we can write that
$$Y_n=\sum_{i=1}^nX_i=n\sum_{i=1}^n\frac{X_i}{n}=n\overline{X}$$
but, by the Central Limit Theorem, $\overline{X}$ will have an approximately normal distribution, with a mean $p$ and variance $\frac{p(1-p)}{n}$, that is,
$$\overline{X}\sim N\left(p,\frac{p(1-p)}{n}\right).$$
Therefore, the transformation $Y_n=n\overline{X}$ will have distribution $$Y_n\sim N(np,p(1-p)).$$
We can observe that $\overline{X}$, in the expression above, is the variable itself $\hat{p}$ and, therefore, to $n$ large we can consider the sampling distribution of $p$ as approximately normal
$$\hat{p}\sim N\left(p,\frac{p(1-p)}{n}\right)$$
Example 2.2.1
Suppose we want to know the percentage of marriages that end in divorce among couples living in São Paulo. As we do not have enough resources to check all the files, we will estimate this percentage based on some available data. Suppose we have data on 10 couples:
| $X_1$ | $X_2$ | $X_3$ | $X_4$ | $X_5$ | $X_6$ | $X_7$ | $X_8$ | $X_9$ | $X_{10}$ |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
Table 6.2.6: Data on divorces for 10 couples
That is, the first couple divorced, the next three did not divorce, the fifth couple divorced, and so on. The number of divorces among these couples is
$$Y_n = \sum_{i=1}^{10}X_i=1+0+0+0+1+0+0+0+0+1=3,$$
then the estimated probability of a divorce is
$$\hat{p}=\frac{3}{10}=0,3.$$
Note that for the binomial distribution, if we know the real probability of divorce, $p$, we could calculate the probability of having $\hat{p}=0,3$ based on a sample size $10$. When $n = 10$, this is precisely the probability of observing $3$ divorces, i.e.
$$\mathbb{P}(Y_n=3):=p(3)= \binom{10}{3} p^3(1-p)^7.$$
If, for example, $p=0,4$, then $p(3)=0,215$. That is, the probability of taking $\hat{p} = 0,3$ is $0,215$. Generally, if we observe $x$ successes, the estimate of $p$ is $\hat{p}=x/n$, which occurs with probability $p(x)$, where $p(x)$ is the probability function of the distribution $Binomial(10,p)$.
Simulation Study
Suppose the divorce rate of a population is $p = 0,3$. Now imagine 1000 teams of researchers and suppose that each team estimates the divorce rate based on data from 10 couples. In this case, different teams of researchers will achieve different results. For example, the first team gets $\hat{p}=0,5$, the second team succeeds $\hat{p}=0,1$, and so on. The sampling distribution of $\hat{p}$ refers to the distribution of values of $\hat{p}$ that teams of researchers would achieve when conducting the same study. In the following table, we have the distribution of $\hat{p}$.
| $ \hat{p} $ | $n$ |
|---|---|
| 0 | 29 |
| 0,1 | 122 |
| 0,2 | 240 |
| 0,3 | 253 |
| 0,4 | 200 |
| 0,5 | 107 |
| 0,6 | 41 |
| 0,7 | 7 |
| 0,8 | 1 |
| 0,9 | 0 |
| 1 | 0 |
Table 6.2.7: Distribution table $\hat{p}$
Figure 6.2.6: Bar graph of the distribution of $\hat{p}$
With these data, we can conclude that
$$\mathbb{E}(\hat{p})=0,2999 \quad \text{Var}(\hat{p})=0,02125124.$$
Remembering that $\hat{p}=\overline{X}$ and, according to Theorem 2.2, we have
$$\mathbb{E}(\hat{p})=\mathbb{E}(\overline{X})=\mu$$
where $\mu$ is the population average. How the population is distributed $\text{Bernoulli}(0,3)$, we know that $\mathbb{E}(X) = 0,3$ and $\text{Var}(X) = 0,3 \times 0,7 = 0,21$.
6.2.3 Sampling distribution of normal data
The goal in this section is to extend the notion of a sampling distribution to situations in which we sample from a normal distribution. Consider $X_1 , \cdots , X_n$ a random sample from a normal distribution with mean $\mu$ and variance $\sigma^2$.
Take, for example, the problem of estimating how many additional hours of sleep are guaranteed to an individual after ingesting a certain drug. Furthermore, suppose the drug is tested on 20 individuals so that the sample mean is $\overline{X}=0,8$ hours. However, if the study is repeated with another 20 participants we may have other results for the sample average. For example, we can have $\overline{X}=1,3$. And by repeating the study again, we could have $\overline{X}=-0,2$. In statistical terms, there will be variation between the sample means.
This problem could be solved if we repeated the study infinite times, but this is unfeasible.
When observations are randomly sampled from a normal distribution, the sample mean also has a normal distribution. That is, when $n$ observations are randomly sampled from a normal distribution with mean $\mu$ and variance $\sigma^2$, the sample mean has a normal distribution with mean $\mu$ and variance $\sigma^2/n$.
Figure 6.2.7: Statistical inference flowchart with a normal distribution sample
Simulation Study
Consider a normal population with mean $\mu = 10$ and variance $\sigma^2=4$. We will carry out a simulation study for the distribution of the sample mean considering samples of size $20$ of this population. For this study, we will use Action and the R software.
Firstly, consider that they are withdrawn $15$ size samples $20$ of this population. Data for each sample is shown below
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 7,98 | 10,70 | 7,41 | 9,92 | 9,62 | 8,44 | 14,46 | 5,59 | 7,56 | 8,66 | 9,67 | 11,40 | 12,18 | 12,79 | 12,06 |
| 15,16 | 10,22 | 9,78 | 11,82 | 9,39 | 5,89 | 8,40 | 12,13 | 13,72 | 12,42 | 10,69 | 8,11 | 10,25 | 7,58 | 7,84 |
| 8,13 | 14,30 | 6,69 | 10,01 | 9,90 | 11,73 | 11,92 | 8,77 | 10,98 | 10,24 | 6,41 | 8,68 | 9,98 | 8,30 | 12,23 |
| 9,84 | 7,92 | 12,55 | 8,91 | 7,50 | 10,43 | 12,99 | 11,22 | 7,52 | 8,50 | 8,73 | 9,73 | 9,49 | 7,87 | 7,97 |
| 9,15 | 8,38 | 9,52 | 10,39 | 13,63 | 8,63 | 9,08 | 12,17 | 10,80 | 8,18 | 8,32 | 12,70 | 8,95 | 6,12 | 12,52 |
| 10,80 | 12,36 | 11,31 | 8,12 | 12,25 | 12,60 | 8,11 | 14,41 | 9,86 | 8,37 | 11,48 | 8,42 | 11,48 | 10,12 | 12,69 |
| 7,43 | 11,07 | 8,71 | 14,06 | 11,58 | 10,06 | 10,58 | 6,65 | 13,21 | 10,29 | 13,65 | 10,75 | 10,70 | 12,98 | 11,36 |
| 10,61 | 10,80 | 9,09 | 8,85 | 12,93 | 13,86 | 10,66 | 11,76 | 11,12 | 7,77 | 11,70 | 10,38 | 12,89 | 11,00 | 10,05 |
| 9,64 | 11,67 | 8,35 | 9,51 | 7,49 | 8,63 | 12,22 | 10,91 | 11,07 | 6,99 | 9,08 | 9,90 | 10,08 | 9,85 | 9,24 |
| 10,44 | 8,90 | 7,72 | 5,10 | 9,56 | 8,47 | 15,78 | 11,45 | 7,38 | 10,21 | 8,23 | 14,34 | 7,78 | 12,31 | 10,63 |
| 10,98 | 9,64 | 11,61 | 11,80 | 7,37 | 8,68 | 12,53 | 9,68 | 10,63 | 9,64 | 8,18 | 8,86 | 11,11 | 8,58 | 9,70 |
| 9,96 | 9,90 | 8,89 | 10,94 | 12,49 | 9,40 | 10,97 | 6,13 | 9,64 | 12,93 | 9,90 | 13,17 | 10,26 | 9,23 | 11,43 |
| 9,50 | 10,93 | 9,46 | 6,09 | 10,90 | 9,74 | 11,93 | 12,13 | 10,71 | 8,58 | 9,40 | 12,05 | 10,75 | 12,86 | 10,48 |
| 15,30 | 10,58 | 10,74 | 8,12 | 5,91 | 9,35 | 5,27 | 10,22 | 12,22 | 9,82 | 12,24 | 8,97 | 12,54 | 8,71 | 11,28 |
| 8,13 | 8,81 | 10,72 | 7,52 | 11,86 | 7,74 | 12,53 | 7,42 | 10,38 | 10,28 | 11,27 | 8,85 | 11,19 | 6,11 | 8,98 |
| 9,47 | 11,46 | 9,05 | 9,22 | 10,06 | 12,46 | 6,89 | 9,95 | 12,54 | 6,86 | 7,70 | 12,55 | 11,66 | 7,50 | 11,52 |
| 9,14 | 9,02 | 11,98 | 8,52 | 6,42 | 7,24 | 10,04 | 5,79 | 9,64 | 9,57 | 9,66 | 10,03 | 9,36 | 11,80 | 9,88 |
| 11,47 | 13,56 | 9,26 | 8,19 | 9,09 | 8,83 | 10,18 | 9,60 | 8,77 | 9,23 | 8,50 | 12,21 | 8,09 | 10,67 | 11,68 |
| 9,65 | 8,11 | 10,08 | 10,85 | 7,99 | 12,46 | 10,30 | 8,58 | 9,84 | 13,98 | 10,64 | 8,72 | 8,78 | 12,22 | 9,96 |
| 12,67 | 8,96 | 8,43 | 10,53 | 10,52 | 10,18 | 8,49 | 11,05 | 10,27 | 7,32 | 9,28 | 10,14 | 12,20 | 7,51 | 9,59 |
Table 6.2.8: 15 samples of size 20
The sample means for each sample are given according to Table 6.2.9 below:
| Samples | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Sample mean | 10,273 | 10,364 | 9,568 | 9,424 | 9,823 | 9,741 | 10,667 | 9,78 | 10,393 | 9,492 | 9,736 | 10,498 | 10,486 | 9,706 | 10,555 |
| Sample standard deviation | 2,111 | 1,745 | 1,554 | 2,049 | 2,225 | 2,023 | 2,53 | 2,458 | 1,752 | 1,912 | 1.744 | 1.817 | 1.456 | 2.274 | 1.426 |
Table 6.2.9: Sample means and variances
Next, we have the Graph of sample means
Figure 6.2.8: Graph of the means of the 15 samples
Let us note here that the mean of the means is 10.0337 and the standard deviation is 0.436.
| Average of averages | Standard deviation |
|---|---|
| 10,0337 | 0,436 |
Table 6.2.10: Descriptive summary of the samples
Suppose now that we do the same process, but instead of considering 15 samples of size 20, we consider 200 samples. For this simulation study, we used the R software. In this case, the histogram of the averages obtained can be seen in the following figure.
Figure 6.2.9: Graph of Means of 200 samples
and the mean of the sample means is given by 10.004 and the standard deviation by 0.441.
Carrying out the same experiment, but now considering 10,000 samples of size 20, the distribution of the sample mean can be seen according to the histogram below.
Figure 6.2.10: Graph of Averages of 10,000 samples
In this case, the average of the sample means was 9.9994 and the standard deviation was 0.449. So, empirically, we can see that the distribution of the sample mean approximates a normal distribution with mean $\mu = 10$ and standard deviation $\frac{\sigma}{\sqrt{n}}=\frac{2}{\sqrt{20}}=0,4472$.
The variance of the sample mean, $\sigma^2_{\overline{X}}$, is called the mean squared error of the sample mean. To be more concrete, imagine that we have a random sample of 25 observations where, without us knowing, the population mean is $1,5$ and the variance is $2$ ($\sigma^2= 2$). We can have a sample mean $\overline{X} = 1,45$. However, imagine that we repeat the study many times so that we have the following sample means
1,45; 1,53; 1,90; 1,43; 2,72; 1,70; 1,13; 1,94; 1,23; …
According to the Central Limit Theorem, if the study is repeated a large number of times, the mean of these sample means will be equal to the population mean, $1,5$, and if we calculate the sampling variance based on these values, we will have $\sigma^2/n = 2/25$. That is, the variance of the sample means is equal to the variance of the distribution from which the observations were sampled, divided by the sample size, assuming only random sampling. The positive square root of the mean squared error, $\sigma_{\overline{X}}=\sigma/\sqrt{n}$, is called standard error of the mean. In practice, the variance ($\sigma^2$) is rarely known, but we can estimate it with the sample variance $s^2$, which provides an estimate of the mean squared error, $s^2/n$ and an estimate of the standard error is $s/\sqrt{n}$.
Distribution of $s^2$
We have the statistics $s^2$ is an unbiased estimator of the variance $\sigma^2$. Let us now study the distribution of $s^2$. A distribution that plays a central role in the distribution of $s^2$ is the chi-square distribution.
Definition 2.3.1
Consider $X$ a random variable with chi-square distribution with $k$ degrees of freedom. Its density is:
$$f_X(x)=\frac{1}{\Gamma(k/2)}\left(\frac{1}{2}\right)^{k/2}x^{k/2-1}e^{-x/2}\mathbb{I}_{(0,\infty)}(x)$$
where parameter $k$ is an integer.
Theorem 2.3.1
If the random variables $X_i, i = 1, 2, \ldots, n$ are independent and normally distributed with means $\mu_i$ and variances $\sigma_i^2$ , then
$$U=\sum_{i=1}^n\left(\frac{X_i-\mu_i}{\sigma_i}\right)^2$$
has a chi-square distribution with $n$ degrees of freedom.
$$U \sim \chi^2_n$$
Demo
In fact, for each $i$, $X_i\sim N(\mu_1,\sigma_1^2)$ So when standardizing $X_i$, we have
$$Z = \frac{X_i-\mu_i}{\sigma_i}\sim N(0,1)$$
Chi-square distribution with 1 degree of freedom is defined as the square of a random variable with standard normal distribution. Like this:
$$Z_i^2 \sim \chi^2_1$$
Therefore, for a sample of $n$ independent variables $X_1, X_2, \ldots, X_n \sim N(\mu_1,\sigma_1^2)$, when standardizing them and adding the squares, we have:
$$\sum_{i=1}^n\left(\frac{X_i-\mu_i}{\sigma_i}\right)^2 \sim \chi^2_n$$
Properties of Theorem 2.3.1
Se $X_1,X_2,\ldots,X_n$ is a random sample from a standard normal distribution, then the following properties apply:
(i) $\overline{X}$ and $\sum_{i=1}^n(X_i-\overline{X})^2$ are independent.
(ii) $\sum_{i=1}^n(X_i-\overline{X})^2$ has a chi-square distribution with $n-1$ degrees of freedom.
Demo
(i) The demonstration will be made only in case $n=2$, but we emphasize that the result is valid for all $n\in\mathbb{N}$. When $n=2$, we have to
$$\overline{X} = \frac{X_1+X_2}{2}$$
and
$$\sum_{i=1}^n(X_i-\overline{X})^2 = \left(X_1-\frac{X_1+X_2}{2}\right)^2+\left(X_2 - \frac{X_1 +X_2}{2}\right)^2 = \frac{(X_1-X_2)^2}{4}+\frac{(X_2-X_1)^2}{4}$$
from which we conclude that
$$\sum_{i=1}^n(X_i-\overline{X})^2=\frac{(X_2-X_1)^2}{2}$$
so that $\overline{X}$ is a function of $X_1+X_2$ and $\sum(X_i-\overline{X})^2$ is a function of $X_2-X_1$ and then, to prove that $\overline{X}$ and $\sum(X_i-\overline{X})^2$ are independent, just show that $X_1+X_2$ and $X_2-X_1$ are independent. Being $M_{Y}(t)$ the moment generating function of the random variable $Y$, we have to
$$M_{X_1+X_2}(t_1) = \mathbb{E}[e^{t_1(X_1+X_2)}]=\mathbb{E}[e^{t_1X_1}e^{t_1X_2}] = \mathbb{E}[e^{t_1X_1}]\mathbb{E}[e^{t_1X_2}]=\exp\left(\frac{1}{2}t_1^2\right)\exp\left(\frac{1}{2}t_1^2\right) = \exp(t_1^2)$$
and, similarly,
$$M_{X_1-X_2}(t_2) = \exp(t_2^2).$$
We also have to, $$M_{X_1+X_2,X_2-X_1}(t_1,t_2) = \mathbb{E}[e^{t_1(X_1+X_2)+t_2(X_2-X_1)}] = \mathbb{E}[e^{(t_1-t_2)X_1 + (t_1+t_2)X_2}]$$ $$= \mathbb{E}\left[ e^{(t_1 - t_2)X_1} \right] \cdot \mathbb{E}\left[ e^{(t_1 + t_2)X_2} \right] = \exp\left( \frac{1}{2}(t_1 - t_2)^2 \right) \cdot \exp\left( \frac{1}{2}(t_1 + t_2)^2 \right)$$ $$= \exp\left( \frac{1}{2}[2t_1^2 + 2t_2^2] \right) = \exp(t_1^2 + t_2^2)$$
Thus, we can verify that
$$M_{X_1+X_2,X_2-X_1}(t_1,t_2) = M_{X_1+X_2}(t_1)M_{X_2-X_1}(t_2)$$
which shows that $X_1+X_2$ and $X_2-X_1$ are independent.
(ii) We consider result (i) for the case in which we have $n$ arbitrary. Furthermore, we observed that
$$\sum X_i^2 = \sum(X_i-\overline{X}+\overline{X})^2 = \sum(X_i-\overline{X})^2+2\overline{X}\sum(X_i-\overline{X})+\sum\overline{X}^2 = \sum(X_i-\overline{X})^2+n\overline{X}^2$$
and that $\sum(X_i-\overline{X})^2$ and $n\overline{X}^2$ are independent. So
$$M_{\sum{X_i^2}}(t) = M_{\sum(X_i-\overline{X})^2}(t)M_{n\overline{X}^2}(t)$$
and therefore
$$M_{\sum{X_i-\overline{X}}}^2(t) = \frac{M_{\sum{X_i^2}(t)}}{M_{n\overline{X}^2}(t)}= \left(\frac{1}{1-2t}\right)^{\frac{n-1}{2}}, \ t \ < \ \frac{1}{2}.$$
How $\overline{X}\sqrt{n}$ has a standard normal distribution, it follows that $\overline{X}^2n$ has a chi-square distribution with one degree of freedom. Furthermore, the torque generating function $\sum(X_i-\overline{X})^2$ is equal to that of a chi-square distribution with $n-1$ degrees of freedom, completing the demonstration.
Corollary 2.3.1
Se $s^2$ is the sampling variance of a random sample $X_1, \ldots, X_n$ of a normal distribution with mean $\mu$ and variance $\sigma^2$, then
$$U=\frac{(n-1)s^2}{\sigma^2}$$
has a chi-square distribution with n-1 degrees of freedom.
Demo
In fact, if $X_i\sim N(\mu,\sigma^2)$ for everyone $i$, then
$$Z_i = \frac{X_i-\mu}{\sigma}\sim N(0,1).$$
We have to
$$U = \frac{(n-1)s^2}{\sigma^2}=\frac{\sum_{i=1}^n(X_i-\overline{X})^2}{\sigma^2}$$
Rewriting $X_i = Z_i\sigma+\mu$, it follows that
$$(X_i-\overline{X})^2 = \left(Z_i\sigma+\mu-\sum_{i=1}^n\frac{Z_i\sigma+\mu}{n}\right)^2 = \left(Z_i\sigma+\mu-\sigma\overline{Z}-\mu\right)^2$$
and therefore
$$(X_i-\overline{X})^2 = (Z_i\sigma-\sigma\overline{Z})^2 = (\sigma(Z_i-\overline{Z}))^2=\sigma^2 (Z_i-\overline{Z})^2.$$
In this way,
$$U = \sum_{i=1}^n\frac{(X_i-\overline{X})^2}{\sigma^2}=\sum_{i=1}^n\frac{\sigma^2(Z_i-\overline{Z})^2}{\sigma^2}=\sum_{i=1}^n(Z_i-\overline{Z})^2$$
and, from item (ii) of Theorem 2.3.1, we conclude that $U$ has a chi-square distribution with $n-1$ degrees of freedom.
Once $s^2$ is a linear function of $U$, the density of $s^2$ can be obtained from the density of $U$. In this way, we have to
$$f_{S^2}(y)=\left(\frac{n-1}{2\sigma^2}\right)^{(n-1)/2}\frac{1}{\Gamma[(n-1)/2]}y^{(n-3)/2}e^{-(n-1)y/2\sigma^2}\mathbb{I}_{(0,\infty)}(y)$$
and, with that, $s^2$ has average $\sigma^2$ and variance $\frac{2\sigma^4}{n-1}$.
Simulation Study
Analogous to the simulation study carried out above, consider a normal population with an average $\mu = 10$ and variance $\sigma^2= 4$. Consider the 15 samples of size 20 from this population.
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 7.98 | 10.70 | 7.41 | 9.92 | 9.62 | 8.44 | 14.46 | 5.59 | 7.56 | 8.66 | 9.67 | 11.40 | 12.18 | 12.79 | 12.06 |
| 15.16 | 10.22 | 9.78 | 11.82 | 9.39 | 5.89 | 8.40 | 12.13 | 13.72 | 12.42 | 10.69 | 8.11 | 10.25 | 7.58 | 7.84 |
| 8.13 | 14.30 | 6.69 | 10.01 | 9.90 | 11.73 | 11.92 | 8.77 | 10.98 | 10.24 | 6.41 | 8.68 | 9.98 | 8.30 | 12.23 |
| 9.84 | 7.92 | 12.55 | 8.91 | 7.50 | 10.43 | 12.99 | 11.22 | 7.52 | 8.50 | 8.73 | 9.73 | 9.49 | 7.87 | 7.97 |
| 9.15 | 8.38 | 9.52 | 10.39 | 13.63 | 8.63 | 9.08 | 12.17 | 10.80 | 8.18 | 8.32 | 12.70 | 8.95 | 6.12 | 12.52 |
| 10.80 | 12.36 | 11.31 | 8.12 | 12.25 | 12.60 | 8.11 | 14.41 | 9.86 | 8.37 | 11.48 | 8.42 | 11.48 | 10.12 | 12.69 |
| 7.43 | 11.07 | 8.71 | 14.06 | 11.58 | 10.06 | 10.58 | 6.65 | 13.21 | 10.29 | 13.65 | 10.75 | 10.70 | 12.98 | 11.36 |
| 10.61 | 10.80 | 9.09 | 8.85 | 12.93 | 13.86 | 10.66 | 11.76 | 11.12 | 7.77 | 11.70 | 10.38 | 12.89 | 11.00 | 10.05 |
| 9.64 | 11.67 | 8.35 | 9.51 | 7.49 | 8.63 | 12.22 | 10.91 | 11.07 | 6.99 | 9.08 | 9.90 | 10.08 | 9.85 | 9.24 |
| 10.44 | 8.90 | 7.72 | 5.10 | 9.56 | 8.47 | 15.78 | 11.45 | 7.38 | 10.21 | 8.23 | 14.34 | 7.78 | 12.31 | 10.63 |
| 10.98 | 9.64 | 11.61 | 11.80 | 7.37 | 8.68 | 12.53 | 9.68 | 10.63 | 9.64 | 8.18 | 8.86 | 11.11 | 8.58 | 9.70 |
| 9.96 | 9.90 | 8.89 | 10.94 | 12.49 | 9.40 | 10.97 | 6.13 | 9.64 | 12.93 | 9.90 | 13.17 | 10.26 | 9.23 | 11.43 |
| 9.50 | 10.93 | 9.46 | 6.09 | 10.90 | 9.74 | 11.93 | 12.13 | 10.71 | 8.58 | 9.40 | 12.05 | 10.75 | 12.86 | 10.48 |
| 15.30 | 10.58 | 10.74 | 8.12 | 5.91 | 9.35 | 5.27 | 10.22 | 12.22 | 9.82 | 12.24 | 8.97 | 12.54 | 8.71 | 11.28 |
| 8.13 | 8.81 | 10.72 | 7.52 | 11.86 | 7.74 | 12.53 | 7.42 | 10.38 | 10.28 | 11.27 | 8.85 | 11.19 | 6.11 | 8.98 |
| 9.47 | 11.46 | 9.05 | 9.22 | 10.06 | 12.46 | 6.89 | 9.95 | 12.54 | 6.86 | 7.70 | 12.55 | 11.66 | 7.50 | 11.52 |
| 9.14 | 9.02 | 11.98 | 8.52 | 6.42 | 7.24 | 10.04 | 5.79 | 9.64 | 9.57 | 9.66 | 10.03 | 9.36 | 11.80 | 9.88 |
| 11.47 | 13.56 | 9.26 | 8.19 | 9.09 | 8.83 | 10.18 | 9.60 | 8.77 | 9.23 | 8.50 | 12.21 | 8.09 | 10.67 | 11.68 |
| 9.65 | 8.11 | 10.08 | 10.85 | 7.99 | 12.46 | 10.30 | 8.58 | 9.84 | 13.98 | 10.64 | 8.72 | 8.78 | 12.22 | 9.96 |
| 12.67 | 8.96 | 8.43 | 10.53 | 10.52 | 10.18 | 8.49 | 11.05 | 10.27 | 7.32 | 9.28 | 10.14 | 12.20 | 7.51 | 9.59 |
Table 6.2.11: 15 samples of size 20
In this case, calculating the variance of each of the 15 samples, we have
| Samples | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Sample variance | 4,455 | 3,045 | 2,414 | 4,199 | 4,949 | 4,092 | 6,402 | 6,040 | 3,070 | 3,654 | 3,042 | 3,300 | 2,121 | 5,173 | 2,033 |
Table 6.2.12: Sample variances
Figure 6.2.11: Variance Chart of 15 samples
The mean of the variances is 3.866 and the variance of the variances is 1.815.
Suppose now that we carry out the same study, but instead of considering 15 samples of size 20, we will consider 1,000. We used the Action software to carry out this simulation. The sampling distribution of variance is given by the following histogram
Figure 6.2.12: Variance Chart of 1,000 samples
In this case, the mean of the variances is 4.006 and the variance is 1.694.
Carrying out the same experiment, but now considering 10000 samples of size 20, we have that the variance distribution is given by the histogram below
Figure 6.2.13: Variance Chart of 10,000 samples
In this case, the mean of the variances is 3.977 and the variance is 1.668. So, indeed, we can see that the distribution of the sampling variance approaches a chi-square distribution with mean $\mu = 4$ and variance $\frac{2\sigma^4}{n-1}=\frac{2\times 16}{19}=1,684$.