# Probability - Girl visiting local pubs

#### Robin04

Problem Statement
A girl spends M hours daily (out of 24) in local pubs. The town has N pubs but she doesn't have a preference so she can be found in any of them with an equal chance. We start looking for her. After checking N-1 pubs we still haven't found her. What's the probability that she's in the last one?
Relevant Equations
-
What I can't understand from the problem is that whether she stays at a certain pub for M hours, or she visits more pubs and goes home after M hours.

If it's the first case, then I think the answer is $\frac{M}{24}\frac{1}{N}$.

This problem is posted as a harder one so I suppose it has to be the second case but I don't see where does this make the answer more complicated.

Related Precalculus Mathematics Homework News on Phys.org

#### Mark44

Mentor
Problem Statement: A girl spends M hours daily (out of 24) in local pubs. The town has N pubs but she doesn't have a preference so she can be found in any of them with an equal chance. We start looking for her. After checking N-1 pubs we still haven't found her. What's the probability that she's in the last one?
Relevant Equations: -

What I can't understand from the problem is that whether she stays at a certain pub for M hours, or she visits more pubs and goes home after M hours.
I read this as saying she spends a total of M hours in all the pubs, not M hours in any single pub.
Robin04 said:
If it's the first case, then I think the answer is $\frac{M}{24}\frac{1}{N}$.

This problem is posted as a harder one so I suppose it has to be the second case but I don't see where does this make the answer more complicated.

#### Robin04

I read this as saying she spends a total of M hours in all the pubs, not M hours in any single pub.
So she spends $\frac{M}{N}$ hours in each meaning the answer is $\frac{M}{24*N}\frac{1}{N}$?

#### Mark44

Mentor
I haven't worked the problem, but it seems to me that you need to use a conditional probability; namely, the probability that she's in the last pub, given that she is not in any of the other N-1 pubs.

#### RPinPA

Homework Helper
It doesn't say how long the search is taking either. But I think at least you have to consider the possibility that the M hours may have already expired when you're searching, and she's already gone home. Or that she might not have gone out yet.

Because if the assumption is that she is guaranteed to still be in one of the N pubs and she isn't in the first N - 1, then the conditional probability of being in the last one is obviously 1.

So the amount of time by which your search is overlapping her pub-hopping is a random variable.

#### Robin04

The way I interpreted the text is that in this model the search doesn't take time, so basically we can say that momentarily the girl is in neither of the N-1 pubs, so she must be in the last one or she's not in any of the pubs. Or it's more complicated?

#### lomidrevo

Well the problem could be stated in a more clear way apparently.
But I assume that we can interpret the statement "A girl spends M hours daily (out of 24) in local pubs" like this:
(at any moment) the probability that we find the girl in any of the local pubs is $\frac{M}{24}$.

Let's define event $i$ as the girl is sitting in the $i$-th bar, where $i = 1, 2, ..., N$. Thus
$$P(1 \cup 2 \cup ... \cup N) = \frac{M}{24}$$

From here, it cannot be any easier to find the result (just realizing that the events are disjoint)

Last edited:

#### Robin04

Well the problem could be stated in a more clear way apparently.
But I assume that we can interpret the statement "A girl spends M hours daily (out of 24) in local pubs" like this:
(at any moment) the probability that we find the girl in any of the local pubs is $\frac{M}{24}$.

Let's define event $i$ as the girl is sitting in the $i$-th bar, where $i = 1, 2, ..., N$. Thus
$$P(1 \cup 2 \cup ... \cup N) = \frac{M}{24}$$

From here, it cannot be any easier to find the result (just realizing that the events are disjoint)
So given that the events are disjoint: $P(1 \cup ... \cup N) = P(1) + ... + P(N)$, and also $P(1)=...=P(N)$, because
she doesn't have a preference so she can be found in any of them with an equal chance.
We're looking for $P(N) = \frac{M}{24}-\frac{N-1}{N}\frac{M}{24} = \frac{M}{24}(1-\frac{N-1}{N}) = \frac{1}{N}\frac{M}{24}$

Is it really this simple? This exercise is worth a lot a points in my assignement.

#### lomidrevo

So given that the events are disjoint: P(1∪...∪N)=P(1)+...+P(N)
Correct.

