Facebook Question (Data Science)
Solution 1:
To put it a bit more formally... Let $p_r$ be the prior probability for rain ($p_n\equiv 1-p_r$). Then the probability of rain given 3 "yes" replies $\{y,y,y\}$ is
$$ \mathsf{P}(\text{rain}\mid \{y,y,y\})=\frac{\mathsf{P}(\text{rain}\cap\{y,y,y\})}{\mathsf{P}(\{y,y,y\})} \\ =\frac{\mathsf{P}(\{y,y,y\}\mid\text{rain})\cdot p_r}{\mathsf{P}(\{y,y,y\}\mid\text{rain})\cdot p_r+\mathsf{P}(\{y,y,y\}\mid\text{no rain})\cdot p_n} $$
Next, if we assume conditional independence of friends' replies, the last formula becomes
$$ =\frac{(2/3)^3\cdot p_r}{(2/3)^3\cdot p_r+(1/3)^3\cdot p_n}=\frac{p_r}{p_r+ p_n/8}. $$
Solution 2:
Each of the above analyses fail to assess the logic of the question primarily in their approach. Since all three say it is raining, you cannot approach the solution by determining each friend's propensity for truth. For it not to be raining, they ALL must be lying. Therefore, the solution must be the inverse of the probability that all three are "messing with you." (1/3)x(1/3)x(1/3)=1/27 (3.7% chance they are all lying). Since there is only a 3.7% chance all three friends are messing with you, there is a 96.3% chance it is raining.
Solution 3:
Your arithmetic is wrong, but that's not the worst problem with your method.
Would you apply the same logic if the question was "are there two blue moons in the sky"?
Solution 4:
** Edited **
Assuming prior possibility of raining on any day is 0.25, P(raining given all three say yes) can be calculated using Bayes theorem
i.e. P(R|YYY) = P(R)*P(YYY|R)/P(YYY)
P(YYY) = all tell truth when raining + all lie when not raining = 0.25 * (2/3)^3 + 0.75 * (1/3)^3
P(R|YYY) = 0.25 * (2/3)^3 / (0.25 * (2/3)^3 + 0.75 * (1/3)^3) = 8 / (8 + 3) = 8/11