Skip to content

Commit 247419d

Browse files
authored
Merge pull request #8 from arpitHub/main
Recent changes
2 parents 3f332ed + 993c773 commit 247419d

File tree

4 files changed

+73
-4
lines changed

4 files changed

+73
-4
lines changed

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ author: Arpit Rawat
1616
navbar-links:
1717
About Me: "aboutme"
1818
Portfolio:
19-
- Streamlit ML App: "https://end-to-end-ml-streamlit-app.herokuapp.com/"
19+
- Streamlit ML App: "https://huggingface.co/spaces/arpitr/end_to_end_ml_app"
2020
# - Photograpy: "https://www.instagram.com/raw.arpit"
2121
LinkedIn: "https://www.linkedin.com/in/arpit-rawat"
2222
# Author's home: "https://www.iarpit.com"
@@ -132,7 +132,7 @@ footer-link-col: "#404040"
132132
#gtag: ""
133133

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

137137
# Google Tag Manager ID
138138
#gtm: ""

_posts/2022-09-01-streamlit-end-to-end-ml-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ tags: [streamlit,ml]
1111
comments: true
1212
---
1313

14-
I wanted to create a simple app which can let you analysis a dataset and build a prediction pipeline.
14+
I wanted to create a simple app which can let you analyze multiple public datasets at one place and build a prediction pipeline.
1515
Here is a Streamlit app which has the mentioned functionality:
1616
[https://end-to-end-ml-streamlit-app.herokuapp.com](#End to End ML app)

_posts/2023-01-02-odds-ratio.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
layout: post
3+
title: Odds and Odds Ratio
4+
subtitle: Explaining Odds and Odds Ratio with the help of example
5+
cover-img: /assets/img/path.jpg
6+
thumbnail-img: /assets/img/thumb.png
7+
share-img: /assets/img/path.jpg
8+
gh-repo: arpithub/arpithub.github.io
9+
gh-badge: [star, fork, follow]
10+
tags: [statistics,book]
11+
comments: true
12+
---
13+
14+
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.
15+
We see these concepts everywhere, odds of an event, odds of winning something.
16+
The definition of Odds is:
17+
__Chance of an event happening / Chance of an event not happening__
18+
19+
Odds Ratio: It's the ratio of odds.
20+
__Odds of an event happening / Odds of an event not happening__
21+
22+
In the medical domain, the Odds ratio helps to understand if an intervention works or not and to what degree.
23+
24+
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.
25+
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.
26+
Among the Intervention group, 400 people have taken the vaccine, and the remaining 100 people haven't taken the vaccine.
27+
In the Control group, 275 people have taken the vaccine and the remaining 225 people haven't taken the vaccine.
28+
29+
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
30+
31+
Plugging in the numbers from the above example,
32+
Odds of getting vaccine in Intervention group = 400/100 = 4
33+
34+
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
35+
36+
Plugging in the numbers from the above example,
37+
Odds of getting vaccine in Intervention group = 275/200 ~ 1.23
38+
39+
To find the effectiveness of the vaccine campaign we will calculate the Odds Ratio.
40+
ie. Ratio of Odds of Intervention group (saw campaign) to Odds of Control group (didn't see campaign).
41+
42+
Plugging in the numbers:
43+
Odds Ratio = 4/1.23 = 3.25
44+
45+
How to interpret Odds Ratio:
46+
If,
47+
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).
48+
49+
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.
50+
51+
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.
52+
53+
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.
54+
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.
55+
56+
Note - Odds Ratio greater or less than 1 can be a positive or negative finding depending on the outcome.
57+
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.
58+
59+
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.
60+
Here are the 3 Signifincant Tests we can perform:
61+
1. Fisher's Exact Test
62+
2. Chi-Square Test
63+
3. Wald Test
64+
65+
Although the Odds Ratio is a powerful tool but it should be used very carefully.
66+
67+
References:
68+
1. [https://www.youtube.com/watch?v=5zPSD_e_N04]
69+
2. [https://www.youtube.com/watch?v=8nm0G-1uJzA]

aboutme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ subtitle: Data Scientist
66

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

9-
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!*.
9+
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!*.
1010
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).
1111

1212
My area of Expertise:

0 commit comments

Comments
 (0)