• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Dice roll probability

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #81
    Originally posted by NotAllThere View Post
    For any given "n" you can calculate the probability of scoring n. The fact that you can get infinitely many values for n is irrelevant. As n gets large, the probability of scoring n dwindles towards zero - quite rapidly.
    That's true but he asked for an equation, ie an exact answer
    "You can't climb the ladder of success, with your hands in the pockets"
    Arnold Schwarzenegger

    Comment


      #82
      Originally posted by d000hg View Post
      got a bit over your head?
      Why should we bother reading your post if you can't be bothered to read the whole thread?
      "You can't climb the ladder of success, with your hands in the pockets"
      Arnold Schwarzenegger

      Comment


        #83
        Originally posted by No2politics View Post
        We have to start thinking in terms of expected number of successes (ie how many 1,s and 2,s are you going to roll in total assuming you have one starting die), rather than the probability of success. I agree that you can't just double probabilities. However you CAN double expectations.
        .
        Hmmm, I see where you're going with this.
        It would certainly make the problem more tractable, IF it's mathematically valid to double expectations. Need to look that up.
        But it's still complicated because MUN wants successes i.e. both 1s and 2s count as a success, bit only 1s lead to further throws.
        So formulating an infinite series expression for that is not that simple, I think.

        I'd love to think more on this but unfortunately must work on some infinitely less interesting statistical stuff for my daily bread. When I come back later I fully expect you to have solved this
        Last edited by sasguru; 6 December 2013, 09:32.
        Hard Brexit now!
        #prayfornodeal

        Comment


          #84
          Originally posted by sasguru View Post
          Problem is you can't simply work out one die and multiply by the number of dice.
          Let's ignore getting a two for now.
          If you have 1 dice the probability of success is 1/6.
          If you have 2 dice the probability of success is NOT 2x1/6=2/6, but 3/36.

          Think of the sample space with two dice. There are 36 possibilities.
          For success, you could have

          1, Number other than 1
          Number other than 1, 1
          1, 1

          So that's 3/36. An additional complication is that for the first 2 possibilities on that list (a single 1) you would throw a further die.
          But for the last possibility (2 ones) you would throw 2 further dice, if I understand correctly.

          I think simulation with a program is the way to go - and I don't think that's a trivial task either. If only I didn't have all this work to do before Christmas, sigh
          1, Number other than 1 - but there are 5 different cases of this
          Number other than 1, 1 - and this
          1, 1

          Overall roll 36 times and you could expect 10 rolls to contain a single 1, 1 to contain 2, and 25 to contain none. The average number of 1's being 1/3

          Comment


            #85
            Originally posted by ASB View Post
            1, Number other than 1 - but there are 5 different cases of this
            Number other than 1, 1 - and this
            1, 1

            Overall roll 36 times and you could expect 10 rolls to contain a single 1, 1 to contain 2, and 25 to contain none. The average number of 1's being 1/3
            Where's the facepalm smiley?
            Hard Brexit now!
            #prayfornodeal

            Comment


              #86
              Originally posted by sasguru View Post
              Hmmm, I see where you're going with this.
              It would certainly make the problem more tractable, IF it's mathematically valid to double expectations. Need to look that up.
              But it's still complicated because MUN wants successes i.e. both 1s and 2s count as a success, bit only 1s lead to further throws.
              So formulating an infinite series expression for that is not that simple, I think.

              I'd love to think more on this but unfortunately must work on some infinitely less interesting statistical stuff for my daily bread. When I come back later I fully expect you to have solved this


              Doodab has solved it already! The series is stated in an earlier post.

              You can add expectations together- that's basic Gcse maths stuff and the basically the foundations that all maths and probability is based upon

              It's called linearity of expectation

              http://www2.informatik.hu-berlin.de/...xpectation.pdf
              Last edited by No2politics; 6 December 2013, 09:51.
              "You can't climb the ladder of success, with your hands in the pockets"
              Arnold Schwarzenegger

              Comment


                #87
                Code:
                <?php
                
                $times_rolled = 0;
                $score = 0;
                
                function dice_roll($rolls){
                        while ($times_rolled < $rolls){
                                $dice_result = rand(1,6);
                                echo "Roll number $times_rolled: $dice_result\n";
                                        if($dice_result == 1 || $dice_result == 2){
                                                $score++;
                                                if($dice_result == 1){
                                                        $rolls++;
                                                }
                                        }
                
                                $times_rolled++;
                        }
                
                        echo "Total score: $score from $rolls total rolls.\n";
                }
                
                $dice = dice_roll(10);
                
                ?>
                If you run this from a shell with PHP installed it gives a rough simulation of the rules (I think).

                Comment


                  #88
                  Love these threads where the resident self appointed Einsteins make a ass of themselves.

                  Comment


                    #89
                    Originally posted by No2politics View Post
                    Doodab has solved it already! The series is stated in an earlier post.

                    You can add expectations together- that's basic Gcse maths stuff and the basically the foundations that all maths and probability is based upon

                    It's called linearity of expectation

                    http://www2.informatik.hu-berlin.de/...xpectation.pdf
                    I had forgotten linearity of expectation.
                    Think you're right, I was confusing probabilities with the required outcome which was no. of successes. Something MUN said in his initial email led to that confusion. He wondered how you could get a probability > 1, but actually we aren't looking at probability but expected no. of successes.
                    My mistake.
                    Last edited by sasguru; 6 December 2013, 10:09.
                    Hard Brexit now!
                    #prayfornodeal

                    Comment


                      #90
                      Originally posted by russell View Post
                      Love these threads where the resident self appointed Einsteins make a ass of themselves.
                      Quiet now. The adults are talking.
                      Originally posted by No2politics View Post
                      That's true but he asked for an equation, ie an exact answer
                      When you're working with maths, you often start off with a few solutions and then try to identify a global pattern.

                      The idea is to work out the exact probabilities for various scenarios. Given the probability of a score of n for one dice (which I've provided), it is possible to work out the probability of score n with m dice - as an equation - most likely with a few combinatoric terms. Once you've got an equation for P(n,m), you can work out the expected values.
                      Down with racism. Long live miscegenation!

                      Comment

                      Working...
                      X