7

I started learning the basics of probabillity theory by myself and did some practicing and I was doing the following exercise which i found on the internet.

Two dices are rolled n-times, determine the probabillity of getting each double (1,1),(2,2),.....,(6,6) atleast one time.

I used the binominal distribution, since all four conditions i) finte number of trials ii)trials are independent iii)each trial has two outcomes and at each trial probability doesn't change.

Consider getting a double is a sucess

P(getting a double on a roll)=$\frac { 1 }{ 6 } $

P( not getting a double)=$\frac { 5 }{ 6 } $

since we are looking for 6-succes we get from the binominal distribution formula that (n,6) $P(x=6)=(n,6){ p }^{ 6 }{ (1-p) }^{ n-6 }$

$P(x=6)=(n,6){ \frac { 1 }{ 6 } }^{ 6 }{ (1-\frac { 5 }{ 6 } ) }^{ n-6 }$

((n,6) denotes the binominal coeff.) I'm a little concerned if this is right,since i did not consider the atleast one time thing furhter my modell does not consider that if a pair comes twice it still counts as success even tho its none. Could you help me to finish this correctly

johnka
  • 569
  • 1
    MathJax hint: to get combinations use {n \choose r} to get ${n \choose r}$ – Ross Millikan Apr 24 '18 at 20:16
  • The above cannot be ok. The intuition makes us think that for $n=1000$ there is a high probability that each double occurs at least once. But in the formula, $(1-p)^{n-6}$ is the "main" (exponential) factor, and it makes the expression converge to zero for $n\to \infty$. Hint: Try to find first the probability that the double $(1,1)$ does not occur. – dan_fulea Apr 24 '18 at 20:25

4 Answers4

3

The chance you don't get double $1$ in $n$ rolls is $\left(\frac {35}{36}\right)^n$ so the chance you do get double $1$ is $1-\left(\frac {35}{36}\right)^n$. The naive thing is to say the chance you get all six doubles is then $\left(1-\left(\frac {35}{36}\right)^n\right)^6$ This ignores the correlation introduced because the fact that you got a double $1$ means you have fewer chances to get double $2$. As $n$ gets large this will not be a problem, but clearly for $n=5$ the chance of getting all the doubles is zero.

This is a job for inclusion-exclusion. There are $36^n$ total sets of rolls. Of that $35^n$ do not have double $1$s so subtract $6\cdot 35^n$ for the sets missing each double. You have subtracted the ones missing two pairs of doubles twice, so add them back in. This is ${6 \choose 2}34^n$. Now we have subtracted the ones missing three doubles three times and added them back three times, so subtract them once, which is ${6 \choose 3}33^n$. Now the ones missing four doubles...

Ross Millikan
  • 374,822
  • could you explain me why the chance of not getting a double in nthrows is (35/36)^n – johnka Apr 24 '18 at 20:54
  • The probability of getting double ones would be $\frac{1}{6}*\frac{1}{6}$ which would be $\frac{1}{36}$ so the probability of not getting the double ones would be $1-\frac{1}{36}= \frac{35}{36}$ now if we roll the dice N times we multiply this probability together N times since they are independent. – Derek Apr 24 '18 at 21:09
1

Supposing we roll two dice that have $q$ sides, $n$ times and ask about each double appearing at least once. We have from first principles that this is given by

$$\frac{1}{q^{2n}} n! [z^n] (\exp(z)-1)^{q} \exp(z)^{q^2-q}.$$

Here we have used the labeled combinatorial class

$$\def\textsc#1{\dosc#1\csod} \def\dosc#1#2\csod{{\rm #1{\small #2}}} \textsc{SEQ}_{=q}(\textsc{SET}_{\ge 1}(\mathcal{Z})) \textsc{SEQ}_{=q^2-q}(\textsc{SET}(\mathcal{Z})).$$

This may be evaluated in two ways, the first is

$$\frac{1}{q^{2n}} n! [z^n] \exp(z)^{q^2-q} \sum_{p=0}^q {q\choose p} (-1)^{q-p} \exp(pz) \\ = \frac{1}{q^{2n}} n! [z^n] \sum_{p=0}^q {q\choose p} (-1)^{q-p} \exp((p+q^2-q)z).$$

This is

$$\bbox[5px,border:2px solid #00A000]{ \frac{1}{q^{2n}} \sum_{p=0}^q {q\choose p} (-1)^{q-p} (p+q^2-q)^n.}$$

The second is

$$\frac{q!}{q^{2n}} n! [z^n] \frac{(\exp(z)-1)^{q}}{q!} \exp(z)^{q^2-q} \\ = \frac{q!}{q^{2n}} n! \sum_{p=q}^n [z^p] \frac{(\exp(z)-1)^{q}}{q!} [z^{n-p}] \exp(z)^{q^2-q} \\ = \frac{q!}{q^{2n}} n! \sum_{p=q}^n {p\brace q} \frac{1}{p!} \frac{(q^2-q)^{n-p}}{(n-p)!}.$$

We get

$$\bbox[5px,border:2px solid #00A000]{ \frac{q!}{q^{2n}} \sum_{p=q}^n {n\choose p} {p\brace q} (q^2-q)^{n-p}.}$$

Observe that the first of these is inclusion-exclusion where the nodes of the underlying poset represent configurations where a given set $P\subseteq D$ of doubles $D$ with $|P|=p$ is missing or possibly more doubles. To see this re-index as follows:

$$\bbox[5px,border:2px solid #00A000]{ \frac{1}{q^{2n}} \sum_{p=0}^q {q\choose p} (-1)^p (q^2-p)^n.}$$

The cardinality of these is clearly $(q^2-p)^n$ where we have removed the $p$ doubles in $P$. Now in this poset the configuration containing all doubles is only included in $P=\emptyset$ and with weight $(-1)^{|P|}$ we get weight one for these. A configuration that is missing the doubles from a set $R$ where $R\subseteq D, R\neq \emptyset$ is included in all nodes representing subsets $P$ of $R$ which gives a weight

$$\sum_{P\subseteq R} (-1)^{|P|} = \sum_{p=0}^{|R|} {|R|\choose p} (-1)^p = 0,$$

so these have weight zero in the poset which concludes the construction by PIE.

Marko Riedel
  • 61,317
  • There is a big amount of undefined variables, brackets, and objects in this answer, as it is shown now, $z$, and $\mathcal Z$ for instance, and it is hard to put the finger on the line that starts the answer, and on the one that gives the answer (with positive probability). Now let us look at the level of the posted question, and try to give a solution using really the "first principles"... – dan_fulea Apr 25 '18 at 00:06
  • For additional documentation consult Wikipedia on Analytic Combinatorics and Wikipedia on formal power series. These are popular methods being taught in the undergraduate curriculum. – Marko Riedel Apr 25 '18 at 00:15
1

I've been scratching my head over this one since it seems like it should be really simple, but.. it isn't...

I tried solving this using the multinomial formula, and I think I've got the correct answer. I confirmed by writing an algorithm to simulate this procedure (rolling 2 die $n$ times, checking if all 6 pairs show up), and the long-run frequencies I'm getting in my simulation match my answer quite closely, so I'm pretty sure I've gotten this correct, or at least very close to correct.

I see someone has already provided an answer, but that solution is way above my head and I don't understand it. I have a feeling the asker here will not understand that explanation without a good deal of further study, so I'm offering my solution as well, which I think is a bit easier to understand, albeit, a bit impractical.

Basically, my solution is a brute-force attack using the multinomial formula. I have basically just summed all possible multinomial probabilities where there are at least $1$ of each pair, using nested summations.

A single multinomial probability is given by:

$$ P(N_1=n_1, N_2=n_2,...,N_m=n_m)={n! \over {n_1! \cdot n_2! \cdot ...\cdot n_m!}}p_1^{n_1}p_2^{n_2}...p_m^{n_m} $$

And this is useful, by thinking of $N_1, N_2,$ etc.. as the number of times $(1,1), (2,2)$ appears in $n$ rolls, and $N_{7 \rightarrow 36}$ as the number of times all other outcomes appear.

By taking the sum of all possible multinomial probabilities where each pair shows up at least once, you should get the probability you're looking for.

So... you want the following sum:

$$P\Bigl(N_1 \ge 1, N_2 \ge 1, N_3 \ge 1, N_4 \ge 1, N_5 \ge 1, N_6 \ge 1, \bigl[0 \le N_{7 \rightarrow 36} \le (n-6) \bigr] \Bigr)$$

$$ = \sum_{n_1=1}^{(n-5)} \sum_{n_2=1}^{(n-S_1-4)} \sum_{n_3=1}^{(n-S_2-3)} \sum_{n_4=1}^{(n-S_3-2)} \sum_{n_5=1}^{(n-S_4-1)} \sum_{n_6=1}^{(n-S_5)} { {n! \over {n^* (n-S_6)! } }{\left( {1\over36} \right)^{S_6} }{\left(30\over36 \right)^{n-S_6}} } $$

where $S_i=\sum_{k=1}^{i} n_k,$ $n^*= \prod_{k=1}^{6} n_k!,$ and $N_1+N_2+...+N_6+N_{7 \rightarrow 36}=n$

In case this isn't obvious, I've represented the number of times $(x,x)$ shows up by $N_x$, and the number of times all non-doubles show up as $N_{7\rightarrow 36}$. Therefore, $p_x={1\over 36},$ and $p_{7\rightarrow 36}={{36-6}\over 36}={30\over36}$.

Now you might be wondering how you would go about simplifying this to derive a simpler, general formula, and I haven't the foggiest idea. However, if you want to find out an actual probability for a given value of $n$, you can use the desmos graphing calculator (which is an amazing tool if you are not aware of this already) to do this for values of $n< (\sim70)$. The calculator starts getting a bit choppy with higher values.

Here is a link to the summation above, with a slider for the $n$ value: https://www.desmos.com/calculator/on90xvxmzx

and here is the algorithm I wrote to test my answer: http://jonsprojects.biz/apr18tests/stackexchange.php?n=50&N=1000

You can change the $n$ parameter (# of rolls) by changing $n=XX$, and the $N$ parameter (# of sets of rolls to generate) by changing $N=XX$ in the url. Don't set it too high or it won't work. My algorithm isn't very efficient.

If someone more knowledgeable than me wants to confirm if I've done this right, that would be great! Or perhaps if someone can simplify my answer a bit more, or has a simpler approach, that would also be great to see.

0

The method needs to be changed from a probability of getting any six doubles to a probability of getting six specific doubles. The probability of getting the first double is 6/36, the next double will be 5/36, the next 4/36 etc.

So the answer is $6!/36^6$

Using the binomial formula doesn't work because the probability changes depending on a success.

Phil H
  • 5,579
  • There are $n$ rolls of the pair of dices, we can tacitly extract this from the question. The combinatorical problems do not show up for $n=6$, but for (slightly) bigger values. The answer should depend on $n$. (And should be "almost one" for $n=1000$...) – dan_fulea Apr 25 '18 at 00:14