[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1167.0. "Johnny Come Lately" by BLITZN::ROBERTS (Reason, Purpose, Self-esteem) Wed Dec 20 1989 21:30

    A statistical puzzle:

    A DEC rest room has three "johns." The facilities department wants to
    know whether three is enough. Empirical measurement shows that there
    are exactly

    0 "johns" in use 17% of the time,
    1 "john"  in use 30% of the time,
    2 "johns" in use 27% of the time,
    3 "johns" in use 26% of the time.

    Assuming a Poisson distribution, what percentage of the time would more
    than 3 "johns" have been used?

    /Dwayne

T.RTitleUserPersonal
Name
DateLines
1167.1Or remove 2 coffee machinesIOSG::CARLINDick Carlin IOSGThu Dec 21 1989 09:1823
    Let's see, isn't it something like

    	 -a x
    	e  a
    	-----
    	 x!          where a = lambda s

    Substituting,
                   -a
    	(x=0)     e   = .17

                   -a
    	(x=1)     e  a = .30      so a = .30/.17

                   -a 2
    	(x=2)     e  a /2 = .264  (close to .27 so poisson possibly true)

                   -a 3
    	(x=3)     e  a /6 = .156

    so frustrated deccies roughly 11% of the time (1-.17-.30-.264-.156)

    
1167.2My Shot At ItBLITZN::ROBERTSReason, Purpose, Self-esteemThu Dec 21 1989 14:3732
    You can calculate the value of "a" in any of the 3 cases (x=0), (x=1)
    or (x=2).

    (x=0)	e^(-a) = 0.17  ==>  a ~ 1.771957

    (x=1)	e^(-a)*a = 0.30  ==>  a ~ 1.781337

    (x=2)	e^(-a)*a^2/2 = 0.27  ==>  a ~ 1.902038

    plugging each of these values of "a" into the function at (x=3) yields
    three different answers:

    (a=1.771957)	e^(-a)*a^3/6 ~ 0.1576

    (a=1.781337)	e^(-a)*a^3/6 ~ 0.1587

    (a=1.902038)	e^(-a)*a^3/6 ~ 0.1712

    The three different answers arrived at for 4+ johns are

    (1-(.17+.30+.27+.1576)) ~ 0.1024

    (1-(.17+.30+.27+.1587)) ~ 0.1013

    (1-(.17+.30+.27+.1712)) ~ 0.0888

    There is no information that would allow us to prefer any of the three
    estimates of "a". Is the best estimate of "a" the average of the three
    values, 1.818444, which would yield an answer of 0.0974? 

    /Dwayne

1167.3BLITZN::ROBERTSReason, Purpose, Self-esteemFri Dec 22 1989 15:5122
    Another way to approach the problem:

                                                 oo
    Find "a" such that 1 = 0.17 + 0.30 + 0.27 + Sigma( P(x,a) )
                                                x=3
                      x
                     a       -a
    where P(x,a) = ------ * e
                     x!

    The only value of "a" for which this is true is

    a ~ 1.764903	(calculated through "goalseeking")

    P(3,a) ~ 0.156864

    Therefore, the percentage of time more than 3 johns would have been
    required is 100%*(1-(0.17+0.30+0.27+0.156864)) ~ 10.3136%.

    /Dwayne

1167.4The right "a".CADSYS::COOPERTopher CooperFri Dec 22 1989 15:5322
    The "right" way to solve this would be to find the value of "a" which
    would minimize the chi-square statistic.  That is, find "a" which
    minimizes:
    
    		(1/N) SUM(i=0,3){ (E[i] - O[i])^2 /E[i] }
    
    	where:
    
    		O[i] is the observed percentage, and
    		E[i] is exp(-a)*a^i / i!	for i=0,1,2
    		     is 1-SUM(j=0,2){E[j]}	for i=3
    
    I doubt if this would produce a particularly "clean" analytically
    solvable minimization problem, but should be quite solvable in
    reasonable time with simple numerical techniques (e.g., binary search
    or Newton's method).
    
    The lack of a value for N will not effect the position of the minimum,
    but will prevent accurate evaluation of just how reasonable a Poisson
    model is.
    
    					Topher
1167.5the right answer depends on contextPULSAR::WALLYWally Neilsen-SteinhardtFri Dec 22 1989 19:4624
    If this is a practical problem, as described in .0, then "about 10%" is
    probably good enough as an answer.
    
    If this is a real problem, disguised for security, then you might like
    to know that there is a whole discipline called queueing theory which
    addresses problems like this.  It is common in such problems to assume
    that arrivals follow a Poisson distribution, and service times follow
    an exponential distribution.  A number of analytic and approximate
    results have been derived.
    
    Minimizing the sum of ( E[i] - O[i] )^2 / E[i] is suggested in .4, but
    it is also possible and often easier to minimize the sum 
    ( E[i] - O[i] )^2.  I could not find an analytic solution, but I got
    close to a simple quadratic iteration formula before I gave up.
    
    There are various theoretical arguments around minimizing the
    chi-square or least square sum.  In this case, it should make little
    difference, since the E[i] are all of the same magnitude.
    
    If you had a case where the "right" minimization was critical, you
    would probably want to set it up as a decision problem.  Ask yourself 
    what is the loss associated with making an incorrect decision about 
    the number of service stations.  Then minimize that loss function, 
    given the observed data O[i].  
1167.6HUB::ROBERTSReason, Purpose, Self-esteemSat Dec 23 1989 02:348
    Thanks. No, it's not a "real" problem. Just an exercise.
    
    The chi-square approach has been giving me trouble. The answer I get
    just plain doesn't look right. I assume I've made some simple goof and
    I'll find it if I spend some time on it.
    
    /Dwayne