What distribution to use for a 'lavatorial' problem?

  • I
  • Thread starter lavoisier
  • Start date
  • #1
177
24

Main Question or Discussion Point

Suppose you have a lavatory with 4 cubicles, in a company that has 30 employees using that lavatory.
Knowing that on average an employee spends 10 minutes in the cubicle, what is the probability that, at any given time, 0, 1, 2, 3 or 4 cubicles are in use? And what would be the average waiting time, if any?

I thought this would be a Poisson distribution situation, but then I'm not really sure it is the case, because if I'm not mistaken Poisson has no upper limit for the number of events, whereas here we can have at most 4 cubicles in use. And I thought with Poisson you needed to specify an interval of time: here I wouldn't know how to describe 'any given time'.

How would you go about tackling this?
Is this a known type of problem (I guess it would apply to supermarkets, post offices, etc...)?

Thanks!
L
 

Answers and Replies

  • #2
806
23
Assuming that the time the time spent in the cubicle is exponential, then this is an M/M/4 queue, with arrivals as a Poisson process with rate ##\lambda##, and service time exponentially distributed with rate ##1/10##.

I'm in a rush right now, so I can't work out a complete solution, but your problem is part of a field called queuing theory. You can read more about your specific problem here: https://en.wikipedia.org/wiki/M/M/c_queue
 
  • #3
mathman
Science Advisor
7,767
417
The distribution for the number of employees wanting to use the lavatory is binomial. One major piece of information needed is how often an employee needs to go.
 
  • #4
177
24
Thank you both! Very interesting.
Surprising how complicated (at least from my point of view as a non-mathematician) the solution of an apparently simple problem can be.
I see there's an R package that handles this kind of problem; I'll give it a go if I find the time.
 
  • #5
806
23
To expand on my previous answer, that fact that you have a finite population (30 employees) makes your problem slightly (but only slightly) more complicated. Your problem is called an M/M/c/K/C = M/M/4/26/30 queue, which means
M = Poisson process arrivals
M = Exponential service times
4 = Number of "service counters" (lavatories)
26 = Number of places in line (there is no size limit for the line, so it's just 30 - 4 lavatories to accommodate everyone)
30 = Population size

I believe the queueing package in R can handle these kinds of problems.
 
Last edited:
  • #6
177
24
I still had no time to try the R thing, sorry.

A simpler (I hope) version of my original question would be: suppose there is a room where people come and go all the time.
30 people frequent this room, they spend on average 10 minutes a day in it, and they go to the room on average 5 times a day.
What is the probability that, looking inside the room at any given time, you find 0, 1, 2, ..., 30 people?

Is it the same kind of problem, or does the fact that I removed the number of cubicles and the queueing change everything?

Tx
L
 
  • #7
34,048
9,898
If you remove the cubicles (or make 30 cubicles), you change the whole analysis.

How long is a day? 8 working hours, or 24 hours?
How are those 5 visits distributed?
Are the visits of different persons independent of each other?

If the distribution is reasonably uniform, we can ignore the discrete nature of the visits and just assume that finding a person at a given time is (total time spent there)/(total time), e. g. 1/(6*8) or 1/(6*24).
The distribution is then a binomial distribution with this probability as p, and n=30. You can approximate it as Poisson-distribution if you like.
 

Related Threads on What distribution to use for a 'lavatorial' problem?

  • Last Post
Replies
4
Views
2K
Replies
1
Views
2K
Replies
2
Views
1K
Replies
2
Views
6K
Replies
16
Views
2K
Replies
2
Views
6K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
4
Views
2K
Top