OpenStax Contemporary MathematicsXYZ Homework Edition

⇩ Download ▾

7.7 What Are the Odds?

Three lottery tickets have been scratched off to reveal the ticket-holder's winnings.
Three lottery tickets have been scratched off to reveal the ticket-holder's winnings.
Figure 7.33 Scratch-off lottery tickets, as well as many other games, represent the likelihood of winning using odds.Scratch-off lottery tickets, as well as many other games, represent the likelihood of winning using odds. (credit: “My Scratch-off Winnings” by Shoshanah/Flickr, CC BY 2.0)

A particular lottery instant-win game has 2 million tickets available. Of those, 500,000 win a prize. If there are 500,000 winners, then it follows that there are 1,500,000 losing tickets. When we evaluate the risk associated with a game like this, it can be useful to compare the number of ways to win the game to the number of ways to lose. In the case of this game, we would compare the 500,000 wins to the 1,500,000 losses. In other words, there are 3 losing tickets for every winning ticket. Comparisons of this type are the focus of this section.

Computing Odds

The ratio of the number of equally likely outcomes in an event E to the number of equally likely outcomes not in the event E′ is called the odds for (or odds in favor of) the event. The opposite ratio (the number of outcomes not in the event to the number in the event E′ to the number in the event E is called the odds against the event.

Odds as a Ratio of Probabilities

We can also think of odds as a ratio of probabilities. Consider again the instant-win game from the section opener, with 500,000 winning tickets out of 2,000,000 total tickets. If a player buys one ticket, the probability of winning is 500,0002,000,000=14, and the probability of losing is 1−14=34. Notice that the ratio of the probability of winning to the probability of losing is 14:34=1:3, which matches the odds in favor of winning.

We can use these formulas to convert probabilities to odds, and vice versa.

from fractions import Fraction

# Odds are a RATIO of two counts, not a probability. This converts either way.
def odds_from_probability(p):
    p = Fraction(p)  # Preserve exact rare events; validate before rounding.
    if not 0 <= p <= 1:
        raise ValueError(f"{p} is not a probability, so it has no odds")
    # 0 and 1 are perfectly good probabilities, and each makes one side of the
    # ratio zero. Odds are a RATIO OF COUNTS, so an impossible event is 0:1 for
    # and 1:0 against - a real answer, not a division to be attempted.
    if p == 0:
        return Fraction(0), None
    if p == 1:
        return None, Fraction(0)
    return p / (1 - p), (1 - p) / p          # odds for, odds against

def probability_from_odds(a, b):             # odds FOR of a:b
    if a < 0 or b < 0 or a + b == 0:
        raise ValueError(f"{a}:{b} is not a ratio of two outcome counts")
    return Fraction(a, a + b)

def show(r):
    if r is None:
        return "1:0"          # the other side of the ratio is zero
    return f"{r.numerator}:{r.denominator}"

print("probability  ->  odds for   odds against")
for p in ["0", "1/4", "1/2", "2/3", "3/38", "0.05", "1"]:
    fo, ag = odds_from_probability(p)
    print(f"  {str(Fraction(p)):>8}       {show(fo):>8}   {show(ag):>8}")

print()
print("odds for  ->  probability")
for a, b in [(1, 3), (3, 1), (1, 1), (5, 2)]:
    print(f"  {a}:{b}        {probability_from_odds(a, b)}")

print()
# The section's own instant-win game: 2 million tickets, 500,000 of them winners.
tickets, winners = 2_000_000, 500_000
losers = tickets - winners
p_win = Fraction(winners, tickets)
fo, ag = odds_from_probability(p_win)
print(f"The instant-win game: {winners:,} winning of {tickets:,} tickets.")
print(f"  P(win)        = {p_win}")
print(f"  odds for      = {show(fo)}")
print(f"  odds against  = {show(ag)}   ({show(ag).split(':')[0]} losing tickets "
      f"for every {show(ag).split(':')[1]} winning one)")
print()
print("Notice the two columns are NOT the same number written differently:")
print("  a probability has the WHOLE in the denominator (winners out of tickets),")
print("  odds have the OTHER PART there (winners against losers).")

Now, let’s convert odds to probabilities. Let’s say the odds for an event are A:B. Then, using the formula above, we have A:B=P(E):(1−P(E)). Converting to fractions and solving for P(E), we get:

AB =P(E)1−P(E)A(1−P(E)) =B×P(E)A−A×P(E) =B×P(E)A=A×P(E)+B×P(E)A=(A+B)×P(E)AA+B=P(E).

Let’s put this result in a formula we can use.

Key Terms

  • odds (for/against)

Key Concepts

  • Odds are computed as the ratio of the probability of an event to the probability of its compliment.

Formulas

  • For an event E,

    odds forE=n(E):n(E′)=P(E):P(E′)=P(E):(1−P(E))odds againstE=n(E′):n(E)=P(E′):P(E)=(1−P(E)):P(E)

  • If the odds in favor of E are A:B, then P(E)=AA+B.

Adapted from Contemporary Mathematics by OpenStax (openstax.org), licensed under CC BY-NC-SA 4.0. Changes were made. License: CC-BY-NC-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.