Last active
June 5, 2018 11:52
-
-
Save seantalts/f5b5ca3ccf37488316a8fd80cc99b9b1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
cdf = function(x, pdf) { | |
sapply(x, function(x) { | |
integrate(pdf, -Inf, x)$value | |
}) | |
} | |
u = cdf(rnorm(1e5), dnorm) | |
hist(u, breaks=100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment