O'Reilly logo

Data Analysis with R - Second Edition by Tony Fischetti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How did we get 1.96?

You can get this number yourself using the qnorm function.

The qnorm function is a little like the opposite of the pnorm function that we saw in the previous chapter. That function started with a p because it gave us a probability—the probability that we would see a value equal to or below it in a normal distribution. The q in qnorm stands for quantile. A quantile, for a given probability, is the value at which the probability will be equal to or below that probability.

I know that was confusing! stated differently, but equivalently, a quantile for a given probability is the value such that if we put it in the pnorm function, we get back that same probability:

  > qnorm(.025) 
  [1] -1.959964 
  > pnorm(-1.959964) 
  [1] 0.025 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required