09 Worked example finding area under density curves#

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

khanacademy

Worked example finding area under density curves fig 1Worked example finding area under density curves fig 2

x = Series(25 * [1] + 50 * [2] + 75 * [3])
x.plot(kind='density', xlim=[0, 3])
<AxesSubplot:ylabel='Density'>
../_images/09 Worked example finding area under density curves_5_1.png
y = Series(2 * [3.5] + 4 * [4] + 4 * [5] + 4 * [6])
x.plot(kind='density')
<AxesSubplot:ylabel='Density'>
../_images/09 Worked example finding area under density curves_6_1.png
# find a way to plot 'em better