Calculate Z-Score from Probability Value - R programming

Viewed 791

I know Z-score can be calculated using pnorm(q=1, mean = 0, sd = 1, lower.tail = TRUE) for example
That will give us a probability value of 0.841344746068543

I was wondering if there was a function that calculates the inverse of that to find the probability from the Z score (Calculating Z=1 from the probability value of 0.841344746068543). Some math textbooks call that function it inverse phi.

1 Answers

Yeah, its called qnorm

qnorm(p=0.841344746068543)

Outputs:

1

In general, for a given distribution there is the following family of functions (using norm as example):

  1. rnorm - draw random numbers from the distribution
  2. dnorm - the density at a given point in the distribution
  3. qnorm - quantile function
  4. pnorm - distribution function (which you have used)

You have the same set for unif for example, (the uniform distribution) (dunif,runif,punif,qunif)

Related