Definition and Equations

  • Definition: The Central Limit Theorem (CLT) states that the sampling distribution of the sample mean approaches a normal distribution as the sample size increases, regardless of the shape of the population distribution.

  • Equations: Standard Error of the Mean: \(SE = \frac{\sigma}{\sqrt{n}}\) Standardized Sample Mean: \(Z = \frac{\bar{X} - \mu}{\sigma/\sqrt{n}}\)

Statement of the CLT

  • Let \(X_1, X_2, ..., X_n\) be a sequence of independent and identically distributed random variables with mean \(\mu\) and variance \(\sigma^2\).
  • As \(n\) approaches infinity, the distribution of \(\frac{\bar{X} - \mu}{\sigma/\sqrt{n}}\) approaches a standard normal distribution.

Why is CLT Important

  • The CLT is important in statistics because it allows us to make inferences about population parameters based on sample data.
  • It is the foundation for many statistical tests and confidence intervals.

Example

  • Suppose we have a population with a mean of 100 and a standard deviation of 15.
  • If we take samples of size 30 from this population, the distribution of sample means will be approximately normal with a mean of 100 and a standard deviation of \(\frac{15}{\sqrt{30}} \approx 2.74\).

Simulating the Example in ggplot2

  • Code for the histogram of the population:
set.seed(123)
population <- rnorm(1000, mean = 100, sd = 15)
single_sample <- replicate(1000, sample(population, 30))

ggplot(data.frame(x = single_sample[, 1]), aes(x = x)) +
  geom_histogram(binwidth = 1, fill = "skyblue", color = "black") +
  labs(title = "Histogram of a Single Sample", x = "Value", y = "Frequency")

Simulating the Example in ggplot2

  • Histogram of the population:

Simulating the Example in ggplot2

  • Code for the histogram of the sample means of the population:
set.seed(123)
sample_means <- replicate(1000, mean(sample(population, 30)))

ggplot(data.frame(x = sample_means), aes(x = x)) +
  geom_histogram(binwidth = 1, fill = "skyblue", color = "black") +
  labs(title = "Sampling Distribution of the Mean", x = "Sample Mean", y = "Frequency")

Simulating the Example in ggplot2

  • Histogram of the sample means of the population:

Simulating the Example in plotly

  • Line graph of the sample means of the population: