Search code examples
rnormal-distribution

How do I solve for a variable in a standard normal distribution using R?


I'm trying to solve this expression using R and I have no clue.

P(Z >= c) = 0.025

I found P(Z < c) = 0.975 using the complement rule but do not know how to proceed further.


Solution

  • If you have the cumulative distribution function (CDF), think about the inverse. Derivation of the inverse cumulative distribution function

    Here, p = 0.975.

    Fortunately, other people have already built functions like these. Compare the definition of the inverse CDF to the quantile function for insights into why the letter q is used by some packages.

    I'll leave the rest up to you.