23 Birthday probability problem#

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

Birthday probability problem fig 1Birthday probability problem fig 2Birthday probability problem fig 3Birthday probability problem fig 4Birthday probability problem fig 5Birthday probability problem fig 6

d = special.perm(365, 30) / (365 ** 30)
1 - d
0.7063162427192686