Simple Monte Carlo simulation/approximation of 2 pair in a 5 card poker handChange in probability complexity when adding 2 “wildcards” (jokers) to a standard 52 card deckApproximation and Monte Carlo simulation.Getting $5$ in a row of same color card “mystery”Bingo probability of a tie with 20 playersProblem with card game called “El Monte”How to calculate the expected value of the Powerball Lottery?Basic Monte Carlo simulation of indistinguishable balls and distinguishable binsSimulating a fair die with a 5-card handAntithetic sampling and Monte Carlo simulationProbability of Straight of 4 in 5 Card Poker Hand

How could a scammer know the apps on my phone / iTunes account?

Math equation in non italic font

Aluminum electrolytic or ceramic capacitors for linear regulator input and output?

Bacteria contamination inside a thermos bottle

Is it good practice to use Linear Least-Squares with SMA?

What does 高層ビルに何車線もの道路。mean?

Have the tides ever turned twice on any open problem?

Are Roman Catholic priests ever addressed as pastor

What is the relationship between relativity and the Doppler effect?

Describing a chess game in a novel

Print a physical multiplication table

ERC721: How to get the owned tokens of an address

How to pronounce "I ♥ Huckabees"?

Instead of a Universal Basic Income program, why not implement a "Universal Basic Needs" program?

How do I change two letters closest to a string and one letter immediately after a string using Notepad++?

Why do tuner card drivers fail to build after kernel update to 4.4.0-143-generic?

How to plot polar formed complex numbers?

Do I need to be arrogant to get ahead?

Official degrees of earth’s rotation per day

Adventure Game (text based) in C++

What is the adequate fee for a reveal operation?

How do I hide Chekhov's Gun?

What did “the good wine” (τὸν καλὸν οἶνον) mean in John 2:10?

Violin - Can double stops be played when the strings are not next to each other?



Simple Monte Carlo simulation/approximation of 2 pair in a 5 card poker hand


Change in probability complexity when adding 2 “wildcards” (jokers) to a standard 52 card deckApproximation and Monte Carlo simulation.Getting $5$ in a row of same color card “mystery”Bingo probability of a tie with 20 playersProblem with card game called “El Monte”How to calculate the expected value of the Powerball Lottery?Basic Monte Carlo simulation of indistinguishable balls and distinguishable binsSimulating a fair die with a 5-card handAntithetic sampling and Monte Carlo simulationProbability of Straight of 4 in 5 Card Poker Hand













0












$begingroup$


I am very curious about simulation of an event where an estimating/sampling technique is used.



In this example, the goal is to simulate a subset of all the roughly $2.6$ million $5$ card poker hands from a standard $52$ card deck and determine how many are $2$ pair hands.



We already know that the correct count is about $123,552 / 2,598,960$ which is about $4.75$% but I am using this example because it has a reasonable # of outcomes to be simulated in any proportion from $0$ to $100$% and because we can use it to check the accuracy of the partial simulation easily.



I would like if someone could simulate a subset of these hands using some simulation software and perhaps build a small table with 5 columns, namely:



  1. Number of hands evaluated

  2. % of total possible hands

  3. Number of winners found

  4. Extrapolated winners expected

  5. Actual error

So for example, a good starting point would be to simulate $1$% of the roughly $2.6$ million possible outcomes so that would be about $26,000$. So for our table we would fill in the following:



  1. $26,000$

  2. $1$%

  3. ? (we would expect around $1236$)

  4. $100$ * whatever we actually get in # $3$.

  5. how far off are we from the expected $1236$ in %?

I'd also be curious of what type of sampling method you used such as random or something else. For example, would you just choose $5$ random cards $26,000$ times and check for a 2 pair? Would that be the best method in this case or would something other than random be more appropriate?



I would like to see the results of some other sample sizes too like $0.01$% ($260$ hands), $0.1$% ($2600$ hands) and $2$% ($52,000$ hands).



