Two ppf tail function for z value?

Using the function ppffrom scipy.stat.norm, I get a result with one tail, for example, it ppf(.95)selects 1.644..., and not 1.96..., it should get a distribution with two tails.

Is there a function in scipy that gives a two-way z-score based on p-value?

+4
source share
1 answer

What you are looking for is quite simple

In [12]: def normz(val):
   ....:     return scipy.stats.norm.ppf((1+val)/2)
   ....: 
In [13]: normz(0.95)
Out[13]: 1.959963984540054

. 95% - 95% , 95% 5% (- ). , , ,

enter image description here

0.025.

, scipy.stats.normal.ppf() C,

enter image description here

/ 0.975 scipy.stats.norm.ppf(). .

enter image description here

+6

All Articles