We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Artificial Intelligence
- Probability & Statistics - Foundations
- Day 4: The Central Limit Theorem #2
- Discussions
Day 4: The Central Limit Theorem #2
Day 4: The Central Limit Theorem #2
Sort by
recency
|
7 Discussions
|
Please Login in order to post a comment
Again, python3 (using scipy.stats) yields the correct solution ( 0.6915) but rejected by the checker.
Enter your code here. Read input from STDIN. Print output to STDOUT
from scipy import stats as st import math
pop_mean = 2.4 pop_sd = 2.0
sample_size = 100 x = 250/sample_size
sample_sd = pop_sd/math.sqrt(sample_size)
z_score = (x -pop_mean)/sample_sd
prob = st.norm.cdf(z_score)
print ('{:0.4f}'.format(prob))
I'm very confused why the z-score of this would be .5 and thus using the normal distribution table why this would come out to be .6145.
if X is a random variable of # tickets bought per student. mean = 2.4 and std dev = 2.0. And then if we just make a new random variable that is supposed to represent 100 students. Then this new random variable 100*X would just have mean = 240 and std dev of 200 correct? And thus calculating the Z score we would get .05 and a probability of .5199. What am I missing here?
I could solve this problem by giving a plain text solution, but python3 solution failed with runtime error (wished errors were more explicit). Is maybe the scipy library unavailable for this challenge? How are we supposed to find the cumulative distribution without using scipy.stats.norm.cdf ?