Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bin_1_val = np.repeat(np.arange(0, a_max + 1)[None, :], (a_max - a_min + 1), axis=0)
- bin_1_ns = np.arange(a_min, a_max + 1)
- bin_1_ps = np.full_like(np.zeros((a_max - a_min + 1, 1)), p1)
- bin_1_prob = binom.pmf(bin_1_val, bin_1_ns[:, None], bin_1_ps)
- bin_2_val = np.repeat(np.arange(0, b_max + 1)[None, :], (b_max - b_min + 1), axis=0)
- bin_2_ns = np.arange(b_min, b_max + 1)
- bin_2_ps = np.full_like(np.zeros((b_max - b_min + 1, 1)), p2)
- bin_2_prob = binom.pmf(bin_2_val, bin_2_ns[:, None], bin_2_ps)
- c_probs = scipy.signal.convolve(bin_1_prob[:, :, None], bin_2_prob[:, None, :])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement