This repository provides resources for demonstrating and analyzing the Central Limit Theorem (CLT) using Python. It includes both Jupyter Notebook and Python script formats to illustrate how the distribution of sample means approaches normality as the sample size increases.
-
central_limit_theorem.ipynb
: A Jupyter Notebook that demonstrates the Central Limit Theorem through interactive visualization and explanations. -
central_limit_theorem.py
: A Python script that performs the same demonstration as the Jupyter Notebook, showing the CLT through command-line execution. -
README.md
: This file, providing an overview and instructions for the repository.
The Central Limit Theorem states that the distribution of sample means approaches a normal distribution as the sample size increases, regardless of the original distribution of the data. This repository provides both a Jupyter Notebook and a Python script to visualize this concept.
- Interactive Visualization: Allows for step-by-step exploration and visualization of the Central Limit Theorem.
- Detailed Explanations: Includes markdown cells explaining the process and results.
- Command-Line Execution: Provides a script that can be run from the terminal or command prompt.
- Histograms and Output: Generates and displays histograms of sample means to illustrate the Central Limit Theorem.
Ensure you have Python and the required libraries installed. You can install the necessary libraries using:
pip install numpy matplotlib
-
Save the Script:
- Ensure the script is as
central_limit_theorem.py
.
- Ensure the script is as
-
Execute the Script:
python central_limit_theorem.py
-
View Results:
- The script will generate histograms and print conclusions about the Central Limit Theorem to your terminal or command prompt.
-
Install Jupyter Notebook: If you don’t have Jupyter installed, you can install it using:
pip install notebook
-
Launch Jupyter Notebook: start Jupyter Notebook:
jupyter notebook
-
Open the Notebook: Open
central_limit_theorem.ipynb
in the Jupyter interface to interact with the notebook and explore the visualizations.
The Central Limit Theorem is a key concept in statistics, demonstrating that the distribution of sample means will approximate normality as the sample size grows. This repository offers both an interactive notebook and a script to explore and understand this theorem through practical examples.