Probability that rolling dice that two dice sum to X Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Why is the probability of getting at least one 1 after 3 rolls of a three-sided dice not 1 - (2/3)**3?What is the smallest value of n such that the probability that a wins the match is at least 0.9?probability function for event whose probability increases over time.Probability: What is the probability that sum of elements in array is greater than or equal to 10?Interpreting the differences of two log normal distributions:Dice Poker SolverWhat is the difference between the following two tests: w.isupper () and not w.islower ()?parabola equation from two points and vertexHow to generate and visualize two 3D planes that intersect?coding in python that it sums a number that the user will give

3 doors, three guards, one stone

Was credit for the black hole image misattributed?

What is the largest species of polychaete?

Passing functions in C++

Classification of bundles, Postnikov towers, obstruction theory, local coefficients

What computer would be fastest for Mathematica Home Edition?

Biased dice probability question

Blender game recording at the wrong time

How to set letter above or below the symbol?

Single author papers against my advisor's will?

Estimated State payment too big --> money back; + 2018 Tax Reform

Using "nakedly" instead of "with nothing on"

Determine whether f is a function, an injection, a surjection

The following signatures were invalid: EXPKEYSIG 1397BC53640DB551

Cauchy Sequence Characterized only By Directly Neighbouring Sequence Members

Stars Make Stars

Did the new image of black hole confirm the general theory of relativity?

What's the point in a preamp?

Windows 10: How to Lock (not sleep) laptop on lid close?

What items from the Roman-age tech-level could be used to deter all creatures from entering a small area?

Simulating Exploding Dice

Why does tar appear to skip file contents when output file is /dev/null?

How do I keep my slimes from escaping their pens?

Why use gamma over alpha radiation?



Probability that rolling dice that two dice sum to X



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Why is the probability of getting at least one 1 after 3 rolls of a three-sided dice not 1 - (2/3)**3?What is the smallest value of n such that the probability that a wins the match is at least 0.9?probability function for event whose probability increases over time.Probability: What is the probability that sum of elements in array is greater than or equal to 10?Interpreting the differences of two log normal distributions:Dice Poker SolverWhat is the difference between the following two tests: w.isupper () and not w.islower ()?parabola equation from two points and vertexHow to generate and visualize two 3D planes that intersect?coding in python that it sums a number that the user will give










1












$begingroup$


New here.



I'm trying to figure out how to come up with a roll system for a game, where i want the probability of rolling N dice or rolling one dice N times and then taking the two largest outcomes, adding them together and equaling them to some value.



I'd be happy if someone could help me with either a formula, pseudocode or the likes.



Thanks.



I already tried something with binomials etc., but i'm confused about the math.



Expected result of running the aforementioned example: 70.4%



EDIT:
I might have formulated the question wrong. Instead of rolling two dies 14 times and finding the sum of the larger two equaling 12, i'd like to e.g. find the sum of the two larger dice in a roll with 14 dice that equal to 8. This might change the answer?










share|cite|improve this question











$endgroup$











  • $begingroup$
    Are you saying that the sum of all the dice equals $14$. Then you must have rolled $14$ ones, and the sum of the two largest dice is $2$. I feel sure that this isn't what you are trying to ask, but I honestly can't guess what you might mean. Perhaps you could give an example of what you are looking for.
    $endgroup$
    – saulspatz
    Mar 25 at 21:20










  • $begingroup$
    Two 6 sided dices cannot sum to 14.
    $endgroup$
    – user
    Mar 25 at 21:24










  • $begingroup$
    meant 12, sorry.
    $endgroup$
    – Jonathan
    Mar 25 at 21:45










  • $begingroup$
    Do you want the find the probability that the highest two die values sum up to exactly $8$, or at least $8$?
    $endgroup$
    – Brian Tung
    Mar 25 at 22:23















1












$begingroup$


New here.



I'm trying to figure out how to come up with a roll system for a game, where i want the probability of rolling N dice or rolling one dice N times and then taking the two largest outcomes, adding them together and equaling them to some value.



I'd be happy if someone could help me with either a formula, pseudocode or the likes.



Thanks.



I already tried something with binomials etc., but i'm confused about the math.



Expected result of running the aforementioned example: 70.4%



EDIT:
I might have formulated the question wrong. Instead of rolling two dies 14 times and finding the sum of the larger two equaling 12, i'd like to e.g. find the sum of the two larger dice in a roll with 14 dice that equal to 8. This might change the answer?










share|cite|improve this question











$endgroup$











  • $begingroup$
    Are you saying that the sum of all the dice equals $14$. Then you must have rolled $14$ ones, and the sum of the two largest dice is $2$. I feel sure that this isn't what you are trying to ask, but I honestly can't guess what you might mean. Perhaps you could give an example of what you are looking for.
    $endgroup$
    – saulspatz
    Mar 25 at 21:20










  • $begingroup$
    Two 6 sided dices cannot sum to 14.
    $endgroup$
    – user
    Mar 25 at 21:24










  • $begingroup$
    meant 12, sorry.
    $endgroup$
    – Jonathan
    Mar 25 at 21:45










  • $begingroup$
    Do you want the find the probability that the highest two die values sum up to exactly $8$, or at least $8$?
    $endgroup$
    – Brian Tung
    Mar 25 at 22:23













1












1








1





$begingroup$


New here.



I'm trying to figure out how to come up with a roll system for a game, where i want the probability of rolling N dice or rolling one dice N times and then taking the two largest outcomes, adding them together and equaling them to some value.



I'd be happy if someone could help me with either a formula, pseudocode or the likes.



Thanks.



I already tried something with binomials etc., but i'm confused about the math.



Expected result of running the aforementioned example: 70.4%



EDIT:
I might have formulated the question wrong. Instead of rolling two dies 14 times and finding the sum of the larger two equaling 12, i'd like to e.g. find the sum of the two larger dice in a roll with 14 dice that equal to 8. This might change the answer?










share|cite|improve this question











$endgroup$




New here.



I'm trying to figure out how to come up with a roll system for a game, where i want the probability of rolling N dice or rolling one dice N times and then taking the two largest outcomes, adding them together and equaling them to some value.



I'd be happy if someone could help me with either a formula, pseudocode or the likes.



Thanks.



I already tried something with binomials etc., but i'm confused about the math.



Expected result of running the aforementioned example: 70.4%



EDIT:
I might have formulated the question wrong. Instead of rolling two dies 14 times and finding the sum of the larger two equaling 12, i'd like to e.g. find the sum of the two larger dice in a roll with 14 dice that equal to 8. This might change the answer?







python






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Mar 26 at 22:57







Jonathan

















asked Mar 25 at 20:34









JonathanJonathan

83




