# 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 - Boxplot | R Dataset / Package datasets / JohnsonJohnson | huiminlol | June 27, 2020 - 6:47 AM |

Picostat Output - Boxplot | R Dataset / Package datasets / JohnsonJohnson | huiminlol | June 27, 2020 - 6:47 AM |

Picostat Output - Boxplot | R Dataset / Package datasets / JohnsonJohnson | huiminlol | June 27, 2020 - 6:46 AM |

Picostat Output - Median | R Dataset / Package MASS / Sitka89 | jordanjmartins | June 25, 2020 - 2:24 PM |

Picostat Output - Hollow Histogram | R Dataset / Package MASS / Sitka89 | jordanjmartins | June 25, 2020 - 1:57 PM |

#### Pagination

Picostat How-To Article |
---|

Unary and Binary Operations |

The Real Number System |

The Real Number Axioms |

Sets, Relations and Functions |

Sets |

#### Pagination

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

crimtab | February 26, 2017 - 11:28 AM | Dataset |

R Dataset / Package datasets / sunspots | March 9, 2018 - 1:06 PM | Dataset |

Theoph | February 26, 2017 - 11:28 AM | Dataset |

R Dataset / Package DAAG / psid2 | March 9, 2018 - 1:06 PM | Dataset |

R Dataset / Package COUNT / badhealth | March 9, 2018 - 1:06 PM | Dataset |