Created
August 28, 2013 13:23
-
-
Save jeroen/6366012 to your computer and use it in GitHub Desktop.
Markdown test with math and figure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Normal Distribution | |
======================= | |
The normal distribution is defined as follows: | |
$$latex | |
f(x;\mu,\sigma^2) = \frac{1}{\sigma\sqrt{2\pi}} e^{ -\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2 } | |
$$ | |
To generate random draws from a normal distribution we use the **rnorm** function: | |
```{r block1} | |
output <- rnorm(1000, 100, 15); | |
``` | |
The normal distribution has the typical bell shape: | |
```{r block2, fig.width=8, fig.height=5} | |
ggplot2::qplot(output) | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment