Assignment - Module 4
01 August 2021
Group 23: Aman Jindal | Yuhang Jiang | Daniel Gabriel Tan | Qining Liu
This is because the two groups have identical count of people. Hence, the division by two.
The third axiom of probability states that, For every finite sequence of n disjoint events $A_1,.....,A_n$, the probability of the union of the events is equal to the summation of their individual properties
The union of two events, $A\cup B$, can be partitioned into three disjoint sets:
Thus, $$P(A\cup B) = P(AB^c) + P(A^cB) + P(AB) \qquad (1)$$
Also because $AB^c$ and $AB$ are disjoint, thus, $$P(A) = P(AB^c) + P(AB) \qquad (2)$$
Similarly, $$P(B) = P(BA^c) + P(AB) \qquad (3)$$
Q.E.D.
x
. y
. Thus,
$$x = \frac{1}{3} + \frac{2}{3}(1-y) \qquad (1)$$$$y = \frac{1}{4} + \frac{3}{4}(1-x) \qquad (2)$$Thus for each person the probability of winning is the sum of the following two components viz.
Thus, on solving $(1)$ and $(2)$ above, we get $x = \frac{2}{3}$ and $y = \frac{1}{2}$
Thus, Probability of Person 2 succeeding first is $\frac{1}{2}$.
Probability of Person 1 succeeding first is $\frac{2}{3}$.
Where,
Probability that exactly k tosses are required is the product of the following:
Thus, $$P(\bar{A}) = \frac{12}{12}*\frac{11}{12}*\text{.....}*\frac{12-n+1}{12} \qquad (1)$$
Thus, $$P(A) = 1- \frac{12}{12}*\frac{11}{12}*\text{.....}*\frac{12-n+1}{12} \qquad (2)$$
Our answer would be the lowest value of n (number of people in the room) for which the probability in $(2)$ becomes greater than 0.5
# Calculating Probability of atleast two people sharing the same birthday for n = 1 to 6
from math import factorial
from pprint import pprint
from numpy import arange
prob_dict = {x: (1- factorial(12)/factorial(12-x)/12**(x)).round(4) for x in arange(1,7)}
print('Probability Table for at least two people having the same birthday month:\n')
pprint(prob_dict, sort_dicts=False)
Probability Table for at least two people having the same birthday month: {1: 0.0, 2: 0.0833, 3: 0.2361, 4: 0.4271, 5: 0.6181, 6: 0.7772}
From the above, we can see that for n = 5 the probability value crosses the threshold of 0.5.
Thus, there should be atleast 5 people in the room to make it possible that atleast two people have the same birth month with a probability of 50%
The End.