subject
Computers and Technology, 03.07.2020 18:01 gabbee

To play a game, you have a box containing 20 fair four-sided dice, with faces {1,2,3,4}. This bag also contains 15 fair six-sided dice (faces {1,2,3,4,5,6}) and 5 fair twenty-sided dice (faces {1,2,3,4,...,19,20}). Call these 3 classes of die "Four", "Six" and "Twenty" (or F, S, and T, for short). You grab one die at random from the box. Work the following problems by hand (and LaTeX your solutions) unless otherwise stated (but don't be afraid to simulate to check your result!).
Part A: You roll your die one time. What is the probability of the event 6R6, that you roll a 6? Include at least 4 decimal places in your final answer.
Solution:
Part B: Suppose you roll a 6. What is the probability that the die you chose from the box is a Six-sided die?
Solution:
Part C: Are the events 6R6 and S independent? Justify your answer using math.
Solution:
Part D: Suppose you roll your die n times and record each outcome. Obviously, if you roll 5 or 6 you know you did not pick a Four-sided die, and if you roll a 7 or higher, you must have picked a Twenty-sided die.
But, if you roll n times in a row and get only 1, 2, 3 or 4, you would have a stronger belief that you in fact grabbed one of the Four-sided dice. Let En be the event that you roll n rolls of 1, 2, 3 or 4 in a row. For example, one outcome in 3E3 is the sequence 2, 3, 1.
Given that you roll a single value of 1, 2, 3 or 4, what is the probability that you have grabbed a Four-sided die? That is, calculate by hand P(∣1)P(F∣E1).
Solution:
Part E: First, work out by hand a formula for the probability in general that you are rolling a Four-sided die, given that you have rolled n values in a row that are 1, 2, 3 or 4 (that is, En). So you want a formula for P(∣)P(F∣En) in terms of n.
Then, define and code a function prob_four to calculate P(∣)P(F∣En). This function should only take one positive integer argument, n.
Verify that your function is performing as expected by checking your answer to Part D when =1n=1.
Solution:
In [ ]:
def prob_four(n): # Your code here.
Part F: What is the smallest value of n successive rolls of 1, 2, 3 or 4 that would make you believe that there's a better-than-90% chance that the die you grabbed is Four-sided? Plugging larger and larger values for n into your prob_four function is a very reasonable way to check this.
In [ ]:
# Your code here.
Solution:

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:50
Write a car class having two private member variables called tank and speed. write public methods called pumpgas and gofast. the method pumpgas gets an integer for gas that must be pumped. that value needs to be added to tank (no more than 20 gallons). it must return the amount of gas that is purchased ($4 per gallon). the method gofast should increase the speed by 5 each time it is called.write a constructor for the above class that initialized both variables to zero.write a tostring to display both the tank and speed when the car is printed.modify the car class to implement the interface comparable and an interface called carinter having the public methods in carinter.write the main program to create an array of size 5 of type car. create 5 car objects having each location of the array to refer to one of the cars. test the pumpgas, gofast, equals method on the array items. write an enhanced loop to print all the car values (using a tostring written last time).write a generic method to find the minimum of four items. pass int, double, char, string and car objects to test this method.
Answers: 1
question
Computers and Technology, 23.06.2019 09:50
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
question
Computers and Technology, 24.06.2019 17:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 2
You know the right answer?
To play a game, you have a box containing 20 fair four-sided dice, with faces {1,2,3,4}. This bag al...
Questions
Questions on the website: 13722367