# conditional probability calculation confusion

Suppose I have 3 friends, each of them are independent and each of them have the probability of p to tell the truth about something (e.g. company, weather, stock, etc.).

Suppose something happened (e.g. company is holding a party other than not holding a party, weather is good other than bad, stock is rising other than drop, etc.), I want to calculate what is the probability 2 of them telling truth, and 1 of them telling wrong?

I think the answer is 3*p*p*(1-p), correct?

But what is the probability of something is true, if 2 of the friends telling me truth, but 1 of friends telling me it is not truth?

P (true | T, T, F) = P (T,T,F|true) * P(true) / P(T,T,F)
demominator P (T,T,F) = P(true) * P(T,T,F|true) + P(false) * P (T,T,F|false)
Suppose prior P(true) = 1/2 and P(false) = 1-1/2 = 1/2, then it become
P (T,T,F) = x*3*p*p*1/2 + 1/2*3*p*(1-p)*(1-p)
numerator = x*3*p*p*(1-p)1/2
final result = p


Suppose I consult more friends, but still they have the same ratio telling the true or not, so for 6 friends, 4 of them telling truth and 2 of them telling false The result becomes,

P (true | T,T,T,T,F,F) = P (T,T,T,T,F,F|true) * P(true) / P(T,T,T,T,F,F)
numerator = C(2,6)*1/2*p^4*(1-p)^2
demominator = C(2,6)*1/2*p^4*(1-p)^2 + C(2,6)*1/2*p^2*(1-p)^4
C(2,6) means select 2 from 6, which is 15
final result is p^2 / (p^2 + (1-p)^2)


If I want to compare if asking 3 friends has higher probability of truth, or asking 6 friends, I just need to compare between p and p^2 / (p^2 + (1-p)^2),

I did calcualation, which gets as long as (2p-1)*(p-1) > 0, asking more friends, is better, which result in p<1/2, it seems counter intuitive?

My intuitive is, asking more friends is better if any individual friend has high confidence (p>1/2)? Anything wrong in my calculation?

• This question seems reasonable to me. I am not sure who down-voted it, but it would be helpful if you could give a reason? (+1 to counter-act down vote) – GeoMatt22 Sep 5 '16 at 21:09
• Thanks for the support @GeoMatt22, if you have any comments to my original question, it will be great. :) – Lin Ma Sep 5 '16 at 22:15

## 2 Answers

For the 4 of 6 case to be better than the 2 of 3 case,

$\frac{p^2}{p^2+(1-p)^2}>p$

$p^2>p^3+p\cdot(1-p)^2$

$p>p^2+(1-p)^2\space\space\space\space\space\space\space, p>0$

$0>p^2+(1-p)^2-p$

$0>p^2+1-2p+p^2-p$

$0>(2p-1)\cdot (p-1)\space\space\space$,I think you have the product as > 0

for p < 1, divide by the negative quantity (p-1), meaning the inequality must reverse

$0 < 2p-1$

$p>\frac{1}{2}$

• Thanks MikeP, you rock! Now there is no counter intuitive -- more people I asked, more confidence I have. Do you think prior matters (to make the conclusion if asking more people is better, even if people give yes/no answer with the same ratio)? For prior, I mean probability of good weather, probability of stock rise, etc. – Lin Ma Sep 7 '16 at 5:52
• BTW, Mike, for my first question in the post, I want to calculate what is the probability 2 of them telling truth, and 1 of them telling wrong? I think the answer is 3*p*p*(1-p), correct? – Lin Ma Sep 7 '16 at 6:09
• Yes I agree! 3*p*p*(1-p). Regarding the priors, let me do some algebra and get back to you :) – MikeP Sep 7 '16 at 12:19
• So, in short, yes the a priori probability matters, as usual. For example, instead of just p for P(2T1F) it becomes p P(t) / ( 2 p P(t) - p - P(t) - 1). And P(4T2F) is even worse. I then divided them, but could not reduce it to something nice. I got the increase to be p*(P(t) (2p-1) + p (1-p))/(P(t) (2p-1) + (1-p)^2). Yuck. – MikeP Sep 7 '16 at 16:19
• Nope, sorry I haven't used any of those – MikeP Sep 8 '16 at 12:40

I'm not sure if I'm understanding what you're saying, because of your English and terminology, but it sounds like you're supposing you have $n$ independent binary signals of a single binary event, each of which has probability $p$ of being correct, and you want to compute the probability that the event actually happened. This is equivalent to supposing you have $n$ independent draws from a Bernoulli distribution whose parameter $θ$ is either $p$ or $1 - p$, and you want to estimate $θ$. This formulation makes it obvious what's missing from your scenario: a prior distribution for $θ$. Although we know $θ$ can only have one of two possible values, we need to decide on their relative prior probability in order to get a posterior estimate for $θ$.

So, choose a prior. Let $α ∈ [0, 1]$ such that a priori, $θ$ has probability $α$ to be $p$ and probability $1 - α$ to be $1 - p$. Given the $n$ Bernoulli trials, let $k$ be the observed number of successes. Then by Bayes's theorem,

\begin{align*} &\phantom{=} P(θ = p | X = x) \\ &= \frac{P(X = x | θ = p) P(θ = p)}{P(X = x)} \\ &= \frac{p^k(1 - p)^{n - k} α} {(αp + (1 - α)(1 - p))^k (α(1 - p) + (1 - α)p)^{n - k}}. \end{align*}

• @LinMa $X$ just means the data and $x$ its observed value. "as you can see, even if there are only two possible output from each friend, but the probability of the output of two possible outcome are different under different condition" — Yes, and those two different possible states of the world are captured in the model I described by the two possible values of $θ$. – Kodiologist Sep 6 '16 at 15:03
• "for $θ$ you mean the probability of $p$ to tell the truth?" — No, $θ$ is the probability of each person saying "yes", so it equals $p$ if the correct answer is "yes" and $1 - p$ if the correct answer is "no". – Kodiologist Sep 7 '16 at 15:01
• @LinMa "I think x is a random event for the truth about what happened, for example X=stock rise" — No, $X$ is the random vector representing your friends' statements (1 for "yes", 0 for "no"). "what I want to calculate is…" — Then calculate $P(θ = p | X = x)$, as above. That's the probability the event actually happened, which is what you want. Like I said, $θ$ is $p$ if the correct answer is "yes" (the event happened) and $1 - p$ if the correct answer is "no" (the event didn't happen). – Kodiologist Sep 8 '16 at 14:24
• "I do not see any need to introduce $θ$ to add another level of complexity." — If you can figure out how to solve this problem without a random variable representing whether the event actually happened, be my guest. – Kodiologist Sep 8 '16 at 14:24
• @LinMa I don't know what to tell you. Good luck. – Kodiologist Sep 9 '16 at 14:18