Using R to calculate probability of rolling 2 numbers in 20 throws [closed]Using R for dice probabilitiesHow to calculate the probability of the outcome of this convoluted dice rolling mechanic?How to find the cumulative probability of a multinomial?Probability of throwing n different numbers in m throws of a diceNumber of rolls to get my desired result with a set probabilityminimum number of rolls necessary to determine how many sides a die hasRolling one die after anotherProbability of a specific event when rolling a 6 sided die five timesRolling a $6$ Sided DieHow many times must I roll a die to confidently assess its fairness?

Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?

Why was this person allowed to become Grand Maester?

A word that means "blending into a community too much"

My boss want to get rid of me - what should I do?

How to learn Linux system internals

Can a human be transformed into a Mind Flayer?

Is an entry level DSLR going to shoot nice portrait pictures?

Is it expected that a reader will skip parts of what you write?

How do free-speech protections in the United States apply in public to corporate misrepresentations?

How can I deal with uncomfortable silence from my partner?

Why not invest in precious metals?

Reactive Programming

How can I make 12 tone and atonal melodies sound interesting?

Ability To Change Root User Password (Vulnerability?)

Non-aqueous eyes?

I have a problematic assistant manager, but I can't fire him

Why can I traceroute to this IP address, but not ping?

Should I put programming books I wrote a few years ago on my resume?

Did Apple bundle a specific monitor with the Apple II+ for schools?

Can the removal of a duty-free sales trolley result in a measurable reduction in emissions?

Increase speed altering column on large table to NON NULL

Why did Intel abandon unified CPU cache?

What does 思ってやっている mean?

With Ubuntu 18.04, how can I have a hot corner that locks the computer?



Using R to calculate probability of rolling 2 numbers in 20 throws [closed]


Using R for dice probabilitiesHow to calculate the probability of the outcome of this convoluted dice rolling mechanic?How to find the cumulative probability of a multinomial?Probability of throwing n different numbers in m throws of a diceNumber of rolls to get my desired result with a set probabilityminimum number of rolls necessary to determine how many sides a die hasRolling one die after anotherProbability of a specific event when rolling a 6 sided die five timesRolling a $6$ Sided DieHow many times must I roll a die to confidently assess its fairness?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3












$begingroup$


We have an 8-sided die. Throwing it 20 times,
what is the probability of rolling a number larger than 6 at least 12 times and at most 16 times?



If you know of an efficient program to write so that I won't have to type in the maths manually, I would be so happy.










share|cite|improve this question







New contributor



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






$endgroup$



