Created
November 11, 2016 00:38
-
-
Save hrstt/2e374664259d0a6e1e0a03f1a4c2ad7a to your computer and use it in GitHub Desktop.
一様分布の和の平均は正規分布の近似に使える(中心極限定理)
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
sum_runif <- function(x) { | |
a <- runif(n = 1000) | |
if (x <= 1) return(a) | |
else return(a + Recall(x-1)) | |
} | |
hist(sum_runif(5)) | |
hist(sum_runif(1)) | |
hist(sum_runif(10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment