# Tough probability question: Fair and Unfair die rolling

Have been trying for the last three hours, and going nuts. Please provide HINTS only, not the solution (or answer).

I'm doing this by a dumb approach, way too much of calculations and excel madness. I'm looking for an intelligent shortcut (or many of them). Looking to cut down on things algebraically. Here's the question.

(Dice = plural of die, the thing with the numbers 1 to 6 on its surface.)

Q. 1000 fair and 1000 unfair dice are available in a bag. On a certain day, from 8 a.m. to 6 p.m., 200 dice are randomly selected from the bag every hour and rolled. The faces are recorded and summed, and the rolled dice are then thrown away, ensuring no replacement. The fair dice behave normally ALL the time, but the unfair dice follow a certain pattern:

(a) Between odd and even hours (e.g. between 9 am and 10 am), the unfair dice change their [1, 2, 3] faces to [4, 5, 6] faces for the whole hour. So they become a dice with [4, 5, 6, 4, 5, 6] as the faces.

(b) Between even and odd hours (e.g. between 8 am and 9 am), the unfair dice change their [4, 5, 6] faces to [1, 2, 3] faces for the whole hour. So they become a dice with [1, 2, 3, 1, 2, 3] as the faces.

(c) However, there is an overriding rule: If any of the two bounding hours is prime, then all other unfair dice patterns are discarded, and the unfair dice change ALL their faces to that prime number only. (e.g. [5, 5, 5, 5, 5, 5] from 4 pm to 5 pm and 5 pm to 6 pm.) If both bounding numbers are prime, then the higher one is shown.

Find the probability (correct to 5 decimal places) that the total sum of all throws from 8 am to 6 pm is (a) Even (b) Is a prime

(12 hour format to be followed after 12 noon. 1 o'clock is 1 o'clock, not 13:00 hours).

-
You've got them switched -- "dice" is the plural of "die". – joriki Aug 5 '11 at 13:45
Oh yes, how shameful. Corrected. Thank you for pointing out. – AndrewL.C. Aug 5 '11 at 13:50
You write "Between odd and even hours (e.g. between 9 am and 10 am)" -- but it seems that this is in fact the only case in which that rule applies, not just an example? – joriki Aug 5 '11 at 13:51
Do you have any reason (mathematical or contextual) to believe that there's a closed form for this? If not, it should best be done by computer. – joriki Aug 5 '11 at 13:52
That's how the problem is. If that's the only instance, then it is the only instance. Yes, you are right. And unfortunately no, the source of the problem does not mention is this is better solved by a computer. Which is why I have been trying with Excel as well. – AndrewL.C. Aug 5 '11 at 13:53

Sorry, I temporarily forgot about the capitalized "hints only" part -- hope you didn't see the answer? Here's a hint for part (a): whatever all the other dice show, what happens if you add a single fair die?

I don't immediately see a reason for part (b) to have a closed form, but you could try the following and check to see whether it's accurate enough either using known bounds on the approximations or by calculating the exact result by computer:

The distribution of the sum should be quite well approximated by a Gaussian. You can calculate its mean and variance relatively easily making use of the linearity of expectation. The mean is straightforward; the variance is a bit more messy but can be calculated from the expectation values of the pairwise products. You might even get by with ignoring the correlations and just adding up the variances for the individual dice.

The Gaussian will be rather broad and slowly varying, so it won't be sensitive to the details of the distribution of the primes. So you could integrate it with the prime density $1/\log n$. I wouldn't be surprised if the result was correct to $5$ digits.

[Update:]

It turns out the idea with the Gaussian was good but the ideas with the prime density and ignoring correlations were bad. The correlations reduce the variance by about a third. If you integrate the product of $1/\log n$ with a normal distribution with mean and variance corresponding to the mean and variance of the distribution of the dice sum, the answer is already off in the second digit. However, if you sum the normal distribution over the actual primes, the result is correct to six digits. So you don't need to calculate the whole distribution or to simulate it; all you need is the mean and variance and the primes. The mean is trivial due to linearity of expectation; the variance is a bit more complicated because for the cross product for two unfair dice you need to take into account that they're slightly less likely to be selected in the same hour than in different hours.

-

Hint: each die has 1/10 chance to be thrown each hour. For a fair die, it has 1/6 chance to come up each of 1,2,3,4,5,6. What is the probability distribution of an unfair die? For the even/odd case, you can then reduce to the probability that each type of die comes up even or odd. But combining the dice to find out if the total is prime sure looks like a mess.

-
The question is about probabilities, not averages. – joriki Aug 5 '11 at 13:59
@joriki: you are right. That makes it much messier. Fixed (for what it's worth) – Ross Millikan Aug 5 '11 at 14:04