06 Probability of sample proportions example#

%%html
<iframe width="700" height="400" src="https://www.youtube.com/embed/BkRJJsHoRdw/" 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

khanacademy

Probability of sample proportions example fig 1Probability of sample proportions example fig 2

n = 160
p = 0.15
mu = p
sigma = np.sqrt(p*(1-p)/n)
1 - stats.norm.cdf(0.10, loc=mu, scale=sigma) # why?
0.9617387497624703