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

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

                              Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                              Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?