qnorm function
This function returns the value of the inverse cumulative density function (cdf) of the normal distribution given a certain random variable p, a population mean μ, and the population standard deviation σ.
Syntax: qnorm(p, mean = 0, sd = 0, lower.tail = TRUE)
Parameters:
- p: It represents the significance level to be used
- mean: vector of means.
- sd: vector standard deviation.
- lower.tail = TRUE: Then the probability to the left of p in the normal distribution is returned.
Example:
In this example, we are calculating the Z-score of the 95th quantile of the standard normal distribution using the qnorm() function in R.
R
qnorm (.95, mean=0, sd=1) |
Output:
[1] 1.644854
A Guide to dnorm, pnorm, rnorm, and qnorm in R
In this article, we will be looking at a guide to the dnorm, pnorm, qnorm, and rnorm methods of the normal distribution in the R programming language.