Bob goes to a party, wearing a hat that fits him well. At the end of the party, Bob picks up a hat, without looking at it. He knows that the hat he has picked is his own with probability p. As a first check to see if he has picked up his own hat, he tries the hat, and if it fits, he decides that it is his own hat. However, even if the hat picked by Bob is not his own, it is still possible that it fits with probability q.

Given that Bob picked a hat that fits him, what is the probability that he is correct in deciding that the hat is indeed his own?

(1-p)*q/(p+(1-p)*q)

^ shouldnt the numerator be p not (1-p)*q?? Bayes rule?

I am not sure... i did it with Conditional Probability formula

what is the correct answer?

(1-q)*p/((1-q)*p+(1-p)*q)

so many answers :(

To find the probability that Bob is correct in deciding that the hat he picked is his own, given that it fits him, we can use conditional probability.

Let's break down the problem step by step:

1. Define the events:
- A: The hat Bob picked is his own.
- B: The picked hat fits Bob.

2. We want to find the conditional probability of A happening given that B has happened, denoted as P(A|B).

3. The probability that Bob picked his own hat is given as p. So, P(A) = p.

4. The probability that the hat Bob picked is not his own (i.e., someone else's hat) but still fits him is given as q. So, P(B|A') = q, where A' represents the event that the hat Bob picked is not his own.

5. We know that the hat Bob picked fits him, so the event B can only happen in two ways: either Bob picked his own hat and it fits (event A ∩ B) or Bob picked someone else's hat and it fits (event A' ∩ B).

6. We can use the law of total probability to express event B as the sum of the two mutually exclusive events A ∩ B and A' ∩ B:
P(B) = P(A ∩ B) + P(A' ∩ B)

7. Using the definition of conditional probability, we can rewrite P(A' ∩ B) as P(B|A') * P(A'). Since Bob hasn't determined whether the hat is his own or not yet, P(A') = 1 - p (probability that the hat is not his own).
So, P(A' ∩ B) = P(B|A') * P(A') = q * (1 - p)

8. Now, we have the expression for P(B) as:
P(B) = P(A ∩ B) + P(A' ∩ B)
= P(B|A) * P(A) + P(B|A') * P(A')
= p + q * (1 - p)

9. We want to find P(A|B), which is the probability that the hat Bob picked is his own given that it fits him. Using Bayes' theorem, we have:
P(A|B) = (P(B|A) * P(A)) / P(B)
= (p) / (p + q * (1 - p))

Therefore, the probability that Bob is correct in deciding that the hat he picked is indeed his own, given that it fits him, is p / (p + q * (1 - p)).