[Tutor] Statistics with python
Steven D'Aprano
steve at pearwood.info
Sat Oct 13 06:56:07 EDT 2018
On Sat, Oct 13, 2018 at 11:32:09AM +0300, Mariam Haji wrote:
> 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?
That depends on the data set.
How is it distributed? There are dozens of likely distributions:
Poisson, Cauchy, binomial, multinomial, hypergeometric, Zipf, Weibull,
Pareto, Student's t, uniform, and many, many, many, MANY more:
https://en.wikipedia.org/wiki/List_of_probability_distributions
> 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
If you use too many abbreviations, especially the wrong abbreviations,
it is hard to understand you.
Do you mean that n, the number of samples ("no") is 56?
What's std? Standard deviation, standard error, Sexually Transmitted
Disease? Something else?
It looks like you are dividing the sample mean by the square root of the
sample size, but I don't know why.
> 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
You're subtracting the average data point from the number of samples,
which is meaningless. And the value of s seems to be meaningless too.
It is possible that I have misunderstood you. Please try explaining your
steps more carefully, without using abbreviations we might not get. I've
tried to guess what you mean as best I can, but I might not have
succeeded.
Thank you.
--
Steve
More information about the Tutor
mailing list