-
-
Save keithmcnulty/0c3883478442118e308bf5b5a9e83b4e to your computer and use it in GitHub Desktop.
Log 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 = log(mult), y = ..density..), fill = "lightblue") + | |
geom_density(aes(x = log(mult)), fill = "pink", alpha = 0.4) + | |
theme_minimal() + | |
labs(x = "Log of Product") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment