# Central Limit Theorem

Sample size of $$n=4$$

$$S\_1 = \[1, 1, 3, 6] \Rightarrow \bar{x\_1}= 2.75 \newline S\_2 = \[3, 4, 3, 1] \Rightarrow \bar{x\_2} = 2.75 \newline S\_3 = \[1, 1, 6, 6] \Rightarrow \bar{x\_3} = 3.50 \newline .\newline.\newline.\newline. \newline S\_n$$

Add your samples together and divide by the number of sample size.

{% embed url="<http://onlinestatbook.com/2/index.html>" %}

The sample average is:

$$\huge s\_n:=\frac{\sum\_i X\_i}{N}$$<br>

For large ​$$n$$, the distribution of sample sums $$​S\_n$$​ is close to normal distribution ​$$N(\mu^\prime,\sigma^\prime)$$where:

* $$​​\mu^\prime=n \times \mu$$
* $$​​\sigma^\prime=\sqrt{n} \times \sigma$$

The **marginOfError** formula can be found [here](https://www.thoughtco.com/margin-of-error-formula-3126275).

#### Standard error of the mean

$$\huge \sigma\_\bar{x}^2 = \frac{\sigma^2}{n} \Longrightarrow \sigma\_\bar{x}=\frac{\sigma}{\sqrt{n}}$$

## Example: Means in quality control

An auto-maker does quality control tests on the paint thickness at different points on its car parts since there is some variability in the painting process. A certain part has a target thickness of $$2\text{ mm}$$. The distribution of thicknesses on this part is skewed to the right with a mean of $$2\text{ mm}$$ and a standard deviation of $$0.5\text{ mm}$$.

A quality control check on this part involves taking a random sample of $$100$$ points and calculating the mean thickness of those points.

**Assuming the stated mean and standard deviation of the thicknesses are correct, what is the probability that the mean thickness in the sample of** $$100$$**points is within** $$0.1\text{ mm}$$ **of the target value?**

### **Part 1: Establish normality**

Approximately normal. Since $$n=100 \geq 30$$, the central limit theorem applies. Even though the population of thicknesses is skewed to the right, the sample means will be normally distributed since the sample size is large.

### Part 2: Find the mean and standard deviation of the sampling distribution

The sampling distribution of a sample mean $$\bar x$$ has:

$$\begin{aligned} \mu\_{\bar x}&=\mu \\\ \sigma\_{\bar x}&=\dfrac{\sigma}{\sqrt n} \end{aligned}$$

Note: For this standard deviation formula to be accurate, our sample size needs to be $$10%$$ or less of the population so we can assume independence.

**What is the mean of the sampling distribution of** $$\bar x$$**?**&#x20;

On average, the sample means will equal the population mean.

$$\mu\_{\bar x}=\mu=2\text{ mm}$$

**What is the standard deviation of the sampling distribution of** $$\bar x$$**?**

It's reasonable to assume that there are more than $$1000$$ points on the part, so we can safely use this formula:

$$\sigma\_{\bar x}=\dfrac{\sigma}{\sqrt n}=\dfrac{0.5}{\sqrt {100}}=\dfrac{0.5}{10}=0.05\text{ mm}$$

### Part 3: Use normal calculations to find the probability in question

**Assuming the stated mean and standard deviation of the thicknesses are correct, what is the approximate probability that the mean thickness in the sample of** $$100$$ **points is within** $$0.1\text{ mm}$$ **of the target value?**

In any normal distribution, we know that approximately $$68%$$ of the data falls within one standard deviation of the mean, $$95%$$9 of data falls within two standard deviations of the mean, and $$99.7%$$ of data falls within three standard deviations of the mean.

We already established that the sample mean thickness $$\bar x$$ is normally distributed with $$\mu\_{\bar x}=2\text{ mm}$$ and $$\sigma\_{\bar x}=0.05\text{ mm}$$. "Within $$0.1\text{ mm}$$ of the target value" is exactly two standard deviations above and below the mean.

<div align="left"><img src="https://3501392451-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLZ89zzVxrdnG1RG6CA%2F-LNFF54819KDMO8TlPDW%2F-LNFxGFHjAW3p26zXClO%2Fexam_part3.png?alt=media&#x26;token=a25ccf9d-404d-4c86-91ba-9fed686d3793" alt=""></div>

Check out that [link](https://osterburg.gitbook.io/scrapbook/~/edit/drafts/-LMvY91E6c4kssbA4IaZ/statistics-and-probability/modeling-data-distribution).

**There is about a** $$95%$$ **probability that sample mean is within** $$0.1\text{ mm}$$ **of the target value.**


---

# 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://stephanosterburg.gitbook.io/scrapbook/math/statistics-and-probability/central-limit-theorem.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.
