Question

In: Computer Science

One of the games of the Massachusetts Lottery is the daily numbers.  Four digits (0 - 9)...

One of the games of the Massachusetts Lottery is the daily numbers.  Four digits (0 - 9) are drawn at random thus producing a 4 digit number.

Your friend has the following theories about the digits drawn:

#1. Over the year the average of the total of the 4 digits drawn each day is 24

#2. If the first digit of the 4 digits drawn is even the last digit is odd at least 75% of the time

#3. The middle digits of the 4 digits drawn are the same at least 35% of the time.

#4. The digit 5 is the most frequently appearing digit in the numbers drawn in the first quarter of the year (ie the first 13 weeks).

#5. Even digits are more common than odd digits

#6. A number with all the same digits appears at least 3 times per year

Generate a list of lists.  Then write code that will test the theories above for one year (52 lists of 4 digits each).  Print to the screen the results of your analysis.

Please done in Python format.

Solutions

Expert Solution

1,

2,3:

4,5:

6.


Related Solutions

In the game Super Vegas Lottery, four digits are drawn at random one at a time with replacement from 0 to 9.
1) In the game Super Vegas Lottery, four digits are drawn at random one at atime with replacement from 0 to 9.In other words, there are 10 slips of paper in a jar, each with a di erent digit printedon it. A slip is drawn from the jar, the number written down, then the slip is put backinto the jar, and the jar is shaken up. This process is repeated three more times.You win if any permutation of your numbers...
Suppose you play a "daily number" lottery game in which three digits from 0–9 are selected...
Suppose you play a "daily number" lottery game in which three digits from 0–9 are selected at random, so your probability of winning is 1/1000. Also suppose lottery results are independent from day to day. A. If you play every day for a 7-day week, what is the probability that you lose every day? B. If you play every day for a 7-day week, what is the probability that you win at least once? (Hint: Make use of your answer...
In a lottery game a player chooses four digits (digits can repeat, for instance 0, 2,...
In a lottery game a player chooses four digits (digits can repeat, for instance 0, 2, 0, 2 is a valid choice) and bet $1 that all four of them will arise in the four digit number drawn from the lottery. It isn’t necessary that the order will be the same: if a player selects 2, 6, 7, 8 the selection of 8, 2, 7, 6 means he won. Player gets $200 if he wins. 1. What is the probability...
In a lottery game a player chooses four digits (digits can repeat, for instance 0, 2,...
In a lottery game a player chooses four digits (digits can repeat, for instance 0, 2, 0, 2 is a valid choice) and bet $1 that all four of them will arise in the four digit number drawn from the lottery. It isn’t necessary that the order will be the same: if a player selects 2, 6, 7, 8 the selection of 8, 2, 7, 6 means he won. Player gets $200 if he wins. 1. What is the probability...
In a lottery, each ticket has 5 one-digit numbers 0-9 on it. (with no digit repeating...
In a lottery, each ticket has 5 one-digit numbers 0-9 on it. (with no digit repeating twice) You win only if your ticket has the digits in the required order. What are your chances of winning?
Create a JAVA lottery game application.  Generate four random numbers, each between 0 and 9 (inclusive).  Allow the...
Create a JAVA lottery game application.  Generate four random numbers, each between 0 and 9 (inclusive).  Allow the user to guess four numbers.  Compare each of the user’s guesses to the four random numbers and display a message that includes the user’s guess, the randomly determined four-digit number, and the amount of points the user has won as follows: No matches 0 points Any one digit matching 5 points Any two digits matching 100 points Any three digits matching 2,000 points All four...
Password consists of five characters: one lowercase letter and four digits 0 – 9. How many...
Password consists of five characters: one lowercase letter and four digits 0 – 9. How many possible combinations for the password are there if digits can be repeated? How many possible combinations for the password are there if digits can not be repeated? What is a percentage of passwords with repeated digits?
For building a lottery simulator on PYTHON: Pick 5 numbers from 0-9 which will be the...
For building a lottery simulator on PYTHON: Pick 5 numbers from 0-9 which will be the winning numbers. Prompt the user to either have the system generate numbers for them or they can pick themselves. If they want to pick themselves, make sure they can only pick a number 0-9. Check for a 5 number match IN ORDER (from players randomly selected numbers to winning numbers). "Give" user a $10,000 prize. Check for a 4 number match in which the...
In a four-digit lottery, each of the four digits is supposed to have the same probability...
In a four-digit lottery, each of the four digits is supposed to have the same probability of occurrence. The table shows the frequency of occurrence of each digit for 87 consecutive daily four-digit drawings. Digit Frequency 0 37 1 40 2 31 3 43 4 34 5 31 6 37 7 29 8 30 9 36 Total 348 (b) Calculate the chi-square test statistic, degrees of freedom, and the p-value. (Round your test statistic value to 2 decimal places and...
In a four-digit lottery, each of the four digits is supposed to have the same probability...
In a four-digit lottery, each of the four digits is supposed to have the same probability of occurrence. The table shows the frequency of occurrence of each digit for 83 consecutive daily four-digit drawings. Digit Frequency 0 26 1 32 2 27 3 40 4 31 5 31 6 33 7 44 8 33 9 35 Total 332 Click here for the Excel Data File (a) The hypothesis for the given issue is H0: The digits come from a uniform...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT