In [6]:
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as spst
%matplotlib inline
• segment 1 (p=0.4): Poisson(1)
• segment 2 (p=0.6): Poisson(10)
In [7]:
def composition():
#fill in here
#determin which distribution to sample from
p=0.4
if np.random.rand()