You toss four coins.
\[ S = \{(H,H,H,H), (H,H,H,T), (H,H,T,H), (H,H,T,T),\\ (H,T,H,H), (H,T,H,T), (H,T,T,H), (H,T,T,T),\\ (T,H,H,H), (T,H,H,T), (T,H,T,H), (T,H,T,T),\\ (T,T,H,H), (T,T,H,T), (T,T,T,H), (T,T,T,T)\} \]
\[N = 16\]
\[P(O_i) = 1/16\]
\[E = \{(T,T,T,T)\}\]
\[P(E) = \frac{number~of~outcomes~in~A}N = \frac1{16}\]
We apply the multiplication rule because each of the four tosses happens independently.
\[P(E) = P(1st~toss~is~tail)\cdot P(2nd~toss~is~tail)\cdot P(3rd~toss~is~tail)\cdot P(4th~toss~is~tail) = \left(\frac 12\right)^4 = \frac1{16}\]
The complement to “getting all tails” is “not getting all tails”. This is the same to “getting at least one heads”.
\[P(\bar E) = 1 - P(E) = 1-\frac1{16} = \frac{15}{16}\]
By the multiplication rule
\[P(A) = \left(\frac{1}2\right)^3 = \frac{1}8\]
\[P(B) = \left(\frac{1}2\right)^2 = \frac{1}4\]
If both A and B occur, then we will have heads in all rolls.
\[A\cap B=\{(H,H,H,H)\}\]
\[P(A\cap B) = \frac1{16}\]
Since
\[\frac{1}{16} = P(A\cap B)\neq P(A)\cdot P(B)=\frac{1}{32}\]
these events are not independent.
If one of A or B occur then we will have one of the five outcomes
\[A\cup B = \{(H,H,H,T), (H,H,H,H), (H,T,H,H), (T,H,H,H), (T,T,H,H)\}\]
Therefore
\[P(A\cup B) = \frac 5{16}\]
We can also compute this using addition rule:
\[P(A\cup B) = P(A) + P(B) - P(A\cap B) = \frac{1}8+\frac{1}4-\frac{1}{16}=\frac{5}{16}\]
\[P(A|B)=\frac{P(A\cap B)}{P(B)} = \frac{1/16}{1/4}=\frac{1}4\] \[P(B|A)=\frac{P(A\cap B)}{P(A)} = \frac{1/16}{1/8}=\frac{1}2\]
\(P(A|B) = \frac{1}4.\) Given that the last two tosses are heads there is 1/4 chance to get heads in the first three rolls.
Why? Given that the last two tosses are heads you can have one of (H,H,H,H), (H,T,H,H), (T,H,H,H), (T,T,H,H) combinations. Among these four combinations only one gives you the heads in the first three rolls, i.e. (H,H,H,H).
\(P(B|A) = \frac{1}2.\) Given that the first three tosses are heads there is 1/2 chance to get heads in the last two rolls.
Why? Given that the first three tosses are heads you can have one of (H,H,H,H), (H,H,H,T) combinations. Among these two combinations only one gives you the heads in the last two rolls, i.e. (H,H,H,H).
You poll 1000 people and ask 2 questions:
You get the following contingency table (measured in frequencies)
## active not-active
## heart attack 50 30
## no heart attack 550 370
\(P(active \cap attack) = \frac{50}{1000} = 0.05\)
\(P(active) = \frac{50+550}{1000} = 0.6\)
\(P(attack) = \frac{50+30}{1000} = 0.08\)
\(P(attack|active) = \frac{P(active \cap attack) }{P(active)} = \frac{0.05}{0.6} = 0.083333\)
\(P(active|attack) = \frac{P(active \cap attack) }{P(attack)} = \frac{0.05}{0.08}= 0.625\)