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

                              Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                              Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                              Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form