Statistics and Probablity with Java, computer science homework help

User Generated

cnenqbk1234

Computer Science

Description

Please do in Java

Unformatted Attachment Preview

Use at least 10000 simulations to answer the following questions. 1. In the game of craps, the shooter rolls two dice and wins if the sum of the dice is 7 or 11 ("natural"); he loses if the sum is 2,3, or 12 (craps). If the sum is 4, 5, 6, 8, 9, or 10, then the result is not yet decided. He must roll the dice again and again, as often as is necessary until the initial sum, be it 4, 5,6,8,9, or 10 is repeated (shooter wins) or until the sum is 7 (shooter loses). Find the probability that the shooter will win in a game of craps by simulation. 2. A rat is trapped in a maze. Initially he has to choose one of two directions. If he goes to the right, then he will wander around in the maze for three minutes and will then return to his initial position. If he goes to the left, then with probability (1/3) he will depart the maze after two minutes of traveling, and with probability (2/3) he will return to his initial position after five minutes of traveling. Assuming that the rat is at all times equally likely to go to the left or the right, find (by simulation) a) the expected number of minutes that he will be trapped in the maze. b) the standard deviation of the amount of time the rat spends in the maze. Note: The program is due at the beginning of the session on the due date • Use this cover page with your name(s) typed- At most two students • Use comments in your programs • Each source and output must be clearly marked with the question number • Circle the answers
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Your project ...


Anonymous
Just what I was looking for! Super helpful.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags