All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Analyzing LOTTO (Posted on 2013-03-28) Difficulty: 4 of 5
Let us denote by S the set of 6 integers (their inclusive range being 1 to 37) drawn at random in a weekly lottery.

Given Sord= (m1, m2 ,m3 ,m4, m5, m6 ) , where the said integers are placed in increasing order, please answer the following questions:

a) What is the expected value of m1?
b) What is the expected value of m6?
c) If your "guess set" consists of 6 distinct integers, chosen randomly within the defined range, what is the expected quantity of numbers in this set that match the drawing's results?

Please resolve analytically and then compare your answers with the results of a simulation, based on at least 100,000 independent drawings.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution No Subject | Comment 2 of 6 |

For any of the expected values, we need to multiply each value by the probability that that value will occur, then add all the products.

In each probability, the number of total combinations of 37 items chosen 6 at a time (i.e., C(37,6)) will come up as the denominator of the probability fractions.

In the case of the lowest chosen number, m1, the number of ways of a given value being the lowest number is C(37-m,5) as the other five numbers need to be drawn from a pool of 37-m numbers that are higher than m, and the expected value is Sum{m=1 to 32}(m*C(37-m,5)/C(37,6)).

In the case of the highest chosen number, m6, the number of ways of a given value being the highest number is C(m-1,5) as the other five numbers need to be drawn from a pool of m-1 numbers that are lower than m, and the expected value is Sum{m=6 to 37}(m*C(m-1,5)/C(37,6)).

The probability of a given number of matches of numbers between your ticket and the winning drawing set is given by:

as C(6,n) possibilities exist for which n numbers on your card match a winner, and the remaining drawn 6-n numbers must come from a pool of numbers not on your card, and that is 37-6=31.

When these computations are done, the answers are:

a) 38/7 ~= 5.4285714285714285713
b) 228/7 ~= 32.5714285714285714285 (these two add up to 38)
c) 36/37 ~= 0.9729729729729729729

The computations were done by:

    5   All=combi(37,6):Expval=0
   10   for M1=1 to 32
   20      Expval=Expval+M1*combi(37-M1,5)//All
   30   next
   40   print Expval,Expval/1
  105   All=combi(37,6):Expval=0
  110   for M6=6 to 37
  120      Expval=Expval+M6*combi(M6-1,5)//All
  130   next
  140   print Expval,Expval/1
  205   All=combi(37,6):Expval=0
  210   for Match=0 to 6
  220      Expval=Expval+Match*combi(6,Match)*combi(37-6,6-Match)//All
  230      print combi(6,Match)*combi(37-6,6-Match)/All:Cu=Cu+combi(6,Match)*combi(37-6,6-Match)/All
  240   next
  245   print Cu
  250   print Expval,Expval/1
A million trials gave these averages in a simulation:

5.430902      32.570788     .972381


FOR tr = 1 TO 1000000
  REDIM used(37): lowest = 99: highest = 0: matches = 0
  FOR i = 1 TO 6
    n = INT(RND(1) * 37 + 1)
   LOOP UNTIL used(n) = 0
   used(n) = 1
   IF n < lowest THEN lowest = n
   IF n > highest THEN highest = n
   IF n < 7 THEN matches = matches + 1
  lowtot = lowtot + lowest: hightot = hightot + highest
  matchtot = matchtot + matches
  IF tr MOD 1000 = 0 THEN
    PRINT lowtot / tr, hightot / tr, matchtot / tr

The matches in the random set were as against the set {1,2,3,4,5,6} as any lotto card set is as good as any other.

  Posted by Charlie on 2013-03-28 19:14:21
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (5)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information