What you're looking for is quite simply
In [12]: def normz(val):
....: return scipy.stats.norm.ppf((1+val)/2)
....:
In [13]: normz(0.95)
Out[13]: 1.959963984540054
This is because of the symmetric nature of the normal distribution. A 95% confidence interval covers 95% of the normal curve, and as a result the probability of acquiring a value outside this 95% is less than 5% (due to its shape). Then recalling that the normal curve is symmetric, the area in each tail is equivalent to
![enter image description here]()
so in your case, the area in each tail is 0.025.
As a result, in order to use scipy.stats.normal.ppf() with C, you must use the symmetric nature of the normal distribution and
![enter image description here]()
to obtain a suitable lower/upper tail probability 0.975 to use with scipy.stats.norm.ppf(). This graph could help you visualize the concept.
![enter image description here]()