The `rnorm()` function in R is a convenient way to simulate values from the normal distribution, characterized by a given mean and standard deviation. I hadn’t previously used the associated commands `dnorm()` (normal density function), `pnorm()` (cumulative distribution function), and `qnorm()` (quantile function) before– so I made a simple demo. The `*norm` functions generate results based on a well-behaved normal distribution, while the corresponding functions `density()`, `ecdf()`, and `quantile()` compute empirical values. The following example could be extended to graphically describe departures from normality (or some other distribution– see `rt(), runif(), rcauchy()` etc.) in a data set.

read more

*Related*

To

**leave a comment** for the author, please follow the link and comment on his blog:

** dylan's blog**.

R-bloggers.com offers

**daily e-mail updates** about

R news and

tutorials on topics such as: visualization (

ggplot2,

Boxplots,

maps,

animation), programming (

RStudio,

Sweave,

LaTeX,

SQL,

Eclipse,

git,

hadoop,

Web Scraping) statistics (

regression,

PCA,

time series,

trading) and more...

If you got this far, why not

__subscribe for updates__ from the site? Choose your flavor:

e-mail,

twitter,

RSS, or

facebook...

**Tags:** Dylan