closed as off-topic by COOLSerdash, mkt, Siong Thye Goh, mdewey, Glen_b Jun 2 at 16:24


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – COOLSerdash, mkt, Siong Thye Goh, mdewey, Glen_b
If this question can be reworded to fit the rules in the help center, please edit the question.






















    3












    $begingroup$


    We have an 8-sided die. Throwing it 20 times,
    what is the probability of rolling a number larger than 6 at least 12 times and at most 16 times?



    If you know of an efficient program to write so that I won't have to type in the maths manually, I would be so happy.










    share|cite|improve this question







    New contributor



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






    $endgroup$



    closed as off-topic by COOLSerdash, mkt, Siong Thye Goh, mdewey, Glen_b Jun 2 at 16:24


    This question appears to be off-topic. The users who voted to close gave this specific reason:


    • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – COOLSerdash, mkt, Siong Thye Goh, mdewey, Glen_b
    If this question can be reworded to fit the rules in the help center, please edit the question.


















      3












      3








      3





      $begingroup$


      We have an 8-sided die. Throwing it 20 times,
      what is the probability of rolling a number larger than 6 at least 12 times and at most 16 times?



      If you know of an efficient program to write so that I won't have to type in the maths manually, I would be so happy.










      share|cite|improve this question







      New contributor



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






      $endgroup$




      We have an 8-sided die. Throwing it 20 times,
      what is the probability of rolling a number larger than 6 at least 12 times and at most 16 times?



      If you know of an efficient program to write so that I won't have to type in the maths manually, I would be so happy.







      r probability dice






      share|cite|improve this question







      New contributor



      Fluffy Wombat 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



      Fluffy Wombat 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






      New contributor



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








      asked Jun 2 at 6:41









      Fluffy WombatFluffy Wombat

      182




      182




      New contributor



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




      New contributor




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






      closed as off-topic by COOLSerdash, mkt, Siong Thye Goh, mdewey, Glen_b Jun 2 at 16:24


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – COOLSerdash, mkt, Siong Thye Goh, mdewey, Glen_b
      If this question can be reworded to fit the rules in the help center, please edit the question.







      closed as off-topic by COOLSerdash, mkt, Siong Thye Goh, mdewey, Glen_b Jun 2 at 16:24


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – COOLSerdash, mkt, Siong Thye Goh, mdewey, Glen_b
      If this question can be reworded to fit the rules in the help center, please edit the question.




















          2 Answers
          2






          active

          oldest

          votes


















          3












          $begingroup$

          The answer by CoolSerdash shows you how to simulate the probability of interest. Here is a direct probability calculation without simulation:



          sides <- 8 # Number of sides of the die
          throws <- 20 # Number of throws
          no_cut <- 6 # Cut-off value (must roll above this)
          n_lower <- 12 # Lower bound
          n_upper <- 16 # Upper bound

          prob <- (sides - no_cut)/sides;
          pbinom(n_upper, throws, prob) - pbinom(n_lower-1, throws, prob);

          [1] 0.000935362





          share|cite|improve this answer









          $endgroup$




















            2












            $begingroup$

            Here is a quick implementation. I'm sure there are more efficient ways.



            d <- 8 # Sides of the die
            throws <- 20 # Number of throws
            no_cut <- 6 # Number at least on die
            n_lower <- 12 # Lower cutoff
            n_upper <- 16 # Upper cutoff

            n_sim <- 1000000 # Number of simulations

            res <- NULL

            res <- replicate(n_sim,
            x <- sample.int(d, size = throws, replace = TRUE)
            s <- sum(x > no_cut)
            (s >= n_lower && s <= n_upper)
            )

            sum(res)/n_sim # simulated probability





            share|cite|improve this answer









            $endgroup$



















              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              3












              $begingroup$

              The answer by CoolSerdash shows you how to simulate the probability of interest. Here is a direct probability calculation without simulation:



              sides <- 8 # Number of sides of the die
              throws <- 20 # Number of throws
              no_cut <- 6 # Cut-off value (must roll above this)
              n_lower <- 12 # Lower bound
              n_upper <- 16 # Upper bound

              prob <- (sides - no_cut)/sides;
              pbinom(n_upper, throws, prob) - pbinom(n_lower-1, throws, prob);

              [1] 0.000935362





              share|cite|improve this answer









              $endgroup$

















                3












                $begingroup$

                The answer by CoolSerdash shows you how to simulate the probability of interest. Here is a direct probability calculation without simulation:



                sides <- 8 # Number of sides of the die
                throws <- 20 # Number of throws
                no_cut <- 6 # Cut-off value (must roll above this)
                n_lower <- 12 # Lower bound
                n_upper <- 16 # Upper bound

                prob <- (sides - no_cut)/sides;
                pbinom(n_upper, throws, prob) - pbinom(n_lower-1, throws, prob);

                [1] 0.000935362





                share|cite|improve this answer









                $endgroup$















                  3












                  3








                  3





                  $begingroup$

                  The answer by CoolSerdash shows you how to simulate the probability of interest. Here is a direct probability calculation without simulation:



                  sides <- 8 # Number of sides of the die
                  throws <- 20 # Number of throws
                  no_cut <- 6 # Cut-off value (must roll above this)
                  n_lower <- 12 # Lower bound
                  n_upper <- 16 # Upper bound

                  prob <- (sides - no_cut)/sides;
                  pbinom(n_upper, throws, prob) - pbinom(n_lower-1, throws, prob);

                  [1] 0.000935362





                  share|cite|improve this answer









                  $endgroup$



                  The answer by CoolSerdash shows you how to simulate the probability of interest. Here is a direct probability calculation without simulation:



                  sides <- 8 # Number of sides of the die
                  throws <- 20 # Number of throws
                  no_cut <- 6 # Cut-off value (must roll above this)
                  n_lower <- 12 # Lower bound
                  n_upper <- 16 # Upper bound

                  prob <- (sides - no_cut)/sides;
                  pbinom(n_upper, throws, prob) - pbinom(n_lower-1, throws, prob);

                  [1] 0.000935362






                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Jun 2 at 7:52









                  BenBen

                  31.6k236137




                  31.6k236137























                      2












                      $begingroup$

                      Here is a quick implementation. I'm sure there are more efficient ways.



                      d <- 8 # Sides of the die
                      throws <- 20 # Number of throws
                      no_cut <- 6 # Number at least on die
                      n_lower <- 12 # Lower cutoff
                      n_upper <- 16 # Upper cutoff

                      n_sim <- 1000000 # Number of simulations

                      res <- NULL

                      res <- replicate(n_sim,
                      x <- sample.int(d, size = throws, replace = TRUE)
                      s <- sum(x > no_cut)
                      (s >= n_lower && s <= n_upper)
                      )

                      sum(res)/n_sim # simulated probability





                      share|cite|improve this answer









                      $endgroup$

















                        2












                        $begingroup$

                        Here is a quick implementation. I'm sure there are more efficient ways.



                        d <- 8 # Sides of the die
                        throws <- 20 # Number of throws
                        no_cut <- 6 # Number at least on die
                        n_lower <- 12 # Lower cutoff
                        n_upper <- 16 # Upper cutoff

                        n_sim <- 1000000 # Number of simulations

                        res <- NULL

                        res <- replicate(n_sim,
                        x <- sample.int(d, size = throws, replace = TRUE)
                        s <- sum(x > no_cut)
                        (s >= n_lower && s <= n_upper)
                        )

                        sum(res)/n_sim # simulated probability





                        share|cite|improve this answer









                        $endgroup$















                          2












                          2








                          2





                          $begingroup$

                          Here is a quick implementation. I'm sure there are more efficient ways.



                          d <- 8 # Sides of the die
                          throws <- 20 # Number of throws
                          no_cut <- 6 # Number at least on die
                          n_lower <- 12 # Lower cutoff
                          n_upper <- 16 # Upper cutoff

                          n_sim <- 1000000 # Number of simulations

                          res <- NULL

                          res <- replicate(n_sim,
                          x <- sample.int(d, size = throws, replace = TRUE)
                          s <- sum(x > no_cut)
                          (s >= n_lower && s <= n_upper)
                          )

                          sum(res)/n_sim # simulated probability





                          share|cite|improve this answer









                          $endgroup$



                          Here is a quick implementation. I'm sure there are more efficient ways.



                          d <- 8 # Sides of the die
                          throws <- 20 # Number of throws
                          no_cut <- 6 # Number at least on die
                          n_lower <- 12 # Lower cutoff
                          n_upper <- 16 # Upper cutoff

                          n_sim <- 1000000 # Number of simulations

                          res <- NULL

                          res <- replicate(n_sim,
                          x <- sample.int(d, size = throws, replace = TRUE)
                          s <- sum(x > no_cut)
                          (s >= n_lower && s <= n_upper)
                          )

                          sum(res)/n_sim # simulated probability






                          share|cite|improve this answer












                          share|cite|improve this answer



                          share|cite|improve this answer










                          answered Jun 2 at 7:00









                          COOLSerdashCOOLSerdash

                          16.8k75395




                          16.8k75395













                              Popular posts from this blog

                              Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

                              Log in Navigation menu

                              Invalid response line returned from server: HTTP/2 401 | ErrorPlease Please Help With Error 500 Internal Server Error after upgrading from 1.7 to 1.9Unable to place new customer orders in admin backendMagento - For “Manage Categories” Forbidden You do not have permission to access this documentHTTP ERROR 500 when using require(_once) app/Mage.phpMemcached causing Web Setup Wizard ErrorCould not create an acl object: Invalid XMLAn error occurred on the server. Please try to place the order againInvalid response line returned from server: HTTP/2 200 - message after update to 2.1.7Magento-CE 2.3.0 installation error on XamppMagento 2.2.6- After Migration all default Payment Methods are not working fine