83











  • $begingroup$
    Are you saying that the sum of all the dice equals $14$. Then you must have rolled $14$ ones, and the sum of the two largest dice is $2$. I feel sure that this isn't what you are trying to ask, but I honestly can't guess what you might mean. Perhaps you could give an example of what you are looking for.
    $endgroup$
    – saulspatz
    Mar 25 at 21:20










  • $begingroup$
    Two 6 sided dices cannot sum to 14.
    $endgroup$
    – user
    Mar 25 at 21:24










  • $begingroup$
    meant 12, sorry.
    $endgroup$
    – Jonathan
    Mar 25 at 21:45










  • $begingroup$
    Do you want the find the probability that the highest two die values sum up to exactly $8$, or at least $8$?
    $endgroup$
    – Brian Tung
    Mar 25 at 22:23
















  • $begingroup$
    Are you saying that the sum of all the dice equals $14$. Then you must have rolled $14$ ones, and the sum of the two largest dice is $2$. I feel sure that this isn't what you are trying to ask, but I honestly can't guess what you might mean. Perhaps you could give an example of what you are looking for.
    $endgroup$
    – saulspatz
    Mar 25 at 21:20










  • $begingroup$
    Two 6 sided dices cannot sum to 14.
    $endgroup$
    – user
    Mar 25 at 21:24










  • $begingroup$
    meant 12, sorry.
    $endgroup$
    – Jonathan
    Mar 25 at 21:45










  • $begingroup$
    Do you want the find the probability that the highest two die values sum up to exactly $8$, or at least $8$?
    $endgroup$
    – Brian Tung
    Mar 25 at 22:23















$begingroup$
Are you saying that the sum of all the dice equals $14$. Then you must have rolled $14$ ones, and the sum of the two largest dice is $2$. I feel sure that this isn't what you are trying to ask, but I honestly can't guess what you might mean. Perhaps you could give an example of what you are looking for.
$endgroup$
– saulspatz
Mar 25 at 21:20




$begingroup$
Are you saying that the sum of all the dice equals $14$. Then you must have rolled $14$ ones, and the sum of the two largest dice is $2$. I feel sure that this isn't what you are trying to ask, but I honestly can't guess what you might mean. Perhaps you could give an example of what you are looking for.
$endgroup$
– saulspatz
Mar 25 at 21:20












$begingroup$
Two 6 sided dices cannot sum to 14.
$endgroup$
– user
Mar 25 at 21:24




$begingroup$
Two 6 sided dices cannot sum to 14.
$endgroup$
– user
Mar 25 at 21:24












$begingroup$
meant 12, sorry.
$endgroup$
– Jonathan
Mar 25 at 21:45




$begingroup$
meant 12, sorry.
$endgroup$
– Jonathan
Mar 25 at 21:45












$begingroup$
Do you want the find the probability that the highest two die values sum up to exactly $8$, or at least $8$?
$endgroup$
– Brian Tung
Mar 25 at 22:23




$begingroup$
Do you want the find the probability that the highest two die values sum up to exactly $8$, or at least $8$?
$endgroup$
– Brian Tung
Mar 25 at 22:23










3 Answers
3






active

oldest

votes


















2












$begingroup$

Your example is simple:
$$
p=1-left (frac56right)^14-binom 141 left (frac56right)^13left (frac16right)approx 0.704.$$



In this expression we have subtracted from $1$ the probabilities of having no or only one 6. The general expression will be much more complicated.




The general expression:
$$
p_X=sum_k=max(1,X-K)^min(K,lfloorfrac X2rfloor)sum_n=2^Nbinom Nn
left (frac1Kright)^n
left (frack-1Kright)^N-n n^1-delta_k,frac X2,
$$

where $X$ is the sum which probability is to be computed, $K$is the number of dice faces (numbered from $1$ to $K$), $N$ is the number of rolls, $delta$ is Kronecker delta, $lfloor xrfloor$ is the floor function.




Explanation of the formula:



Let the two largest numbers be $k$ and $k'$ ($1le kle k'le K$, $k+k'=X$). Any other result of a trial, $k''$, should be either less or equal to $k$. To avoid over-counting it is suggestive to consider the arrangements with distinct amount of trials giving the result "$k$" separately and then sum the resulting probabilities. This idea is implemented in the formula in the following way:



The first sum runs over all possible values of $k$. The limits of summation are chosen to ensure $k'=X-kge k$. The limits also take care of the finite set of allowed values $(1..K)$ for $k$. In the next sum each $n$ represents the cardinality of a multiset consisting of one $k'$ and $(n-1)$ $k$-numbers. The multiset can be placed in the overall result of $N$ trials in $binom Nn$ ways ($k$ and $k'$ are assumed for a moment to be indistinguishable). The probability that the final result contains such a multiset is $left (frac1Kright)^nleft (frack-1Kright)^N-n$, where the last factor stays for the probability to fill the rest $(N-n)$ places with numbers $k''<k$. Finally, if $kne k'$ (which is equivalent to $knefrac X2$), one among $n$ places chosen for the multiset shall be filled with $k$. This can be done in $binom n1=n$ ways, and this is the last factor in the expression.




Hope this helps.






share|cite|improve this answer











$endgroup$












  • $begingroup$
    what would the general formula look like? E.g. for 7 or 8 then?
    $endgroup$
    – Jonathan
    Mar 25 at 21:46










  • $begingroup$
    @Jonathan I have added the general formula. Hope this helps.
    $endgroup$
    – user
    Mar 26 at 0:05










  • $begingroup$
    An error, sorry.
    $endgroup$
    – Jonathan
    Mar 26 at 14:19










  • $begingroup$
    @Jonathan No problem. If you have suggestions for improving the answer don't hesitate to tell me.
    $endgroup$
    – user
    Mar 26 at 14:55


















1












$begingroup$

This is the same as the answer I gave to the now closed https://stats.stackexchange.com/questions/399396/probability-that-rolling-n-dice-that-the-two-larger-dice-sum-to-x/399409#399409.



Here is a program to solve the question:



import fractions

# The usual recursive factorial implementation.
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)

# The standard formula for n choose m
def choose(n, m):
return factorial(n) / factorial(m) / factorial(n-m)

# The number of ways to get a roll given a number of dice
# of a given size.
def num_dice_outcomes(num_of_dice, dice_size):
return dice_size**num_of_dice

# Recursive way to calculate rolling the dice and coming to a
# specific answer. Note, the cache uses memoization to make it
# faster.
cached_dice_outcomes =
def num_dice_outcomes_of_result(num_of_dice, dice_size, result):
# First the trivial answers.
if result < num_of_dice:
return 0
elif num_of_dice * dice_size < result:
return 0
elif num_of_dice < 0:
return 0
elif num_of_dice < 2:
# Either 0 from 0 dice, or something in the range
# 1..size_of_dice from 1 die. Either way there is 1 way.
return 1
else:
# The answer depends only on t.
t = (num_of_dice, dice_size, result)
# If we don't have a cached answer
if t not in cached_dice_outcomes:
answer = 0
# For each possible roll of the first die
for i in range(1, dice_size + 1):
# We add the number of ways that the rest adds up.
answer = answer + num_dice_outcomes_of_result(num_of_dice - 1, dice_size, result - i)
# And now cache it so that we don't repeat this calculation.
cached_dice_outcomes[t] = answer
return cached_dice_outcomes[t]

# This is the function that computes our answer. We will calculate
# the number of ways to get the right answer over the number of
# possible dice outcomes.
def prob_of_sum(result, num_of_dice, top_n_dice=2, dice_size=6):
# Get the number of possible dice outcomes.
total_count = num_dice_outcomes(num_of_dice, dice_size)

