-
-
Save keithmcnulty/93f21b1e7203bdc342145986b7daa3ba to your computer and use it in GitHub Desktop.
Multiplicative process distribution
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
library(ggplot2) | |
set.seed(123) | |
mult <- replicate(10000, prod(1 + runif(10))) | |
ggplot() + | |
geom_histogram(aes(x = mult, y = ..density..), fill = "lightblue") + | |
geom_density(aes(x = mult), fill = "pink", alpha = 0.4) + | |
theme_minimal() + | |
labs(x = "Product") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment