Hi guys, I have a statistics question where I am to calculate the probability of a sample dataset.
I have done the coding bit but I am not sure if I did the right thing, I just need confirmation before I submit it. the question is as: If a sample of 50 patients is taken from a dataset what is the probability that we will get a patient above the age of 56? So I know my sample mean is 50 and my no is 56 to get std I manually did 50/√56 (that's 50/square root of 56) I got the answer as 6.66 So my mean is 50 and std is 6.66 Then I did the below to get the z score and probability using scipy.stats as st m=50 s=6.66 z1 = (56-m)/s p1 = st.norm.sf(z1) print ('Probability of patient above the age of 56 is:', (p1)) Probability of patient above the age of 56 is: 0.183820506093897 Am i missing something or did I do it right? Thanks in Advance. -- *Regards,* *Mariam.* _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor