Normal Distribution-R language

Source: Internet
Author: User
Dnorm (x, mean = 0, SD = 1, log = FALSE)
Pnorm (q, mean = 0, SD = 1, Lower.tail = TRUE, LOG.P = FALSE)
Qnorm (p, mean = 0, SD = 1, Lower.tail = TRUE, LOG.P = FALSE)
Rnorm (n, mean = 0, SD = 1)
//-----------------------------
Dnorm the probability density function value of the normal distribution, i.e. PDF
Dnorm (0,mean = 0, SD = 1.5, log = FALSE)
0.2659615
Dnorm (0,mean = 0, SD = 1.0, log = FALSE)
0.3989423
Dnorm (0,mean = 0, SD =. 5, log = FALSE)
0.7978846
//-------------------------------
Pnorm the probability distribution function of the normal distribution, which is the CDF following calculation 3σ
Pnorm (1, mean = 0, SD = 1, log = False)-Pnorm ( -1, mean = 0, SD = 1, log = False)
0.6826895
Pnorm (2, mean = 0, SD = 1, log = False)-Pnorm ( -2, mean = 0, SD = 1, log = False)
0.9544997
Pnorm (3, mean = 0, SD = 1, log = False)-Pnorm ( -3, mean = 0, SD = 1, log = False)
0.9973002
//-----------------------------------
Qnorm the inverse function of the probability distribution function of normal distribution and finding the quantile based on the probability distribution
Qnorm (0.0026998/2+0.997302, mean = 0, SD = 1, log = FALSE)
3.000406
Qnorm (0.0026998/2, mean = 0, SD = 1, log = FALSE)
-3
//-------------------------------------
Random variable generation function of Rnorm normal distribution
A.random <-rnorm (mean = 0, SD = 1)
A.random <-Sort (a.random)
Pnorm (a.random,0,1)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.