14 Example - Analyzing the difference in distributions#

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

khanacademy

Example - Analyzing the difference in distributions fig 1

mu_m = 178
sigma_m = 8 
mu_w = 170
sigma_w = 6
mu_d = mu_m - mu_w
sigma_d_sq = sigma_m ** 2 + sigma_w ** 2
sigma_d = np.sqrt(sigma_d_sq)
sigma_d
10.0
z_score_0 = (0 - mu_d) / sigma_d
z_score_0
-0.8
stats.norm.cdf(z_score_0)
0.2118553985833967