I have this question which is confusing me. I searched a lot to find an explanation but without success, though I am sure that it is a known puzzle and there is someone who asked it before!
We know that, with probability $p$, the person we are looking for lives in a certain $7$-story building. If this person lives in the building, then he is equally likely to live on any of the $7$ floors.
What is the probability that he lives on the $7$th floor of this building?
We explore without success the first $6$ floors. What is the probability now that he lives on the $7$th level?
How to solve this question? Do we need to assume that the probability is equally-likely? Do we take into consideration that the person lives outside the building?
You know
I. $P(\text{In building})=p$
II. $P(\text{Floor 7} | \text{In building})=\dfrac{1}{7}$
For question 1, you are looking for:
$P(\text{Floor 7}) = P(\text{Floor 7} | \text{In building})P(\text{In building})+P(\text{Floor 7} | \overline{\text{In building}})P(\overline{\text{In building}})$
For question $2$ you are finding the same thing, but given the information "the person is not on floors 1 through 6", you know that $P(\text{Floor 7} | \text{In building}) = 1$