Simulating the CLT
A statistics tutor wants to show a class something they can normally only be told: that sample averages behave predictably even though individual observations do not. Real studies get one sample and no way to see what a second would have looked like, so the class simulates the invisible part.
A population is set up with a known true mean and a known standard deviation. From it, many separate samples are drawn, each containing the same number of observations. The draw is written for you in the editor once the four figures have been read: samples becomes a grid with one row per sample and one column per observation, so each row is one complete sample and has an average of its own. The generator is started from a seed so the whole class sees the same grid, and the tutor runs the demonstration again with different settings each term.
Task: Print the grand mean - the average of those individual sample averages - as a single number rounded to 2 decimals. Round once, at the end.
Input
Five lines: the seed, the population's true mean, the population's standard deviation, how many samples to draw, and how many observations are in each sample. The seed and the last two are whole numbers; the mean and standard deviation are decimals.
Output
One line holding the grand mean, rounded to 2 decimals and printed the way Python prints a float - 99.93.
Example:
Input:
0
100
15
1000
30
Output:
99.93
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in