jklein694
10/3/2017 - 3:59 PM

Loop PDF and CDF

Loop PDF and CDF

plot_discrete_pmf(1, 6, 1/6., 6, 'Discrete Uniform Distribution')
plot_discrete_cdf(1, 6, 1./6, 6, 'Discrete Uniform Distribution')

plot_discrete_pmf(0, 1, 0.25, 1, 'Bernoulli unfair coin-flip', stats_dist=stats.bernoulli(0.25))
plot_discrete_cdf(0, 1, 0.25, 1, 'Bernoulli unfair coin-flip', stats_dist=stats.bernoulli(0.25))

plot_discrete_pmf(0, 50, 0.25, 50, 'Binomial 50 unfair coin-flips', stats.binom(50,0.25), lw=8)
plot_discrete_cdf(0, 50, 0.25, 50, 'Binomial 50 unfair coin-flips', stats.binom(50,0.25))

plot_discrete_pmf(0, 50, 4./52., dist_name='Geometric, failures until king drawn', stats_dist=stats.geom(4./52), lw=8)
plot_discrete_cdf(0, 50, 4./52., dist_name='Geometric, failures until king drawn', stats_dist=stats.geom(4./52))

plot_discrete_pmf(0, 100, p=0.05, dist_name='Negative Binomial, count to 3 purchases', 
                  stats_dist=stats.nbinom(3, 0.05), lw=3)
plot_discrete_cdf(0, 100, 0.05, dist_name='Negative Binomial, count to 3 purchases', 
                  stats_dist=stats.nbinom(3, 0.05))
                  
plot_discrete_pmf(0, 50, dist_name='Poisson, rate=25', stats_dist=stats.poisson(25), lw=8)
plot_discrete_cdf(0, 50, dist_name='Poisson, rate=25', stats_dist=stats.poisson(25))

plot_discrete_pmf(0, 52, 0.25, 20, 'Hypergeometric drawing hearts, 52-cards', stats.hypergeom(52,13,20), lw=8)
plot_discrete_cdf(0, 52, 0.25, 20, 'Hypergeometric drawing hearts, 52-cards', stats.hypergeom(52,13,20))