https://thill3.shinyapps.io/Central-Limit-Theorem-Demonstration/

Central Limit Theorem Demo

Thomas Hill III
2019 July 04

Background - The Central Limit Theorem

The Central Limit Theorem states, informally, that the mean (average) of a set of random variables is approximately normally distributed regardless of the distribution from which the random values were initially generated. That is, if we choose any probability distribution (say the exponential one), choose a number of values based on it, take the mean of those values, repeat those two steps many times, and then consider all of the means that we've generated then together those means will approximately form a normal probability distribution (the “bell curve”).

For some other background on probability distributions please see slide 5.

The App - Input

This app allows you to explore the Central Limit Theorem through the exponential distribution.
Through the interface you'll be able to adjust the following parameters.

  • The number of values that go into each mean
  • The number of means that go into creating the plot
  • The lambda parameter for the exponential distribution
  • The bin width for the histogram of the raw data points
  • The bin width for the histogram of the means

And, just for fun,

  • The color of the bars in the histograms.

The App - Output

Histogram of raw data plot of chunk unnamed-chunk-1

Histogram of means of 10 values plot of chunk unnamed-chunk-2

Background - Probability Distributions

A probability distribution is a function that indicates how probable an outcome is. There are two main types - discrete (finite set of oucomes) or continuous (infinite number of possible values). Some probability distributions are defined by certain parameters. These parameters can squish or expand parts of the distribution, but they do not change the overall shape of the distribution.
Below are some common distributions, their types (discrete or continuous), and their parameters.

Distribution Category Parameters
Poisson Discrete Lambda (= Mean and Variance)
Uniform Continuous Minimum, Maximum
Geometric Discrete p (= Probability of success)
Exponential Continuous Lambda (= 1/mean)