1. #1
    sycoogtit
    play matchbook
    sycoogtit's Avatar Become A Pro!
    Join Date: 02-11-10
    Posts: 322

    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.

  2. #2
    sycoogtit
    play matchbook
    sycoogtit's Avatar Become A Pro!
    Join Date: 02-11-10
    Posts: 322

    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?

  3. #3
    luigi
    luigi's Avatar Become A Pro!
    Join Date: 08-29-09
    Posts: 32

    do you need the formula to convert moneylines to percents?

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

    sbrmoneylinecoverter.xlsx

  4. #4
    sycoogtit
    play matchbook
    sycoogtit's Avatar Become A Pro!
    Join Date: 02-11-10
    Posts: 322

    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.

  5. #5
    Maverick22
    Maverick22's Avatar Become A Pro!
    Join Date: 04-10-10
    Posts: 807
    Betpoints: 58

    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.

  6. #6
    sycoogtit
    play matchbook
    sycoogtit's Avatar Become A Pro!
    Join Date: 02-11-10
    Posts: 322

    Yes Mav, I think that's it. That's what I ended up doing and it seems to work. Thanks for the reply.

  7. #7
    therber2
    Barrels of whiskey
    therber2's Avatar Become A Pro!
    Join Date: 12-22-08
    Posts: 3,715

    Quote Originally Posted by Maverick22 View Post
    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.

  8. #8
    uva3021
    uva3021's Avatar Become A Pro!
    Join Date: 03-01-07
    Posts: 537
    Betpoints: 381

    if you use decimal or percentage as a comparison measure its much easier than american odds

  9. #9
    MonkeyF0cker
    Update your status
    MonkeyF0cker's Avatar Become A Pro!
    Join Date: 06-12-07
    Posts: 12,144
    Betpoints: 1127

    Quote Originally Posted by Maverick22 View Post
    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.

  10. #10
    sycoogtit
    play matchbook
    sycoogtit's Avatar Become A Pro!
    Join Date: 02-11-10
    Posts: 322

    Quote Originally Posted by MonkeyF0cker View Post
    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)
    Return values:
    1 = closing is closer than opening
    -1 = opposite, duh
    0 = no change

Top