Hello everyone, can someone help with problem 2 on Quiz 2? When standard dev is 0 its obvious we are getting the mean every time, but with say std. dev 20, 95% of the values are within 3 std. dev. so thats (100 +- 60)*1000. But how do you come up with an expected value and why is it so much larger for std. dev. 40
Is this a program or just math?
it is a quiz problem so you have to read the code and come up with the expected value
you are not allowed to run the code so there has to be a mathematical reasoning for it
You aren't giving enough information either way.
import random tots = [0.00]*3 maxVals = [0.0]*3 mean = 100.0 stdDevs = [0.0, 20.0, 40.0] for i in range(1000): for j in range(len(tots)): next = random.gauss(mean, stdDevs[j]) tots[j] += next what are the expected values of tots
Interesting... I would expect the expected values to be the mean, or 100.0 for each individual element... by definition.
thats what i thought, but the answer is [100,000 100,000 1000,000]
oh wait, I see.
The loop is adding 100 each time, but it does this 1000 times.
yea, i get the first two 100,000s, but how does standard deviation 40 result in the value 1000,000?
I don't think it should
me too
Join our real-time social learning platform and learn together with your friends!