<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Title
Step1:  Create Population Data From Non-Normal Distribution
Step2:  View the True Mean Of Population
Step3:  Take A Sample Mean, Repeat 1000 Times
Step4:  Plot The Sample Means Of All 100 Samples
Step5:  This is the critical chart, remember that the population distribution was uniform, however, this distribution is approaching normality. This is the key point to the central limit theory, and the reason we can assume sample means are not bias.
View The Mean Sample Mean
Step6:  Compare To True Mean
<ASSISTANT_TASK:>
Python Code:
# Import packages
import pandas as pd
import numpy as np
# Set matplotlib as inline
%matplotlib inline  
Explanation: Title: Demonstrate The Central Limit Theorem
Slug: demonstrate_the_central_limit_theorem
Summary: Python introduction to the central limit theorem
Date: 2016-05-01 12:00
Category: Statistics
Tags: Basics
Authors: Chris Albon  
Preliminaries
End of explanation
# Create an empty dataframe
population = pd.DataFrame()
# Create an column that is 10000 random numbers drawn from a uniform distribution
population['numbers'] = np.random.uniform(0,10000,size=10000)
# Plot a histogram of the score data.
# This confirms the data is not a normal distribution.
population['numbers'].hist(bins=100)
Explanation: Create Population Data From Non-Normal Distribution
End of explanation
# View the mean of the numbers
population['numbers'].mean()
Explanation: View the True Mean Of Population
End of explanation
# Create a list
sampled_means = []
# For 1000  times,
for i in range(0,1000):
    # Take a random sample of 100 rows from the population, take the mean of those rows, append to sampled_means
    sampled_means.append(population.sample(n=100).mean().values[0])
Explanation: Take A Sample Mean, Repeat 1000 Times
End of explanation
# Plot a histogram of sampled_means. 
# It is clearly normally distributed and centered around 5000
pd.Series(sampled_means).hist(bins=100)
Explanation: Plot The Sample Means Of All 100 Samples
End of explanation
# View the mean of the sampled_means
pd.Series(sampled_means).mean()
Explanation: This is the critical chart, remember that the population distribution was uniform, however, this distribution is approaching normality. This is the key point to the central limit theory, and the reason we can assume sample means are not bias.
View The Mean Sample Mean
End of explanation
# Subtract Mean Sample Mean From True Population Mean
error = population['numbers'].mean() - pd.Series(sampled_means).mean()
# Print
print('The Mean Sample Mean is only %f different the True Population mean!' % error)
Explanation: Compare To True Mean
End of explanation
<END_TASK>