Calmcode - birthday problem: calculating

The birthday problem formula.

1 2 3 4 5 6

Here's the code that we're running in the notebook.

import numpy as np
import matplotlib.pylab as plt

def calculate(room = 20):
    return 1 - np.prod((365 - np.arange(room))/365)

plt.plot([calculate(r) for r in range(1, 35)], label="calculated")