dnorm function

This function returns the value of the probability density function (pdf) of the normal distribution given a certain random variable x, a population mean μ, and the population standard deviation σ. 

Syntax; dnorm(x, mean, sd)

Parameters:

  • x: vector of quantiles.
  • mean: vector of means.
  • sd: vector standard deviation.

Example:

In this example, we will be finding the value of the standard normal distribution pdf at x=1 using the dnorm() function in the R.

R




dnorm(x=1, mean=0, sd=1)


Output:

[1] 0.2419707

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.

Similar Reads

dnorm function

This function returns the value of the probability density function (pdf) of the normal distribution given a certain random variable x, a population mean μ, and the population standard deviation σ....

pnorm function

...

qnorm 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 σ....

rnorm function

...

Contact Us