Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Outline: % If I don't put my name here Naji will call me Matlab McMatlabface % If I don't put my email here, Naji will

image text in transcribed

image text in transcribed

Outline:

% If I don't put my name here Naji will call me Matlab McMatlabface % If I don't put my email here, Naji will sign me up for curling with Devin % If I don't put a date here, Naji will sign me up at match.com % If I don't put a file name here, Naji will delete this file % % If I don't describe my program here, I will agree to babysit Naji's son % for a month for free clear % removes all variables from memory (good practice) close all % closes all figure windows (none in this program) clc % clears Commmand Window (not necessary) %% Declarations -- put all variables and values here so it's easy to change % Avoid any numbers in your code by making them variables %% Simulation % Roll the dice and store the values % Part a % Part b % Part c % Part d % Part e % Part f % Part g %% Output -- use fprintf to print your results to the command window
(7 pts) Yahtzee (Milton Bradley) is a dice game with aspects of poker. You roll five dice and score points according to combinations of the five dice. Rerolls are allowed. Let's play a simplified game of Yahtzee with NO rerolls or complicated scoring. Use MATLAB (or another programming language or interface) to simulate 1,000,000 rolls of the five dice. Download the outline file from Sakai and fill in the fields. Use your program to calculate the following probabilities and print them to the screen. Feel free to check your answer with hand calculations, but you don't have to show them. MATLAB functions I used were randi, sum, mean, sort, ismember, and fprintf. Report ALL probabilities as % to the nearest thousandths place. a. b. c. (2 pts) What is the average sum of the five dice? (2 pts) What is the probability that the sum of the dice is 20? (1 pt) What is the probability that the sum of the dice is 32? (7 pts) Yahtzee (Milton Bradley) is a dice game with aspects of poker. You roll five dice and score points according to combinations of the five dice. Rerolls are allowed. Let's play a simplified game of Yahtzee with NO rerolls or complicated scoring. Use MATLAB (or another programming language or interface) to simulate 1,000,000 rolls of the five dice. Download the outline file from Sakai and fill in the fields. Use your program to calculate the following probabilities and print them to the screen. Feel free to check your answer with hand calculations, but you don't have to show them. MATLAB functions I used were randi, sum, mean, sort, ismember, and fprintf. Report ALL probabilities as % to the nearest thousandths place. a. b. c. (2 pts) What is the average sum of the five dice? (2 pts) What is the probability that the sum of the dice is 20? (1 pt) What is the probability that the sum of the dice is 32

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_2

Step: 3

blur-text-image_3

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

More Books

Students explore these related Databases questions