The scenario described in this question is basically one of rolling a die until we get a one and we want to know how many roles it's going to take. The number of rules that will take to get a one can be modelled as a geometric, random variable. And this is because each roll of the die can be broken down into either success, which is we get a one or failure. We get anything from 536 and each trial is independent of the other trials. The probability of getting a one on each trial does not change based on what you get on other trials, and the probability success for X trial is one out of six. What we say X is the number of rules. Until we get a one, we can say it is a geometric random variable with probability of success 1/6. And so for part, A were asked to describe how we would simulate rolling the die until we get a one so you could actually do this quite manually. Just with an actual die. You could keep rolling the die until you get a one and each time record the number of roles that was required until getting a one. So you might roll it once and get a two and then roll it a second time and get a one so you would record, too. Then you start over again. If you get a one on your four thrill the next time, then you recorded for and you just keep repeating that you could also define a random number generator in a computer application, with the probability of success of 1/6. So Step one is roll a die or use a random number generator To would be to repeat one until success. And here success is defined as rolling a one and then stop so three would be count the number of roles. So on your first simulation, you might get a one on the third, a role so then X is equal to three second simulation. You might get a one on the fifth role, so X is equal to five third one. You might get a one on the 10th. Roll X is equal to 10 and so on, and for B, it says to run at least 30 simulations or 30 trials, so that means we're going to do this. I am actually doing 50 from my example. So I'm gonna repeat this process up until 50. And I actually did this using our software, So I made a little program, and I'll just warn you that I'm not a expert programmer, so this may not be particularly well written, but I have verified that it works properly. So in case you want to take a stab at using our, um, this might give you a leg up on getting started and you can see that I've used 50 trials here and so I won't walk through the how the program works. That's beyond the scope of this exercise. But you can see I have 50 trials that have been executed here, and we can ignore the number, the numbers in brackets. So for 50 trials, these are the number of roles that it took each time before getting a one. So on the second trial, it actually took 17 rolls before getting one, which is pretty unlikely. But you can see normally it happens within six or seven rolls and pipe, Artzi says. Based on our simulation estimate, the probabilities that you might win on the first roll on the second roll, the third rule, etcetera. So basically, we're going to estimate the probability distribution for the geometric random variable with probability of success of 1/6 so we can make a table with X is equal to one to, and I'll make a catch all category for greater than or equal to eight. Since these probabilities air getting smaller and smaller as we get to higher numbers of roles, required it until success. And our strategy will be to use the relative frequency definition for a probability. And you may remember that the relative frequency would be equal in this case, equal to the number of simulations for which X equals I divided by the number of simulations. So, for example, if if X equals seven and you can see we had one 23 I think there are only three simulations with seven, so we would get seven divided by 50 which is the total number of simulations, and so we can repeat that step for all ex from one through 50. And if I do that with my simulation results, I get 0.18 and so that completes see our estimate of the probabilities for winning on one roll to roll three rolls, etcetera for her part dealer as to calculate the actual probabilities for the geometric a random variable. So we want to calculate probability of requiring X rolls before success. And that's given by this formula, where P is the probability success and Q is one minus p. So, for example, probably of success on the first roll is equal to P basically, which is equal to 1/6. And so we can tell you these up in the same table that we already created in part C. So just copy that here, and we'll call this rule the probability of X equaling X. And so if we repeat this calculation for all X, we get the following numbers. And so the second row is three. Calculations for the Probability model, which completes Part D and for Party, were asked to compare the distribution of outcomes in the simulation to the probability model. So we've already done a good job of this by placing them both side by side in this table so you can you can compare them on a one by one basis to see how close they are to each other, and you can see that it's actually quite close. We did 50 simulations and the valleys air quite close. This might be the furthest apart that the two ah strategies give. These two are even further apart, but it turns out that 50 simulations gave us a pretty good estimate of the probability distribution.