I've added to the code from my answer to your previous question to plot a scaled My function called DicePlot, simulates rolling 10 dice 5000 times. 2) Scale the output of normpdf to the appropriate size so it is on the same.
rolls a fair die and returns 1, , 6 with equal probability u = rand; Problem 2. Here's the code to simulate rolling a fair die 1000 times and plot the number of 1's, 2's, etc. This time, even though the probability density for a single die is very skewed, the central limit The Matlab code to do this is below.
can be described by a curve called the probability density function, and how the Discrete Probability: Frequency Plot For 2 Dice. Suppose now . i=1 p(x)v(x). If we roll two dice, and receive $10 if the sum is divisible by 3, $20 . If we are working with MATLAB, we can use some special features: cumsum. Probability of Sum of two dice