pnorm function
This function returns the value of the cumulative density function (cdf) of the normal distribution given a certain random variable q, a population mean μ, and the population standard deviation σ.
Syntax: pnorm(q, mean, sd,lower.tail)
Parameters:
- q: It is a vector of quantiles.
- mean: vector of means.
- sd: vector standard deviation.
- lower.tail: It is logical; if TRUE (default), probabilities are otherwise
Example: In this example, we will be calculating the percentage of students at this school who are taller than 75 inches height of males at a certain school is normally distributed with a mean of μ=70 inches and a standard deviation of σ =3 inches using the pnorm() function in the R.
R
pnorm (75, mean=70, sd=3, lower.tail= FALSE ) |
Output:
[1] 0.04779035
At this school, 4.779% of males are taller than 75 inches.
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.
Contact Us