## Hao is playing a video game.

On the one hand, suppose there exists an hint for each movement. The probability that the hint is “to shot” is $p_1$. When the hint is “to shot” and the actual best movement is “to shot” with a probability of $p_2$. That if the hint does not imply him to shot but the real best movement is “to shot” has a probability of $p_3$.

On the other hand, the probability that Hao sees the hint is $p_4$. If he sees the hint then he will always shot, and if not then he will not shot. If he misses the hint then Hao will flip a fair coin to decide whether or not to shot.

## Interpret

• Event A: the hint is “shot”.
• $P(A)=p_1$
• $P(A^C)=1-p_1$ (the hint is “not shot”)
• Event B: actually the best movement is “to shot”.
• $P(B)=P((B\cap A)\cup(B\cap A^C))$
• $=P(B\mid A)\cdot P(A)+P(B\mid A^C)\cdot P(A^C)$
• $=p_2\cdot p_1+p_3\cdot (1-p_1)$
• $=p_1p_2-p_1p_3+p_3$
• $P(B^C)=P((B^C\cap A)\cup(B^C\cap A^C))$
• $=P(B^C\mid A)\cdot P(A)+P(B^C\mid A^C)\cdot P(A^C)$
• $=(1-p_2)\cdot p_1+(1-p_3)\cdot (1-p_1)$
• $=1-p_1p_2+p_1p_3-p_3$
• (Event $B^C$: actually the best movement is “not to shot”.)
• Validation:
• $P(B)+P(B^C)$
• $=(p_1p_2-p_1p_3+p_3)+(1-p_1p_2+p_1p_3-p_3)$
• $=1$
• Event C: Hao sees the hint.
• $P(C)=p_4$
• $P(C^C)=1-p_4$ (Hao doesn’t see the hint)
• Event D: flipping a fair coin:
• $P(D)=P(D^C)=\frac{1}{2}$
• Event E: Hao does shot.
• $P(E)=P((E\cap C)\cup(E\cap C^C))$
• $=P(E\mid C)\cdot P(C)+P(E\mid C^C)\cdot P(C^C)$
• $=1\cdot P(A)\cdot P(C)+P(D)\cdot P(C^C)$
• $=p_1p_4+\frac{1}{2}(1-p_4)$
• $P(E^C)=P((E^C\cap C)\cup(E^C\cap C^C))$
• $=P(E^C\mid C)\cdot P(C)+P(E^C\mid C^C)\cdot P(C^C)$
• $=1\cdot P(A^C)\cdot P(C)+P(D^C)\cdot P(C^C)$
• $=(1-p_1)p_4+\frac{1}{2}(1-p_4)$
• $=\frac{1}{2}+\frac{1}{2}p_4-p_1p_4$
• (Event $E^C$: Hao does not shot.)
• Validation:
• $P(E)+P(E^C)$
• $=(p_1p_4+\frac{1}{2}-\frac{1}{2}p_4)+(\frac{1}{2}+\frac{1}{2}p_4-p_1p_4)$
• $=1$

## Q1

In one move, Hao misses the hint and he do one kind of action. Whatever it is, the real best movement is “to shot”. What is the probability of the hint being “to shot”?

$\because$ Event $C,C^C$ are independent of both Event A and B.
$\therefore P(A\mid (C^C\cap B))=\cfrac{P(A\cap B\cap C^C)}{P(B\cap C^C)}$
$=\cfrac{P(C^C)P(A\cap B)}{P(C^C)P(B)}$
$=\cfrac{P(B\cap A)}{P(B)}$
$=\cfrac{P(B\mid A)P(A)}{P(B)}$
$=\cfrac{p_2p_1}{p_1p_2-p_1p_3+p_3}$

## Q2

Are events $A^C$ and $E$ independent?

$P(A^C\cap E)=P((A^C\cap E\cap C)\cup (A^C\cap E\cap C^C))$
$=P(E\cap A^C\cap C)+(A^C\cap(E\cap C^C))$
$=0+P(A^C)P(C^C)P(D)$
$=(1-p_1)(1-p_4)\frac{1}{2}$
$=\frac{1}{2}-\frac{1}{2}p_1-\frac{1}{2}p_4+p_1p_4$

$P(A^C)P(E)$
$=p_1(\frac{1}{2}+\frac{1}{2}p_4-p_1p_4)$
$=\frac{1}{2}p_1+\frac{1}{2}p_1p_4-p^2_1p_4$

$\because P(A^C\cap E)\ne P(A^C)P(E)$
$\therefore A^C$ and $E$ are dependent.

## Q3

Hao is shooting but the best movement is not to shot. What is the probability that he saw the hint? (AB’ and DB’shown in the figure above are event $A\cap B^C$ and $D\cap B^C$ respectively.)

$P(C\mid E\cap B^C)$
$=\cfrac{P(AB’)}{P(AB’)+P(DB’)}$
$=\cfrac{p_4p_1(1-p_2)}{p_4p_1(1-p_2)+(1-p_4)\cdot\frac{1}{2}\cdot(p_1(1-p_2)+(1-p_1)(1-p_3))}$

## Reference Code

The probability graph was built by R, Rgraphviz and Rstudio.

 Harry Surden. (2015, March 2). Probability Tree Diagrams in R | Harry Surden. Retrieved from http://www.harrysurden.com/wordpress/archives/292

0%