“The odds are good for my favourite team.”, might somebody say but what do they mean with odds?

## Odds

We will talk today about odds. Not just because to understand the language of sports betters but also because they are quite important for Bayesian updating. Odds can reduce our calculations and therefore our computation if we program an algorithm.

Odds tell us the ratio of that an event occurs versus that it doesn’t occur. More formal it says:

The odds for event E versus event E’ are the ratio of their probabilities . If undefined the second event is assumed to be the complement . So the odds of E are:

**Example:** O(rain)=2 means that the probability for rain is twice the probability for no rain ( versus ). We could also say that the odds for rain are 2 to 1.

## Conversions formulas

We can convert probabilities to odds and odds to probabilities as following:

If P(E)=p then:

If O(E)=q then:

**Example:** Recall our coin example from the last posts. We had the following Bayesian Updating table:

Hypothesis | Prior | Likelihood | unnormalised Posterior | normalised Posterior |

H | P(H) | P(D|H) | P(D|H)P(H) | P(H|D) |

A | 0.5 | 0.5 | 0.25 | 0.4 |

B | 0.25 | 0.6 | 0.15 | 0.24 |

C | 0.25 | 0.9 | 0.225 | 0.36 |

Total | 1 | 0.625 | 1 |

What are the prior odds and posterior odds of A?

**Answer:** We can calculate the prior and posterior odds with the above given formula:

where . We then have:

where . We then have:

We can write the process of updating odds as following:

That is because the normalising factor would be the same in both, the ratio is therefore the same.

## Bayes’ Factors (BF)

We can see that the posterior odds are times smaller than the prior odds. This factor is called the Bayes’ Factor. The Bayes’ Factor is given by the following formula:

**Where in the process of updating odds does the Bayes’ Factor occur?**

posterior odds = Bayes’ Factor x prior odds

**Evidence for or against the hypothesis?**

- BF > 1 gives evidence for the hypothesis
- BF < 1 gives evidence against the hypothesis
- BF = 1 gives no evidence

## Updating again and again

**Conditionally Independent**

Two events are conditionally independent if:

**Example:** Recall the coin example: We had the following Bayesian Updating table with the data being tails:

Hypothesis | Prior | Likelihood | unnormalised Posterior | normalised Posterior |

H | P(H) | P(D|H) | P(D|H)P(H) | P(H|D) |

A | 0.5 | 0.5 | 0.25 | 0.4 |

B | 0.25 | 0.6 | 0.15 | 0.24 |

C | 0.25 | 0.9 | 0.225 | 0.36 |

Total | 1 | 0.625 | 1 |

What are the odds for a type A coin after we had one heads and one tails?

We first calculate O(A): where . We then have:

We then calculate the BF for tails:

We then calculate the BF for heads:

We can then finally calculate O(A|heads, tails):

Odds allow us to compute the posterior probabilities faster and with less computation. That’s why they are so important for us.