# Normal Random Samples

Example Data | 244 | 238 | 1 |

Help | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

## The Normal Distribution## DescriptionDensity, distribution function, quantile function and random
generation for the normal distribution with mean equal to ## Usagednorm(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) ## Arguments
## DetailsIf The normal distribution has density
where ## Value
The length of the result is determined by The numerical arguments other than For ## SourceFor Cody, W. D. (1993)
Algorithm 715: SPECFUN – A portable FORTRAN package of special
function routines and test drivers.
For Wichura, M. J. (1988)
Algorithm AS 241: The percentage points of the normal distribution.
which provides precise results up to about 16 digits. For ## ReferencesBecker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
Johnson, N. L., Kotz, S. and Balakrishnan, N. (1995)
## Examplesrequire(graphics) dnorm(0) == 1/sqrt(2*pi) dnorm(1) == exp(-1/2)/sqrt(2*pi) dnorm(1) == 1/sqrt(2*pi*exp(1)) ## Using "log = TRUE" for an extended range : par(mfrow = c(2,1)) plot(function(x) dnorm(x, log = TRUE), -60, 50, main = "log { Normal density }") curve(log(dnorm(x)), add = TRUE, col = "red", lwd = 2) mtext("dnorm(x, log=TRUE)", adj = 0) mtext("log(dnorm(x))", col = "red", adj = 1) plot(function(x) pnorm(x, log.p = TRUE), -50, 10, main = "log { Normal Cumulative }") curve(log(pnorm(x)), add = TRUE, col = "red", lwd = 2) mtext("pnorm(x, log=TRUE)", adj = 0) mtext("log(pnorm(x))", col = "red", adj = 1) ## if you want the so-called 'error function' erf <- function(x) 2 * pnorm(x * sqrt(2)) - 1 ## (see Abramowitz and Stegun 29.2.29) ## and the so-called 'complementary error function' erfc <- function(x) 2 * pnorm(x * sqrt(2), lower = FALSE) ## and the inverses erfinv <- function (x) qnorm((1 + x)/2)/sqrt(2) erfcinv <- function (x) qnorm(x/2, lower = FALSE)/sqrt(2) |

Recent Queries With This Operation |
---|

No queries made on this operation yet. |

Recent Queries | App/Dataset | By | Date |
---|---|---|---|

Picostat Output - Correlation Coefficients | R Dataset / Package wooldridge / crime2 | ikramnajah | October 22, 2020 - 10:15 AM |

Picostat Output - Numerical Summaries | OpenIntro Statistics Dataset - yrbss_samp | pmagunia | August 9, 2020 - 4:03 PM |

Picostat Output - Numerical Summaries | R Dataset / Package boot / acme | User | August 2, 2020 - 4:15 PM |

Picostat Output - Numerical Summaries | R Dataset / Package boot / acme | User | August 2, 2020 - 4:14 PM |

Picostat Output - Numerical Summaries | R Dataset / Package boot / acme | User | August 2, 2020 - 4:14 PM |

#### Pagination

Title | Authored on | Content type |
---|---|---|

R Dataset / Package psych / sat.act | March 9, 2018 - 1:06 PM | Dataset |

R Dataset / Package wooldridge / prison | March 9, 2018 - 1:06 PM | Dataset |

R Dataset / Package wooldridge / voucher | March 9, 2018 - 1:06 PM | Dataset |

R Dataset / Package mi / CHAIN | March 9, 2018 - 1:06 PM | Dataset |

R Dataset / Package KMsurv / rats | March 9, 2018 - 1:06 PM | Dataset |