# Now count the number of outcomes that get the result.
result_count = 0
# cutoff is the smallest roll we will include in our top n dice.
# It is in the range 1..dice_size.
for cutoff in range(1, dice_size + 1):
# How more do we need to get from the dice that are above
# our cutoff?
result_above = result - cutoff * top_n_dice
# We can have 0..(top_n_dice - 1) dice above the cutoff.
for dice_above in range(top_n_dice):
# How many ways do the dice above get to the needed
# result above?
ways_above = num_dice_outcomes_of_result(dice_above, dice_size - cutoff, result_above)
# How many combinations of dice can be part of our dice above?
ways_dice_above = choose(num_of_dice, dice_above)
# How many dice are at our cutoff? This includes all of
# the top n that are not above, plus any number of the rest.
# That range works out to be:
# (top_n_dice - dice_above)..(num_of_dice - dice_above)
for dice_at_cutoff in range(top_n_dice - dice_above, num_of_dice - dice_above + 1):
# How many ways can we choose which dice are at the cutoff?
ways_dice_cutoff = choose(num_of_dice - dice_above, dice_at_cutoff)
# How many ways can the dice below the cutoff be rolled?
ways_dice_below = num_dice_outcomes(num_of_dice - dice_above - dice_at_cutoff, cutoff-1)
# We now know the number of ways to get this result from
# this cutoff, this many dice_above cutoff, and this many
# dice_at_cutoff.
this_ways = ways_above * ways_dice_above * ways_dice_cutoff * ways_dice_below
# Add that to our running total.
result_count = result_count + this_ways
# We return a fraction to get exact arithmetic, even if the numbers
# involved are very large.
return fractions.Fraction(result_count, total_count)

# We print our answer as a float for convenience.
print(float(prob_of_sum(12, 14, 2, 6))) # 0.704031049874





share|cite|improve this answer











