Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ author: Arpit Rawat
navbar-links:
About Me: "aboutme"
Portfolio:
- Streamlit ML App: "https://end-to-end-ml-streamlit-app.herokuapp.com/"
- Streamlit ML App: "https://huggingface.co/spaces/arpitr/end_to_end_ml_app"
# - Photograpy: "https://www.instagram.com/raw.arpit"
LinkedIn: "https://www.linkedin.com/in/arpit-rawat"
# Author's home: "https://www.iarpit.com"
Expand Down Expand Up @@ -132,7 +132,7 @@ footer-link-col: "#404040"
#gtag: ""

# Fill in your Google Analytics ID to track your website using Google Analytics
google_analytics: "UA-193500230-1"
google_analytics: "G-0LV5DQ3ZSZ"

# Google Tag Manager ID
#gtm: ""
Expand Down
2 changes: 1 addition & 1 deletion _posts/2022-09-01-streamlit-end-to-end-ml-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ tags: [streamlit,ml]
comments: true
---

I wanted to create a simple app which can let you analysis a dataset and build a prediction pipeline.
I wanted to create a simple app which can let you analyze multiple public datasets at one place and build a prediction pipeline.
Here is a Streamlit app which has the mentioned functionality:
[https://end-to-end-ml-streamlit-app.herokuapp.com](#End to End ML app)
69 changes: 69 additions & 0 deletions _posts/2023-01-02-odds-ratio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
layout: post
title: Odds and Odds Ratio
subtitle: Explaining Odds and Odds Ratio with the help of example
cover-img: /assets/img/path.jpg
thumbnail-img: /assets/img/thumb.png
share-img: /assets/img/path.jpg
gh-repo: arpithub/arpithub.github.io
gh-badge: [star, fork, follow]
tags: [statistics,book]
comments: true
---

Currently, I am reading the book **The Art of Statistics** by Sir David John Spiegelhalter and wanted to touch on the Odds and Odds ratio.
We see these concepts everywhere, odds of an event, odds of winning something.
The definition of Odds is:
__Chance of an event happening / Chance of an event not happening__

Odds Ratio: It's the ratio of odds.
__Odds of an event happening / Odds of an event not happening__

In the medical domain, the Odds ratio helps to understand if an intervention works or not and to what degree.

For example, we want to test the effectiveness of a vaccine campaign. We will first calculate the odds of the Intervention group and the odds of the Control group.
Let's say there are 500 people in the **Intervention group** which consists of people seen the vaccine campaign and the **Control group** which consists of 500 people who haven't seen the campaign.
Among the Intervention group, 400 people have taken the vaccine, and the remaining 100 people haven't taken the vaccine.
In the Control group, 275 people have taken the vaccine and the remaining 225 people haven't taken the vaccine.

Odds of getting the vaccine in the Intervention group = No. of people who took the vaccine / No. of people who haven't taken the vaccine

Plugging in the numbers from the above example,
Odds of getting vaccine in Intervention group = 400/100 = 4

Odds of getting the vaccine in the Control group = No. of people who took the vaccine / No. of people who haven't taken the vaccine

Plugging in the numbers from the above example,
Odds of getting vaccine in Intervention group = 275/200 ~ 1.23

To find the effectiveness of the vaccine campaign we will calculate the Odds Ratio.
ie. Ratio of Odds of Intervention group (saw campaign) to Odds of Control group (didn't see campaign).

Plugging in the numbers:
Odds Ratio = 4/1.23 = 3.25

How to interpret Odds Ratio:
If,
Odd Ratio = 1 then it means there wasn't any effect of an action on a task, here campaign (Action) has no effect on taking the vaccine (task).

Odd Ratio > 1 means people who were exposed to action were more likely to perform a task, here people who saw the campaign were more likely to take the vaccine as compared to people who haven't seen the campaign.

Odd Ratio < 1 means people who were exposed to action were less likely to perform a task, here people who saw the campaign were less likely to take the vaccine as compared to people who haven't seen the campaign.

In our example since the Odds Ratio is greater than 1 that means the vaccine campaign was effective as people who saw the campaign (Intervention group) are more likely to take the vaccine.
The Odds ratio value of 3.25 tells us that people in the Intervention group have 3 times more odds of taking the vaccine as compared to the Control group.

Note - Odds Ratio greater or less than 1 can be a positive or negative finding depending on the outcome.
The Odds Ratio is like R-squared which shows the relationship between two things. In the above example, a relationship between Exposing to Vaccine Campaign and Getting the vaccine.

To further validate the relationship between the vaccine campaign and getting the vaccine, we can perform some Significant tests. We can check if the Odds Ratio is statistically significant or not.
Here are the 3 Signifincant Tests we can perform:
1. Fisher's Exact Test
2. Chi-Square Test
3. Wald Test

Although the Odds Ratio is a powerful tool but it should be used very carefully.

References:
1. [https://www.youtube.com/watch?v=5zPSD_e_N04]
2. [https://www.youtube.com/watch?v=8nm0G-1uJzA]
2 changes: 1 addition & 1 deletion aboutme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ subtitle: Data Scientist

<img width = "280" height = "280" style="float:left; margin-right: 20px;" src="/assets/img/me.jpeg" >

Currently, I am working as a Data Scientist at [Mailgun by Pathwire](https://www.mailgun.com). Prior to this, I have worked as Senior Software Engineer at [Agile Media Lab](http://agilemedialab.in/) for 5 years. I have completed my Master's in Engineering Management from Northeastern University at Boston in 2018 and Bachelor's in Computer Science from Panjab University at Chandigarh in 2011. My interest for Data Science started during my time at Northeastern when I realized that by applying correct knowledge and tools we can generate valuable insights from the data (Of course you have make sure about the integrity of the data). **Self learning** plays a big role in data science field, to this day I keep learning new things everyday and *This is the way!*.
Currently, I am working as a Data Scientist at [Mailgun by Sinch](https://www.mailgun.com). Prior to this, I have worked as Senior Software Engineer at [Agile Media Lab](http://agilemedialab.in/) for 5 years. I have completed my Master's in Engineering Management from Northeastern University at Boston in 2018 and Bachelor's in Computer Science from Panjab University at Chandigarh in 2011. My interest for Data Science started during my time at Northeastern when I realized that by applying correct knowledge and tools we can generate valuable insights from the data (Of course you have make sure about the integrity of the data). **Self learning** plays a big role in data science field, to this day I keep learning new things everyday and *This is the way!*.
In my leisure time I explore hiking places, [taking photographs](https://www.instagram.com/raw.arpit), play tennis and perform experiments with Raspberry pi(es).

My area of Expertise:
Expand Down