# deriving z score for 95% confidence interval [duplicate]

95% of the area under the standard normal distribution lies within 1.96 standard deviations away from the mean (0). This 1.96 number is used to construct 95% confidence intervals. I was just wondering... how is this 1.96 value derived? Looking at the standard normal distribution, I know the following statement is true:

$$\dfrac{1}{\sqrt{2\pi}}\int_{-\infty}^{-z}e^{-x^2/2}dx=\dfrac{1}{\sqrt{2\pi}}\int_{z}^{\infty}e^{-x^2/2}dx=0.025$$

Where z = 1.96. These areas are equal to 0.025 because they represent the leftover areas under the standard normal distribution below -1.96 and above 1.96, which adds up to 5% or 0.05. I want to know how I can mathematically show that z = 1.96.

I tried differentiating both sides with respect to z so I could make use of the fundamental theorem of calculus and solve for z to show that it had to equal 1.96, but that didn't work out for me... kept getting an undefined answer for z. Am I going about this the right way? Or is there a better way to explicitly show that z = 1.96? This is just something I've been curious about regarding z scores.

• – Glen_b Sep 7 '17 at 7:27
• Ah... thank you for the references! I didn't see those – clueless_undergrad37 Sep 7 '17 at 17:49

'simply integrate $$\dfrac{1}{\sqrt{2\pi}}\int_{-1.96}^{1.96}e^{-{1\over2}x^2}dx$$ and you should find that when you evaluate the definite integral, the result is $\approx 0.95$

(added after OP's comment...) alternatively, you can look at the problem this way, $$0.95 = \dfrac{1}{\sqrt{2\pi}}\int_{-z}^{z}e^{-{1\over2}x^2}dx$$ that can be simplified a bit by observing that the Normal PDF is symmetric about $x=0$ Thus, an equivalent statement is... $$0.95 = \dfrac{2}{\sqrt{2\pi}}\int_{0}^{z}e^{-{1\over2}x^2}dx$$

next steps...evaluate the definite integral on the right hand side and then it's just algebra to find $z$

• That makes sense, but I want to know how you would do it the other way around, like, how would you figure out, with integrals, what your upper and lower limits need to be in order to capture 95% of the area under the standard normal curve. I'm interested in how you find that 1.96 number. – clueless_undergrad37 Sep 7 '17 at 5:21
• Man... this is getting really messy! To evaluate that definite integral above, I'm trying to do that trick Tilefish Poele referred me to in that video link where basically you name the definite integral $I$, then you look at $I^2$ and convert everything to polar coordinates to solve, but this is super messy since we're looking at x between 0 and k and y between 0 and k, which is a rectangular region. I'm at the point where I've converted my double integral into polar coordinates, but it's too complex to evaluate... – clueless_undergrad37 Sep 7 '17 at 6:32
• I let $I = \int_{0}^{k} e^{-x^2/2}\,dx$ so then $I^2 = \int_{0}^{k} e^{-x^2/2}\,dx \cdot \int_{0}^{k} e^{-y^2/2}\,dy = \int_{0}^{k}\,\int_{0}^{k} e^{-(x^2 + y^2)/2}\,dx\,dy$. Converting $I^2$ into polar coordinates gets really messy... and I reached a point where I didn't know how to proceed because converting the regions $x \in [0, k]$ and $y \in [0,k]$ into polar coordinates is messy! – clueless_undergrad37 Sep 7 '17 at 6:51
• @clueless_undergrad37 "...it gets messy". Yes. It does. I think it is intractable. It is difficult to express a finite rectangular region in the plane in polar coordinates. I guess this is why we look these things up in a table. The entries in the table are generated by iterative numerical methods.If you mess around with the integrate function over on the wolfram website, you can see the result you seek (and so much more). – Brad S. Sep 7 '17 at 17:29

You can show it by simply solving the integral. I think the easiest way would probably be using radial coordinates. There is a tutorial here How to integrate e^-x^2

Then either solve for $Z$ at $0.025$ or sub in $Z = 1.96$.

• Cool... so following the video, I would first want to solve that double integral version of my original problem... but what would my upper and lower limits look like in polar coordinates? The region in rectangular coordinates would be x in (-infinity, k) and y in (-infinity, k). I'm a bit rusty with this... would the new region be r from 0 to k*sec(theta) and theta between 0 and 2pi? – clueless_undergrad37 Sep 7 '17 at 5:16