Created
May 25, 2018 12:03
-
-
Save johnmyleswhite/a4ea9aeac99c67afe6dd592a7e7228fe 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
using Distributions | |
using PyPlot | |
ϵ = 0.0001 | |
n_grid = 10_000 | |
ps = linspace(ϵ, 1 - ϵ, n_grid) | |
ss = [std(Bernoulli(p)) for p in ps] | |
sks = [skewness(Bernoulli(p)) for p in ps] | |
pl = plot(ps, ss) | |
xlabel("p") | |
ylabel("Standard Deviation of Bernoulli(p)") | |
pl = plot(ps, sks) | |
xlabel("p") | |
ylabel("Skewness of Bernoulli(p)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment