22 Binompdf and binomcdf functions
22 Binompdf and binomcdf functions#
%%html
<iframe width="700" height="400" src="https://www.youtube.com/embed/IngLJs6T1Qw/" frameborder="0" allowfullscreen></iframe>
import numpy as np
import pandas as pd
from pandas import Series, DataFrame
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats, special
k = 4
n = 7
p = 0.35
stats.binom.pmf(k, n, p) # why is not there pdf?
0.14423819921874995
stats.binom.cdf(k, n, p)
0.9443924648437501