Number of rolls

num_rolls <- 24

Mean and standard deviation of a single roll of a fair six-sided die

mu <- (1+2+3+4+5+6)/6 sigma <- sqrt((1^2 + 2^2 + 3^2 + 4^2 + 5^2 + 6^2)/6 - mu^2)

Calculate the mean and standard deviation of the sum of n_rolls rolls

mu_sum <- num_rolls * mu sigma_sum <- sqrt(num_rolls) * sigma

Calculate the z-scores for 84 and 84.5 (for greater than 84)

z_greater_than_84 <- (84.5 - mu_sum) / sigma_sum z_equal_to_84 <- (84 - mu_sum) / sigma_sum

Calculate the probabilities using the cumulative normal distribution function

prob_greater_than_84 <- 1 - pnorm(z_greater_than_84) prob_equal_to_84 <- pnorm(z_equal_to_84 + 0.5/sigma_sum) - pnorm(z_equal_to_84 - 0.5/sigma_sum)