220k views
1 vote
Write a program to play an automated dice game that uses two dice (GVDie class provided). The player rolls both dice and either wins one credit, loses one credit, or sets a goal for future rolls?The current round ends when player wins or loses a credit. The game ends when credits are zero.

Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.

User Ed R
by
7.1k points

1 Answer

3 votes

Final answer:

The student's query involves two main topics: probability concepts, such as random variables and expected value, and the creation of a dice game program. They are introduced to practical probability through dice-based exercises and the calculation of sample means to analyze data.

Step-by-step explanation:

The student's question revolves around two aspects: 1) understanding random variables in probability games, and 2) developing a program for an automated dice game using a GVDie class. For the programming part, the dice game logic should reflect the probability outcomes similar to those encountered in gambling games explained in the math exercises.

Probability and Expected Value

Two games discussed, one Chinese and one Vietnamese, help illustrate the concepts of random variables and expected value in probability. A random variable X is defined as the number of matches of dice faces, with its distribution being expressed for different outcomes. The expected value is associated with the net gain or loss over the long term.

Calculating Sample Means

Another aspect involves calculating sample means after rolling multiple dice to understand the central tendency in probability and statistics. Collaborative exercises are given to practice rolling dice and tabulating the results, which underpins statistical analysis concepts like frequency.

User Andrey  Yankovich
by
7.8k points