All You Need to Know About Odds Ratio

All You Need to Know About Odds Ratio

5 mins read575 Views Comment
Vikram Singh
Assistant Manager - Content
Updated on Oct 30, 2023 13:42 IST

The odds ratio is defined as the ratio of the number of favorable events to the ratio of unfavorable events. This article, will briefly discuss odd ratio, log odd ratio and difference between odd ratio and probability.


This article will discuss what is the odds ratio (or odd) in statistics and why statisticians like odd more than probability. Later in the blog, we will also discuss the difference between Odds Ratio and Probability. So, let’s dive deep to learn about Odds ratios and How to calculate them.

Table of Content

What is the Odds Ratio

In statistics, the odd ratio is defined as the ratio of a number of favorable events to the ratio of unfavorable events.

  • In simple terms, it is the ratio of two probabilities of two events i.e.
  • Odd can range from 0 to infinity
    • 0: the event is not likely to happen
    • Infinity: The event is more likely to happen
    • OR > 1: Indicates the occurrence of an event
    • OR < 1: indicates decreased occurrence of an event
  • It is a measure of the association between exposure and an outcome.
  • Odd relates to the binary outcome, where the outcome either occurs or does not occur.
What is Programming What is Python
What is Data Science What is Machine Learning

Now, let’s take an example to get a better understanding of the odd ratio.

Example -1: Let you toss a coin 10 times, and every time you want to get head, (i.e., win = head) but you get only 3 heads.

So, odds of winning = 3 / 7 = 0.4286

But, now, if you tossed a coin 100 times and you get head only 3 times,

So, odds of winning = 3 / 97 = 0.031

Now, take another case, you toss a coin 1000 times, and in this case, you get the same result (head – 3 times only)

So, odds of winning = 3 / 997 = 0.0030

From the above 3 cases, we get:

  • Odds of winning getting closer to 0
    • Here, the odds are also referred to as “Odds against Winning.”

Example – 2 : We will use the above example, with a little change: Here, in every 10 tosses of a coin, you are getting 7 heads and only 3 tails.

So, odds of winning = 7/3 = 2.34

Case – iiYou tossed a coin 100 times, and you got: Head = 97, Tail = 3.

Odds of winning = 97 / 3 = 32.34

Case – iii: You tossed a coin 1000 times, and you got: Head = 997, Tail = 3

Odds of Winning = 997 / 3 = 332.34

From the above three cases, we get:

  • The odds of winning are increasing
    • This is also referred to as “Odds in Favor of Winning.”
Programming Online Courses and Certification Python Online Courses and Certifications
Data Science Online Courses and Certifications Machine Learning Online Courses and Certifications

What is Log Odds (log (odd ratio))

Log odd is nothing, but the log of odd, i.e., log(odd ratio). 

Now a simple question arises why do we need a log (odd ratio).

log(odd ratio) gives a fair scale for the comaparison of winning or loosing 

Let’s take the case – 1 of Example – 2:

Odd of winning = 7/3 = 2.34 

=> log(odd of winning) = log(2.34) = 0.369

=> log(odd of winning) = 0.369

So, odd of loosing = 3/7 = 0.4286 

=> log(odd of loosing) = log(0.4286) 

=> log(odd of loosing) = – 0.368

Hence, from above, we get taking the log of odds (winning and losing) will make it look symmetrical.

Till now, you have a clear understanding of odd ratio and how to calculate it. 

So, a question is: “What is the difference between Odd Ratio and Probability.”

In this section, we will discuss odd ratio vs. probability and take one example to get a better understanding.

Odd Ratio vs. Probability

Parameter Odd Ratio Probability
Definition Odd Ratio is the ratio of chance in favor of the event to chance against it. It is the likelihood of the occurrence of events.
Formula Occurrence / Non-Occurrence Occurrence / Whole
Range zero to infinity Zero to one
Representation Ratio Decimal or percentage

Example – 3: What are the odds of drawing a Jack in a deck of cards.

In a deck of cards, there are total 52 cards, and in which there are only 4 cards that are jack.

This implies,

Probability of Jack = p = 4/52 = 1/13

=> Probability of Jack = 1/13 

Hence, the odd of drawing Jack = p / 1-p = (1/13) / (1 – (1/13)) = (1/13) / (12/13) = 1:12

=> odd of drawing Jack = 1 : 12


This article briefly discusses the odds ratio, log(odd ratio), and the difference between odd ratio and probability.

Odds ratio and probability are two different concepts that we use in statistics. The odds ratio is the ratio of change in favor to chance against of occurrence of an event, whereas probability is the likelihood of the occurrence of an event.

One of the applications of log(odd ratio) is derived from the logit function that we use in Logistic Regression.

logit function = log(odd ratio) = log( / 1-p), 

where p is the probability.

I hope this article will help you to understand the concept of odd ratios.

Top Trending Article

Top Online Python Compiler | How to Check if a Python String is Palindrome | Feature Selection Technique | Conditional Statement in Python | How to Find Armstrong Number in Python | Data Types in Python | How to Find Second Occurrence of Sub-String in Python String | For Loop in Python |Prime Number | Inheritance in Python | Validating Password using Python Regex | Python List |Market Basket Analysis in Python | Python Dictionary | Python While Loop | Python Split Function | Rock Paper Scissor Game in Python | Python String | How to Generate Random Number in Python | Python Program to Check Leap Year | Slicing in Python

Interview Questions

Data Science Interview Questions | Machine Learning Interview Questions | Statistics Interview Question | Coding Interview Questions | SQL Interview Questions | SQL Query Interview Questions | Data Engineering Interview Questions | Data Structure Interview Questions | Database Interview Questions | Data Modeling Interview Questions | Deep Learning Interview Questions |

About the Author
Vikram Singh
Assistant Manager - Content

Vikram has a Postgraduate degree in Applied Mathematics, with a keen interest in Data Science and Machine Learning. He has experience of 2+ years in content creation in Mathematics, Statistics, Data Science, and Mac... Read Full Bio