# Solved – Expected number of dice rolls require to make a sum greater than or equal to K

A 6 sided die is rolled iteratively. What is the expected number of rolls required to make a sum greater than or equal to K?

Before Edit

``P(Sum>=1 in exactly 1 roll)=1 P(Sum>=2 in exactly 1 roll)=5/6 P(Sum>=2 in exactly 2 rolls)=1/6 P(Sum>=3 in exactly 1 roll)=5/6 P(Sum>=3 in exactly 2 rolls)=2/6 P(Sum>=3 in exactly 3 rolls)=1/36 P(Sum>=4 in exactly 1 roll)=3/6 P(Sum>=4 in exactly 2 rolls)=3/6 P(Sum>=4 in exactly 3 rolls)=2/36 P(Sum>=4 in exactly 4 rolls)=1/216 ``

After Edit

``P(Sum>=1 in atleast 1 roll)=1 P(Sum>=2 in atleast 1 roll)=5/6 P(Sum>=2 in atleast 2 rolls)=1 P(Sum>=3 in atleast 1 roll)=4/6 P(Sum>=3 in atleast 2 rolls)=35/36 P(Sum>=3 in atleast 3 rolls)=1 P(Sum>=4 in atleast 1 roll)=3/6 P(Sum>=4 in atleast 2 rolls)=33/36 P(Sum>=4 in atleast 3 rolls)=212/216 P(Sum>=4 in atleast 4 rolls)=1 ``

I am not sure this is correct first of all and but I think this probability is related to the expected number of rolls?

But I don't know how to proceed further. Am I proceeding in the right direction?

Contents

This is so far only some ideas for another, more exact, approach, based on the same observation that my first answer. With time I will extend this …

First, some notation. Let \$K\$ be some given, positive (large) integer. We want the distribution of \$N\$, which is the minimum number of throws of an ordinary dice to get sum at least \$K\$. So, first we define \$X_i\$ as the outcome of dice throw \$i\$, and \$X^{(n)}=X_1+dots+X_n\$. If we can find the distribution of \$X^{(n)}\$ for all \$n\$ then we can find the distribution of \$N\$ by using \$\$ P(N ge n)= P(X_1+dots+X_n le K), \$\$ and we are done.

Now, the possible values for \$X_1+dots+X_n\$ are \$n,n+1,n+2,dots,6n\$, and for \$k\$ in that range, to find the probability \$P(X_1+dots+X_n=k)\$, we need to find the total number of ways to write \$k\$ as a sum of exactly \$n\$ integers, all in the range \$1,2,dots,6\$. But that is called an restricted integer composition, a problem well studied in combinatorics. Some related questions on math SE is found by https://math.stackexchange.com/search?q=integer+compositions

So searching and studying that combinatorics literature we can get quiet precise results. I will follow up on that, but later …

Rate this post

# Solved – Expected number of dice rolls require to make a sum greater than or equal to K

A 6 sided die is rolled iteratively. What is the expected number of rolls required to make a sum greater than or equal to K?

Before Edit

``P(Sum>=1 in exactly 1 roll)=1 P(Sum>=2 in exactly 1 roll)=5/6 P(Sum>=2 in exactly 2 rolls)=1/6 P(Sum>=3 in exactly 1 roll)=5/6 P(Sum>=3 in exactly 2 rolls)=2/6 P(Sum>=3 in exactly 3 rolls)=1/36 P(Sum>=4 in exactly 1 roll)=3/6 P(Sum>=4 in exactly 2 rolls)=3/6 P(Sum>=4 in exactly 3 rolls)=2/36 P(Sum>=4 in exactly 4 rolls)=1/216 ``

After Edit

``P(Sum>=1 in atleast 1 roll)=1 P(Sum>=2 in atleast 1 roll)=5/6 P(Sum>=2 in atleast 2 rolls)=1 P(Sum>=3 in atleast 1 roll)=4/6 P(Sum>=3 in atleast 2 rolls)=35/36 P(Sum>=3 in atleast 3 rolls)=1 P(Sum>=4 in atleast 1 roll)=3/6 P(Sum>=4 in atleast 2 rolls)=33/36 P(Sum>=4 in atleast 3 rolls)=212/216 P(Sum>=4 in atleast 4 rolls)=1 ``

I am not sure this is correct first of all and but I think this probability is related to the expected number of rolls?

But I don't know how to proceed further. Am I proceeding in the right direction?