and also P(1)=...=P(N),
That is generally true, but you have an additional info to work with: you already checked bars $i = 1,2,...N-1$ and she wasn't there... So what is the probability of finding her in the last bar, when you know that $P(1 \cup 2 \cup ... \cup N) = \frac{M}{24}$ must hold?

#### Robin04

Correct.

That is generally true, but you have an additional info to work with: you already checked bars $i = 1,2,...N-1$ and she wasn't there... So what is the probability of finding her in the last bar, when you know that $P(1 \cup 2 \cup ... \cup N) = \frac{M}{24}$ must hold?
Oh, so $P(1)=P(2)=...=P(N-1)=0$ as it's known that she's not there and then $P(N)=\frac{M}{24}$?

#### lomidrevo

Exactly! It may look surprising at the first glance that the result doesn't depend on $N$, but when you think about more deeply, it make sense.

#### PeroK

Homework Helper
Gold Member
2018 Award
Exactly! It may look surprising at the first glance that the result doesn't depend on $N$, but when you think about more deeply, it make sense.
No, that's not correct. Let's put in some numbers and look at the frequencies. Assume that $M = 4$ and $N = 4$, say.

You decide to look for her at a certain time. There is a probablity of $1/6$ that she is in a pub somewhere and $5/6$ that she is at home.

As she is equally likely to be in each pub, there is a probablity of $1/24$ that she is in each pub.

Now, run the experiment $24$ times. We can ignore the $3$ cases where she is found in one of the first three pubs and concentrate on the cases where she is not.

There are $20$ times that she will not be found in any pub and $1$ time that she will be found in the last pub. So, in $21/24$ cases she will not be in any of the first three pubs. And, in only one of these cases will she be found in the last pub.

The conditional probablity of finding her in the last pub, given she is not in one of the first three is, therefore, $1/21$.

I know that this gives the answer to the OP, but you have totally led him astray, so we needed to get this post back onto the right lines.

#### PeroK

Homework Helper
Gold Member
2018 Award
Oh, so $P(1)=P(2)=...=P(N-1)=0$ as it's known that she's not there and then $P(N)=\frac{M}{24}$?
No, you've been completely led astray by @lomidrevo.

You must use the techniques of calculating conditional probabilities. I prefer the frequency/probability tree approach described above.

#### lomidrevo

No, that's not correct. Let's put in some numbers and look at the frequencies. Assume that $M = 4$ and $N = 4$, say.

You decide to look for her at a certain time. There is a probablity of $1/6$ that she is in a pub somewhere and $5/6$ that she is at home.

As she is equally likely to be in each pub, there is a probablity of $1/24$ that she is in each pub.

Now, run the experiment $24$ times. We can ignore the $3$ cases where she is found in one of the first three pubs and concentrate on the cases where she is not.

There are $20$ times that she will not be found in any pub and $1$ time that she will be found in the last pub. So, in $21/24$ cases she will not be in any of the first three pubs. And, in only one of these cases will she be found in the last pub.

The conditional probablity of finding her in the last pub, given she is not in one of the first three is, therefore, $1/21$.

I know that this gives the answer to the OP, but you have totally led him astray, so we needed to get this post back onto the right lines.
Oh gosh, you are probably right... your counting looks very convincingly. Due to my oversimplified strategy I didn't exclude the cases when she is found in some of the first N-1 bars.

I have one supplementary question:
In your approach (during all 24 trials), are you visiting the bars always in the same order? I.e. you have (implicitly) labeled them $1, 2, 3, 4$ and the bar $4$ is always the last one to check. Correct?
Does it make any difference when during each trial you visit the bars in a random order?
My guess would be that it does not matter, as the trials are independent, but I am not sure.

#### PeroK

Homework Helper
Gold Member
2018 Award
Oh gosh, you are probably right... your counting looks very convincingly. Due to my oversimplified strategy I didn't exclude the cases when she is found in some of the first N-1 bars.

