In the game of ChuckALuck a player tosses three dice and ear

In the game of Chuck-A-Luck a player tosses three dice and earns a dollar for each 6 that appears. It costs one dollar for each roll of the three dice. Let X he the random variable representing the dollar amount won in a single roll of the three dice minus the dollar spent to play. Example: if the player rolls (6, 2, 6), then X = 1. Write R code to simulate the game of Chuck-A-Luck in the following steps. Write a function to simulate a roll of Chuck-A-l.uck. The function should return the amount won minus the dollar spent (i.e., the random variable X from above.) Run your function and compute the sample mean and variance for this simulation. Plot a histogram of the X variable. Is the histogram symmetric about the mean?

Solution

R is an implementation of the S programming language combined with lexical scoping semantics inspired by Scheme.[11] S was created by John Chambers while at Bell Labs. There are some important differences, but much of the code written for S runs unaltered.[12]

R was created by Ross Ihaka and Robert Gentleman[13] at the University of Auckland, New Zealand, and is currently developed by the R Development Core Team, of which Chambers is a member. R is named partly after the first names of the first two R authors and partly as a play on the name of S.[14] The project was conceived in 1992, with an initial version released in 1995 and a stable beta version in 2000

 In the game of Chuck-A-Luck a player tosses three dice and earns a dollar for each 6 that appears. It costs one dollar for each roll of the three dice. Let X h

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site