Trouble calculating probability The Next CEO of Stack OverflowHow can one calculate the probability and payout for a slot-machine that has multiple match lines?Chance to pick 3 balls out of 6 (with replacement, order doesn't matter)Calculating probability with n choose kCalculating the “odds in”…Calculating probability of winning Power BallThe Price is Right optimal playBucket Sort Probabilityprobability - Does it matter who goes first?Probability distribution based on rounded numbersCombinatorics: Under-counting the probability of an outcome

Term for the "extreme-extension" version of a straw man fallacy?

Customer Requests (Sometimes) Drive Me Bonkers!

Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?

Whats the best way to handle refactoring a big file?

What is meant by a M next to a roman numeral?

Fastest way to shutdown Ubuntu Mate 18.10

How do spells that require an ability check vs. the caster's spell save DC work?

Any way to transfer all permissions from one role to another?

The King's new dress

If I blow insulation everywhere in my attic except the door trap, will heat escape through it?

When did Lisp start using symbols for arithmetic?

How can I quit an app using Terminal?

Why Were Madagascar and New Zealand Discovered So Late?

How to write the block matrix in LaTex?

Why do professional authors make "consistency" mistakes? And how to avoid them?

What size rim is OK?

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?

Science fiction novels about a solar system spanning civilisation where people change their bodies at will

Only print output after finding pattern

What is the point of a new vote on May's deal when the indicative votes suggest she will not win?

Why didn't Khan get resurrected in the Genesis Explosion?

Can the Reverse Gravity spell affect the Meteor Swarm spell?

Trouble understanding the speech of overseas colleagues

Is it okay to store user locations?



Trouble calculating probability



The Next CEO of Stack OverflowHow can one calculate the probability and payout for a slot-machine that has multiple match lines?Chance to pick 3 balls out of 6 (with replacement, order doesn't matter)Calculating probability with n choose kCalculating the “odds in”…Calculating probability of winning Power BallThe Price is Right optimal playBucket Sort Probabilityprobability - Does it matter who goes first?Probability distribution based on rounded numbersCombinatorics: Under-counting the probability of an outcome










1












$begingroup$


Machine generates one random integer in range $[0;40)$ on every spin.

You should choose 5 numbers in that range.



Then the machine will spit out 5 numbers (numbers are independent of each other).



what is the probability that you will get exactly two numbers correct?




My logic:

You should get two of them right. chance of that is: $r = left( 1 over 40 right)^ 2 $

You should get 3 of wrong. Chance of that is: $w = left( 39 over 40 right)^3 $

As order doesn't matter answer should be: $$ans = rw over 2!3!$$
Simulator tells me I'm wrong. Where is my logic flawed?



P.s. Machine can spit out duplicates










share|cite|improve this question









New contributor




Ika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    Not sure this is clear. First of all, are the numbers chosen without replacement? That is, can you get duplicates? Secondly, where is $frac 140$ coming from? If you just choose one number, the chances that the machine also chooses it are $1-left(frac 3940right)^5$ (assuming that you are choosing wih replacement). If you are choosing without replacement then it should be $frac 540$ Note that the two values are close but not the same.
    $endgroup$
    – lulu
    yesterday











  • $begingroup$
    You can get duplicate and you should choose 5 numbers.
    $endgroup$
    – Ika
    yesterday











  • $begingroup$
    Please edit your post to reflect that fact, don't leave critical information to the comment section.
    $endgroup$
    – lulu
    yesterday










  • $begingroup$
    I understand that you are choosing $5$ numbers, I just gave the one choice calculation to illustrate. Now you just have a simple binomial problem
    $endgroup$
    – lulu
    yesterday










  • $begingroup$
    Thanks I edited it.
    $endgroup$
    – Ika
    yesterday















1












$begingroup$


Machine generates one random integer in range $[0;40)$ on every spin.

You should choose 5 numbers in that range.



Then the machine will spit out 5 numbers (numbers are independent of each other).



what is the probability that you will get exactly two numbers correct?




My logic:

You should get two of them right. chance of that is: $r = left( 1 over 40 right)^ 2 $

You should get 3 of wrong. Chance of that is: $w = left( 39 over 40 right)^3 $

As order doesn't matter answer should be: $$ans = rw over 2!3!$$
Simulator tells me I'm wrong. Where is my logic flawed?



P.s. Machine can spit out duplicates










share|cite|improve this question









New contributor




Ika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    Not sure this is clear. First of all, are the numbers chosen without replacement? That is, can you get duplicates? Secondly, where is $frac 140$ coming from? If you just choose one number, the chances that the machine also chooses it are $1-left(frac 3940right)^5$ (assuming that you are choosing wih replacement). If you are choosing without replacement then it should be $frac 540$ Note that the two values are close but not the same.
    $endgroup$
    – lulu
    yesterday











  • $begingroup$
    You can get duplicate and you should choose 5 numbers.
    $endgroup$
    – Ika
    yesterday











  • $begingroup$
    Please edit your post to reflect that fact, don't leave critical information to the comment section.
    $endgroup$
    – lulu
    yesterday










  • $begingroup$
    I understand that you are choosing $5$ numbers, I just gave the one choice calculation to illustrate. Now you just have a simple binomial problem
    $endgroup$
    – lulu
    yesterday










  • $begingroup$
    Thanks I edited it.
    $endgroup$
    – Ika
    yesterday













1












1








1





$begingroup$


Machine generates one random integer in range $[0;40)$ on every spin.

You should choose 5 numbers in that range.



Then the machine will spit out 5 numbers (numbers are independent of each other).



what is the probability that you will get exactly two numbers correct?




My logic:

You should get two of them right. chance of that is: $r = left( 1 over 40 right)^ 2 $

You should get 3 of wrong. Chance of that is: $w = left( 39 over 40 right)^3 $

As order doesn't matter answer should be: $$ans = rw over 2!3!$$
Simulator tells me I'm wrong. Where is my logic flawed?



P.s. Machine can spit out duplicates










share|cite|improve this question









New contributor




Ika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




Machine generates one random integer in range $[0;40)$ on every spin.

You should choose 5 numbers in that range.



Then the machine will spit out 5 numbers (numbers are independent of each other).



what is the probability that you will get exactly two numbers correct?




My logic:

You should get two of them right. chance of that is: $r = left( 1 over 40 right)^ 2 $

You should get 3 of wrong. Chance of that is: $w = left( 39 over 40 right)^3 $

As order doesn't matter answer should be: $$ans = rw over 2!3!$$
Simulator tells me I'm wrong. Where is my logic flawed?



P.s. Machine can spit out duplicates







probability combinatorics






share|cite|improve this question









New contributor




Ika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question









New contributor




Ika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question








edited yesterday









Roddy MacPhee

533118




533118






New contributor




Ika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









IkaIka

63




63




New contributor




Ika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Ika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Ika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • $begingroup$
    Not sure this is clear. First of all, are the numbers chosen without replacement? That is, can you get duplicates? Secondly, where is $frac 140$ coming from? If you just choose one number, the chances that the machine also chooses it are $1-left(frac 3940right)^5$ (assuming that you are choosing wih replacement). If you are choosing without replacement then it should be $frac 540$ Note that the two values are close but not the same.
    $endgroup$
    – lulu
    yesterday











  • $begingroup$
    You can get duplicate and you should choose 5 numbers.
    $endgroup$
    – Ika
    yesterday











  • $begingroup$
    Please edit your post to reflect that fact, don't leave critical information to the comment section.
    $endgroup$
    – lulu
    yesterday










  • $begingroup$
    I understand that you are choosing $5$ numbers, I just gave the one choice calculation to illustrate. Now you just have a simple binomial problem
    $endgroup$
    – lulu
    yesterday










  • $begingroup$
    Thanks I edited it.
    $endgroup$
    – Ika
    yesterday
















  • $begingroup$
    Not sure this is clear. First of all, are the numbers chosen without replacement? That is, can you get duplicates? Secondly, where is $frac 140$ coming from? If you just choose one number, the chances that the machine also chooses it are $1-left(frac 3940right)^5$ (assuming that you are choosing wih replacement). If you are choosing without replacement then it should be $frac 540$ Note that the two values are close but not the same.
    $endgroup$
    – lulu
    yesterday











  • $begingroup$
    You can get duplicate and you should choose 5 numbers.
    $endgroup$
    – Ika
    yesterday











  • $begingroup$
    Please edit your post to reflect that fact, don't leave critical information to the comment section.
    $endgroup$
    – lulu
    yesterday










  • $begingroup$
    I understand that you are choosing $5$ numbers, I just gave the one choice calculation to illustrate. Now you just have a simple binomial problem
    $endgroup$
    – lulu
    yesterday










  • $begingroup$
    Thanks I edited it.
    $endgroup$
    – Ika
    yesterday















$begingroup$
Not sure this is clear. First of all, are the numbers chosen without replacement? That is, can you get duplicates? Secondly, where is $frac 140$ coming from? If you just choose one number, the chances that the machine also chooses it are $1-left(frac 3940right)^5$ (assuming that you are choosing wih replacement). If you are choosing without replacement then it should be $frac 540$ Note that the two values are close but not the same.
$endgroup$
– lulu
yesterday





$begingroup$
Not sure this is clear. First of all, are the numbers chosen without replacement? That is, can you get duplicates? Secondly, where is $frac 140$ coming from? If you just choose one number, the chances that the machine also chooses it are $1-left(frac 3940right)^5$ (assuming that you are choosing wih replacement). If you are choosing without replacement then it should be $frac 540$ Note that the two values are close but not the same.
$endgroup$
– lulu
yesterday













$begingroup$
You can get duplicate and you should choose 5 numbers.
$endgroup$
– Ika
yesterday





$begingroup$
You can get duplicate and you should choose 5 numbers.
$endgroup$
– Ika
yesterday













$begingroup$
Please edit your post to reflect that fact, don't leave critical information to the comment section.
$endgroup$
– lulu
yesterday




$begingroup$
Please edit your post to reflect that fact, don't leave critical information to the comment section.
$endgroup$
– lulu
yesterday












$begingroup$
I understand that you are choosing $5$ numbers, I just gave the one choice calculation to illustrate. Now you just have a simple binomial problem
$endgroup$
– lulu
yesterday




$begingroup$
I understand that you are choosing $5$ numbers, I just gave the one choice calculation to illustrate. Now you just have a simple binomial problem
$endgroup$
– lulu
yesterday












$begingroup$
Thanks I edited it.
$endgroup$
– Ika
yesterday




$begingroup$
Thanks I edited it.
$endgroup$
– Ika
yesterday










5 Answers
5






active

oldest

votes


















2












$begingroup$

This is a simple binomial problem.



Note: I am assuming that both you and the machine choose with replacement. That is, either (or both) of you might have duplicates.



For a single choice you make, the probability that the machine also makes it (as one of the $5$ it chooses) is $psi = 1 - left( frac 3940right)^5$.



As your choices are independent, the answer is then $$binom 52times psi^2times (1-psi)^3approx .0967$$






share|cite|improve this answer









$endgroup$




















    2












    $begingroup$

    Let's say, you have chosen 5 numbers. Then the odds of the machine generating one of your chosen numbers is $frac540$. This happens twice and it doesn't happen thrice. So this should be $left(frac540right)^2timesleft(frac3540right)^3$. Now this could have happened in $frac5!2! times 3!$ (or $5 choose 2$).



    So, is it $left(left(frac540right)^2 times left(frac3540right)^3 times 5 choose 2 right)$?



    However, the assumption is that you choose distinct numbers in that range. In case, your strategy is to maximize the "correct" score. If you are picking at random without a strategy, then lulu's answer is the one you are looking for.






    share|cite|improve this answer










    New contributor




    Balakrishnan Rajan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






    $endgroup$








    • 2




      $begingroup$
      I believe the number of ways is $frac5!2! 3!$ because exchanging two correct numbers is the same case (already included in the probability).
      $endgroup$
      – Ertxiem
      yesterday







    • 1




      $begingroup$
      Your solution is the most natural one, given the text of the problem. But it is not yet correct. You should replace $5!$ by $5choose2$.
      $endgroup$
      – Christian Blatter
      yesterday










    • $begingroup$
      Ah yes. Thanks Ertxiem and Christian Blatter. In this case, $5 choose 2$ and $frac5!2! times 3!$ are the same value. I am guessing it's because it can either be a multiset with 3 items and 2 items of two types or choosing 2 trials out of 5 for the "correct" trials. Am I right?
      $endgroup$
      – Balakrishnan Rajan
      yesterday






    • 1




      $begingroup$
      The binomial form says something like: from 5 items, choose two without replacement, in this case we are selecting the position (order) at which the correct numbers are "split" by the machine. The factorial form says that from all permutations of 5 elements, we are not interested in those that only exchange the order of the 2 correct numbers and we are not interested in those that only exchange the order of the 3 incorrect numbers.
      $endgroup$
      – Ertxiem
      yesterday


















    0












    $begingroup$

    Here is the argument if neither you nor the machine can repeat.



    Since all the numbers are equally likely let's assume you chose $1,2,3,4,5$.



    There are $T = binom405$ total ways the machine can choose its five numbers. Let's count how that choice might overlap with yours.



    There are



    $$
    binom355 text choices with 0 text overlap
    $$



    $$
    binom51binom354 text choices with 1 text overlap
    $$

    $$
    binom52binom353 text choices with 2 text overlap
    $$

    $$
    binom53binom352 text choices with 3 text overlap
    $$

    $$
    binom54binom351 text choices with 4 text overlap
    $$

    $$
    1 text choice with 5 text overlap
    $$



    To find the probability of exactly $2$ matches, compute that number as above and divide by $T$, To find the probability of at least $2$ matches, add the probabilites of $0$ and $1$ match and subtract from $1$.






    share|cite|improve this answer









    $endgroup$




















      0












      $begingroup$

      There are a few different errors in your calculation.



      • If the numbers you choose are $ n_1, n_2, dots, n_5 $ (I'm presuming these have to be all different), and the numbers generated by the machine are $ m_1, m_2, dots, m_5 $, then $ left(frac140right)^2 $ is merely the probability that any specified ordered pair of numbers generated by the machine are equal to some given pair of your chosen numbers (e.g. $ m_1=n_1 $ and $ m_2=n_2 $, for instance). To allow for the fact that the order doesn't matter, you need to multiply, not divide, by $ 2! $—that is, $ mathrmProbleft(leftm_1=n_1, &, m_2=n_2rightlorleftm_2=n_1, &, m_2=n_1rightright)=2left(frac140right)^2 $. But you still haven't counted the cases where some other pair of the numbers chosen by the machine ($ m_4 $ and $ m_5 $, for example) are equal to your $ n_1 $ and $ n_2 $, let alone any other pair of your chosen numbers.

      • As clarified in one of your comments, it is possible for more than $ 2 $ of the numbers generated by the machine to match some of those in your hand even when you have only exactly two right. If you choose numbers $ 1,2,3,4,5 $, for instance, and the machine generates the numbers $ 6,7,1,8,2,1 $, then exactly $ 2 $ of your numbers—namely, $ 1 $ and $ 2 $—are among those generated by the machine, but three of those generated by the machine—namely the $ 2 $ and the two $ 1$s—are among those you chose. Also, once the machine has generated two of the numbers you have chosen, it cannot generate any of the remaining $ 3 $ you have chosen without increasing the number you've got correct to more than $ 2 $. Thus, for both of these reasons, $ left(frac3940right)^3 $ isn't the probability of your getting $ 3 $ wrong.

      The easiest way I can see of calculating the probability you're looking for is to treat the accumulating number of matches between the numbers generated by the machine and those you have chosen as an inhomogeneous Markov chain. Let $ C $ be the set of numbers you have chosen (which I assume to be all distinct), $ m_1, m_2, dots, m_5 $ the numbers generated by the machine, and $ X_n = leftvert leftm_iright_i=1^ncap Crightvert, X_0=0 $. Then $ leftX_nright_i=1^5 $ is a Markov chain whose states and transitions are represented in the diagram below:enter image description here



      The numbers on the links are the transition probabilities, while the numbers inside the circles are the probabilities of the states being reached. If my arithmetic is correct, the probability that exactly two of your chosen numbers appear amongst those generated by the machine is $ frac81,0911,280,000approx 0.063 $.






      share|cite|improve this answer











      $endgroup$




















        0












        $begingroup$

        If the machine is choosing with replacement, but the person is choosing five distinct numbers, and if success means two distinct numbers the person chose are picked by the machine, then the problem is much more difficult:



        Probability machine chooses five distinct numbers:
        $$dfrac40!35!40^5$$



        Probability machine chooses four distinct numbers (choose the four distinct numbers the machine selected, choose the one number that is repeated twice, permute the multiset to find all possible orders these numbers could be chosen, divide by the total number of ways to choose five numbers):
        $$dfracdbinom404dbinom41dfrac5!1!1!1!2!40^5$$



        Probability machine chooses three distinct numbers (choose the three distinct numbers the machine selected, either one number is repeated three times or two numbers are repeated twice each):
        $$dfracdbinom403dbinom31left(dfrac5!3!1!1!+dfrac5!2!2!1!right)40^5$$



        Probability machine chooses two distinct numbers (choose the two distinct numbers the machine selected. You can have one number four times and the other once or one number three times and the other twice.):
        $$dfracdbinom402dbinom21left(dfrac5!4!1!+dfrac5!3!2!right)40^5$$



        So, the probability of you matching exactly two numbers:
        $$beginalign* & dfrac40!35!40^5cdot dfrac5cdot 4cdot 35cdot 34cdot 3340cdot 39cdot 38cdot 37cdot 36\ + & dfracdbinom404dbinom41dfrac5!2!40^5cdot dfrac4cdot 3cdot 36cdot 35cdot 3440cdot 39cdot 38cdot 37cdot 36 \ + & dfracdbinom403dbinom31left(dfrac5!3!+dfrac5!(2!)^2right)40^5cdot dfrac3cdot 2cdot 37cdot 36cdot 3540cdot 39cdot 38cdot 37cdot 36 \ + & dfracdbinom402dbinom21left(dfrac5!4!+dbinom53right)40^5cdot dfrac2cdot 1cdot 38cdot 37cdot 3640cdot 39cdot 38cdot 37cdot 36 approx 0.0091259765625endalign*$$



        Note: It is possible for the machine to choose one distinct number, but there is a zero probability that you wind up with two matching numbers, so I ignored that case. To show that my numbers work out though, you can test that the following holds:



        $$dfrac40!35!+dbinom404dbinom41dfrac5!2!1!1!1!+dbinom403dbinom31left(dfrac5!3!1!1!+dfrac5!2!2!1!right)+dbinom402dbinom21left(dfrac5!4!1!+dfrac5!3!2!right)+dbinom401 = 40^5$$



        (I verified this is true myself using Wolframalpha).






        share|cite|improve this answer











        $endgroup$













          Your Answer





          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          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
          );



          );






          Ika is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3164343%2ftrouble-calculating-probability%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          5 Answers
          5






          active

          oldest

          votes








          5 Answers
          5






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2












          $begingroup$

          This is a simple binomial problem.



          Note: I am assuming that both you and the machine choose with replacement. That is, either (or both) of you might have duplicates.



          For a single choice you make, the probability that the machine also makes it (as one of the $5$ it chooses) is $psi = 1 - left( frac 3940right)^5$.



          As your choices are independent, the answer is then $$binom 52times psi^2times (1-psi)^3approx .0967$$






          share|cite|improve this answer









          $endgroup$

















            2












            $begingroup$

            This is a simple binomial problem.



            Note: I am assuming that both you and the machine choose with replacement. That is, either (or both) of you might have duplicates.



            For a single choice you make, the probability that the machine also makes it (as one of the $5$ it chooses) is $psi = 1 - left( frac 3940right)^5$.



            As your choices are independent, the answer is then $$binom 52times psi^2times (1-psi)^3approx .0967$$






            share|cite|improve this answer









            $endgroup$















              2












              2








              2





              $begingroup$

              This is a simple binomial problem.



              Note: I am assuming that both you and the machine choose with replacement. That is, either (or both) of you might have duplicates.



              For a single choice you make, the probability that the machine also makes it (as one of the $5$ it chooses) is $psi = 1 - left( frac 3940right)^5$.



              As your choices are independent, the answer is then $$binom 52times psi^2times (1-psi)^3approx .0967$$






              share|cite|improve this answer









              $endgroup$



              This is a simple binomial problem.



              Note: I am assuming that both you and the machine choose with replacement. That is, either (or both) of you might have duplicates.



              For a single choice you make, the probability that the machine also makes it (as one of the $5$ it chooses) is $psi = 1 - left( frac 3940right)^5$.



              As your choices are independent, the answer is then $$binom 52times psi^2times (1-psi)^3approx .0967$$







              share|cite|improve this answer












              share|cite|improve this answer



              share|cite|improve this answer










              answered yesterday









              lulululu

              43.2k25080




              43.2k25080





















                  2












                  $begingroup$

                  Let's say, you have chosen 5 numbers. Then the odds of the machine generating one of your chosen numbers is $frac540$. This happens twice and it doesn't happen thrice. So this should be $left(frac540right)^2timesleft(frac3540right)^3$. Now this could have happened in $frac5!2! times 3!$ (or $5 choose 2$).



                  So, is it $left(left(frac540right)^2 times left(frac3540right)^3 times 5 choose 2 right)$?



                  However, the assumption is that you choose distinct numbers in that range. In case, your strategy is to maximize the "correct" score. If you are picking at random without a strategy, then lulu's answer is the one you are looking for.






                  share|cite|improve this answer










                  New contributor




                  Balakrishnan Rajan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  $endgroup$








                  • 2




                    $begingroup$
                    I believe the number of ways is $frac5!2! 3!$ because exchanging two correct numbers is the same case (already included in the probability).
                    $endgroup$
                    – Ertxiem
                    yesterday







                  • 1




                    $begingroup$
                    Your solution is the most natural one, given the text of the problem. But it is not yet correct. You should replace $5!$ by $5choose2$.
                    $endgroup$
                    – Christian Blatter
                    yesterday










                  • $begingroup$
                    Ah yes. Thanks Ertxiem and Christian Blatter. In this case, $5 choose 2$ and $frac5!2! times 3!$ are the same value. I am guessing it's because it can either be a multiset with 3 items and 2 items of two types or choosing 2 trials out of 5 for the "correct" trials. Am I right?
                    $endgroup$
                    – Balakrishnan Rajan
                    yesterday






                  • 1




                    $begingroup$
                    The binomial form says something like: from 5 items, choose two without replacement, in this case we are selecting the position (order) at which the correct numbers are "split" by the machine. The factorial form says that from all permutations of 5 elements, we are not interested in those that only exchange the order of the 2 correct numbers and we are not interested in those that only exchange the order of the 3 incorrect numbers.
                    $endgroup$
                    – Ertxiem
                    yesterday















                  2












                  $begingroup$

                  Let's say, you have chosen 5 numbers. Then the odds of the machine generating one of your chosen numbers is $frac540$. This happens twice and it doesn't happen thrice. So this should be $left(frac540right)^2timesleft(frac3540right)^3$. Now this could have happened in $frac5!2! times 3!$ (or $5 choose 2$).



                  So, is it $left(left(frac540right)^2 times left(frac3540right)^3 times 5 choose 2 right)$?



                  However, the assumption is that you choose distinct numbers in that range. In case, your strategy is to maximize the "correct" score. If you are picking at random without a strategy, then lulu's answer is the one you are looking for.






                  share|cite|improve this answer










                  New contributor




                  Balakrishnan Rajan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  $endgroup$








                  • 2




                    $begingroup$
                    I believe the number of ways is $frac5!2! 3!$ because exchanging two correct numbers is the same case (already included in the probability).
                    $endgroup$
                    – Ertxiem
                    yesterday







                  • 1




                    $begingroup$
                    Your solution is the most natural one, given the text of the problem. But it is not yet correct. You should replace $5!$ by $5choose2$.
                    $endgroup$
                    – Christian Blatter
                    yesterday










                  • $begingroup$
                    Ah yes. Thanks Ertxiem and Christian Blatter. In this case, $5 choose 2$ and $frac5!2! times 3!$ are the same value. I am guessing it's because it can either be a multiset with 3 items and 2 items of two types or choosing 2 trials out of 5 for the "correct" trials. Am I right?
                    $endgroup$
                    – Balakrishnan Rajan
                    yesterday






                  • 1




                    $begingroup$
                    The binomial form says something like: from 5 items, choose two without replacement, in this case we are selecting the position (order) at which the correct numbers are "split" by the machine. The factorial form says that from all permutations of 5 elements, we are not interested in those that only exchange the order of the 2 correct numbers and we are not interested in those that only exchange the order of the 3 incorrect numbers.
                    $endgroup$
                    – Ertxiem
                    yesterday













                  2












                  2








                  2





                  $begingroup$

                  Let's say, you have chosen 5 numbers. Then the odds of the machine generating one of your chosen numbers is $frac540$. This happens twice and it doesn't happen thrice. So this should be $left(frac540right)^2timesleft(frac3540right)^3$. Now this could have happened in $frac5!2! times 3!$ (or $5 choose 2$).



                  So, is it $left(left(frac540right)^2 times left(frac3540right)^3 times 5 choose 2 right)$?



                  However, the assumption is that you choose distinct numbers in that range. In case, your strategy is to maximize the "correct" score. If you are picking at random without a strategy, then lulu's answer is the one you are looking for.






                  share|cite|improve this answer










                  New contributor




                  Balakrishnan Rajan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  $endgroup$



                  Let's say, you have chosen 5 numbers. Then the odds of the machine generating one of your chosen numbers is $frac540$. This happens twice and it doesn't happen thrice. So this should be $left(frac540right)^2timesleft(frac3540right)^3$. Now this could have happened in $frac5!2! times 3!$ (or $5 choose 2$).



                  So, is it $left(left(frac540right)^2 times left(frac3540right)^3 times 5 choose 2 right)$?



                  However, the assumption is that you choose distinct numbers in that range. In case, your strategy is to maximize the "correct" score. If you are picking at random without a strategy, then lulu's answer is the one you are looking for.







                  share|cite|improve this answer










                  New contributor




                  Balakrishnan Rajan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|cite|improve this answer



                  share|cite|improve this answer








                  edited yesterday





















                  New contributor




                  Balakrishnan Rajan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered yesterday









                  Balakrishnan RajanBalakrishnan Rajan

                  1519




                  1519




                  New contributor




                  Balakrishnan Rajan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  Balakrishnan Rajan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  Balakrishnan Rajan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.







                  • 2




                    $begingroup$
                    I believe the number of ways is $frac5!2! 3!$ because exchanging two correct numbers is the same case (already included in the probability).
                    $endgroup$
                    – Ertxiem
                    yesterday







                  • 1




                    $begingroup$
                    Your solution is the most natural one, given the text of the problem. But it is not yet correct. You should replace $5!$ by $5choose2$.
                    $endgroup$
                    – Christian Blatter
                    yesterday










                  • $begingroup$
                    Ah yes. Thanks Ertxiem and Christian Blatter. In this case, $5 choose 2$ and $frac5!2! times 3!$ are the same value. I am guessing it's because it can either be a multiset with 3 items and 2 items of two types or choosing 2 trials out of 5 for the "correct" trials. Am I right?
                    $endgroup$
                    – Balakrishnan Rajan
                    yesterday






                  • 1




                    $begingroup$
                    The binomial form says something like: from 5 items, choose two without replacement, in this case we are selecting the position (order) at which the correct numbers are "split" by the machine. The factorial form says that from all permutations of 5 elements, we are not interested in those that only exchange the order of the 2 correct numbers and we are not interested in those that only exchange the order of the 3 incorrect numbers.
                    $endgroup$
                    – Ertxiem
                    yesterday












                  • 2




                    $begingroup$
                    I believe the number of ways is $frac5!2! 3!$ because exchanging two correct numbers is the same case (already included in the probability).
                    $endgroup$
                    – Ertxiem
                    yesterday







                  • 1




                    $begingroup$
                    Your solution is the most natural one, given the text of the problem. But it is not yet correct. You should replace $5!$ by $5choose2$.
                    $endgroup$
                    – Christian Blatter
                    yesterday










                  • $begingroup$
                    Ah yes. Thanks Ertxiem and Christian Blatter. In this case, $5 choose 2$ and $frac5!2! times 3!$ are the same value. I am guessing it's because it can either be a multiset with 3 items and 2 items of two types or choosing 2 trials out of 5 for the "correct" trials. Am I right?
                    $endgroup$
                    – Balakrishnan Rajan
                    yesterday






                  • 1




                    $begingroup$
                    The binomial form says something like: from 5 items, choose two without replacement, in this case we are selecting the position (order) at which the correct numbers are "split" by the machine. The factorial form says that from all permutations of 5 elements, we are not interested in those that only exchange the order of the 2 correct numbers and we are not interested in those that only exchange the order of the 3 incorrect numbers.
                    $endgroup$
                    – Ertxiem
                    yesterday







                  2




                  2




                  $begingroup$
                  I believe the number of ways is $frac5!2! 3!$ because exchanging two correct numbers is the same case (already included in the probability).
                  $endgroup$
                  – Ertxiem
                  yesterday





                  $begingroup$
                  I believe the number of ways is $frac5!2! 3!$ because exchanging two correct numbers is the same case (already included in the probability).
                  $endgroup$
                  – Ertxiem
                  yesterday





                  1




                  1




                  $begingroup$
                  Your solution is the most natural one, given the text of the problem. But it is not yet correct. You should replace $5!$ by $5choose2$.
                  $endgroup$
                  – Christian Blatter
                  yesterday




                  $begingroup$
                  Your solution is the most natural one, given the text of the problem. But it is not yet correct. You should replace $5!$ by $5choose2$.
                  $endgroup$
                  – Christian Blatter
                  yesterday












                  $begingroup$
                  Ah yes. Thanks Ertxiem and Christian Blatter. In this case, $5 choose 2$ and $frac5!2! times 3!$ are the same value. I am guessing it's because it can either be a multiset with 3 items and 2 items of two types or choosing 2 trials out of 5 for the "correct" trials. Am I right?
                  $endgroup$
                  – Balakrishnan Rajan
                  yesterday




                  $begingroup$
                  Ah yes. Thanks Ertxiem and Christian Blatter. In this case, $5 choose 2$ and $frac5!2! times 3!$ are the same value. I am guessing it's because it can either be a multiset with 3 items and 2 items of two types or choosing 2 trials out of 5 for the "correct" trials. Am I right?
                  $endgroup$
                  – Balakrishnan Rajan
                  yesterday




                  1




                  1




                  $begingroup$
                  The binomial form says something like: from 5 items, choose two without replacement, in this case we are selecting the position (order) at which the correct numbers are "split" by the machine. The factorial form says that from all permutations of 5 elements, we are not interested in those that only exchange the order of the 2 correct numbers and we are not interested in those that only exchange the order of the 3 incorrect numbers.
                  $endgroup$
                  – Ertxiem
                  yesterday




                  $begingroup$
                  The binomial form says something like: from 5 items, choose two without replacement, in this case we are selecting the position (order) at which the correct numbers are "split" by the machine. The factorial form says that from all permutations of 5 elements, we are not interested in those that only exchange the order of the 2 correct numbers and we are not interested in those that only exchange the order of the 3 incorrect numbers.
                  $endgroup$
                  – Ertxiem
                  yesterday











                  0












                  $begingroup$

                  Here is the argument if neither you nor the machine can repeat.



                  Since all the numbers are equally likely let's assume you chose $1,2,3,4,5$.



                  There are $T = binom405$ total ways the machine can choose its five numbers. Let's count how that choice might overlap with yours.



                  There are



                  $$
                  binom355 text choices with 0 text overlap
                  $$



                  $$
                  binom51binom354 text choices with 1 text overlap
                  $$

                  $$
                  binom52binom353 text choices with 2 text overlap
                  $$

                  $$
                  binom53binom352 text choices with 3 text overlap
                  $$

                  $$
                  binom54binom351 text choices with 4 text overlap
                  $$

                  $$
                  1 text choice with 5 text overlap
                  $$



                  To find the probability of exactly $2$ matches, compute that number as above and divide by $T$, To find the probability of at least $2$ matches, add the probabilites of $0$ and $1$ match and subtract from $1$.






                  share|cite|improve this answer









                  $endgroup$

















                    0












                    $begingroup$

                    Here is the argument if neither you nor the machine can repeat.



                    Since all the numbers are equally likely let's assume you chose $1,2,3,4,5$.



                    There are $T = binom405$ total ways the machine can choose its five numbers. Let's count how that choice might overlap with yours.



                    There are



                    $$
                    binom355 text choices with 0 text overlap
                    $$



                    $$
                    binom51binom354 text choices with 1 text overlap
                    $$

                    $$
                    binom52binom353 text choices with 2 text overlap
                    $$

                    $$
                    binom53binom352 text choices with 3 text overlap
                    $$

                    $$
                    binom54binom351 text choices with 4 text overlap
                    $$

                    $$
                    1 text choice with 5 text overlap
                    $$



                    To find the probability of exactly $2$ matches, compute that number as above and divide by $T$, To find the probability of at least $2$ matches, add the probabilites of $0$ and $1$ match and subtract from $1$.






                    share|cite|improve this answer









                    $endgroup$















                      0












                      0








                      0





                      $begingroup$

                      Here is the argument if neither you nor the machine can repeat.



                      Since all the numbers are equally likely let's assume you chose $1,2,3,4,5$.



                      There are $T = binom405$ total ways the machine can choose its five numbers. Let's count how that choice might overlap with yours.



                      There are



                      $$
                      binom355 text choices with 0 text overlap
                      $$



                      $$
                      binom51binom354 text choices with 1 text overlap
                      $$

                      $$
                      binom52binom353 text choices with 2 text overlap
                      $$

                      $$
                      binom53binom352 text choices with 3 text overlap
                      $$

                      $$
                      binom54binom351 text choices with 4 text overlap
                      $$

                      $$
                      1 text choice with 5 text overlap
                      $$



                      To find the probability of exactly $2$ matches, compute that number as above and divide by $T$, To find the probability of at least $2$ matches, add the probabilites of $0$ and $1$ match and subtract from $1$.






                      share|cite|improve this answer









                      $endgroup$



                      Here is the argument if neither you nor the machine can repeat.



                      Since all the numbers are equally likely let's assume you chose $1,2,3,4,5$.



                      There are $T = binom405$ total ways the machine can choose its five numbers. Let's count how that choice might overlap with yours.



                      There are



                      $$
                      binom355 text choices with 0 text overlap
                      $$



                      $$
                      binom51binom354 text choices with 1 text overlap
                      $$

                      $$
                      binom52binom353 text choices with 2 text overlap
                      $$

                      $$
                      binom53binom352 text choices with 3 text overlap
                      $$

                      $$
                      binom54binom351 text choices with 4 text overlap
                      $$

                      $$
                      1 text choice with 5 text overlap
                      $$



                      To find the probability of exactly $2$ matches, compute that number as above and divide by $T$, To find the probability of at least $2$ matches, add the probabilites of $0$ and $1$ match and subtract from $1$.







                      share|cite|improve this answer












                      share|cite|improve this answer



                      share|cite|improve this answer










                      answered yesterday









                      Ethan BolkerEthan Bolker

                      45.4k553120




                      45.4k553120





















                          0












                          $begingroup$

                          There are a few different errors in your calculation.



                          • If the numbers you choose are $ n_1, n_2, dots, n_5 $ (I'm presuming these have to be all different), and the numbers generated by the machine are $ m_1, m_2, dots, m_5 $, then $ left(frac140right)^2 $ is merely the probability that any specified ordered pair of numbers generated by the machine are equal to some given pair of your chosen numbers (e.g. $ m_1=n_1 $ and $ m_2=n_2 $, for instance). To allow for the fact that the order doesn't matter, you need to multiply, not divide, by $ 2! $—that is, $ mathrmProbleft(leftm_1=n_1, &, m_2=n_2rightlorleftm_2=n_1, &, m_2=n_1rightright)=2left(frac140right)^2 $. But you still haven't counted the cases where some other pair of the numbers chosen by the machine ($ m_4 $ and $ m_5 $, for example) are equal to your $ n_1 $ and $ n_2 $, let alone any other pair of your chosen numbers.

                          • As clarified in one of your comments, it is possible for more than $ 2 $ of the numbers generated by the machine to match some of those in your hand even when you have only exactly two right. If you choose numbers $ 1,2,3,4,5 $, for instance, and the machine generates the numbers $ 6,7,1,8,2,1 $, then exactly $ 2 $ of your numbers—namely, $ 1 $ and $ 2 $—are among those generated by the machine, but three of those generated by the machine—namely the $ 2 $ and the two $ 1$s—are among those you chose. Also, once the machine has generated two of the numbers you have chosen, it cannot generate any of the remaining $ 3 $ you have chosen without increasing the number you've got correct to more than $ 2 $. Thus, for both of these reasons, $ left(frac3940right)^3 $ isn't the probability of your getting $ 3 $ wrong.

                          The easiest way I can see of calculating the probability you're looking for is to treat the accumulating number of matches between the numbers generated by the machine and those you have chosen as an inhomogeneous Markov chain. Let $ C $ be the set of numbers you have chosen (which I assume to be all distinct), $ m_1, m_2, dots, m_5 $ the numbers generated by the machine, and $ X_n = leftvert leftm_iright_i=1^ncap Crightvert, X_0=0 $. Then $ leftX_nright_i=1^5 $ is a Markov chain whose states and transitions are represented in the diagram below:enter image description here



                          The numbers on the links are the transition probabilities, while the numbers inside the circles are the probabilities of the states being reached. If my arithmetic is correct, the probability that exactly two of your chosen numbers appear amongst those generated by the machine is $ frac81,0911,280,000approx 0.063 $.






                          share|cite|improve this answer











                          $endgroup$

















                            0












                            $begingroup$

                            There are a few different errors in your calculation.



                            • If the numbers you choose are $ n_1, n_2, dots, n_5 $ (I'm presuming these have to be all different), and the numbers generated by the machine are $ m_1, m_2, dots, m_5 $, then $ left(frac140right)^2 $ is merely the probability that any specified ordered pair of numbers generated by the machine are equal to some given pair of your chosen numbers (e.g. $ m_1=n_1 $ and $ m_2=n_2 $, for instance). To allow for the fact that the order doesn't matter, you need to multiply, not divide, by $ 2! $—that is, $ mathrmProbleft(leftm_1=n_1, &, m_2=n_2rightlorleftm_2=n_1, &, m_2=n_1rightright)=2left(frac140right)^2 $. But you still haven't counted the cases where some other pair of the numbers chosen by the machine ($ m_4 $ and $ m_5 $, for example) are equal to your $ n_1 $ and $ n_2 $, let alone any other pair of your chosen numbers.

                            • As clarified in one of your comments, it is possible for more than $ 2 $ of the numbers generated by the machine to match some of those in your hand even when you have only exactly two right. If you choose numbers $ 1,2,3,4,5 $, for instance, and the machine generates the numbers $ 6,7,1,8,2,1 $, then exactly $ 2 $ of your numbers—namely, $ 1 $ and $ 2 $—are among those generated by the machine, but three of those generated by the machine—namely the $ 2 $ and the two $ 1$s—are among those you chose. Also, once the machine has generated two of the numbers you have chosen, it cannot generate any of the remaining $ 3 $ you have chosen without increasing the number you've got correct to more than $ 2 $. Thus, for both of these reasons, $ left(frac3940right)^3 $ isn't the probability of your getting $ 3 $ wrong.

                            The easiest way I can see of calculating the probability you're looking for is to treat the accumulating number of matches between the numbers generated by the machine and those you have chosen as an inhomogeneous Markov chain. Let $ C $ be the set of numbers you have chosen (which I assume to be all distinct), $ m_1, m_2, dots, m_5 $ the numbers generated by the machine, and $ X_n = leftvert leftm_iright_i=1^ncap Crightvert, X_0=0 $. Then $ leftX_nright_i=1^5 $ is a Markov chain whose states and transitions are represented in the diagram below:enter image description here



                            The numbers on the links are the transition probabilities, while the numbers inside the circles are the probabilities of the states being reached. If my arithmetic is correct, the probability that exactly two of your chosen numbers appear amongst those generated by the machine is $ frac81,0911,280,000approx 0.063 $.






                            share|cite|improve this answer











                            $endgroup$















                              0












                              0








                              0





                              $begingroup$

                              There are a few different errors in your calculation.



                              • If the numbers you choose are $ n_1, n_2, dots, n_5 $ (I'm presuming these have to be all different), and the numbers generated by the machine are $ m_1, m_2, dots, m_5 $, then $ left(frac140right)^2 $ is merely the probability that any specified ordered pair of numbers generated by the machine are equal to some given pair of your chosen numbers (e.g. $ m_1=n_1 $ and $ m_2=n_2 $, for instance). To allow for the fact that the order doesn't matter, you need to multiply, not divide, by $ 2! $—that is, $ mathrmProbleft(leftm_1=n_1, &, m_2=n_2rightlorleftm_2=n_1, &, m_2=n_1rightright)=2left(frac140right)^2 $. But you still haven't counted the cases where some other pair of the numbers chosen by the machine ($ m_4 $ and $ m_5 $, for example) are equal to your $ n_1 $ and $ n_2 $, let alone any other pair of your chosen numbers.

                              • As clarified in one of your comments, it is possible for more than $ 2 $ of the numbers generated by the machine to match some of those in your hand even when you have only exactly two right. If you choose numbers $ 1,2,3,4,5 $, for instance, and the machine generates the numbers $ 6,7,1,8,2,1 $, then exactly $ 2 $ of your numbers—namely, $ 1 $ and $ 2 $—are among those generated by the machine, but three of those generated by the machine—namely the $ 2 $ and the two $ 1$s—are among those you chose. Also, once the machine has generated two of the numbers you have chosen, it cannot generate any of the remaining $ 3 $ you have chosen without increasing the number you've got correct to more than $ 2 $. Thus, for both of these reasons, $ left(frac3940right)^3 $ isn't the probability of your getting $ 3 $ wrong.

                              The easiest way I can see of calculating the probability you're looking for is to treat the accumulating number of matches between the numbers generated by the machine and those you have chosen as an inhomogeneous Markov chain. Let $ C $ be the set of numbers you have chosen (which I assume to be all distinct), $ m_1, m_2, dots, m_5 $ the numbers generated by the machine, and $ X_n = leftvert leftm_iright_i=1^ncap Crightvert, X_0=0 $. Then $ leftX_nright_i=1^5 $ is a Markov chain whose states and transitions are represented in the diagram below:enter image description here



                              The numbers on the links are the transition probabilities, while the numbers inside the circles are the probabilities of the states being reached. If my arithmetic is correct, the probability that exactly two of your chosen numbers appear amongst those generated by the machine is $ frac81,0911,280,000approx 0.063 $.






                              share|cite|improve this answer











                              $endgroup$



                              There are a few different errors in your calculation.



                              • If the numbers you choose are $ n_1, n_2, dots, n_5 $ (I'm presuming these have to be all different), and the numbers generated by the machine are $ m_1, m_2, dots, m_5 $, then $ left(frac140right)^2 $ is merely the probability that any specified ordered pair of numbers generated by the machine are equal to some given pair of your chosen numbers (e.g. $ m_1=n_1 $ and $ m_2=n_2 $, for instance). To allow for the fact that the order doesn't matter, you need to multiply, not divide, by $ 2! $—that is, $ mathrmProbleft(leftm_1=n_1, &, m_2=n_2rightlorleftm_2=n_1, &, m_2=n_1rightright)=2left(frac140right)^2 $. But you still haven't counted the cases where some other pair of the numbers chosen by the machine ($ m_4 $ and $ m_5 $, for example) are equal to your $ n_1 $ and $ n_2 $, let alone any other pair of your chosen numbers.

                              • As clarified in one of your comments, it is possible for more than $ 2 $ of the numbers generated by the machine to match some of those in your hand even when you have only exactly two right. If you choose numbers $ 1,2,3,4,5 $, for instance, and the machine generates the numbers $ 6,7,1,8,2,1 $, then exactly $ 2 $ of your numbers—namely, $ 1 $ and $ 2 $—are among those generated by the machine, but three of those generated by the machine—namely the $ 2 $ and the two $ 1$s—are among those you chose. Also, once the machine has generated two of the numbers you have chosen, it cannot generate any of the remaining $ 3 $ you have chosen without increasing the number you've got correct to more than $ 2 $. Thus, for both of these reasons, $ left(frac3940right)^3 $ isn't the probability of your getting $ 3 $ wrong.

                              The easiest way I can see of calculating the probability you're looking for is to treat the accumulating number of matches between the numbers generated by the machine and those you have chosen as an inhomogeneous Markov chain. Let $ C $ be the set of numbers you have chosen (which I assume to be all distinct), $ m_1, m_2, dots, m_5 $ the numbers generated by the machine, and $ X_n = leftvert leftm_iright_i=1^ncap Crightvert, X_0=0 $. Then $ leftX_nright_i=1^5 $ is a Markov chain whose states and transitions are represented in the diagram below:enter image description here



                              The numbers on the links are the transition probabilities, while the numbers inside the circles are the probabilities of the states being reached. If my arithmetic is correct, the probability that exactly two of your chosen numbers appear amongst those generated by the machine is $ frac81,0911,280,000approx 0.063 $.







                              share|cite|improve this answer














                              share|cite|improve this answer



                              share|cite|improve this answer








                              answered yesterday


























                              community wiki





                              lonza leggiera






















                                  0












                                  $begingroup$

                                  If the machine is choosing with replacement, but the person is choosing five distinct numbers, and if success means two distinct numbers the person chose are picked by the machine, then the problem is much more difficult:



                                  Probability machine chooses five distinct numbers:
                                  $$dfrac40!35!40^5$$



                                  Probability machine chooses four distinct numbers (choose the four distinct numbers the machine selected, choose the one number that is repeated twice, permute the multiset to find all possible orders these numbers could be chosen, divide by the total number of ways to choose five numbers):
                                  $$dfracdbinom404dbinom41dfrac5!1!1!1!2!40^5$$



                                  Probability machine chooses three distinct numbers (choose the three distinct numbers the machine selected, either one number is repeated three times or two numbers are repeated twice each):
                                  $$dfracdbinom403dbinom31left(dfrac5!3!1!1!+dfrac5!2!2!1!right)40^5$$



                                  Probability machine chooses two distinct numbers (choose the two distinct numbers the machine selected. You can have one number four times and the other once or one number three times and the other twice.):
                                  $$dfracdbinom402dbinom21left(dfrac5!4!1!+dfrac5!3!2!right)40^5$$



                                  So, the probability of you matching exactly two numbers:
                                  $$beginalign* & dfrac40!35!40^5cdot dfrac5cdot 4cdot 35cdot 34cdot 3340cdot 39cdot 38cdot 37cdot 36\ + & dfracdbinom404dbinom41dfrac5!2!40^5cdot dfrac4cdot 3cdot 36cdot 35cdot 3440cdot 39cdot 38cdot 37cdot 36 \ + & dfracdbinom403dbinom31left(dfrac5!3!+dfrac5!(2!)^2right)40^5cdot dfrac3cdot 2cdot 37cdot 36cdot 3540cdot 39cdot 38cdot 37cdot 36 \ + & dfracdbinom402dbinom21left(dfrac5!4!+dbinom53right)40^5cdot dfrac2cdot 1cdot 38cdot 37cdot 3640cdot 39cdot 38cdot 37cdot 36 approx 0.0091259765625endalign*$$



                                  Note: It is possible for the machine to choose one distinct number, but there is a zero probability that you wind up with two matching numbers, so I ignored that case. To show that my numbers work out though, you can test that the following holds:



                                  $$dfrac40!35!+dbinom404dbinom41dfrac5!2!1!1!1!+dbinom403dbinom31left(dfrac5!3!1!1!+dfrac5!2!2!1!right)+dbinom402dbinom21left(dfrac5!4!1!+dfrac5!3!2!right)+dbinom401 = 40^5$$



                                  (I verified this is true myself using Wolframalpha).






                                  share|cite|improve this answer











                                  $endgroup$

















                                    0












                                    $begingroup$

                                    If the machine is choosing with replacement, but the person is choosing five distinct numbers, and if success means two distinct numbers the person chose are picked by the machine, then the problem is much more difficult:



                                    Probability machine chooses five distinct numbers:
                                    $$dfrac40!35!40^5$$



                                    Probability machine chooses four distinct numbers (choose the four distinct numbers the machine selected, choose the one number that is repeated twice, permute the multiset to find all possible orders these numbers could be chosen, divide by the total number of ways to choose five numbers):
                                    $$dfracdbinom404dbinom41dfrac5!1!1!1!2!40^5$$



                                    Probability machine chooses three distinct numbers (choose the three distinct numbers the machine selected, either one number is repeated three times or two numbers are repeated twice each):
                                    $$dfracdbinom403dbinom31left(dfrac5!3!1!1!+dfrac5!2!2!1!right)40^5$$



                                    Probability machine chooses two distinct numbers (choose the two distinct numbers the machine selected. You can have one number four times and the other once or one number three times and the other twice.):
                                    $$dfracdbinom402dbinom21left(dfrac5!4!1!+dfrac5!3!2!right)40^5$$



                                    So, the probability of you matching exactly two numbers:
                                    $$beginalign* & dfrac40!35!40^5cdot dfrac5cdot 4cdot 35cdot 34cdot 3340cdot 39cdot 38cdot 37cdot 36\ + & dfracdbinom404dbinom41dfrac5!2!40^5cdot dfrac4cdot 3cdot 36cdot 35cdot 3440cdot 39cdot 38cdot 37cdot 36 \ + & dfracdbinom403dbinom31left(dfrac5!3!+dfrac5!(2!)^2right)40^5cdot dfrac3cdot 2cdot 37cdot 36cdot 3540cdot 39cdot 38cdot 37cdot 36 \ + & dfracdbinom402dbinom21left(dfrac5!4!+dbinom53right)40^5cdot dfrac2cdot 1cdot 38cdot 37cdot 3640cdot 39cdot 38cdot 37cdot 36 approx 0.0091259765625endalign*$$



                                    Note: It is possible for the machine to choose one distinct number, but there is a zero probability that you wind up with two matching numbers, so I ignored that case. To show that my numbers work out though, you can test that the following holds:



                                    $$dfrac40!35!+dbinom404dbinom41dfrac5!2!1!1!1!+dbinom403dbinom31left(dfrac5!3!1!1!+dfrac5!2!2!1!right)+dbinom402dbinom21left(dfrac5!4!1!+dfrac5!3!2!right)+dbinom401 = 40^5$$



                                    (I verified this is true myself using Wolframalpha).






                                    share|cite|improve this answer











                                    $endgroup$















                                      0












                                      0








                                      0





                                      $begingroup$

                                      If the machine is choosing with replacement, but the person is choosing five distinct numbers, and if success means two distinct numbers the person chose are picked by the machine, then the problem is much more difficult:



                                      Probability machine chooses five distinct numbers:
                                      $$dfrac40!35!40^5$$



                                      Probability machine chooses four distinct numbers (choose the four distinct numbers the machine selected, choose the one number that is repeated twice, permute the multiset to find all possible orders these numbers could be chosen, divide by the total number of ways to choose five numbers):
                                      $$dfracdbinom404dbinom41dfrac5!1!1!1!2!40^5$$



                                      Probability machine chooses three distinct numbers (choose the three distinct numbers the machine selected, either one number is repeated three times or two numbers are repeated twice each):
                                      $$dfracdbinom403dbinom31left(dfrac5!3!1!1!+dfrac5!2!2!1!right)40^5$$



                                      Probability machine chooses two distinct numbers (choose the two distinct numbers the machine selected. You can have one number four times and the other once or one number three times and the other twice.):
                                      $$dfracdbinom402dbinom21left(dfrac5!4!1!+dfrac5!3!2!right)40^5$$



                                      So, the probability of you matching exactly two numbers:
                                      $$beginalign* & dfrac40!35!40^5cdot dfrac5cdot 4cdot 35cdot 34cdot 3340cdot 39cdot 38cdot 37cdot 36\ + & dfracdbinom404dbinom41dfrac5!2!40^5cdot dfrac4cdot 3cdot 36cdot 35cdot 3440cdot 39cdot 38cdot 37cdot 36 \ + & dfracdbinom403dbinom31left(dfrac5!3!+dfrac5!(2!)^2right)40^5cdot dfrac3cdot 2cdot 37cdot 36cdot 3540cdot 39cdot 38cdot 37cdot 36 \ + & dfracdbinom402dbinom21left(dfrac5!4!+dbinom53right)40^5cdot dfrac2cdot 1cdot 38cdot 37cdot 3640cdot 39cdot 38cdot 37cdot 36 approx 0.0091259765625endalign*$$



                                      Note: It is possible for the machine to choose one distinct number, but there is a zero probability that you wind up with two matching numbers, so I ignored that case. To show that my numbers work out though, you can test that the following holds:



                                      $$dfrac40!35!+dbinom404dbinom41dfrac5!2!1!1!1!+dbinom403dbinom31left(dfrac5!3!1!1!+dfrac5!2!2!1!right)+dbinom402dbinom21left(dfrac5!4!1!+dfrac5!3!2!right)+dbinom401 = 40^5$$



                                      (I verified this is true myself using Wolframalpha).






                                      share|cite|improve this answer











                                      $endgroup$



                                      If the machine is choosing with replacement, but the person is choosing five distinct numbers, and if success means two distinct numbers the person chose are picked by the machine, then the problem is much more difficult:



                                      Probability machine chooses five distinct numbers:
                                      $$dfrac40!35!40^5$$



                                      Probability machine chooses four distinct numbers (choose the four distinct numbers the machine selected, choose the one number that is repeated twice, permute the multiset to find all possible orders these numbers could be chosen, divide by the total number of ways to choose five numbers):
                                      $$dfracdbinom404dbinom41dfrac5!1!1!1!2!40^5$$



                                      Probability machine chooses three distinct numbers (choose the three distinct numbers the machine selected, either one number is repeated three times or two numbers are repeated twice each):
                                      $$dfracdbinom403dbinom31left(dfrac5!3!1!1!+dfrac5!2!2!1!right)40^5$$



                                      Probability machine chooses two distinct numbers (choose the two distinct numbers the machine selected. You can have one number four times and the other once or one number three times and the other twice.):
                                      $$dfracdbinom402dbinom21left(dfrac5!4!1!+dfrac5!3!2!right)40^5$$



                                      So, the probability of you matching exactly two numbers:
                                      $$beginalign* & dfrac40!35!40^5cdot dfrac5cdot 4cdot 35cdot 34cdot 3340cdot 39cdot 38cdot 37cdot 36\ + & dfracdbinom404dbinom41dfrac5!2!40^5cdot dfrac4cdot 3cdot 36cdot 35cdot 3440cdot 39cdot 38cdot 37cdot 36 \ + & dfracdbinom403dbinom31left(dfrac5!3!+dfrac5!(2!)^2right)40^5cdot dfrac3cdot 2cdot 37cdot 36cdot 3540cdot 39cdot 38cdot 37cdot 36 \ + & dfracdbinom402dbinom21left(dfrac5!4!+dbinom53right)40^5cdot dfrac2cdot 1cdot 38cdot 37cdot 3640cdot 39cdot 38cdot 37cdot 36 approx 0.0091259765625endalign*$$



                                      Note: It is possible for the machine to choose one distinct number, but there is a zero probability that you wind up with two matching numbers, so I ignored that case. To show that my numbers work out though, you can test that the following holds:



                                      $$dfrac40!35!+dbinom404dbinom41dfrac5!2!1!1!1!+dbinom403dbinom31left(dfrac5!3!1!1!+dfrac5!2!2!1!right)+dbinom402dbinom21left(dfrac5!4!1!+dfrac5!3!2!right)+dbinom401 = 40^5$$



                                      (I verified this is true myself using Wolframalpha).







                                      share|cite|improve this answer














                                      share|cite|improve this answer



                                      share|cite|improve this answer








                                      edited 10 hours ago









                                      lonza leggiera

                                      1,21028




                                      1,21028










                                      answered yesterday









                                      InterstellarProbeInterstellarProbe

                                      3,099727




                                      3,099727




















                                          Ika is a new contributor. Be nice, and check out our Code of Conduct.









                                          draft saved

                                          draft discarded


















                                          Ika is a new contributor. Be nice, and check out our Code of Conduct.












                                          Ika is a new contributor. Be nice, and check out our Code of Conduct.











                                          Ika is a new contributor. Be nice, and check out our Code of Conduct.














                                          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%2f3164343%2ftrouble-calculating-probability%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

                                          Boston (Lincolnshire) Stedsbyld | Berne yn Boston | NavigaasjemenuBoston Borough CouncilBoston, Lincolnshire

                                          Trouble understanding the speech of overseas colleaguesHow can I better understand manager or clients with strong accents?Adding more movement and speech at the fundamental level to a highly-sedentary job?Difficulty in understanding Manager's accent(language and communication)How to adjust yourself where your colleagues are not understanding to you?Understanding manager's expectationsForeigner and colleagues using slangHaving difficulty understanding meetingsHow do you breathe when giving a speech?Trouble Waking Up for Emergencies (On-Call)Problems with colleaguesColleagues feeling insecure when I do my work

                                          Ballerup Komuun Stääden an saarpen | Futnuuten | Luke uk diar | Nawigatsjuunwww.ballerup.dkwww.statistikbanken.dk: Tabelle BEF44 (Folketal pr. 1. januar fordelt på byer)Commonskategorii: Ballerup Komuun55° 44′ N, 12° 22′ O