Suppose that we continually roll a die until the sum of all
Suppose that we continually roll a die until the sum of all throws exceeds 100. What is the most likely value of this total when you stop? We shall answer this question by numerical simulation. Generate a random number from rolling a die once. Generate one sample path of rolling a die until the sum of all those exceeds 100. Generate 1000 sample paths, each of which represents rolling a die until the sum of all those exceeds 100. Then compute the total sum of each sample paths. Generate the histogram, mean, variance of the total sum.
Solution
