<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
Step1:  Population distribution
Here is a population of size 100,000.
Step2:  This is what the population distribution looks like when represented as a frequency histogram.
Step4:  Sample distribution
Here is sample of size 60 drawn without replacement from this population
Step5:  Here is what the frequency histogram of the sample looks like.
Step6:  Here's density histograms of the population (gray) and the sample (blue) drawn together.
Step7:  Sampling distribution of the mean
To estimate the sampling distribution of the mean, we draw 1000 samples of size 60 and calculate the mean for each such sample.
Step8:  Here is the frequency histogram of the sampling distribution of the mean.
Step9:  Here are the density histograms of the population (grey), our first sample (blue), and the sampling distribution of the mean(red), all drawn in the same plot. 
IMPORTANT NOTE
<ASSISTANT_TASK:>
Python Code:
mu, sigma = 64, 8
popn = np.random.normal(loc=mu,scale=sigma, size=100000)
truemu, truesigma = np.mean(popn), np.std(popn)
s = \
For the population of interest, the true mean is {} 
and the true standard deviation is {} 
print(s.format(truemu,truesigma))
Explanation: Population distribution
Here is a population of size 100,000.
End of explanation
plt.hist(popn, bins=50, color='gray', alpha=0.75, histtype='stepfilled')
plt.xlabel("X")
plt.ylabel("Frequency")
pass
Explanation: This is what the population distribution looks like when represented as a frequency histogram.
End of explanation
sample = np.random.choice(popn, size=60, replace=False)
s = \
For the population of interest, the point estimates of the 
mean and standard deviation are {} and {}, respectively
print(s.format(np.mean(sample),np.std(sample,ddof=1)))
Explanation: Sample distribution
Here is sample of size 60 drawn without replacement from this population:
End of explanation
plt.hist(sample, color='steelblue', alpha=0.75, 
         histtype='stepfilled',label='sample')
plt.xlabel("X")
plt.ylabel("Frequency")
pass
Explanation: Here is what the frequency histogram of the sample looks like.
End of explanation
plt.hist(popn, normed=True, bins=50, label='population',
         color='gray', alpha=0.75, histtype='stepfilled')
plt.hist(sample, normed=True, label='sample',
         color='steelblue', alpha=0.75, histtype='stepfilled')
plt.xlabel("X")
plt.ylabel("Density")
plt.legend(loc="best")
pass
Explanation: Here's density histograms of the population (gray) and the sample (blue) drawn together.
End of explanation
smeans = []
for i in range(1000):
    rsample = np.random.choice(popn, size=60, replace=False)
    smeans.append(np.mean(rsample))
Explanation: Sampling distribution of the mean
To estimate the sampling distribution of the mean, we draw 1000 samples of size 60 and calculate the mean for each such sample.
End of explanation
plt.hist(smeans, normed=True, bins=30, label='simulated\ndistn of\n means',
         color='firebrick', alpha=0.75, histtype='stepfilled')
plt.xlabel("mean(X)")
plt.ylabel("Frequency")
pass
Explanation: Here is the frequency histogram of the sampling distribution of the mean.
End of explanation
plt.hist(popn, normed=True, bins=50, label='population',
         color='gray', alpha=0.75, histtype='stepfilled')
plt.hist(sample, normed=True, label='sample',
         color='steelblue', alpha=0.75, histtype='stepfilled')
plt.hist(smeans, normed=True, bins=50, label='simulated\ndistn of\n means',
         color='firebrick', alpha=0.75, histtype='stepfilled')
plt.xlabel("X")
plt.ylabel("Density")
plt.legend(loc="best")
plt.ylim(0,0.06)  # comment out this line to remove truncation
pass
Explanation: Here are the density histograms of the population (grey), our first sample (blue), and the sampling distribution of the mean(red), all drawn in the same plot. 
IMPORTANT NOTE: to facilitate visual comparison of the distributions I've truncated the y-axis. Comment out the ylim line below to see the complete density histogram of the sampling distribution of sample means.
End of explanation
<END_TASK>