Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Background preforming a statistical analysis using Java's Random object and a roulette wheel simulation. Roulette is a casino game where a ball is dropped on

Background
preforming a statistical analysis using Java's Random object and a roulette wheel simulation. Roulette is a casino game where a ball is dropped on a spinning wheel. Depending on where the ball lands, the player may win or lose money.
A (European) roulette wheel has slots for the numbers 0 through 36 (illustrated above). Each number is colored either green, red, or black.
0 is Green.
1-10 (even numbers), 11-18 (odd numbers), 19-28 (even numbers), and 29-36 (odd numbers) are Black.
1-10 (odd numbers), 11-18 (even numbers), 19-28 (odd numbers), and 29-36 (even numbers) are Red.
Question
write a java program using Javas Random object to pick a number between 0 and 36 to simulate a spin of a Roulette wheel.
During the first trial, your program will need to pick 100 random numbers between 0 and 36 (simulating 100 games.) The second trial requires picking 1 million random numbers between 0 and 36 (simulating 1 million games.) The third trial requires picking 1 billion random numbers between 0 and 36 (simulating 1 billion games.)
During each trial, your program needs to keep track of how many times a red number appeared, how many times a black number appeared, and how many times the green number appeared. After each trial, print the totals for each color.
After you have collected your data, determine if the results are in line with the statistical odds of such events happening on a fair, real-world European Roulette Wheel.
Where n is the number of simulations:
The expected number of occurrences of red numbers appearing is 18/37 * n
The expected number of occurrences of black numbers appearing is 18/37 * n
The expected number of occurrences of the green number (0) appearing is 1/37 * n
question 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

More Books

Students also viewed these Databases questions