Probabbility question

I have a more complicated situation that the question below, but I will do that one with a computer program. I’d like to verify the program with the example below:

Given one 6-sided die, how many rolls on average before every number is rolled? Obviously the minimum is 6 rolls, and theoretically there could be trillions of rolls without a “5” ever coming up.

Is this question even answerable? I know given N rolls, one can caclulate the odds for all #s appearing (0 for 1-5 rolls, 6!/6^6 for 6 rolls I think)

thanks,

Brian

This is an example of what’s known as the collector’s problem. You should be able to find info by searching on that phrase.

14.7, but you should work it out yourself.

I believe this is called an occupancy problem and is solved by using Stirling’s Numbers of the Second Kind.

It is called an occupancy problem, because they are usually phrased in this way. There are (in your case) 6 boxes. Marbles are randomly dropped into the 6 boxes with an equal probability of each marble landing in any 1 of the six boxes. On average, how many marbles must be dropped before all the boxes are occupied?

I solved this problem a long time ago and I believe the answer is 13 rolls.
It seems nivlac thinks it is a bit higher than that.
Time to do some more searching.

http://www.mathpages.com/home/kmath437.htm

= n(1 + 1/2 + 1/3 + … 1/n) in this case n = 6
= 6(1 + 1/2 + 1/3 + 1/4 + 1/5 +1/6)
= 6 + 3 + 2 + 6/4 + 6/5 + 1
= 14.7

By the way, the real question is: how many hits to take out an Ogre (supertank).
Though the supertanks in question may not match the commercial Ogre in specifications.

Brian

A straightforward explanation.

http://www.stat.ualberta.ca/people/schmu/preprints/collect.htm

I don’t want to make a mountain out of a molehill out of this, but I decided to run a computer simulation. I wrote an Excel spreadsheet (yes, very crude) to determine the occurrences of the number of dice rolls needed for each “success”.
My simulation basically states that all six numbers will be shown 50% of the time when the “die” has been rolled anywhere between 6 and 13 times.
The other 50% of the trials require 14 or more rolls for all 6 numbers to appear.
I guess that I’m answering the question based on probability distribution.
Now, if I were to calculate the average of the number of dice rolls, then the simulation suggests that 15 is about right (thereby agreeing with Dr Paprika, N9IWP and both cites that they posted).
So, I realize I’m really putting myself out on a mathematical limb here, but I think there is a difference in the way the problem is stated and/or interpreted.

This seems (to me anyway) to be the equivalent of the difference between the half-life and average life of nuclear decay.

Well, I just had to carry this out another year (so to speak).
I wrote a Javascript simulation of this problem. Instead of putting this on my official website, I put it on a free geocities website here:
http://www.geocities.com/internet_web_surfer_dude/problty.htm

When you go to the site just click the enter key once.
The red numbers 1 through 10 are the actual dice rolling “trials”.
For example, in row 1, in the example I am viewing, it shows:

  1. 3 5 6 1 2 2 4
    This means that a simulated die was rolled and it displayed a 3 then 5, 6, 1, 2, 2, 4
    When it rolled a four, this completed showing all six numbers.
    It took seven rolls for this to occur (the two occurred twice).
    (This “number of rolls required for success” is shown on the far right of each of the 10 rows.)

If you look at the bottom you will notice 5 output boxes.
The 3 boxes next to the “ENTER” key show the number of trials, a running total of all the dice rolls, and the third box = the second box ÷ by the first which shows the “average” number of rolls it required for those 10 succeses.

The row underneath the “ENTER” key shows a probability distribution of the

of rolls required for a success. As I said, I figured this out decades ago, and I remembered it was 13 (and that’s why I chose to split it at that number).

This distribution would be important if this were a gambling bet. If I were to bet someone even money, that I could roll a die and get all 6 numbers in 13 tries, I would eventually come out a winner. (Greater than 50% of the successes require 13 or fewer rolls).

Anyway, as I stated earlier, this might be analagous to the difference between the half life of an isotope and the average life.

Anyway, after you click the “ENTER” key with your mouse, just hold the KEYBOARD enter key down to get a bunch of computer data.
I ran a simulation of 10,000 successes with the following results:
The average came out to be 14.7254
(damned good agreement with the calculations of nivlac and N9IWP).

The probability distribution came out as:
13 or fewer rolls: 5,187
14 or more rolls: 4,813

Which agrees nicely with my statement that with 13 rolls or less, you will be successful more than half the time.

So, I’d like to see some more discussion on this particular problem.

For one thing, how would that 13 (the 50% or more number) be calculated? As I said, I remembered having to look this up in a book that showed Stirling’s numbers of the Second Kind. Is there an easier way than this?

Seriously Brian, is your question really

how many hits to take out an Ogre (supertank).
Though the supertanks in question may not match the commercial Ogre in specifications
?.

If that’s the case would the answer be closer to 15 or 13?

Here’s an idea:
If you want to know the probability of getting your first “5” after a N number of rolls, then ALL of the rolls before had to be non-“5”… so (N-1) of the rolls had an independent prob of 5/6 (of not being “5”), and the last one had a 1/6 (probability of being “5”). You multiply the independant probs…

So, Prob of getting your first “5” after N-rolls = (1/6)*(5/6)^(N-1)
If you sum the above up over Infinity, you get = “1” - Normality.
[AKA, Sum(P_N) = 1 ]

The “Expectation Value of the number of rolls it takes” (AKA Average # of rolls)
= Sum( N*P_N)/Sum(P_N) = … add it up, divide by 1 … = 6

So the average number of rolls to get your first “5” is 6.

Does that answer your question?I’m not sure I understood what you were looking for… :slight_smile:

Hmmm, good question.
If you were designing a game: Given a 6 box Ogre, how many (one hit they die) units do you put against it to make a balanced game?

The real question is more complicated because as boxes gets hit the Ogre loses guns. In the board game it is more complicated because different ranges and movement rates.

My scenario is “garden scale” (wooden units appox 4x6 inches) where instead of rolling dice one tosses a bean bag. The Ogre is bigger and thus easier to hit (you roll a die to see what you hit on the Ogre). And different guns you aim while standing / kneeling / sitting.

Brian

I decided to rewrite that program (the original is still there).
Anyway, the new one is located at:
http://www.geocities.com/Internet_web_surfer_dude/problty2.htm
This one shows the probability distributions for 6,7, 8, 9, 10, 11, 12, 13
with totals for less than 13 and totals for 14 and greater.

I would think that the probability of getting all 6 numbers in exactly 6 rolls is (1*(5/6)(4/6)(3/6)(2/6)(1/6)) = 0.0154320987654321

In the simulation, I ran 10,000 trials and there were 157 “successes” for 6 out of six rolls. This agrees pretty well.

Anyway, if you are designing a game (or whatever), wouldn’t the 50% distribution number be more important than the “average” that those other websites talk about?