Can Mathematica and/or other simulation software handle this problem easily? If so, does it automatically check that the same random hand is not generated multiple times for the same simulation or does that require separate programming or is it not a concern since it would be rare if the number of samples is small (such as $1$% or less of the total # of possible $5$ card hands)?










share|cite|improve this question











$endgroup$
















    0












    $begingroup$


    I am very curious about simulation of an event where an estimating/sampling technique is used.



    In this example, the goal is to simulate a subset of all the roughly $2.6$ million $5$ card poker hands from a standard $52$ card deck and determine how many are $2$ pair hands.



    We already know that the correct count is about $123,552 / 2,598,960$ which is about $4.75$% but I am using this example because it has a reasonable # of outcomes to be simulated in any proportion from $0$ to $100$% and because we can use it to check the accuracy of the partial simulation easily.



    I would like if someone could simulate a subset of these hands using some simulation software and perhaps build a small table with 5 columns, namely:



    1. Number of hands evaluated

    2. % of total possible hands

    3. Number of winners found

    4. Extrapolated winners expected

    5. Actual error

    So for example, a good starting point would be to simulate $1$% of the roughly $2.6$ million possible outcomes so that would be about $26,000$. So for our table we would fill in the following:



    1. $26,000$

    2. $1$%

    3. ? (we would expect around $1236$)

    4. $100$ * whatever we actually get in # $3$.

    5. how far off are we from the expected $1236$ in %?

    I'd also be curious of what type of sampling method you used such as random or something else. For example, would you just choose $5$ random cards $26,000$ times and check for a 2 pair? Would that be the best method in this case or would something other than random be more appropriate?



    I would like to see the results of some other sample sizes too like $0.01$% ($260$ hands), $0.1$% ($2600$ hands) and $2$% ($52,000$ hands).



    Can Mathematica and/or other simulation software handle this problem easily? If so, does it automatically check that the same random hand is not generated multiple times for the same simulation or does that require separate programming or is it not a concern since it would be rare if the number of samples is small (such as $1$% or less of the total # of possible $5$ card hands)?










    share|cite|improve this question











    $endgroup$














      0












      0








      0





      $begingroup$


      I am very curious about simulation of an event where an estimating/sampling technique is used.



      In this example, the goal is to simulate a subset of all the roughly $2.6$ million $5$ card poker hands from a standard $52$ card deck and determine how many are $2$ pair hands.



      We already know that the correct count is about $123,552 / 2,598,960$ which is about $4.75$% but I am using this example because it has a reasonable # of outcomes to be simulated in any proportion from $0$ to $100$% and because we can use it to check the accuracy of the partial simulation easily.



      I would like if someone could simulate a subset of these hands using some simulation software and perhaps build a small table with 5 columns, namely:



      1. Number of hands evaluated

      2. % of total possible hands

      3. Number of winners found

      4. Extrapolated winners expected

      5. Actual error

      So for example, a good starting point would be to simulate $1$% of the roughly $2.6$ million possible outcomes so that would be about $26,000$. So for our table we would fill in the following:



      1. $26,000$

      2. $1$%

      3. ? (we would expect around $1236$)

      4. $100$ * whatever we actually get in # $3$.

      5. how far off are we from the expected $1236$ in %?

      I'd also be curious of what type of sampling method you used such as random or something else. For example, would you just choose $5$ random cards $26,000$ times and check for a 2 pair? Would that be the best method in this case or would something other than random be more appropriate?



      I would like to see the results of some other sample sizes too like $0.01$% ($260$ hands), $0.1$% ($2600$ hands) and $2$% ($52,000$ hands).



      Can Mathematica and/or other simulation software handle this problem easily? If so, does it automatically check that the same random hand is not generated multiple times for the same simulation or does that require separate programming or is it not a concern since it would be rare if the number of samples is small (such as $1$% or less of the total # of possible $5$ card hands)?










      share|cite|improve this question











      $endgroup$




      I am very curious about simulation of an event where an estimating/sampling technique is used.



      In this example, the goal is to simulate a subset of all the roughly $2.6$ million $5$ card poker hands from a standard $52$ card deck and determine how many are $2$ pair hands.



      We already know that the correct count is about $123,552 / 2,598,960$ which is about $4.75$% but I am using this example because it has a reasonable # of outcomes to be simulated in any proportion from $0$ to $100$% and because we can use it to check the accuracy of the partial simulation easily.



      I would like if someone could simulate a subset of these hands using some simulation software and perhaps build a small table with 5 columns, namely:



      1. Number of hands evaluated

      2. % of total possible hands

      3. Number of winners found

      4. Extrapolated winners expected

      5. Actual error

      So for example, a good starting point would be to simulate $1$% of the roughly $2.6$ million possible outcomes so that would be about $26,000$. So for our table we would fill in the following:



      1. $26,000$

      2. $1$%

      3. ? (we would expect around $1236$)

      4. $100$ * whatever we actually get in # $3$.

      5. how far off are we from the expected $1236$ in %?

      I'd also be curious of what type of sampling method you used such as random or something else. For example, would you just choose $5$ random cards $26,000$ times and check for a 2 pair? Would that be the best method in this case or would something other than random be more appropriate?



      I would like to see the results of some other sample sizes too like $0.01$% ($260$ hands), $0.1$% ($2600$ hands) and $2$% ($52,000$ hands).



      Can Mathematica and/or other simulation software handle this problem easily? If so, does it automatically check that the same random hand is not generated multiple times for the same simulation or does that require separate programming or is it not a concern since it would be rare if the number of samples is small (such as $1$% or less of the total # of possible $5$ card hands)?







      probability simulation






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Sep 26 '14 at 8:48







      David

















      asked Sep 26 '14 at 8:14









      DavidDavid

      33711133




      33711133




















          1 Answer
          1






          active

          oldest

          votes


















          0












          $begingroup$

          Assuming your random simulation is indeed random, generating the same hand more than once is not a problem: you do not have to remove duplicates or even have to check whether it has happened. Generating duplicate cards in the same hand would be a problem.



          If the probability of an event is $p$ and you sample $n$ times then, using the binomial distribution, you would expect $np$ cases to occur, with a standard deviation of $sqrtnp(1-p)$. The ratio of these is $sqrtfrac1-pnp$. Thanks to the central limit theorem, you would expect $95%$ to within about two standard deviations of the expected value.



          For your example this give a mean of about $1236.0$ as you have said and a standard deviation of about $34.3$. The ratio in your example about $0.0278$ suggesting that about $95%$ of simulations should be within $5.55%$ of $1236$.



          Change the sample size and you change $n$ in the calculations above. If it is small, you should use the binomial distribution directly rather than a Gaussian approximation, especially given the discreteness of the results.






          share|cite|improve this answer









          $endgroup$












          • $begingroup$
            Can I get some "concrete" data please like someone run a random simulation of some number of trials of a $5$ card poker hand such as $2600$ and report back? I am anxious to see how close to the expected value of $124$ we actually get. Thanks.
            $endgroup$
            – David
            Sep 26 '14 at 10:28











          • $begingroup$
            Here concrete data will tell you less than theory. But if you insist, $260$ attempts gave me $16$ two-pairs (but not full houses or fours-of-a-kind), $2600$ attempts gave me $114$ two-pairs, $26000$ attempts gave me $1263$ two-pairs, and $260000$ attempts gave me $12425$ two-pairs. Consistent with my answer but less informative.
            $endgroup$
            – Henry
            Sep 26 '14 at 12:13










          • $begingroup$
            That is informative thanks. It seems like the Monte Carlo method works when you don't need an exact count/probability but rather just an approximation. However if there were trillions (or more) of possible outcomes to consider, then the % we could actually simulate in a reasonable amount of time would go way down and the possible error would likely go way up. Notice that the $16$ you got here out of $260$ has the greatest % error since it should be a theoretical $12.4$ count so that is about $29$% too high an estimate but I would say it is "ballpark" (although in the "nosebleed" section).
            $endgroup$
            – David
            Sep 26 '14 at 12:49











          • $begingroup$
            The sample error does not really depend on the population size (at least not until they are the same order of magnitude and you are sampling without replacement). My expression $sqrtfrac1-pnp$ indicates how the likely magnitude of the relative error changes with the sample size, and is unaffected by whether there are millions, or billions, or trillions of possibilities in the original population.
            $endgroup$
            – Henry
            Sep 26 '14 at 13:18










          • $begingroup$
            Also your formulas are informative but sometimes we don't know p, that is why we are simulating it. For example, in my original problem of drawing $27$ cards from $54$. I don't even have a feel for what a "ballpark" answer would be on that and because it has about $2$ quadrillion card combinations, even a simulation would likely be considerably off.
            $endgroup$
            – David
            Sep 26 '14 at 13:35










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



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f946703%2fsimple-monte-carlo-simulation-approximation-of-2-pair-in-a-5-card-poker-hand%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0












          $begingroup$

          Assuming your random simulation is indeed random, generating the same hand more than once is not a problem: you do not have to remove duplicates or even have to check whether it has happened. Generating duplicate cards in the same hand would be a problem.



          If the probability of an event is $p$ and you sample $n$ times then, using the binomial distribution, you would expect $np$ cases to occur, with a standard deviation of $sqrtnp(1-p)$. The ratio of these is $sqrtfrac1-pnp$. Thanks to the central limit theorem, you would expect $95%$ to within about two standard deviations of the expected value.



          For your example this give a mean of about $1236.0$ as you have said and a standard deviation of about $34.3$. The ratio in your example about $0.0278$ suggesting that about $95%$ of simulations should be within $5.55%$ of $1236$.



          Change the sample size and you change $n$ in the calculations above. If it is small, you should use the binomial distribution directly rather than a Gaussian approximation, especially given the discreteness of the results.






          share|cite|improve this answer









          $endgroup$












          • $begingroup$
            Can I get some "concrete" data please like someone run a random simulation of some number of trials of a $5$ card poker hand such as $2600$ and report back? I am anxious to see how close to the expected value of $124$ we actually get. Thanks.
            $endgroup$
            – David
            Sep 26 '14 at 10:28











          • $begingroup$
            Here concrete data will tell you less than theory. But if you insist, $260$ attempts gave me $16$ two-pairs (but not full houses or fours-of-a-kind), $2600$ attempts gave me $114$ two-pairs, $26000$ attempts gave me $1263$ two-pairs, and $260000$ attempts gave me $12425$ two-pairs. Consistent with my answer but less informative.
            $endgroup$
            – Henry
            Sep 26 '14 at 12:13










          • $begingroup$
            That is informative thanks. It seems like the Monte Carlo method works when you don't need an exact count/probability but rather just an approximation. However if there were trillions (or more) of possible outcomes to consider, then the % we could actually simulate in a reasonable amount of time would go way down and the possible error would likely go way up. Notice that the $16$ you got here out of $260$ has the greatest % error since it should be a theoretical $12.4$ count so that is about $29$% too high an estimate but I would say it is "ballpark" (although in the "nosebleed" section).
            $endgroup$
            – David
            Sep 26 '14 at 12:49











          • $begingroup$
            The sample error does not really depend on the population size (at least not until they are the same order of magnitude and you are sampling without replacement). My expression $sqrtfrac1-pnp$ indicates how the likely magnitude of the relative error changes with the sample size, and is unaffected by whether there are millions, or billions, or trillions of possibilities in the original population.
            $endgroup$
            – Henry
            Sep 26 '14 at 13:18










          • $begingroup$
            Also your formulas are informative but sometimes we don't know p, that is why we are simulating it. For example, in my original problem of drawing $27$ cards from $54$. I don't even have a feel for what a "ballpark" answer would be on that and because it has about $2$ quadrillion card combinations, even a simulation would likely be considerably off.
            $endgroup$
            – David
            Sep 26 '14 at 13:35















          0












          $begingroup$

          Assuming your random simulation is indeed random, generating the same hand more than once is not a problem: you do not have to remove duplicates or even have to check whether it has happened. Generating duplicate cards in the same hand would be a problem.



          If the probability of an event is $p$ and you sample $n$ times then, using the binomial distribution, you would expect $np$ cases to occur, with a standard deviation of $sqrtnp(1-p)$. The ratio of these is $sqrtfrac1-pnp$. Thanks to the central limit theorem, you would expect $95%$ to within about two standard deviations of the expected value.



          For your example this give a mean of about $1236.0$ as you have said and a standard deviation of about $34.3$. The ratio in your example about $0.0278$ suggesting that about $95%$ of simulations should be within $5.55%$ of $1236$.



          Change the sample size and you change $n$ in the calculations above. If it is small, you should use the binomial distribution directly rather than a Gaussian approximation, especially given the discreteness of the results.






          share|cite|improve this answer









          $endgroup$












          • $begingroup$
            Can I get some "concrete" data please like someone run a random simulation of some number of trials of a $5$ card poker hand such as $2600$ and report back? I am anxious to see how close to the expected value of $124$ we actually get. Thanks.
            $endgroup$
            – David
            Sep 26 '14 at 10:28











          • $begingroup$
            Here concrete data will tell you less than theory. But if you insist, $260$ attempts gave me $16$ two-pairs (but not full houses or fours-of-a-kind), $2600$ attempts gave me $114$ two-pairs, $26000$ attempts gave me $1263$ two-pairs, and $260000$ attempts gave me $12425$ two-pairs. Consistent with my answer but less informative.
            $endgroup$
            – Henry
            Sep 26 '14 at 12:13










          • $begingroup$
            That is informative thanks. It seems like the Monte Carlo method works when you don't need an exact count/probability but rather just an approximation. However if there were trillions (or more) of possible outcomes to consider, then the % we could actually simulate in a reasonable amount of time would go way down and the possible error would likely go way up. Notice that the $16$ you got here out of $260$ has the greatest % error since it should be a theoretical $12.4$ count so that is about $29$% too high an estimate but I would say it is "ballpark" (although in the "nosebleed" section).
            $endgroup$
            – David
            Sep 26 '14 at 12:49











          • $begingroup$
            The sample error does not really depend on the population size (at least not until they are the same order of magnitude and you are sampling without replacement). My expression $sqrtfrac1-pnp$ indicates how the likely magnitude of the relative error changes with the sample size, and is unaffected by whether there are millions, or billions, or trillions of possibilities in the original population.
            $endgroup$
            – Henry
            Sep 26 '14 at 13:18










          • $begingroup$
            Also your formulas are informative but sometimes we don't know p, that is why we are simulating it. For example, in my original problem of drawing $27$ cards from $54$. I don't even have a feel for what a "ballpark" answer would be on that and because it has about $2$ quadrillion card combinations, even a simulation would likely be considerably off.
            $endgroup$
            – David
            Sep 26 '14 at 13:35













          0












          0








          0





          $begingroup$

          Assuming your random simulation is indeed random, generating the same hand more than once is not a problem: you do not have to remove duplicates or even have to check whether it has happened. Generating duplicate cards in the same hand would be a problem.



          If the probability of an event is $p$ and you sample $n$ times then, using the binomial distribution, you would expect $np$ cases to occur, with a standard deviation of $sqrtnp(1-p)$. The ratio of these is $sqrtfrac1-pnp$. Thanks to the central limit theorem, you would expect $95%$ to within about two standard deviations of the expected value.



          For your example this give a mean of about $1236.0$ as you have said and a standard deviation of about $34.3$. The ratio in your example about $0.0278$ suggesting that about $95%$ of simulations should be within $5.55%$ of $1236$.



          Change the sample size and you change $n$ in the calculations above. If it is small, you should use the binomial distribution directly rather than a Gaussian approximation, especially given the discreteness of the results.






          share|cite|improve this answer









          $endgroup$



          Assuming your random simulation is indeed random, generating the same hand more than once is not a problem: you do not have to remove duplicates or even have to check whether it has happened. Generating duplicate cards in the same hand would be a problem.



          If the probability of an event is $p$ and you sample $n$ times then, using the binomial distribution, you would expect $np$ cases to occur, with a standard deviation of $sqrtnp(1-p)$. The ratio of these is $sqrtfrac1-pnp$. Thanks to the central limit theorem, you would expect $95%$ to within about two standard deviations of the expected value.



          For your example this give a mean of about $1236.0$ as you have said and a standard deviation of about $34.3$. The ratio in your example about $0.0278$ suggesting that about $95%$ of simulations should be within $5.55%$ of $1236$.



          Change the sample size and you change $n$ in the calculations above. If it is small, you should use the binomial distribution directly rather than a Gaussian approximation, especially given the discreteness of the results.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Sep 26 '14 at 9:46









          HenryHenry

          101k481168




          101k481168











          • $begingroup$
            Can I get some "concrete" data please like someone run a random simulation of some number of trials of a $5$ card poker hand such as $2600$ and report back? I am anxious to see how close to the expected value of $124$ we actually get. Thanks.
            $endgroup$
            – David
            Sep 26 '14 at 10:28











          • $begingroup$
            Here concrete data will tell you less than theory. But if you insist, $260$ attempts gave me $16$ two-pairs (but not full houses or fours-of-a-kind), $2600$ attempts gave me $114$ two-pairs, $26000$ attempts gave me $1263$ two-pairs, and $260000$ attempts gave me $12425$ two-pairs. Consistent with my answer but less informative.
            $endgroup$
            – Henry
            Sep 26 '14 at 12:13










          • $begingroup$
            That is informative thanks. It seems like the Monte Carlo method works when you don't need an exact count/probability but rather just an approximation. However if there were trillions (or more) of possible outcomes to consider, then the % we could actually simulate in a reasonable amount of time would go way down and the possible error would likely go way up. Notice that the $16$ you got here out of $260$ has the greatest % error since it should be a theoretical $12.4$ count so that is about $29$% too high an estimate but I would say it is "ballpark" (although in the "nosebleed" section).
            $endgroup$
            – David
            Sep 26 '14 at 12:49











          • $begingroup$
            The sample error does not really depend on the population size (at least not until they are the same order of magnitude and you are sampling without replacement). My expression $sqrtfrac1-pnp$ indicates how the likely magnitude of the relative error changes with the sample size, and is unaffected by whether there are millions, or billions, or trillions of possibilities in the original population.
            $endgroup$
            – Henry
            Sep 26 '14 at 13:18










          • $begingroup$
            Also your formulas are informative but sometimes we don't know p, that is why we are simulating it. For example, in my original problem of drawing $27$ cards from $54$. I don't even have a feel for what a "ballpark" answer would be on that and because it has about $2$ quadrillion card combinations, even a simulation would likely be considerably off.
            $endgroup$
            – David
            Sep 26 '14 at 13:35
















          • $begingroup$
            Can I get some "concrete" data please like someone run a random simulation of some number of trials of a $5$ card poker hand such as $2600$ and report back? I am anxious to see how close to the expected value of $124$ we actually get. Thanks.
            $endgroup$
            – David
            Sep 26 '14 at 10:28











          • $begingroup$
            Here concrete data will tell you less than theory. But if you insist, $260$ attempts gave me $16$ two-pairs (but not full houses or fours-of-a-kind), $2600$ attempts gave me $114$ two-pairs, $26000$ attempts gave me $1263$ two-pairs, and $260000$ attempts gave me $12425$ two-pairs. Consistent with my answer but less informative.
            $endgroup$
            – Henry
            Sep 26 '14 at 12:13










          • $begingroup$
            That is informative thanks. It seems like the Monte Carlo method works when you don't need an exact count/probability but rather just an approximation. However if there were trillions (or more) of possible outcomes to consider, then the % we could actually simulate in a reasonable amount of time would go way down and the possible error would likely go way up. Notice that the $16$ you got here out of $260$ has the greatest % error since it should be a theoretical $12.4$ count so that is about $29$% too high an estimate but I would say it is "ballpark" (although in the "nosebleed" section).
            $endgroup$
            – David
            Sep 26 '14 at 12:49











          • $begingroup$
            The sample error does not really depend on the population size (at least not until they are the same order of magnitude and you are sampling without replacement). My expression $sqrtfrac1-pnp$ indicates how the likely magnitude of the relative error changes with the sample size, and is unaffected by whether there are millions, or billions, or trillions of possibilities in the original population.
            $endgroup$
            – Henry
            Sep 26 '14 at 13:18










          • $begingroup$
            Also your formulas are informative but sometimes we don't know p, that is why we are simulating it. For example, in my original problem of drawing $27$ cards from $54$. I don't even have a feel for what a "ballpark" answer would be on that and because it has about $2$ quadrillion card combinations, even a simulation would likely be considerably off.
            $endgroup$
            – David
            Sep 26 '14 at 13:35















          $begingroup$
          Can I get some "concrete" data please like someone run a random simulation of some number of trials of a $5$ card poker hand such as $2600$ and report back? I am anxious to see how close to the expected value of $124$ we actually get. Thanks.
          $endgroup$
          – David
          Sep 26 '14 at 10:28





          $begingroup$
          Can I get some "concrete" data please like someone run a random simulation of some number of trials of a $5$ card poker hand such as $2600$ and report back? I am anxious to see how close to the expected value of $124$ we actually get. Thanks.
          $endgroup$
          – David
          Sep 26 '14 at 10:28













          $begingroup$
          Here concrete data will tell you less than theory. But if you insist, $260$ attempts gave me $16$ two-pairs (but not full houses or fours-of-a-kind), $2600$ attempts gave me $114$ two-pairs, $26000$ attempts gave me $1263$ two-pairs, and $260000$ attempts gave me $12425$ two-pairs. Consistent with my answer but less informative.
          $endgroup$
          – Henry
          Sep 26 '14 at 12:13




          $begingroup$
          Here concrete data will tell you less than theory. But if you insist, $260$ attempts gave me $16$ two-pairs (but not full houses or fours-of-a-kind), $2600$ attempts gave me $114$ two-pairs, $26000$ attempts gave me $1263$ two-pairs, and $260000$ attempts gave me $12425$ two-pairs. Consistent with my answer but less informative.
          $endgroup$
          – Henry
          Sep 26 '14 at 12:13












          $begingroup$
          That is informative thanks. It seems like the Monte Carlo method works when you don't need an exact count/probability but rather just an approximation. However if there were trillions (or more) of possible outcomes to consider, then the % we could actually simulate in a reasonable amount of time would go way down and the possible error would likely go way up. Notice that the $16$ you got here out of $260$ has the greatest % error since it should be a theoretical $12.4$ count so that is about $29$% too high an estimate but I would say it is "ballpark" (although in the "nosebleed" section).
          $endgroup$
          – David
          Sep 26 '14 at 12:49





          $begingroup$
          That is informative thanks. It seems like the Monte Carlo method works when you don't need an exact count/probability but rather just an approximation. However if there were trillions (or more) of possible outcomes to consider, then the % we could actually simulate in a reasonable amount of time would go way down and the possible error would likely go way up. Notice that the $16$ you got here out of $260$ has the greatest % error since it should be a theoretical $12.4$ count so that is about $29$% too high an estimate but I would say it is "ballpark" (although in the "nosebleed" section).
          $endgroup$
          – David
          Sep 26 '14 at 12:49













          $begingroup$
          The sample error does not really depend on the population size (at least not until they are the same order of magnitude and you are sampling without replacement). My expression $sqrtfrac1-pnp$ indicates how the likely magnitude of the relative error changes with the sample size, and is unaffected by whether there are millions, or billions, or trillions of possibilities in the original population.
          $endgroup$
          – Henry
          Sep 26 '14 at 13:18




          $begingroup$
          The sample error does not really depend on the population size (at least not until they are the same order of magnitude and you are sampling without replacement). My expression $sqrtfrac1-pnp$ indicates how the likely magnitude of the relative error changes with the sample size, and is unaffected by whether there are millions, or billions, or trillions of possibilities in the original population.
          $endgroup$
          – Henry
          Sep 26 '14 at 13:18












          $begingroup$
          Also your formulas are informative but sometimes we don't know p, that is why we are simulating it. For example, in my original problem of drawing $27$ cards from $54$. I don't even have a feel for what a "ballpark" answer would be on that and because it has about $2$ quadrillion card combinations, even a simulation would likely be considerably off.
          $endgroup$
          – David
          Sep 26 '14 at 13:35




          $begingroup$
          Also your formulas are informative but sometimes we don't know p, that is why we are simulating it. For example, in my original problem of drawing $27$ cards from $54$. I don't even have a feel for what a "ballpark" answer would be on that and because it has about $2$ quadrillion card combinations, even a simulation would likely be considerably off.
          $endgroup$
          – David
          Sep 26 '14 at 13:35

















          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%2f946703%2fsimple-monte-carlo-simulation-approximation-of-2-pair-in-a-5-card-poker-hand%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

          Solar Wings Breeze Design and development Specifications (Breeze) References Navigation menu1368-485X"Hang glider: Breeze (Solar Wings)"e

          Kathakali Contents Etymology and nomenclature History Repertoire Songs and musical instruments Traditional plays Styles: Sampradayam Training centers and awards Relationship to other dance forms See also Notes References External links Navigation menueThe Illustrated Encyclopedia of Hinduism: A-MSouth Asian Folklore: An EncyclopediaRoutledge International Encyclopedia of Women: Global Women's Issues and KnowledgeKathakali Dance-drama: Where Gods and Demons Come to PlayKathakali Dance-drama: Where Gods and Demons Come to PlayKathakali Dance-drama: Where Gods and Demons Come to Play10.1353/atj.2005.0004The Illustrated Encyclopedia of Hinduism: A-MEncyclopedia of HinduismKathakali Dance-drama: Where Gods and Demons Come to PlaySonic Liturgy: Ritual and Music in Hindu Tradition"The Mirror of Gesture"Kathakali Dance-drama: Where Gods and Demons Come to Play"Kathakali"Indian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceMedieval Indian Literature: An AnthologyThe Oxford Companion to Indian TheatreSouth Asian Folklore: An Encyclopedia : Afghanistan, Bangladesh, India, Nepal, Pakistan, Sri LankaThe Rise of Performance Studies: Rethinking Richard Schechner's Broad SpectrumIndian Theatre: Traditions of PerformanceModern Asian Theatre and Performance 1900-2000Critical Theory and PerformanceBetween Theater and AnthropologyKathakali603847011Indian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceBetween Theater and AnthropologyBetween Theater and AnthropologyNambeesan Smaraka AwardsArchivedThe Cambridge Guide to TheatreRoutledge International Encyclopedia of Women: Global Women's Issues and KnowledgeThe Garland Encyclopedia of World Music: South Asia : the Indian subcontinentThe Ethos of Noh: Actors and Their Art10.2307/1145740By Means of Performance: Intercultural Studies of Theatre and Ritual10.1017/s204912550000100xReconceiving the Renaissance: A Critical ReaderPerformance TheoryListening to Theatre: The Aural Dimension of Beijing Opera10.2307/1146013Kathakali: The Art of the Non-WorldlyOn KathakaliKathakali, the dance theatreThe Kathakali Complex: Performance & StructureKathakali Dance-Drama: Where Gods and Demons Come to Play10.1093/obo/9780195399318-0071Drama and Ritual of Early Hinduism"In the Shadow of Hollywood Orientalism: Authentic East Indian Dancing"10.1080/08949460490274013Sanskrit Play Production in Ancient IndiaIndian Music: History and StructureBharata, the Nāṭyaśāstra233639306Table of Contents2238067286469807Dance In Indian Painting10.2307/32047833204783Kathakali Dance-Theatre: A Visual Narrative of Sacred Indian MimeIndian Classical Dance: The Renaissance and BeyondKathakali: an indigenous art-form of Keralaeee

          Method to test if a number is a perfect power? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Detecting perfect squares faster than by extracting square rooteffective way to get the integer sequence A181392 from oeisA rarely mentioned fact about perfect powersHow many numbers such $n$ are there that $n<100,lfloorsqrtn rfloor mid n$Check perfect squareness by modulo division against multiple basesFor what pair of integers $(a,b)$ is $3^a + 7^b$ a perfect square.Do there exist any positive integers $n$ such that $lfloore^nrfloor$ is a perfect power? What is the probability that one exists?finding perfect power factors of an integerProve that the sequence contains a perfect square for any natural number $m $ in the domain of $f$ .Counting Perfect Powers