From fc94ec21f570424077520c7634733a96ed5f2539 Mon Sep 17 00:00:00 2001 From: arpithub Date: Mon, 2 Jan 2023 18:42:19 -0600 Subject: [PATCH 1/5] New Post on Odds and Odds Ratio --- .../2022-09-01-streamlit-end-to-end-ml-app.md | 2 +- _posts/2023-01-02-odd-ratios.md | 69 +++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 _posts/2023-01-02-odd-ratios.md diff --git a/_posts/2022-09-01-streamlit-end-to-end-ml-app.md b/_posts/2022-09-01-streamlit-end-to-end-ml-app.md index 692b05b..0bb2039 100755 --- a/_posts/2022-09-01-streamlit-end-to-end-ml-app.md +++ b/_posts/2022-09-01-streamlit-end-to-end-ml-app.md @@ -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) diff --git a/_posts/2023-01-02-odd-ratios.md b/_posts/2023-01-02-odd-ratios.md new file mode 100644 index 0000000..02e79eb --- /dev/null +++ b/_posts/2023-01-02-odd-ratios.md @@ -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 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] From 41dd08ce05f2c50b7708676feb4d57e362ac5d4b Mon Sep 17 00:00:00 2001 From: arpithub Date: Mon, 2 Jan 2023 18:56:04 -0600 Subject: [PATCH 2/5] New Post on Odds and Odds Ratio --- _posts/{2023-01-02-odd-ratios.md => 2023-01-02-odds-ratio.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename _posts/{2023-01-02-odd-ratios.md => 2023-01-02-odds-ratio.md} (100%) mode change 100644 => 100755 diff --git a/_posts/2023-01-02-odd-ratios.md b/_posts/2023-01-02-odds-ratio.md old mode 100644 new mode 100755 similarity index 100% rename from _posts/2023-01-02-odd-ratios.md rename to _posts/2023-01-02-odds-ratio.md From a2f3381d62e662b579484f6ba51e9b8ecdd200b6 Mon Sep 17 00:00:00 2001 From: Arpit Rawat Date: Wed, 22 Feb 2023 08:46:57 -0600 Subject: [PATCH 3/5] Update aboutme.md --- aboutme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aboutme.md b/aboutme.md index f0f8895..3377b93 100755 --- a/aboutme.md +++ b/aboutme.md @@ -6,7 +6,7 @@ subtitle: Data Scientist -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: From 0601dfa81a5d4000d38fafe6214f131427087e4c Mon Sep 17 00:00:00 2001 From: Arpit Rawat Date: Wed, 22 Feb 2023 08:48:26 -0600 Subject: [PATCH 4/5] Update 2023-01-02-odds-ratio.md --- _posts/2023-01-02-odds-ratio.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2023-01-02-odds-ratio.md b/_posts/2023-01-02-odds-ratio.md index 02e79eb..f344cef 100755 --- a/_posts/2023-01-02-odds-ratio.md +++ b/_posts/2023-01-02-odds-ratio.md @@ -62,7 +62,7 @@ Here are the 3 Signifincant Tests we can perform: 2. Chi-Square Test 3. Wald Test -Although the Odds Ratio is a powerful tool it should be used very carefully. +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] From 993c773d634434244711f058f7c48a8a818594bd Mon Sep 17 00:00:00 2001 From: Arpit Rawat Date: Sun, 26 Feb 2023 17:34:39 -0600 Subject: [PATCH 5/5] fixed google analytics tag 4 --- _config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index 8f6ac28..ce73a47 100755 --- a/_config.yml +++ b/_config.yml @@ -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" @@ -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: ""