I have one supplementary question:
In your approach (during all 24 trials), are you visiting the bars always in the same order? I.e. you have (implicitly) labeled them $1, 2, 3, 4$ and the bar $4$ is always the last one to check. Correct?
Does it make any difference when during each trial you visit the bars in a random order?
My guess would be that it does not matter, as the trials are independent, but I am not sure.
If we imagine that the girl is at home $20$ times and in each of the pubs $1$ time out of a typical set of 24 trials.

Before we do anything the probability she is in pub 4 is $1/24$. If we look in pub 1 and she is not there, then that excludes that case, leaving all remaining 23 cases unchanged. Now, there is a $1/23$ probability she is in each of the remaining pubs 2-4. If we then look in a second pub and she is not there, that rules out that case. Then, there would be a probability of $1/22$ that she is in each of the remaining pubs 3-4. And, finally, if we look in pub 3 and she is not there, then the probability she is in pub 4 is $1/21$.

Note that the probability of all the other options increases each time we eliminate one option.

A second way to look at it is that before we do anything there is a $1/6$ chance that she is in a pub. But, each time we check a pub and find she is not there the probability she is in a pub reduces. After looking in the first pub, the probability has reduced to $3/23$, then $2/22$ and eventually $1/21$. In other words, after we have looked in three pubs and not found her there is significantly less chance that she is in a pub somewhere.

The way we label the pubs does not matter. It only depends on being a pub not yet looked in.

#### lomidrevo

@Robin04 sorry for misleading you! I should have think about the problem a bit longer before I came out with my naive solution.

@PeroK, thanks a lot for you detailed explanation!

Lesson for me: Don't refuse the conditional probability just because the events seems to be disjoint at first glance. (Events "girl not sitting in bar 1, 2 or 3" and "girl sitting in bar 4" are definitively not disjoint!)

#### Robin04

Okay, I'm a bit confused now but I'll try. So we're looking for P(she's in the Nth pub| she's not in any other pub) = P(she's in the Nth pub and she's not in any other pub)/P(she's not in any other pub)

P(she's in the Nth pub and she's not in any other pub) = $\frac{M}{24}\frac{1}{N}$
P(she's not in any other pub) = $1-\frac{M}{24} + \frac{M}{24}\frac{1}{N}$

Maybe?

#### PeroK

Homework Helper
Gold Member
2018 Award
Okay, I'm a bit confused now but I'll try. So we're looking for P(she's in the Nth pub| she's not in any other pub) = P(she's in the Nth pub and she's not in any other pub)/P(she's not in any other pub)

P(she's in the Nth pub and she's not in any other pub) = $\frac{M}{24}\frac{1}{N}$
P(she's not in any other pub) = $1-\frac{M}{24} + \frac{M}{24}\frac{1}{N}$

Maybe?
Yes, those look correct. You could also look up Bayes's Theorem.

#### Robin04

Yes, those look correct. You could also look up Bayes's Theorem.
Thank you very much! So the answer is $\frac{\frac{M}{24N}}{1+\frac{M}{24}(\frac{1}{N}-1)}$

#### PeroK

Homework Helper
Gold Member
2018 Award
Thank you very much! So the answer is $\frac{\frac{M}{24N}}{1+\frac{M}{24}(\frac{1}{N}-1)}$
I think you've mixed up a minus sign.

If you plug in $M = N = 4$ you should get $1/21$.

#### Robin04

I think you've mixed up a minus sign.

If you plug in $M = N = 4$ you should get $1/21$.
I don't get 1/21 with any change of sign. I must have made some other mistake.

#### PeroK

Homework Helper
Gold Member
2018 Award
I don't get 1/21 with any change of sign. I must have made some other mistake.
Sorry, I misread it. Try plugging in $N = M = 4$ to what you have. To be honest, you should have done that in any case!

#### Robin04

Sorry, I misread it. Try plugging in $N = M = 4$ to what you have. To be honest, you should have done that in any case!
Oh wait, I mistyped it in my calculator, it's 1/21 for N=M=4. Thank you very much! :)

#### PeroK

Homework Helper
Gold Member
2018 Award
Oh wait, I mistyped it in my calculator, it's 1/21 for N=M=4. Thank you very much! :)
You can go and have a drink at the local pub now!

#### Robin04

You can go and have a drink at the local pub now!
Haha, at least now there's a formula that can help in finding me!

"Probability - Girl visiting local pubs"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving