Search for question
Question

Question 5: What is the average dollar amount of the 1000 simulated spins? How does this compare to your answer in Question 2? In Question 1, you determined the theoretical probability mass function for the random variable X. Now let's construct the simulated probability mass function for the 1000 simulated wheel spins. The following R code will construct the simulated PMF based on your 1000 simulated wheel spins. Be sure that you've stored your simulated spins in a vector called spins_thousand. The following code will not work if you don't have this vector properly named. table (as.factor(spins_thousand))/1000 In the code above, the as. factor function assigns each of the outcomes in the spins_thousand vector to a category. The vector of categorical values is then used as the input in the table/neach of the outcomes in the spins_thousand vector to a category. The vector of categorical values is then used as the input in the table function which determines the frequency of each category. The values in this table are then finally divided by 1000 so that we are presented with the/ndivided by 1000 so that we are presented with the proportion of times each dollar amount was spun. This is the PMF.

Fig: 1

Fig: 2

Fig: 3