class: center, middle, inverse, title-slide .title[ # Categorical Data Anaylsis ] .subtitle[ ## Odds Ratio with example ] .author[ ### Dr. Zulfiqar Ali (Assistant Professor) ] .institute[ ### College of Statistcal Sciences, University of the Punjab, Lahore ] .date[ ### 20 June 2023 ] --- --- ## Introduction - In statistics and epidemiology, the odds ratio (OR) is a measure of the strength of association between two variables. -- - It is commonly used to assess the likelihood of an event occurring in one group compared to another group. -- - The odds ratio can provide valuable insights into the relationship between variables and help make informed decisions. -- --- ## Definition - The odds ratio is defined as the ratio of the odds of an event occurring in one group to the odds of the same event occurring in another group. -- - Mathematically, the odds ratio (OR) is calculated as: -- - OR = (a/b) / (c/d) -- - Where: -- - a: Number of events in the exposed group -- - b: Number of non-events in the exposed group -- - c: Number of events in the unexposed group -- - d: Number of non-events in the unexposed group -- --- ## Interpreting the Odds Ratio - The odds ratio can take values greater than 1, equal to 1, or less than 1, each with a specific interpretation. -- - If the odds ratio is greater than 1: -- - It indicates that the event is more likely to occur in the exposed group compared to the unexposed group. -- - For example, if OR = 2, it means that the odds of an event occurring in the exposed group are twice as high as the odds in the unexposed group. -- - If the odds ratio is equal to 1: -- - It suggests that there is no association between the exposure and the event. -- - The odds of the event occurring in both groups are equal. -- - If the odds ratio is less than 1: -- - It indicates that the event is less likely to occur in the exposed group compared to the unexposed group. -- - For example, if OR = 0.5, it means that the odds of an event occurring in the exposed group are half as high as the odds in the unexposed group. -- --- ## Example Calculation - Let's consider a study investigating the association between smoking and lung cancer. -- - The data collected from the study is as follows: -- - Exposed group (smokers): -- - Number of lung cancer cases: 100 -- - Number of non-lung cancer cases: 400 -- - Unexposed group (non-smokers): -- - Number of lung cancer cases: 50 -- - Number of non-lung cancer cases: 450 -- - We can calculate the odds ratio using the formula: -- - OR = (a/b) / (c/d) -- - Substituting the values, we get: -- - OR = (100/400) / (50/450) -- - = 0.25 / 0.1111 -- - = 2.25 -- --- ## Interpretation of the Example - In the example calculation, the odds ratio is 2.25. -- - This indicates that the odds of developing lung cancer are 2.25 times higher in smokers compared to non-smokers. -- - It suggests a positive association between smoking and lung cancer. -- - However, it's important to note that the odds ratio alone does not establish causality, but rather measures the strength of association. -- --- ## Another example Suppose we are conducting a study on the effectiveness of a new drug for treating a certain medical condition. -- We have a sample of 200 patients, divided into two groups: Group A, receiving the new drug, and Group B, receiving a placebo. --- ## Solution - In Group A (new drug): -- - Number of patients who showed improvement: 80 -- - Number of patients who did not show improvement: 20 -- - In Group B (placebo): -- - Number of patients who showed improvement: 40 -- - Number of patients who did not show improvement: 60 -- - Now, let's calculate the odds ratio: -- - OR = (a/b) / (c/d) -- - Substituting the values: -- - a = 80 (number of patients who showed improvement in Group A) -- - b = 20 (number of patients who did not show improvement in Group A) -- - c = 40 (number of patients who showed improvement in Group B) -- - d = 60 (number of patients who did not show improvement in Group B) -- - OR = (80/20) / (40/60) -- - = 4 / 0.67 -- - ≈ 5.97 -- - The odds ratio is approximately 5.97. This means that the odds of improvement in the group receiving the new drug (Group A) are nearly 6 times higher than the odds in the placebo group (Group B). -- --- ## Interpretation: - The odds ratio of 5.97 suggests a strong positive association between receiving the new drug and experiencing improvement in the medical condition. -- - It indicates that patients in Group A have significantly higher odds of improvement compared to those in Group B. -- --- ## Example: Odds Ratio for Aspirin Use and Heart Attacks Suppose we conducted a retrospective study on a group of 500 individuals who were at risk of heart attacks. -- Among them, 200 individuals were regularly taking aspirin as a preventive measure, and 300 individuals were not taking aspirin. -- --- ## Solution - In the group taking aspirin: -- - Number of individuals who had a heart attack: 20 -- - Number of individuals who did not have a heart attack: 180 -- - In the group not taking aspirin: -- - Number of individuals who had a heart attack: 50 -- - Number of individuals who did not have a heart attack: 250 -- - Now, let's calculate the odds ratio: -- - OR = (a/b) / (c/d) -- - Substituting the values: -- - a = 20 (number of individuals who had a heart attack in the aspirin group) -- - b = 180 (number of individuals who did not have a heart attack in the aspirin group) -- - c = 50 (number of individuals who had a heart attack in the non-aspirin group) -- - d = 250 (number of individuals who did not have a heart attack in the non-aspirin group) -- - OR = (20/180) / (50/250) -- - = 0.1111 / 0.2 -- - ≈ 0.5555 -- - The odds ratio is approximately 0.5555. -- This means that the odds of having a heart attack in the group taking aspirin are approximately 0.5555 times the odds in the group not taking aspirin. -- --- ##Interpretation: - The odds ratio of 0.5555 suggests that individuals taking aspirin have lower odds of experiencing a heart attack compared to those not taking aspirin. -- - It indicates a potential protective effect of aspirin in reducing the risk of heart attacks -- --- ## Relationship between OR and RR - In some cases, the odds ratio can be used as an approximation of the relative risk when the outcome of interest is rare (less than 10%). -- - The relationship between OR and RR is influenced by the prevalence of the outcome in the study population. -- - When the outcome is rare, OR provides an approximate estimate of RR. -- - As the outcome becomes more common, the OR overestimates the RR. --- ## Calculating Relative Risk from Odds Ratio - To calculate the relative risk (RR) from the odds ratio (OR), we need to know the baseline risk or prevalence of the outcome in the unexposed group. -- - If the outcome is rare, we can use the following formula: -- - RR ≈ OR -- - However, if the outcome is not rare, we use the formula: -- - RR = OR / (1 - P0 + P0 * OR) - Where P0 is the prevalence or risk of the outcome in the unexposed group. --- ## Example Calculation - Let's consider an example to illustrate the calculation of relative risk from odds ratio. -- - Suppose we conducted a study on the association between smoking and lung cancer. -- - The odds ratio (OR) obtained from the study is 2.5. -- - The prevalence of lung cancer in the unexposed group is 0.05 (5%). -- - Using the formula for relative risk: -- - RR = OR / (1 - P0 + P0 * OR) - = 2.5 / (1 - 0.05 + 0.05 * 2.5) - ≈ 2.63 -- - The calculated relative risk (RR) is approximately 2.63. --- ## Interpretation - When the odds ratio and relative risk are similar or close in value, it suggests that the outcome of interest is rare in the study population. -- - In our example, since the odds ratio (OR) and relative risk (RR) are both around 2.5, we can infer that lung cancer is relatively rare in the study population. -- - However, if the outcome were more common, the odds ratio would overestimate the relative risk. --- ## Calculating Odds raito from Relative Risk - To calculate the odds ratio (OR) from the relative risk (RR), we need to know the prevalence or risk of the outcome in both the exposed and unexposed groups. -- Here's the formula: -- - OR = (RR / (1 - P0)) * (1 / P0) - Where: - RR is the relative risk - P0 is the prevalence or risk of the outcome in the unexposed group --- ## Example - Suppose we conducted a study on the association between a specific medication and the occurrence of a side effect. -- The relative risk (RR) obtained from the study is 1.5. -- The prevalence of the side effect in the unexposed group (P0) is 0.1 (10%). -- - Using the formula for odds ratio: -- - OR = (RR / (1 - P0)) * (1 / P0) - = (1.5 / (1 - 0.1)) * (1 / 0.1) - = (1.5 / 0.9) * 10 - ≈ 16.67 - The calculated odds ratio (OR) is approximately 16.67. -- --- ## Interpretation - The odds ratio of 16.67 suggests that the odds of experiencing the side effect in the exposed group are approximately 16.67 times higher than the odds in the unexposed group. -- - Please note that this calculation assumes a case-control study design or a cross-sectional study design where prevalence is used instead of incidence. Also, it's important to consider the limitations and context of the study when interpreting the results. --- # References 1. Agresti, A. (1996). An introduction to categorical data analysis.