$endgroup$




















    0












    $begingroup$

    I assume throughout that the die used is $6$ sided.



    Taking each value of $X$ separately there are $11$ possible values the 'larger sum' can take - $2,3,4,5,6,7,8,9,10,11,12$. In order to achieve $X=2$ in $n$ rolls of the die, one must roll $n$ $1$s which has a probability of $frac16^n$ of occurring. For $X=3$ one must roll a single $2$ and otherwise $1$s. The probability of this occurring is $binomn1frac16^n=fracn6^n$ because the $2$ can be rolled in any of the $n$ rolls and there are $n$ total rolls occurring with a probability of $frac16$ of occurring. For $X=4$ one can roll any number of $2$s greater than or equal to two and otherwise roll a $1$. The probability of this occurring is equal to $frac13^n-frac1+n6^n=frac2^n-n-16^n$ because this is just equal to the probability of rolling $n$ $1$s or $2$s and not rolling either all $1$s or only one $2$ ($X=2$ and $X=3$ respectively). One can continue like this to formulate every possibility up to $X=12$.






    share|cite|improve this answer









    $endgroup$












    • $begingroup$
      i edited the question as i might have explained it wrong. I'm interested in knowing whether in a roll with 14 dice, what the probability that two larger among the 14 dice, equal to 12. Sorry, if this changes things.
      $endgroup$
      – Jonathan
      Mar 25 at 21:15










    • $begingroup$
      So the two largest values rolled are $6$? In which case you need to roll at least $2$ sixes out of $14$. This can be found using a binomial distribution.
      $endgroup$
      – Peter Foreman
      Mar 25 at 21:22










    • $begingroup$
      I have 14 dice, i roll them all at once. What is the probability that the two "largest" (most eyes) equal to e.g. 8. Does that help?
      $endgroup$
      – Jonathan
      Mar 25 at 21:49










    • $begingroup$
      That is what I understood the problem as and I began to explain how one would calculate this above.
      $endgroup$
      – Peter Foreman
      Mar 25 at 21:50










    • $begingroup$
      For $8$ to occur one must roll at least two $4$s and every other die less than or equal to $4$; orr one could roll a $5$, $3$ and every other roll be less than or equal to $3$; or one could roll a $6$, $2$ and every other roll be less than or equal to $2$. Calculate the probability of these events occurring and add them together.
      $endgroup$
      – Peter Foreman
      Mar 25 at 21:52











    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "69"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3162287%2fprobability-that-rolling-dice-that-two-dice-sum-to-x%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2












    $begingroup$

    Your example is simple:
    $$
    p=1-left (frac56right)^14-binom 141 left (frac56right)^13left (frac16right)approx 0.704.$$



    In this expression we have subtracted from $1$ the probabilities of having no or only one 6. The general expression will be much more complicated.




    The general expression:
    $$
    p_X=sum_k=max(1,X-K)^min(K,lfloorfrac X2rfloor)sum_n=2^Nbinom Nn
    left (frac1Kright)^n
    left (frack-1Kright)^N-n n^1-delta_k,frac X2,
    $$

    where $X$ is the sum which probability is to be computed, $K$is the number of dice faces (numbered from $1$ to $K$), $N$ is the number of rolls, $delta$ is Kronecker delta, $lfloor xrfloor$ is the floor function.




    Explanation of the formula:



    Let the two largest numbers be $k$ and $k'$ ($1le kle k'le K$, $k+k'=X$). Any other result of a trial, $k''$, should be either less or equal to $k$. To avoid over-counting it is suggestive to consider the arrangements with distinct amount of trials giving the result "$k$" separately and then sum the resulting probabilities. This idea is implemented in the formula in the following way:



    The first sum runs over all possible values of $k$. The limits of summation are chosen to ensure $k'=X-kge k$. The limits also take care of the finite set of allowed values $(1..K)$ for $k$. In the next sum each $n$ represents the cardinality of a multiset consisting of one $k'$ and $(n-1)$ $k$-numbers. The multiset can be placed in the overall result of $N$ trials in $binom Nn$ ways ($k$ and $k'$ are assumed for a moment to be indistinguishable). The probability that the final result contains such a multiset is $left (frac1Kright)^nleft (frack-1Kright)^N-n$, where the last factor stays for the probability to fill the rest $(N-n)$ places with numbers $k''<k$. Finally, if $kne k'$ (which is equivalent to $knefrac X2$), one among $n$ places chosen for the multiset shall be filled with $k$. This can be done in $binom n1=n$ ways, and this is the last factor in the expression.




    Hope this helps.






    share|cite|improve this answer











    $endgroup$












    • $begingroup$
      what would the general formula look like? E.g. for 7 or 8 then?
      $endgroup$
      – Jonathan
      Mar 25 at 21:46










    • $begingroup$
      @Jonathan I have added the general formula. Hope this helps.
      $endgroup$
      – user
      Mar 26 at 0:05










    • $begingroup$
      An error, sorry.
      $endgroup$
      – Jonathan
      Mar 26 at 14:19










    • $begingroup$
      @Jonathan No problem. If you have suggestions for improving the answer don't hesitate to tell me.
      $endgroup$
      – user
      Mar 26 at 14:55















    2












    $begingroup$

    Your example is simple:
    $$
    p=1-left (frac56right)^14-binom 141 left (frac56right)^13left (frac16right)approx 0.704.$$



    In this expression we have subtracted from $1$ the probabilities of having no or only one 6. The general expression will be much more complicated.




    The general expression:
    $$
    p_X=sum_k=max(1,X-K)^min(K,lfloorfrac X2rfloor)sum_n=2^Nbinom Nn
    left (frac1Kright)^n
    left (frack-1Kright)^N-n n^1-delta_k,frac X2,
    $$

    where $X$ is the sum which probability is to be computed, $K$is the number of dice faces (numbered from $1$ to $K$), $N$ is the number of rolls, $delta$ is Kronecker delta, $lfloor xrfloor$ is the floor function.




    Explanation of the formula:



    Let the two largest numbers be $k$ and $k'$ ($1le kle k'le K$, $k+k'=X$). Any other result of a trial, $k''$, should be either less or equal to $k$. To avoid over-counting it is suggestive to consider the arrangements with distinct amount of trials giving the result "$k$" separately and then sum the resulting probabilities. This idea is implemented in the formula in the following way:



    The first sum runs over all possible values of $k$. The limits of summation are chosen to ensure $k'=X-kge k$. The limits also take care of the finite set of allowed values $(1..K)$ for $k$. In the next sum each $n$ represents the cardinality of a multiset consisting of one $k'$ and $(n-1)$ $k$-numbers. The multiset can be placed in the overall result of $N$ trials in $binom Nn$ ways ($k$ and $k'$ are assumed for a moment to be indistinguishable). The probability that the final result contains such a multiset is $left (frac1Kright)^nleft (frack-1Kright)^N-n$, where the last factor stays for the probability to fill the rest $(N-n)$ places with numbers $k''<k$. Finally, if $kne k'$ (which is equivalent to $knefrac X2$), one among $n$ places chosen for the multiset shall be filled with $k$. This can be done in $binom n1=n$ ways, and this is the last factor in the expression.




    Hope this helps.






    share|cite|improve this answer











    $endgroup$












    • $begingroup$
      what would the general formula look like? E.g. for 7 or 8 then?
      $endgroup$
      – Jonathan
      Mar 25 at 21:46










    • $begingroup$
      @Jonathan I have added the general formula. Hope this helps.
      $endgroup$
      – user
      Mar 26 at 0:05










    • $begingroup$
      An error, sorry.
      $endgroup$
      – Jonathan
      Mar 26 at 14:19










    • $begingroup$
      @Jonathan No problem. If you have suggestions for improving the answer don't hesitate to tell me.
      $endgroup$
      – user
      Mar 26 at 14:55













    2












    2








    2





    $begingroup$

    Your example is simple:
    $$
    p=1-left (frac56right)^14-binom 141 left (frac56right)^13left (frac16right)approx 0.704.$$



    In this expression we have subtracted from $1$ the probabilities of having no or only one 6. The general expression will be much more complicated.




    The general expression:
    $$
    p_X=sum_k=max(1,X-K)^min(K,lfloorfrac X2rfloor)sum_n=2^Nbinom Nn
    left (frac1Kright)^n
    left (frack-1Kright)^N-n n^1-delta_k,frac X2,
    $$

    where $X$ is the sum which probability is to be computed, $K$is the number of dice faces (numbered from $1$ to $K$), $N$ is the number of rolls, $delta$ is Kronecker delta, $lfloor xrfloor$ is the floor function.




    Explanation of the formula:



    Let the two largest numbers be $k$ and $k'$ ($1le kle k'le K$, $k+k'=X$). Any other result of a trial, $k''$, should be either less or equal to $k$. To avoid over-counting it is suggestive to consider the arrangements with distinct amount of trials giving the result "$k$" separately and then sum the resulting probabilities. This idea is implemented in the formula in the following way:



    The first sum runs over all possible values of $k$. The limits of summation are chosen to ensure $k'=X-kge k$. The limits also take care of the finite set of allowed values $(1..K)$ for $k$. In the next sum each $n$ represents the cardinality of a multiset consisting of one $k'$ and $(n-1)$ $k$-numbers. The multiset can be placed in the overall result of $N$ trials in $binom Nn$ ways ($k$ and $k'$ are assumed for a moment to be indistinguishable). The probability that the final result contains such a multiset is $left (frac1Kright)^nleft (frack-1Kright)^N-n$, where the last factor stays for the probability to fill the rest $(N-n)$ places with numbers $k''<k$. Finally, if $kne k'$ (which is equivalent to $knefrac X2$), one among $n$ places chosen for the multiset shall be filled with $k$. This can be done in $binom n1=n$ ways, and this is the last factor in the expression.




    Hope this helps.






    share|cite|improve this answer











    $endgroup$



    Your example is simple:
    $$
    p=1-left (frac56right)^14-binom 141 left (frac56right)^13left (frac16right)approx 0.704.$$



    In this expression we have subtracted from $1$ the probabilities of having no or only one 6. The general expression will be much more complicated.




    The general expression:
    $$
    p_X=sum_k=max(1,X-K)^min(K,lfloorfrac X2rfloor)sum_n=2^Nbinom Nn
    left (frac1Kright)^n
    left (frack-1Kright)^N-n n^1-delta_k,frac X2,
    $$

    where $X$ is the sum which probability is to be computed, $K$is the number of dice faces (numbered from $1$ to $K$), $N$ is the number of rolls, $delta$ is Kronecker delta, $lfloor xrfloor$ is the floor function.




    Explanation of the formula:



    Let the two largest numbers be $k$ and $k'$ ($1le kle k'le K$, $k+k'=X$). Any other result of a trial, $k''$, should be either less or equal to $k$. To avoid over-counting it is suggestive to consider the arrangements with distinct amount of trials giving the result "$k$" separately and then sum the resulting probabilities. This idea is implemented in the formula in the following way:



    The first sum runs over all possible values of $k$. The limits of summation are chosen to ensure $k'=X-kge k$. The limits also take care of the finite set of allowed values $(1..K)$ for $k$. In the next sum each $n$ represents the cardinality of a multiset consisting of one $k'$ and $(n-1)$ $k$-numbers. The multiset can be placed in the overall result of $N$ trials in $binom Nn$ ways ($k$ and $k'$ are assumed for a moment to be indistinguishable). The probability that the final result contains such a multiset is $left (frac1Kright)^nleft (frack-1Kright)^N-n$, where the last factor stays for the probability to fill the rest $(N-n)$ places with numbers $k''<k$. Finally, if $kne k'$ (which is equivalent to $knefrac X2$), one among $n$ places chosen for the multiset shall be filled with $k$. This can be done in $binom n1=n$ ways, and this is the last factor in the expression.




    Hope this helps.







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited Mar 26 at 19:44

























    answered Mar 25 at 21:34









    useruser

    6,57011031




    6,57011031











    • $begingroup$
      what would the general formula look like? E.g. for 7 or 8 then?
      $endgroup$
      – Jonathan
      Mar 25 at 21:46










    • $begingroup$
      @Jonathan I have added the general formula. Hope this helps.
      $endgroup$
      – user
      Mar 26 at 0:05










    • $begingroup$
      An error, sorry.
      $endgroup$
      – Jonathan
      Mar 26 at 14:19










    • $begingroup$
      @Jonathan No problem. If you have suggestions for improving the answer don't hesitate to tell me.
      $endgroup$
      – user
      Mar 26 at 14:55
















    • $begingroup$
      what would the general formula look like? E.g. for 7 or 8 then?
      $endgroup$
      – Jonathan
      Mar 25 at 21:46










    • $begingroup$
      @Jonathan I have added the general formula. Hope this helps.
      $endgroup$
      – user
      Mar 26 at 0:05










    • $begingroup$
      An error, sorry.
      $endgroup$
      – Jonathan
      Mar 26 at 14:19










    • $begingroup$
      @Jonathan No problem. If you have suggestions for improving the answer don't hesitate to tell me.
      $endgroup$
      – user
      Mar 26 at 14:55















    $begingroup$
    what would the general formula look like? E.g. for 7 or 8 then?
    $endgroup$
    – Jonathan
    Mar 25 at 21:46




    $begingroup$
    what would the general formula look like? E.g. for 7 or 8 then?
    $endgroup$
    – Jonathan
    Mar 25 at 21:46












    $begingroup$
    @Jonathan I have added the general formula. Hope this helps.
    $endgroup$
    – user
    Mar 26 at 0:05




    $begingroup$
    @Jonathan I have added the general formula. Hope this helps.
    $endgroup$
    – user
    Mar 26 at 0:05












    $begingroup$
    An error, sorry.
    $endgroup$
    – Jonathan
    Mar 26 at 14:19




    $begingroup$
    An error, sorry.
    $endgroup$
    – Jonathan
    Mar 26 at 14:19












    $begingroup$
    @Jonathan No problem. If you have suggestions for improving the answer don't hesitate to tell me.
    $endgroup$
    – user
    Mar 26 at 14:55




    $begingroup$
    @Jonathan No problem. If you have suggestions for improving the answer don't hesitate to tell me.
    $endgroup$
    – user
    Mar 26 at 14:55











    1












    $begingroup$

    This is the same as the answer I gave to the now closed https://stats.stackexchange.com/questions/399396/probability-that-rolling-n-dice-that-the-two-larger-dice-sum-to-x/399409#399409.



    Here is a program to solve the question:



    import fractions

    # The usual recursive factorial implementation.
    def factorial(n):
    if n == 0:
    return 1
    else:
    return n * factorial(n-1)

    # The standard formula for n choose m
    def choose(n, m):
    return factorial(n) / factorial(m) / factorial(n-m)

    # The number of ways to get a roll given a number of dice
    # of a given size.
    def num_dice_outcomes(num_of_dice, dice_size):
    return dice_size**num_of_dice

    # Recursive way to calculate rolling the dice and coming to a
    # specific answer. Note, the cache uses memoization to make it
    # faster.
    cached_dice_outcomes =
    def num_dice_outcomes_of_result(num_of_dice, dice_size, result):
    # First the trivial answers.
    if result < num_of_dice:
    return 0
    elif num_of_dice * dice_size < result:
    return 0
    elif num_of_dice < 0:
    return 0
    elif num_of_dice < 2:
    # Either 0 from 0 dice, or something in the range
    # 1..size_of_dice from 1 die. Either way there is 1 way.
    return 1
    else:
    # The answer depends only on t.
    t = (num_of_dice, dice_size, result)
    # If we don't have a cached answer
    if t not in cached_dice_outcomes:
    answer = 0
    # For each possible roll of the first die
    for i in range(1, dice_size + 1):
    # We add the number of ways that the rest adds up.
    answer = answer + num_dice_outcomes_of_result(num_of_dice - 1, dice_size, result - i)
    # And now cache it so that we don't repeat this calculation.
    cached_dice_outcomes[t] = answer
    return cached_dice_outcomes[t]

    # This is the function that computes our answer. We will calculate
    # the number of ways to get the right answer over the number of
    # possible dice outcomes.
    def prob_of_sum(result, num_of_dice, top_n_dice=2, dice_size=6):
    # Get the number of possible dice outcomes.
    total_count = num_dice_outcomes(num_of_dice, dice_size)

    # Now count the number of outcomes that get the result.
    result_count = 0
    # cutoff is the smallest roll we will include in our top n dice.
    # It is in the range 1..dice_size.
    for cutoff in range(1, dice_size + 1):
    # How more do we need to get from the dice that are above
    # our cutoff?
    result_above = result - cutoff * top_n_dice
    # We can have 0..(top_n_dice - 1) dice above the cutoff.
    for dice_above in range(top_n_dice):
    # How many ways do the dice above get to the needed
    # result above?
    ways_above = num_dice_outcomes_of_result(dice_above, dice_size - cutoff, result_above)
    # How many combinations of dice can be part of our dice above?
    ways_dice_above = choose(num_of_dice, dice_above)
    # How many dice are at our cutoff? This includes all of
    # the top n that are not above, plus any number of the rest.
    # That range works out to be:
    # (top_n_dice - dice_above)..(num_of_dice - dice_above)
    for dice_at_cutoff in range(top_n_dice - dice_above, num_of_dice - dice_above + 1):
    # How many ways can we choose which dice are at the cutoff?
    ways_dice_cutoff = choose(num_of_dice - dice_above, dice_at_cutoff)
    # How many ways can the dice below the cutoff be rolled?
    ways_dice_below = num_dice_outcomes(num_of_dice - dice_above - dice_at_cutoff, cutoff-1)
    # We now know the number of ways to get this result from
    # this cutoff, this many dice_above cutoff, and this many
    # dice_at_cutoff.
    this_ways = ways_above * ways_dice_above * ways_dice_cutoff * ways_dice_below
    # Add that to our running total.
    result_count = result_count + this_ways
    # We return a fraction to get exact arithmetic, even if the numbers
    # involved are very large.
    return fractions.Fraction(result_count, total_count)

    # We print our answer as a float for convenience.
    print(float(prob_of_sum(12, 14, 2, 6))) # 0.704031049874





    share|cite|improve this answer











    $endgroup$

















      1












      $begingroup$

      This is the same as the answer I gave to the now closed https://stats.stackexchange.com/questions/399396/probability-that-rolling-n-dice-that-the-two-larger-dice-sum-to-x/399409#399409.



      Here is a program to solve the question:



      import fractions

      # The usual recursive factorial implementation.
      def factorial(n):
      if n == 0:
      return 1
      else:
      return n * factorial(n-1)

      # The standard formula for n choose m
      def choose(n, m):
      return factorial(n) / factorial(m) / factorial(n-m)

      # The number of ways to get a roll given a number of dice
      # of a given size.
      def num_dice_outcomes(num_of_dice, dice_size):
      return dice_size**num_of_dice

      # Recursive way to calculate rolling the dice and coming to a
      # specific answer. Note, the cache uses memoization to make it
      # faster.
      cached_dice_outcomes =
      def num_dice_outcomes_of_result(num_of_dice, dice_size, result):
      # First the trivial answers.
      if result < num_of_dice:
      return 0
      elif num_of_dice * dice_size < result:
      return 0
      elif num_of_dice < 0:
      return 0
      elif num_of_dice < 2:
      # Either 0 from 0 dice, or something in the range
      # 1..size_of_dice from 1 die. Either way there is 1 way.
      return 1
      else:
      # The answer depends only on t.
      t = (num_of_dice, dice_size, result)
      # If we don't have a cached answer
      if t not in cached_dice_outcomes:
      answer = 0
      # For each possible roll of the first die
      for i in range(1, dice_size + 1):
      # We add the number of ways that the rest adds up.
      answer = answer + num_dice_outcomes_of_result(num_of_dice - 1, dice_size, result - i)
      # And now cache it so that we don't repeat this calculation.
      cached_dice_outcomes[t] = answer
      return cached_dice_outcomes[t]

      # This is the function that computes our answer. We will calculate
      # the number of ways to get the right answer over the number of
      # possible dice outcomes.
      def prob_of_sum(result, num_of_dice, top_n_dice=2, dice_size=6):
      # Get the number of possible dice outcomes.
      total_count = num_dice_outcomes(num_of_dice, dice_size)

      # Now count the number of outcomes that get the result.
      result_count = 0
      # cutoff is the smallest roll we will include in our top n dice.
      # It is in the range 1..dice_size.
      for cutoff in range(1, dice_size + 1):
      # How more do we need to get from the dice that are above
      # our cutoff?
      result_above = result - cutoff * top_n_dice
      # We can have 0..(top_n_dice - 1) dice above the cutoff.
      for dice_above in range(top_n_dice):
      # How many ways do the dice above get to the needed
      # result above?
      ways_above = num_dice_outcomes_of_result(dice_above, dice_size - cutoff, result_above)
      # How many combinations of dice can be part of our dice above?
      ways_dice_above = choose(num_of_dice, dice_above)
      # How many dice are at our cutoff? This includes all of
      # the top n that are not above, plus any number of the rest.
      # That range works out to be:
      # (top_n_dice - dice_above)..(num_of_dice - dice_above)
      for dice_at_cutoff in range(top_n_dice - dice_above, num_of_dice - dice_above + 1):
      # How many ways can we choose which dice are at the cutoff?
      ways_dice_cutoff = choose(num_of_dice - dice_above, dice_at_cutoff)
      # How many ways can the dice below the cutoff be rolled?
      ways_dice_below = num_dice_outcomes(num_of_dice - dice_above - dice_at_cutoff, cutoff-1)
      # We now know the number of ways to get this result from
      # this cutoff, this many dice_above cutoff, and this many
      # dice_at_cutoff.
      this_ways = ways_above * ways_dice_above * ways_dice_cutoff * ways_dice_below
      # Add that to our running total.
      result_count = result_count + this_ways
      # We return a fraction to get exact arithmetic, even if the numbers
      # involved are very large.
      return fractions.Fraction(result_count, total_count)

      # We print our answer as a float for convenience.
      print(float(prob_of_sum(12, 14, 2, 6))) # 0.704031049874





      share|cite|improve this answer











      $endgroup$















        1












        1








        1





        $begingroup$

        This is the same as the answer I gave to the now closed https://stats.stackexchange.com/questions/399396/probability-that-rolling-n-dice-that-the-two-larger-dice-sum-to-x/399409#399409.



        Here is a program to solve the question:



        import fractions

        # The usual recursive factorial implementation.
        def factorial(n):
        if n == 0:
        return 1
        else:
        return n * factorial(n-1)

        # The standard formula for n choose m
        def choose(n, m):
        return factorial(n) / factorial(m) / factorial(n-m)

        # The number of ways to get a roll given a number of dice
        # of a given size.
        def num_dice_outcomes(num_of_dice, dice_size):
        return dice_size**num_of_dice

        # Recursive way to calculate rolling the dice and coming to a
        # specific answer. Note, the cache uses memoization to make it
        # faster.
        cached_dice_outcomes =
        def num_dice_outcomes_of_result(num_of_dice, dice_size, result):
        # First the trivial answers.
        if result < num_of_dice:
        return 0
        elif num_of_dice * dice_size < result:
        return 0
        elif num_of_dice < 0:
        return 0
        elif num_of_dice < 2:
        # Either 0 from 0 dice, or something in the range
        # 1..size_of_dice from 1 die. Either way there is 1 way.
        return 1
        else:
        # The answer depends only on t.
        t = (num_of_dice, dice_size, result)
        # If we don't have a cached answer
        if t not in cached_dice_outcomes:
        answer = 0
        # For each possible roll of the first die
        for i in range(1, dice_size + 1):
        # We add the number of ways that the rest adds up.
        answer = answer + num_dice_outcomes_of_result(num_of_dice - 1, dice_size, result - i)
        # And now cache it so that we don't repeat this calculation.
        cached_dice_outcomes[t] = answer
        return cached_dice_outcomes[t]

        # This is the function that computes our answer. We will calculate
        # the number of ways to get the right answer over the number of
        # possible dice outcomes.
        def prob_of_sum(result, num_of_dice, top_n_dice=2, dice_size=6):
        # Get the number of possible dice outcomes.
        total_count = num_dice_outcomes(num_of_dice, dice_size)

        # Now count the number of outcomes that get the result.
        result_count = 0
        # cutoff is the smallest roll we will include in our top n dice.
        # It is in the range 1..dice_size.
        for cutoff in range(1, dice_size + 1):
        # How more do we need to get from the dice that are above
        # our cutoff?
        result_above = result - cutoff * top_n_dice
        # We can have 0..(top_n_dice - 1) dice above the cutoff.
        for dice_above in range(top_n_dice):
        # How many ways do the dice above get to the needed
        # result above?
        ways_above = num_dice_outcomes_of_result(dice_above, dice_size - cutoff, result_above)
        # How many combinations of dice can be part of our dice above?
        ways_dice_above = choose(num_of_dice, dice_above)
        # How many dice are at our cutoff? This includes all of
        # the top n that are not above, plus any number of the rest.
        # That range works out to be:
        # (top_n_dice - dice_above)..(num_of_dice - dice_above)
        for dice_at_cutoff in range(top_n_dice - dice_above, num_of_dice - dice_above + 1):
        # How many ways can we choose which dice are at the cutoff?
        ways_dice_cutoff = choose(num_of_dice - dice_above, dice_at_cutoff)
        # How many ways can the dice below the cutoff be rolled?
        ways_dice_below = num_dice_outcomes(num_of_dice - dice_above - dice_at_cutoff, cutoff-1)
        # We now know the number of ways to get this result from
        # this cutoff, this many dice_above cutoff, and this many
        # dice_at_cutoff.
        this_ways = ways_above * ways_dice_above * ways_dice_cutoff * ways_dice_below
        # Add that to our running total.
        result_count = result_count + this_ways
        # We return a fraction to get exact arithmetic, even if the numbers
        # involved are very large.
        return fractions.Fraction(result_count, total_count)

        # We print our answer as a float for convenience.
        print(float(prob_of_sum(12, 14, 2, 6))) # 0.704031049874





        share|cite|improve this answer











        $endgroup$



        This is the same as the answer I gave to the now closed https://stats.stackexchange.com/questions/399396/probability-that-rolling-n-dice-that-the-two-larger-dice-sum-to-x/399409#399409.



        Here is a program to solve the question:



        import fractions

        # The usual recursive factorial implementation.
        def factorial(n):
        if n == 0:
        return 1
        else:
        return n * factorial(n-1)

        # The standard formula for n choose m
        def choose(n, m):
        return factorial(n) / factorial(m) / factorial(n-m)

        # The number of ways to get a roll given a number of dice
        # of a given size.
        def num_dice_outcomes(num_of_dice, dice_size):
        return dice_size**num_of_dice

        # Recursive way to calculate rolling the dice and coming to a
        # specific answer. Note, the cache uses memoization to make it
        # faster.
        cached_dice_outcomes =
        def num_dice_outcomes_of_result(num_of_dice, dice_size, result):
        # First the trivial answers.
        if result < num_of_dice:
        return 0
        elif num_of_dice * dice_size < result:
        return 0
        elif num_of_dice < 0:
        return 0
        elif num_of_dice < 2:
        # Either 0 from 0 dice, or something in the range
        # 1..size_of_dice from 1 die. Either way there is 1 way.
        return 1
        else:
        # The answer depends only on t.
        t = (num_of_dice, dice_size, result)
        # If we don't have a cached answer
        if t not in cached_dice_outcomes:
        answer = 0
        # For each possible roll of the first die
        for i in range(1, dice_size + 1):
        # We add the number of ways that the rest adds up.
        answer = answer + num_dice_outcomes_of_result(num_of_dice - 1, dice_size, result - i)
        # And now cache it so that we don't repeat this calculation.
        cached_dice_outcomes[t] = answer
        return cached_dice_outcomes[t]

        # This is the function that computes our answer. We will calculate
        # the number of ways to get the right answer over the number of
        # possible dice outcomes.
        def prob_of_sum(result, num_of_dice, top_n_dice=2, dice_size=6):
        # Get the number of possible dice outcomes.
        total_count = num_dice_outcomes(num_of_dice, dice_size)

        # Now count the number of outcomes that get the result.
        result_count = 0
        # cutoff is the smallest roll we will include in our top n dice.
        # It is in the range 1..dice_size.
        for cutoff in range(1, dice_size + 1):
        # How more do we need to get from the dice that are above
        # our cutoff?
        result_above = result - cutoff * top_n_dice
        # We can have 0..(top_n_dice - 1) dice above the cutoff.
        for dice_above in range(top_n_dice):
        # How many ways do the dice above get to the needed
        # result above?
        ways_above = num_dice_outcomes_of_result(dice_above, dice_size - cutoff, result_above)
        # How many combinations of dice can be part of our dice above?
        ways_dice_above = choose(num_of_dice, dice_above)
        # How many dice are at our cutoff? This includes all of
        # the top n that are not above, plus any number of the rest.
        # That range works out to be:
        # (top_n_dice - dice_above)..(num_of_dice - dice_above)
        for dice_at_cutoff in range(top_n_dice - dice_above, num_of_dice - dice_above + 1):
        # How many ways can we choose which dice are at the cutoff?
        ways_dice_cutoff = choose(num_of_dice - dice_above, dice_at_cutoff)
        # How many ways can the dice below the cutoff be rolled?
        ways_dice_below = num_dice_outcomes(num_of_dice - dice_above - dice_at_cutoff, cutoff-1)
        # We now know the number of ways to get this result from
        # this cutoff, this many dice_above cutoff, and this many
        # dice_at_cutoff.
        this_ways = ways_above * ways_dice_above * ways_dice_cutoff * ways_dice_below
        # Add that to our running total.
        result_count = result_count + this_ways
        # We return a fraction to get exact arithmetic, even if the numbers
        # involved are very large.
        return fractions.Fraction(result_count, total_count)

        # We print our answer as a float for convenience.
        print(float(prob_of_sum(12, 14, 2, 6))) # 0.704031049874






        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Mar 26 at 17:11

























        answered Mar 26 at 3:53









        btillybtilly

        96068




        96068





















            0












            $begingroup$

            I assume throughout that the die used is $6$ sided.



            Taking each value of $X$ separately there are $11$ possible values the 'larger sum' can take - $2,3,4,5,6,7,8,9,10,11,12$. In order to achieve $X=2$ in $n$ rolls of the die, one must roll $n$ $1$s which has a probability of $frac16^n$ of occurring. For $X=3$ one must roll a single $2$ and otherwise $1$s. The probability of this occurring is $binomn1frac16^n=fracn6^n$ because the $2$ can be rolled in any of the $n$ rolls and there are $n$ total rolls occurring with a probability of $frac16$ of occurring. For $X=4$ one can roll any number of $2$s greater than or equal to two and otherwise roll a $1$. The probability of this occurring is equal to $frac13^n-frac1+n6^n=frac2^n-n-16^n$ because this is just equal to the probability of rolling $n$ $1$s or $2$s and not rolling either all $1$s or only one $2$ ($X=2$ and $X=3$ respectively). One can continue like this to formulate every possibility up to $X=12$.






            share|cite|improve this answer









            $endgroup$












            • $begingroup$
              i edited the question as i might have explained it wrong. I'm interested in knowing whether in a roll with 14 dice, what the probability that two larger among the 14 dice, equal to 12. Sorry, if this changes things.
              $endgroup$
              – Jonathan
              Mar 25 at 21:15










            • $begingroup$
              So the two largest values rolled are $6$? In which case you need to roll at least $2$ sixes out of $14$. This can be found using a binomial distribution.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:22










            • $begingroup$
              I have 14 dice, i roll them all at once. What is the probability that the two "largest" (most eyes) equal to e.g. 8. Does that help?
              $endgroup$
              – Jonathan
              Mar 25 at 21:49










            • $begingroup$
              That is what I understood the problem as and I began to explain how one would calculate this above.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:50










            • $begingroup$
              For $8$ to occur one must roll at least two $4$s and every other die less than or equal to $4$; orr one could roll a $5$, $3$ and every other roll be less than or equal to $3$; or one could roll a $6$, $2$ and every other roll be less than or equal to $2$. Calculate the probability of these events occurring and add them together.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:52















            0












            $begingroup$

            I assume throughout that the die used is $6$ sided.



            Taking each value of $X$ separately there are $11$ possible values the 'larger sum' can take - $2,3,4,5,6,7,8,9,10,11,12$. In order to achieve $X=2$ in $n$ rolls of the die, one must roll $n$ $1$s which has a probability of $frac16^n$ of occurring. For $X=3$ one must roll a single $2$ and otherwise $1$s. The probability of this occurring is $binomn1frac16^n=fracn6^n$ because the $2$ can be rolled in any of the $n$ rolls and there are $n$ total rolls occurring with a probability of $frac16$ of occurring. For $X=4$ one can roll any number of $2$s greater than or equal to two and otherwise roll a $1$. The probability of this occurring is equal to $frac13^n-frac1+n6^n=frac2^n-n-16^n$ because this is just equal to the probability of rolling $n$ $1$s or $2$s and not rolling either all $1$s or only one $2$ ($X=2$ and $X=3$ respectively). One can continue like this to formulate every possibility up to $X=12$.






            share|cite|improve this answer









            $endgroup$












            • $begingroup$
              i edited the question as i might have explained it wrong. I'm interested in knowing whether in a roll with 14 dice, what the probability that two larger among the 14 dice, equal to 12. Sorry, if this changes things.
              $endgroup$
              – Jonathan
              Mar 25 at 21:15










            • $begingroup$
              So the two largest values rolled are $6$? In which case you need to roll at least $2$ sixes out of $14$. This can be found using a binomial distribution.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:22










            • $begingroup$
              I have 14 dice, i roll them all at once. What is the probability that the two "largest" (most eyes) equal to e.g. 8. Does that help?
              $endgroup$
              – Jonathan
              Mar 25 at 21:49










            • $begingroup$
              That is what I understood the problem as and I began to explain how one would calculate this above.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:50










            • $begingroup$
              For $8$ to occur one must roll at least two $4$s and every other die less than or equal to $4$; orr one could roll a $5$, $3$ and every other roll be less than or equal to $3$; or one could roll a $6$, $2$ and every other roll be less than or equal to $2$. Calculate the probability of these events occurring and add them together.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:52













            0












            0








            0





            $begingroup$

            I assume throughout that the die used is $6$ sided.



            Taking each value of $X$ separately there are $11$ possible values the 'larger sum' can take - $2,3,4,5,6,7,8,9,10,11,12$. In order to achieve $X=2$ in $n$ rolls of the die, one must roll $n$ $1$s which has a probability of $frac16^n$ of occurring. For $X=3$ one must roll a single $2$ and otherwise $1$s. The probability of this occurring is $binomn1frac16^n=fracn6^n$ because the $2$ can be rolled in any of the $n$ rolls and there are $n$ total rolls occurring with a probability of $frac16$ of occurring. For $X=4$ one can roll any number of $2$s greater than or equal to two and otherwise roll a $1$. The probability of this occurring is equal to $frac13^n-frac1+n6^n=frac2^n-n-16^n$ because this is just equal to the probability of rolling $n$ $1$s or $2$s and not rolling either all $1$s or only one $2$ ($X=2$ and $X=3$ respectively). One can continue like this to formulate every possibility up to $X=12$.






            share|cite|improve this answer









            $endgroup$



            I assume throughout that the die used is $6$ sided.



            Taking each value of $X$ separately there are $11$ possible values the 'larger sum' can take - $2,3,4,5,6,7,8,9,10,11,12$. In order to achieve $X=2$ in $n$ rolls of the die, one must roll $n$ $1$s which has a probability of $frac16^n$ of occurring. For $X=3$ one must roll a single $2$ and otherwise $1$s. The probability of this occurring is $binomn1frac16^n=fracn6^n$ because the $2$ can be rolled in any of the $n$ rolls and there are $n$ total rolls occurring with a probability of $frac16$ of occurring. For $X=4$ one can roll any number of $2$s greater than or equal to two and otherwise roll a $1$. The probability of this occurring is equal to $frac13^n-frac1+n6^n=frac2^n-n-16^n$ because this is just equal to the probability of rolling $n$ $1$s or $2$s and not rolling either all $1$s or only one $2$ ($X=2$ and $X=3$ respectively). One can continue like this to formulate every possibility up to $X=12$.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Mar 25 at 20:57









            Peter ForemanPeter Foreman

            7,2411319




            7,2411319











            • $begingroup$
              i edited the question as i might have explained it wrong. I'm interested in knowing whether in a roll with 14 dice, what the probability that two larger among the 14 dice, equal to 12. Sorry, if this changes things.
              $endgroup$
              – Jonathan
              Mar 25 at 21:15










            • $begingroup$
              So the two largest values rolled are $6$? In which case you need to roll at least $2$ sixes out of $14$. This can be found using a binomial distribution.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:22










            • $begingroup$
              I have 14 dice, i roll them all at once. What is the probability that the two "largest" (most eyes) equal to e.g. 8. Does that help?
              $endgroup$
              – Jonathan
              Mar 25 at 21:49










            • $begingroup$
              That is what I understood the problem as and I began to explain how one would calculate this above.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:50










            • $begingroup$
              For $8$ to occur one must roll at least two $4$s and every other die less than or equal to $4$; orr one could roll a $5$, $3$ and every other roll be less than or equal to $3$; or one could roll a $6$, $2$ and every other roll be less than or equal to $2$. Calculate the probability of these events occurring and add them together.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:52
















            • $begingroup$
              i edited the question as i might have explained it wrong. I'm interested in knowing whether in a roll with 14 dice, what the probability that two larger among the 14 dice, equal to 12. Sorry, if this changes things.
              $endgroup$
              – Jonathan
              Mar 25 at 21:15










            • $begingroup$
              So the two largest values rolled are $6$? In which case you need to roll at least $2$ sixes out of $14$. This can be found using a binomial distribution.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:22










            • $begingroup$
              I have 14 dice, i roll them all at once. What is the probability that the two "largest" (most eyes) equal to e.g. 8. Does that help?
              $endgroup$
              – Jonathan
              Mar 25 at 21:49










            • $begingroup$
              That is what I understood the problem as and I began to explain how one would calculate this above.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:50










            • $begingroup$
              For $8$ to occur one must roll at least two $4$s and every other die less than or equal to $4$; orr one could roll a $5$, $3$ and every other roll be less than or equal to $3$; or one could roll a $6$, $2$ and every other roll be less than or equal to $2$. Calculate the probability of these events occurring and add them together.
              $endgroup$
              – Peter Foreman
              Mar 25 at 21:52















            $begingroup$
            i edited the question as i might have explained it wrong. I'm interested in knowing whether in a roll with 14 dice, what the probability that two larger among the 14 dice, equal to 12. Sorry, if this changes things.
            $endgroup$
            – Jonathan
            Mar 25 at 21:15




            $begingroup$
            i edited the question as i might have explained it wrong. I'm interested in knowing whether in a roll with 14 dice, what the probability that two larger among the 14 dice, equal to 12. Sorry, if this changes things.
            $endgroup$
            – Jonathan
            Mar 25 at 21:15












            $begingroup$
            So the two largest values rolled are $6$? In which case you need to roll at least $2$ sixes out of $14$. This can be found using a binomial distribution.
            $endgroup$
            – Peter Foreman
            Mar 25 at 21:22




            $begingroup$
            So the two largest values rolled are $6$? In which case you need to roll at least $2$ sixes out of $14$. This can be found using a binomial distribution.
            $endgroup$
            – Peter Foreman
            Mar 25 at 21:22












            $begingroup$
            I have 14 dice, i roll them all at once. What is the probability that the two "largest" (most eyes) equal to e.g. 8. Does that help?
            $endgroup$
            – Jonathan
            Mar 25 at 21:49




            $begingroup$
            I have 14 dice, i roll them all at once. What is the probability that the two "largest" (most eyes) equal to e.g. 8. Does that help?
            $endgroup$
            – Jonathan
            Mar 25 at 21:49












            $begingroup$
            That is what I understood the problem as and I began to explain how one would calculate this above.
            $endgroup$
            – Peter Foreman
            Mar 25 at 21:50




            $begingroup$
            That is what I understood the problem as and I began to explain how one would calculate this above.
            $endgroup$
            – Peter Foreman
            Mar 25 at 21:50












            $begingroup$
            For $8$ to occur one must roll at least two $4$s and every other die less than or equal to $4$; orr one could roll a $5$, $3$ and every other roll be less than or equal to $3$; or one could roll a $6$, $2$ and every other roll be less than or equal to $2$. Calculate the probability of these events occurring and add them together.
            $endgroup$
            – Peter Foreman
            Mar 25 at 21:52




            $begingroup$
            For $8$ to occur one must roll at least two $4$s and every other die less than or equal to $4$; orr one could roll a $5$, $3$ and every other roll be less than or equal to $3$; or one could roll a $6$, $2$ and every other roll be less than or equal to $2$. Calculate the probability of these events occurring and add them together.
            $endgroup$
            – Peter Foreman
            Mar 25 at 21:52

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3162287%2fprobability-that-rolling-dice-that-two-dice-sum-to-x%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Lowndes Grove History Architecture References Navigation menu32°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661132°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661178002500"National Register Information System"Historic houses of South Carolina"Lowndes Grove""+32° 48' 6.00", −79° 57' 58.00""Lowndes Grove, Charleston County (260 St. Margaret St., Charleston)""Lowndes Grove"The Charleston ExpositionIt Happened in South Carolina"Lowndes Grove (House), Saint Margaret Street & Sixth Avenue, Charleston, Charleston County, SC(Photographs)"Plantations of the Carolina Low Countrye

            random experiment with two different functions on unit interval Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Random variable and probability space notionsRandom Walk with EdgesFinding functions where the increase over a random interval is Poisson distributedNumber of days until dayCan an observed event in fact be of zero probability?Unit random processmodels of coins and uniform distributionHow to get the number of successes given $n$ trials , probability $P$ and a random variable $X$Absorbing Markov chain in a computer. Is “almost every” turned into always convergence in computer executions?Stopped random walk is not uniformly integrable

            How should I support this large drywall patch? Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How do I cover large gaps in drywall?How do I keep drywall around a patch from crumbling?Can I glue a second layer of drywall?How to patch long strip on drywall?Large drywall patch: how to avoid bulging seams?Drywall Mesh Patch vs. Bulge? To remove or not to remove?How to fix this drywall job?Prep drywall before backsplashWhat's the best way to fix this horrible drywall patch job?Drywall patching using 3M Patch Plus Primer