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 . 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 . 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?

To solve this problem, we can use Bayes' theorem. Let's define the events:

A: Bob picks a hat that fits him (as given in the problem)
B: Bob's hat is his own (what we want to find the probability of)

We are given the probability P(A|B) = , which is the probability that Bob picks a hat that fits him given that the hat is indeed his own. We need to find P(B|A), which is the probability that Bob's hat is his own given that he picks a hat that fits him.

Using Bayes' theorem, we have:

P(B|A) = (P(A|B) * P(B)) / P(A)

In this case, P(B) is the probability that Bob's hat is his own without any additional information. Since there are a total of hats, the probability that Bob's hat is his own is 1/.

Now, P(A) is the probability that Bob picks a hat that fits him. This can happen in two cases: either he picks his own hat (probability P(A|B) = ), or he picks someone else's hat but it still fits him (probability P(A|~B) = ). Therefore, we can calculate P(A) as:

P(A) = P(A|B) * P(B) + P(A|~B) * P(~B)
= * + * (1/)

Now, substituting these values into Bayes' theorem, we have:

P(B|A) = ( * * ) / ( * + * (1/))

Simplifying the expression gives us the probability that Bob is correct in deciding that the hat is indeed his own given that it fits him.