Exercise

Changing the mean of normal distributions

In this exercise, you'll use sampling to calculate the 95% confidence interval of the average height of American adult males. Recall from the lesson that the heights of American adult males are normally distributed with a mean of 177 centimeters and a standard deviation of eight centimeters.

After sampling from the distribution with the above sample statistics, you'll change the mean of the heights to 185 centimeters without changing the standard deviation to explore what happens to the mean and confidence interval of the average height after sampling again.

The following have been imported for you: random, NumPy as np, and SciPy's stats module as st.

Instructions

100 XP
  • Sample 1,000 times from the normal distribution where the mean is 177 and the standard deviation is eight; store the results inheights_177_8.
  • Sample 1,000 times from the normal distribution where the mean is 185 and the standard deviation is eight; store the results inheights_185_8.