PHYCS 3730/6720 Lab Exercise

Reading and references:
Answer file Mylab17.txt.

Exercise 1. Mean and standard deviation

Modify your code in Exercise 1 of lab16 so you take only 20 values on the interval [0,1], and calculate the mean and (population) standard deviation of these values. Note that the probability distribution here is flat, not Gaussian. The numpy mean() and std() methods will do this calculation for you, but you should multiply the result for the standard deviation by sqrt(nsamp/(nsamp-1)) to correct for bias.

Copy your code to the answer file, and report your results for the mean and standard deviation.

Calculate the standard deviation of the mean, using the result of the central limit theorem, i.e. divide the population standard deviation you just calculated by the square root of the sample size, sqrt(nsamp).


Exercise 2. Standard deviation of the mean

To illustrate the concept of the standard deviation of the mean, run your code in Exercise 1 above 1000 times, yielding 1000 means. Calculate the mean of the means and standard deviation of the means. Copy your code and answers in the answer file.

Plot a histogram of the resulting means. Does this histogram look roughly like a Gaussian distribution?

Does your result for the population standard deviation of the means here agree with your estimate of the standard deviation of the mean from Exercise 1. (This is a check of the central limit theorem.) Give a comparison of your results in your answer file.