Skip to content

Instantly share code, notes, and snippets.

@keithmcnulty
Created June 10, 2021 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keithmcnulty/b1dce511bc1611cbf0220dbd734a27ec to your computer and use it in GitHub Desktop.
Save keithmcnulty/b1dce511bc1611cbf0220dbd734a27ec to your computer and use it in GitHub Desktop.
Additive process distribution
library(ggplot2)
set.seed(123)
add <- replicate(10000, sum(runif(10)))
ggplot() +
geom_histogram(aes(x = add, y = ..density..), fill = "lightblue") +
geom_density(aes(x = add), fill = "pink", alpha = 0.4) +
theme_minimal() +
labs(x = "Sum")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment