Consider three six-sided dice, and let random variable Y = the value of the face for each.

348 Views Asked by At

enter image description here

The probability mass function is given by the following table. I am having trouble trying to solve this mathematically.

1

There are 1 best solutions below

3
On BEST ANSWER

Comment: In order to give you a general idea how such a simulation can be done, I am showing R code for a million 3-dice experiments, along with some remarks. The R function sample(1:6, 3, rep=T) randomly 'throws' 3 fair dice,

set.seed(1234)     # for reproducibility
m = 10^6;  n = 3
x = replicate( m, sum(sample(1:6, 3, rep=T)) )

mean(x);  var(x)
[1] 10.49926       # aprx E(X) = 3(3.5) = 10.5
2*sd(x)/sqrt(m)
[1] 0.005916101    # aprx 95% margin of sim error for E(X)

[1] 8.750062       # aprx V(X) = ??

mean(x>2 & x<13)
[1] 0.7407         # aprx P(2 < X < 13)
2*sd(x>2 & x<13)/sqrt(m)
[1] 0.0008765015   # aprx 95% margin of sim for this peobability

Notes: Of course simulated values are only estimates. But there are ways to assess accuracy.

  • It is easy to find the exact mean and variance for one die by analytic means, and thus to find exact values for $E(X)$ and $V(X).$ By the Law of Large Numbers, sample means of a million values should be good approximations of respective population values.

  • Similarly for $P(2 <X< 13).$ [What is the normal approximation of this probability?

  • By the Central Limit Theorem you can get 95% margins of simulation error for the mean and the probability above.

The histogram is a bit tricky because you want one bin for each possible value 3 through 18 (controlled here by the br parameter).

hdr = "Simulated Dist'n: Total on 3 Faie Dice"
hist(x, prob=T, br=(2:18)+.5, col="skyblue2", main=hdr)

enter image description here

With a million iterations, you can manipulate results of table to get (very likely) numerators of $6^3$ in the PMF.

round(6^3*table(x)/m)
x
 3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18   # values of X
 1  3  6 10 15 21 25 27 27 25 21 15 10  6  3  1   # PMF numerators

For example, it is easy to see that $P(X = 3) = 1/216.$

Addendum: Your die is unfair, The R sample function can handle that. Parts of the simulation are modified for your unfair die as follows:

set.seed(509)
m = 10^6;  n = 3;  pr = c(.35,.30, .25, .05, .03, .02)
x = replicate( m, sum(sample(1:6, 3, rep=T, prob=pr)) )
mean(x)
[1] 6.512189       # aprx E(X) = 6.51
2*sd(x)/sqrt(m)
[1] 0.004042752    # aprx 96% margin of sim error 
mu = sum((1:6)*pr);  mu.s = 3*mu;  mu.s
[1] 6.51           # exact E(X)

hdr = "Simulated Dist'n: Total on 3 Unfaie Dice"
hist(x, prob=T, br=(2:18)+.5, col="skyblue2", main=hdr)

enter image description here