Search code examples
rnormal-distribution

R: how to find x given the value of qnorm(x)=-2


Given the value of qnorm(x)=-2, how to find x using R? I'm trying to solve the power 1-beta from the value of qnorm(1-beta). Thank you.


Solution

  • The pnorm function serves as the inverse for qnorm. Ergo

    > pnorm(qnorm(0.5))
    [1] 0.5
    

    So to your question

    > pnorm(-2)
    [1] 0.02275013
    > qnorm(0.02275013)
    [1] -2
    > 1 - pnorm(-2)
    [1] 0.9772499