1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Waiting in a lineup

  1. Feb 22, 2014 #1
    1. The problem statement, all variables and given/known data

    There are two queues at a checkout in a grocery store. You are in Q1, behind 2 people (one of them is just starting to be served). Your friend is in Q2, behind 1 person (who just started to be served). The expected service time is \lambda minutes. The service at each checkout is independent, identical, and exponentially distributed.

    (a) What is the expected time until you check out?

    (b) What is the probability that your friend is still waiting when you start to be serviced at the checkout?

    2. Relevant equations

    Mean of exponential distribution is [itex] \frac{1} { \lambda } [\itex], whenever the parameter is \lambda.
    The PDF for an exponential distribution is: p(t) = \lambda e^{-\lambda t}

    The CDF for an exponential distribution is: P(t) = 1 - e^{- \lambda t}

    3. The attempt at a solution

    (a) I think this is [itex]3 \lambda[\itex], because of the memoryless property. Not sure how to formalize this, though.

    (b) I was thinking that I should use the CDF here. Suppose that Q1 is composed of person A and person B. Person A finishes at time s. Person B finishes at time t, t > s. Q2 is composed of person C, who does not finish by time t.

    [tex] Pr ($Q1 done by time $t) = Pr($B done by time $t - s) \cdot \int_0^t {Pr(A done by time s)ds}[\tex]

    And then Pr(our event) = integral over t from 0 to infinity {Pr(Q1 done by time t) Pr(C not done by time t)}

    Using the CDF in all cases. Is this the correct approach?

    P.S. How do I write in Latex on these forums?
    Last edited: Feb 22, 2014
  2. jcsd
  3. Feb 22, 2014 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

  4. Feb 22, 2014 #3

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    It is weird that you use ##\lambda## for the mean; the usual convention is to use ##\lambda## as a rate, so the mean is ##1/ \lambda##. However, if that is what your book or your prof. wrote then you are stuck with it.

    For (a) there is nothing much to formalize: it is a fact that ##E \sum_i X_i = \sum_i E X_i##, whether or not the ##X_i## are independent or identically distributed. The only thing you need worry about is whether all ##E X_i## are equal to ##\lambda##, or whether there is something special about the customer currently being served (as compared with the other, as-yet-unserved customers).

    For (b): what is the probability that the leading customer (i.e., the one currently in service) in your line finishes before the leading customer in your friend's line? Remember, all service times are iid and exponential. Now, if the leading customer in your line finishes first, you are back to a situation where both you and your friend are next in line. Of course, the customers in front of you both in your respective lines will have completed different amounts of service, but does that really matter in this problem?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted