# 6-1. The Mean and Standard Deviation of the Sample Mean

{% file src="/files/-Lz9nUBbHRdG-LUtmNw4" %}
Chapter 6 (Korean)
{% endfile %}

{% file src="/files/-Lz9pRgMoae9qeSsfp6o" %}
Chapter 6 (Chinese)
{% endfile %}

{% file src="/files/-LzjBvctKsTu0fZ\_uecl" %}
Examples of Chapter 6 (R Sources) - Changed
{% endfile %}

{% file src="/files/-Lr2U-Smd2oS4iVEDVTj" %}
Distribution of Random Variables
{% endfile %}

{% file src="/files/-Lr2VRjzKuUHBL4KDRXT" %}
Famous Probability Distribution Function
{% endfile %}

Suppose we wish to estimate the mean $$μ$$ of a population.&#x20;

In actual practice we would typically take just one sample.&#x20;

Imagine however that we take sample after sample, all of the same size $$n,$$ and compute the sample mean $$\bar{x}$$ of each one.&#x20;

We will likely get a different value of $$\bar{x}$$ each time.&#x20;

> **The sample mean** $$\bar{x}$$  **is a random variable**: it varies from sample to sample in a way that cannot be predicted with certainty.&#x20;

We will write $$\bar{X}$$ when the sample mean is thought of as a random variable, and write $$\bar{x}$$ for the values that it takes.&#x20;

> The random variable $$\bar{X}$$ has **a mean, denoted** $$μ\_\bar{X}$$ , and **a standard deviation, denoted** $$σ\_ \bar {X}$$ **.**&#x20;

Here is an example with such a small population and small sample size that we can actually write down every single sample.

**EXAMPLE 1.** A rowing team consists of four rowers who weigh 152, 156, 160, and 164 pounds. Find all possible random samples with replacement of size two and compute the sample mean for each one. Use them to find the probability distribution, the mean, and the standard deviation of the sample mean $$\bar{X}$$ .

**\[ Solution ]**

* all possible samples

![](/files/-Lr3OzS4RLjt3-9bQODR)

Mean and Variance of Sample Means

* 7 possible sample means : {152, 154, 156, 158, 160, 162, 164}
* probability distribution of the sample means : \
  {1/16, 2/16, 3/16, 4/16, 3/16, 2/16, 1/16}
* $$\mu\_\bar{X} =$$ $$\Sigma \bar{x}P(\bar{x})$$ = 158
* $$\sigma\_\bar{x} ^2 =$$ $$\Sigma \bar{x}^2P(\bar{x})  - {\Sigma \bar{x}P(\bar{x}) }^2 = 24974 - 158^2 = 10$$. &#x20;

Mean and Variance of Population

* population : {152, 156, 160, 164}
* mean $$\mu = 158$$&#x20;
* variance $$\sigma ^2 = 20$$&#x20;

{% tabs %}
{% tab title="R Source" %}

```
# 1. Mean and Variance of Sample Means

x <- c(152, 154, 156, 158, 160, 162, 164)
p <- c(1, 2, 3, 4, 3, 2, 1)/16

mu_x <- sum(x*p); mu_x
var_x <- sum(x^2 * p) - mu_x^2; var_x


# 2. Mean and Variance of Population

y <- c(152, 156, 160, 164)

mu_y <- sum(y)/length(y); mu_y
var_y <- sum(y^2)/length(y) - mu_y^2; var_y 
```

{% endtab %}

{% tab title="1. Sample Mean" %}

```
> mu_x <- sum(x*p); mu_x
## [1] 158
> var_x <- sum(x^2 * p) - mu_x^2; var_x
## [1] 10
```

{% endtab %}

{% tab title="2. Population" %}

```
> mu_y <- sum(y)/length(y); mu_y
## [1] 158
> var_y <- sum(y^2)/length(y) - mu_y^2; var_y 
## [1] 20
```

{% endtab %}
{% endtabs %}

> Suppose random samples of size *n* are drawn from a population with mean *μ* and standard deviation *σ*. The mean $$μ\_\bar{X}$$ and standard deviation $$σ\_\bar{X}$$ of the sample mean $$\bar{X}$$ satisfy&#x20;
>
> &#x20;                      $$μ\_{\bar{X}}=μ$$   and   $$σ\_{\bar{X}}=\frac{σ}{\sqrt{n}}$$ <br>

\
**EXAMPLE 2.** The mean and standard deviation of the tax value of all vehicles registered in a certain state are $$\mu = $13,525$$ and  $$σ=$4,180.$$Suppose random samples of size 100 are drawn from the population of vehicles. What are the mean $$μ\_\bar{X}$$ and standard deviation  $$σ\_\bar{ X }$$ of the sample mean $$\bar{X}$$?

**\[ Solution ]**

* &#x20;$$μ\_{\bar{X}}=μ = 13,525$$
* &#x20; $$σ\_{\bar{X}}=\frac{σ}{\sqrt{n}} = \frac{4,180}{\sqrt{100}} = 418$$

{% tabs %}
{% tab title="R Source" %}

```
n <- 100
mu <- 13525
si <- 4180

# 1. Mean of Sample Mean
mu_x <- mu; mu

# 2. Standard Deviation of Sample Mean
sig_x <- si / sqrt(n); sig_x
```

{% endtab %}

{% tab title="Result" %}

```
> # 1. Mean of Sample Mean
> mu_x <- mu; mu
## [1] 13525
> 
> # 2. Standard Deviation of Sample Mean
> sig_x <- si / sqrt(n); sig_x
## [1] 418
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kmis.gitbook.io/statistics/chapter-6.-sampling-distributions/6-1.-the-mean-and-standard-deviation-of-the-sample-mean.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
