Which of two numbers is closest to the third?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sycoogtit
    SBR Sharp
    • 02-11-10
    • 322

    #1
    Which of two numbers is closest to the third?
    Let's say you have 3 numbers, A, B and C.
    A = -105
    B = -110
    C = -115

    You can eyeball those three numbers and see that B is closer to A than
    C is, but what's a formula for that? You also have to account for
    different signs in the numbers like:

    A = 105
    B = -101
    C = 110

    Any clues? I'm stuck and tired of entering this stuff in manually.
  • sycoogtit
    SBR Sharp
    • 02-11-10
    • 322

    #2
    I think I got it. Subtract C from both A and B, then whichever of A and B is closer to zero is closer to C. Is that right?
    Comment
    • luigi
      SBR Rookie
      • 08-29-09
      • 32

      #3
      do you need the formula to convert moneylines to percents?

      If so here's the formula(s) in excel

      sbrmoneylinecoverter.xlsx
      Comment
      • sycoogtit
        SBR Sharp
        • 02-11-10
        • 322

        #4
        Thanks luigi, but no I didn't need that. I was trying to figure out which of the opening and closing pinny lines are closer to my model's projected line.
        Comment
        • Maverick22
          SBR Wise Guy
          • 04-10-10
          • 807

          #5
          Not sure if I grasp the question. Take your 'focal" number ( For example A )...

          x = Abs( abs(a) - abs(b) ) vs y =Abs( abs(a) - abs(c) )

          where "abs" = absolute value

          Whichever number ( x or y) is lowest represents the number that is closest to (A) on the number line.

          Let me know, if i have misunderstood the question.
          Comment
          • sycoogtit
            SBR Sharp
            • 02-11-10
            • 322

            #6
            Yes Mav, I think that's it. That's what I ended up doing and it seems to work. Thanks for the reply.
            Comment
            • therber2
              Restricted User
              • 12-22-08
              • 3715

              #7
              Originally posted by Maverick22
              Not sure if I grasp the question. Take your 'focal" number ( For example A )...

              x = Abs( abs(a) - abs(b) ) vs y =Abs( abs(a) - abs(c) )

              where "abs" = absolute value

              Whichever number ( x or y) is lowest represents the number that is closest to (A) on the number line.

              Let me know, if i have misunderstood the question.
              Yes this is how I would do it. Good work.
              Comment
              • uva3021
                SBR Wise Guy
                • 03-01-07
                • 537

                #8
                if you use decimal or percentage as a comparison measure its much easier than american odds
                Comment
                • MonkeyF0cker
                  SBR Posting Legend
                  • 06-12-07
                  • 12144

                  #9
                  Originally posted by Maverick22
                  Not sure if I grasp the question. Take your 'focal" number ( For example A )...

                  x = Abs( abs(a) - abs(b) ) vs y =Abs( abs(a) - abs(c) )

                  where "abs" = absolute value

                  Whichever number ( x or y) is lowest represents the number that is closest to (A) on the number line.

                  Let me know, if i have misunderstood the question.
                  That formula doesn't work too well if you're looking for the closest number to +104 between -103 and -101.

                  The easiest method would be (as stated) to convert to another format. If you'd still like the logic for American odds, let us know. It's not entirely difficult, but it's much more cumbersome than the alternatives.
                  Comment
                  • sycoogtit
                    SBR Sharp
                    • 02-11-10
                    • 322

                    #10
                    Originally posted by MonkeyF0cker
                    That formula doesn't work too well if you're looking for the closest number to +104 between -103 and -101.

                    The easiest method would be (as stated) to convert to another format. If you'd still like the logic for American odds, let us know. It's not entirely difficult, but it's much more cumbersome than the alternatives.
                    Ha! You're right. This what I actually did:

                    Let A = opening line, i.e. -103
                    Let B = closing line, i.e. -101
                    Let C = the line I care about, i.e. +104

                    =IF(A=B;0;IF(ABS(B-C)<ABS(A-C);-1;1))

                    Return values:
                    1 = closing is closer than opening
                    -1 = opposite, duh
                    0 = no change
                    Comment
                    SBR Contests
                    Collapse
                    Top-Rated US Sportsbooks
                    Collapse
                    Working...