Math Question - Probability

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheSaxRunner05
    The Doctor
    • Apr 2006
    • 6144

    #16
    Re: Math Question - Probability

    Originally posted by ilikexd
    It should be the EV of the highest number among N terms is the highest number among N-1 terms + 3.2/(2^N). It doesn't apply to the first term though, which is just 3.

    3+3.2/(2^2)
    3+3.2/4=3.8

    3.8+3.2/(2^4)
    3.8+3.2/8=4.2

    etc.

    It should asymptotically approach 5 too.
    May I ask where the 3.2 constant comes from? I'm a little confused where that number comes from.


    Comment

    • ilikexd
      FFR Simfile Author
      • Apr 2006
      • 3207

      #17
      Re: Math Question - Probability

      Originally posted by SKG_Scintill
      edit v3: looking at yours nathan, I think that's one of the first things that got me troubled, because that approach stops working from 4 and onward I believe
      that's a shame, i had bruteforced 3, 3.8, and 4.2 as the answers for n=1,2,3 with very long arithmetic and assumed a relation there

      why don't you just run your program a bunch of times and take the average results so an equation can be fitted to them?

      Comment

      • TheSaxRunner05
        The Doctor
        • Apr 2006
        • 6144

        #18
        Re: Math Question - Probability

        Here's my line of thinking: The probability of a single random number being above or below 3 is 50%. There is 50% of the range on the left and 50% of the range to the right.

        It gets more complicated when you add a second probability. I'm looking for the product of two numbers that equals .5, so I take the sqr root of .5 - or .707

        This number means the highest of two individual random numbers has a 50% chance of being in the top 29.3% percentile of all possible random numbers. If I take the .707 and multiply by 5, the max value, I get ~3.535 for an expected value.

        For three numbers, I'm asking what three probabilities multiplied together reach 50% probability. The cubic root of .5 is .793, multiplied by 5 is ~3.968.

        If this line if reasoning is incorrect, it would be helpful to me to know where the logical flaw lies, so I better understand it.


        Comment

        • SKG_Scintill
          Spun a twirly fruitcake,
          FFR Simfile Author
          • Feb 2009
          • 3875

          #19
          Re: Math Question - Probability

          @Nathan: I made a code that does my formula to give you the average number instead
          using 1 to 5, up to 10 times before taking the highest number
          Code:
          <?php
          
          for ($m = 1; $m <= 10; $m++) {
          	$res = 0;
          	for ($n = 1; $n <= 5; $n++) {
          		$part = $n * (pow($n,$m) - pow($n-1,$m));
          		$res += $part;
          	}
          	$avg = $res / pow(5, $m);
          	echo $avg . '<br/>';
          }

          here are the results:
          3
          3.8
          4.2
          4.4336
          4.584
          4.68704
          4.76064
          4.81477376
          4.85544192
          4.88647424

          edit: tried to use wolframalpha to see what it could do with my formula, but it's giving me some harmonic number series, which I know nothing of
          here's the formula I know nothing of

          k, n and m being variables, H being... something mathematical

          edit v2: for now I'll keep it at this formula, reposting it so I can at least sleep
          k is highest number (1 to "5")
          n is current number in summation
          m is amount of times before taking highest number
          average =
          Last edited by SKG_Scintill; 07-26-2017, 05:10 PM.





          Originally posted by bluguerilla
          So Sexy Robotnik (SKG_Scintill) {.0001/10} [--]
          ___
          . RHYTHMS PR LAYERING
          . ZOMG I HAD TO QUIT OUT TERRIBLE
          .

          Comment

          • SKG_Scintill
            Spun a twirly fruitcake,
            FFR Simfile Author
            • Feb 2009
            • 3875

            #20
            Re: Math Question - Probability

            heh in my formula's case 0^0 = 1





            Originally posted by bluguerilla
            So Sexy Robotnik (SKG_Scintill) {.0001/10} [--]
            ___
            . RHYTHMS PR LAYERING
            . ZOMG I HAD TO QUIT OUT TERRIBLE
            .

            Comment

            • TheSaxRunner05
              The Doctor
              • Apr 2006
              • 6144

              #21
              Re: Math Question - Probability

              Originally posted by SKG_Scintill
              heh in my formula's case 0^0 = 1
              Makes sense heh

              I think I found the problem with my formula -
              My Nth root of .5 * 5 formula only works for picking values 0 - 5, I don't know how to factor in starting at 1. What it's multiplied by determines the asymptote and I can't Add a constant, or the result will go over 5.

              Edit:// Ok I was close

              I think it's (xth-root of .5)*4 +1
              Last edited by TheSaxRunner05; 07-26-2017, 07:25 PM.


              Comment

              • SKG_Scintill
                Spun a twirly fruitcake,
                FFR Simfile Author
                • Feb 2009
                • 3875

                #22
                Re: Math Question - Probability

                that doesn't work

                using 1 to 5, doing it twice before taking highest
                Code:
                [num1, num2]: highestnum
                1,1: 1	2,1: 2	3,1: 3	4,1: 4	5,1: 5
                1,2: 2	2,2: 2	3,2: 3	4,2: 4	5,2: 5
                1,3: 3	2,3: 3	3,3: 3	4,3: 4	5,3: 5
                1,4: 4	2,4: 4	3,4: 4	4,4: 4	5,4: 5
                1,5: 5	2,5: 5	3,5: 5	4,5: 5	5,5: 5
                
                [amount of combinations]
                5^2 = 25
                
                [number's amount of occurrences]
                1: 1
                2: 3
                3: 5
                4: 7
                5: 9
                
                [weight of numbers]
                1: 1 * 1 = 1
                2: 3 * 2 = 6
                3: 5 * 3 = 15
                4: 7 * 4 = 28
                5: 9 * 5 = 45
                
                [sum of weights]
                1 + 6 + 15 + 28 + 45 = 95
                
                [average] = [sum of weights] / [amount of combinations]

                average: 95 / 25 = 3.8

                using your formula:
                0.5^(1/2)*4+1 = 3.8284~~~
                Last edited by SKG_Scintill; 07-26-2017, 07:46 PM.





                Originally posted by bluguerilla
                So Sexy Robotnik (SKG_Scintill) {.0001/10} [--]
                ___
                . RHYTHMS PR LAYERING
                . ZOMG I HAD TO QUIT OUT TERRIBLE
                .

                Comment

                • TheSaxRunner05
                  The Doctor
                  • Apr 2006
                  • 6144

                  #23
                  Re: Math Question - Probability

                  Originally posted by SKG_Scintill
                  that doesn't work

                  using 1 to 5, doing it twice before taking highest
                  Code:
                  [num1, num2]: highestnum
                  1,1: 1	2,1: 2	3,1: 3	4,1: 4	5,1: 5
                  1,2: 2	2,2: 2	3,2: 3	4,2: 4	5,2: 5
                  1,3: 3	2,3: 3	3,3: 3	4,3: 4	5,3: 5
                  1,4: 4	2,4: 4	3,4: 4	4,4: 4	5,4: 5
                  1,5: 5	2,5: 5	3,5: 5	4,5: 5	5,5: 5
                  
                  [amount of combinations]
                  5^2 = 25
                  
                  [number's amount of occurrences]
                  1: 1
                  2: 3
                  3: 5
                  4: 7
                  5: 9
                  
                  [weight of numbers]
                  1: 1 * 1 = 1
                  2: 3 * 2 = 6
                  3: 5 * 3 = 15
                  4: 7 * 4 = 28
                  5: 9 * 5 = 45
                  
                  [sum of weights]
                  1 + 6 + 15 + 28 + 45 = 95
                  
                  [average] = [sum of weights] / [amount of combinations]

                  average: 95 / 25 = 3.8

                  using your formula:
                  0.5^(1/2)*4+1 = 3.8284~~~
                  I see, and since all answers will be rational numbers, using the square root function will fail. I can match one really close to the actual probabilities, but really close is like horseshoes and hand grenades in math lol

                  Thanks for going back and forth on this, I'm going to toy with the equation you posted a bit more.


                  Comment

                  • benguino
                    Kawaii Desu Ne?
                    • Dec 2007
                    • 4185

                    #24
                    Re: Math Question - Probability

                    I came up with this: http://puu.sh/wU5Jx/8ad6c883ab.pdf

                    Got the equation (5n+1)/(n+1)

                    If there's any errors or questions about my work, let me know. Or if someone finds a more elegant solution, I'd also be up for seeing it.

                    EDIT: Here's a graph
                    Last edited by benguino; 07-26-2017, 08:13 PM.
                    AMA: http://ask.fm/benguino

                    Not happening now! Don't click to join!



                    Originally posted by Spenner
                    (^)> peck peck says the heels
                    Originally posted by Xx{Midnight}xX
                    And god made ben, and realized he was doomed to miss. And said it was good.
                    Originally posted by Zakvvv666
                    awww :< crushing my dreams; was looking foward to you attempting to shoot yourself point blank and missing

                    Comment

                    • MarcusHawkins
                      The Punny Anti-PA Guy
                      • Jun 2013
                      • 1219

                      #25
                      Re: Math Question - Probability

                      Originally posted by reuben_tate
                      I came up with this: http://puu.sh/wU5Jx/8ad6c883ab.pdf

                      Got the equation (5n+1)/(n+1)

                      If there's any errors or questions about my work, let me know. Or if someone finds a more elegant solution, I'd also be up for seeing it.

                      EDIT: Here's a graph
                      Oh, so the formula is essentially (Max value*n + Min value)/(n + Min value), if I'm understanding this right?

                      Originally posted by Ghost_Medley

                      This man is three months too early.
                      Originally posted by badman7772
                      Guess I'll take another Quality Pack please. I won't have Hawkins luck but I'm sure I'll have badluck7772.

                      Originally posted by _Zenith_
                      what the fuck marcus lmao

                      Originally posted by rushyrulz
                      You should all thank MarcusHawkins btw

                      Originally posted by DDRNGGin
                      Marcus is probably going to be the main man to win this (You will always be my DDR brother for life, MarcusHawkins! )

                      Originally posted by Sky Kitten
                      Best Newbie
                      1st: MarcusHawkins: 4

                      Up And Coming FFRer
                      2nd: MarcusHawkins: 3

                      Comment

                      • TheSaxRunner05
                        The Doctor
                        • Apr 2006
                        • 6144

                        #26
                        Re: Math Question - Probability

                        Originally posted by reuben_tate
                        Got the equation (5n+1)/(n+1)
                        Plugging 2 into this equation gives 11/3 or 3.666....

                        Is there an error in what Scintill showed earlier to show an answer of exactly 3.8?

                        Originally posted by SKG_Scintill
                        that doesn't work

                        using 1 to 5, doing it twice before taking highest
                        Code:
                        [num1, num2]: highestnum
                        1,1: 1	2,1: 2	3,1: 3	4,1: 4	5,1: 5
                        1,2: 2	2,2: 2	3,2: 3	4,2: 4	5,2: 5
                        1,3: 3	2,3: 3	3,3: 3	4,3: 4	5,3: 5
                        1,4: 4	2,4: 4	3,4: 4	4,4: 4	5,4: 5
                        1,5: 5	2,5: 5	3,5: 5	4,5: 5	5,5: 5
                        
                        [amount of combinations]
                        5^2 = 25
                        
                        [number's amount of occurrences]
                        1: 1
                        2: 3
                        3: 5
                        4: 7
                        5: 9
                        
                        [weight of numbers]
                        1: 1 * 1 = 1
                        2: 3 * 2 = 6
                        3: 5 * 3 = 15
                        4: 7 * 4 = 28
                        5: 9 * 5 = 45
                        
                        [sum of weights]
                        1 + 6 + 15 + 28 + 45 = 95
                        
                        [average] = [sum of weights] / [amount of combinations]

                        average: 95 / 25 = 3.8

                        using your formula:
                        0.5^(1/2)*4+1 = 3.8284~~~


                        Comment

                        • benguino
                          Kawaii Desu Ne?
                          • Dec 2007
                          • 4185

                          #27
                          Re: Math Question - Probability

                          Originally posted by TheSaxRunner05
                          Plugging 2 into this equation gives 11/3 or 3.666....

                          Is there an error in what Scintill showed earlier to show an answer of exactly 3.8?
                          It looks like that is the case if you're looking at the discrete probability (the only options are 1, 2, 3, 4, 5) as opposed to the continuous probability (you can pick any real number between 1 and 5). So I'd expect it to be close but not exactly the same.
                          AMA: http://ask.fm/benguino

                          Not happening now! Don't click to join!



                          Originally posted by Spenner
                          (^)> peck peck says the heels
                          Originally posted by Xx{Midnight}xX
                          And god made ben, and realized he was doomed to miss. And said it was good.
                          Originally posted by Zakvvv666
                          awww :< crushing my dreams; was looking foward to you attempting to shoot yourself point blank and missing

                          Comment

                          • benguino
                            Kawaii Desu Ne?
                            • Dec 2007
                            • 4185

                            #28
                            Re: Math Question - Probability

                            Originally posted by MarcusHawkins
                            Oh, so the formula is essentially (Max value*n + Min value)/(n + Min value), if I'm understanding this right?
                            It seems that might be the case...wolframalpha won't do the integral in the general case for me...so I'll have to compute it by hand. I can double check.
                            AMA: http://ask.fm/benguino

                            Not happening now! Don't click to join!



                            Originally posted by Spenner
                            (^)> peck peck says the heels
                            Originally posted by Xx{Midnight}xX
                            And god made ben, and realized he was doomed to miss. And said it was good.
                            Originally posted by Zakvvv666
                            awww :< crushing my dreams; was looking foward to you attempting to shoot yourself point blank and missing

                            Comment

                            • TheSaxRunner05
                              The Doctor
                              • Apr 2006
                              • 6144

                              #29
                              Re: Math Question - Probability

                              Originally posted by MarcusHawkins
                              Oh, so the formula is essentially (Max value*n + Min value)/(n + Min value), if I'm understanding this right?
                              Sorry if I mistook what you said earlier, I thought you were essentially recapping what I said in my first paragraph of the OP, but you were much more on the right track than I was.


                              Comment

                              • TheSaxRunner05
                                The Doctor
                                • Apr 2006
                                • 6144

                                #30
                                Re: Math Question - Probability

                                Originally posted by reuben_tate
                                It looks like that is the case if you're looking at the discrete probability (the only options are 1, 2, 3, 4, 5) as opposed to the continuous probability (you can pick any real number between 1 and 5). So I'd expect it to be close but not exactly the same.
                                Gotcha, thanks for the explanation.
                                I really need to take a calculus course sometime to better understand integrals


                                Comment

                                Working...