title

Logistic Regression Details Pt1: Coefficients

description

When you do logistic regression you have to make sense of the coefficients. These are based on the log(odds) and log(odds ratio), but, to be honest, the easiest way to make sense of these are through examples. In this StatQuest, I walk you though two Logistic Regression Examples, step-by-step, and show you exactly how the coefficients are derived and how to interpret them.
NOTE: This StatQuest assumes that you are already familiar with...
The main ideas of Logistic Regression: https://youtu.be/yIYKR4sgzI8
Odds and Log(odds): https://youtu.be/ARfXDSkQf1Y
Odds Ratio and Log(odds ratio): https://youtu.be/8nm0G-1uJzA
Linear Regression: https://youtu.be/PaFPbb66DxQ and
Linear Models: https://youtu.be/nk2CQITm_eo
https://youtu.be/NF5_btOaCig
For a complete index of all the StatQuest videos, check out:
https://statquest.org/video-index/
If you'd like to support StatQuest, please consider...
Buying The StatQuest Illustrated Guide to Machine Learning!!!
PDF - https://statquest.gumroad.com/l/wvtmc
Paperback - https://www.amazon.com/dp/B09ZCKR4H6
Kindle eBook - https://www.amazon.com/dp/B09ZG79HXC
Patreon: https://www.patreon.com/statquest
...or...
YouTube Membership: https://www.youtube.com/channel/UCtYLUTtgS3k1Fg4y5tAhLbw/join
...a cool StatQuest t-shirt or sweatshirt:
https://shop.spreadshirt.com/statquest-with-josh-starmer/
...buying one or two of my songs (or go large and get a whole album!)
https://joshuastarmer.bandcamp.com/
...or just donating to StatQuest!
https://www.paypal.me/statquest
Lastly, if you want to keep up with me as I research and create new StatQuests, follow me on twitter:
https://twitter.com/joshuastarmer
0:00 Awesome song and introduction
1:13 Review of Logistic Regression Concepts
2:47 Coefficients for continuous variables
10:46 Coefficients for discrete variables
17:52 Coefficients for combinations of variable types
Correction:
15:21 The left hand side of the equation should be “log(odds Obesity)” instead of “size”.
#statquest #logistic

detail

{'title': 'Logistic Regression Details Pt1: Coefficients', 'heatmap': [{'end': 324.495, 'start': 301.581, 'weight': 0.716}, {'end': 583.332, 'start': 537.017, 'weight': 0.755}], 'summary': 'Provides detailed insights into logistic regression coefficients, emphasizing their interpretation to predict obesity using continuous and discrete variables, along with an overview of logistic regression as a generalized linear model and its application in assessing coefficients through standard error, z value, and p-value.', 'chapters': [{'end': 140.436, 'segs': [{'end': 81.779, 'src': 'embed', 'start': 31.65, 'weight': 0, 'content': [{'end': 40.298, 'text': 'This StatQuest follows up on logistic regression clearly explained, which provides the big picture of what logistic regression is and how it works.', 'start': 31.65, 'duration': 8.648}, {'end': 46.104, 'text': 'In this video, I want to dive deeper into how logistic regression works.', 'start': 42.06, 'duration': 4.044}, {'end': 51.83, 'text': "Specifically, we'll talk about the coefficients that are the result of any logistic regression.", 'start': 46.745, 'duration': 5.085}, {'end': 55.193, 'text': "We'll talk about how they are determined and interpreted.", 'start': 52.41, 'duration': 2.783}, {'end': 62.995, 'text': "We'll talk about the coefficients in the context of using a continuous variable like weight to predict obesity.", 'start': 56.633, 'duration': 6.362}, {'end': 72.417, 'text': "And we'll talk about the coefficients in the context of testing if a discrete variable like whether or not a mutated gene is related to obesity.", 'start': 64.215, 'duration': 8.202}, {'end': 81.779, 'text': "Before we dive into the details, let's do a quick review of some of logistic regression's main ideas to make sure we're all on the same page.", 'start': 73.917, 'duration': 7.862}], 'summary': 'This statquest dives into interpreting coefficients in logistic regression and uses examples of continuous and discrete variables.', 'duration': 50.129, 'max_score': 31.65, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE31650.jpg'}], 'start': 0.818, 'title': 'Logistic regression coefficients', 'summary': "Provides an introduction to logistic regression coefficients, with an emphasis on interpreting them to predict obesity using examples of continuous and discrete variables. it also includes a review of logistic regression's main ideas and an introduction to the concept of probability.", 'chapters': [{'end': 140.436, 'start': 0.818, 'title': 'Understanding logistic regression coefficients', 'summary': "Covers the basics of logistic regression, focusing on coefficients and their interpretation, using examples of continuous and discrete variables to predict obesity, with a quick review of logistic regression's main ideas and an introduction to the concept of probability.", 'duration': 139.618, 'highlights': ['The chapter dives deeper into logistic regression, specifically focusing on the coefficients that result from it, and their interpretation.', 'It discusses the context of using a continuous variable like weight to predict obesity and the context of testing if a discrete variable, such as a mutated gene, is related to obesity.', "A quick review of logistic regression's main ideas is provided to ensure understanding before delving into the details.", 'An example is used to demonstrate the concept of probability in logistic regression, where the y-axis represents the probability of a mouse being obese based on its weight, ranging from 0 to 1.']}], 'duration': 139.618, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE818.jpg', 'highlights': ['The chapter delves into interpreting logistic regression coefficients for predicting obesity.', 'It discusses using continuous and discrete variables to predict obesity.', "A quick review of logistic regression's main ideas is provided.", 'An example demonstrates the concept of probability in logistic regression.']}, {'end': 633.639, 'segs': [{'end': 190.566, 'src': 'embed', 'start': 141.195, 'weight': 0, 'content': [{'end': 149.219, 'text': 'I want to mention that logistic regression is a specific type of generalized linear model, often abbreviated GLM.', 'start': 141.195, 'duration': 8.024}, {'end': 159.545, 'text': "Generalized linear models are a generalization of the concepts and abilities of regular linear models which we've already talked about in many StatQuests.", 'start': 150.4, 'duration': 9.145}, {'end': 166.609, 'text': "That means that if you're familiar with linear models, then you're well on your way to understanding logistic regression.", 'start': 160.766, 'duration': 5.843}, {'end': 175.241, 'text': "We'll start by talking about logistic regression when we use a continuous variable like weight to predict obesity.", 'start': 168.114, 'duration': 7.127}, {'end': 182.708, 'text': 'This type of logistic regression is closely related to linear regression, a type of linear model.', 'start': 176.742, 'duration': 5.966}, {'end': 187.152, 'text': "So let's do a super quick review of linear regression.", 'start': 184.249, 'duration': 2.903}, {'end': 190.566, 'text': 'Shameless self-promotion!.', 'start': 188.766, 'duration': 1.8}], 'summary': 'Logistic regression is a type of generalized linear model closely related to linear regression and can be used to predict obesity using continuous variables like weight.', 'duration': 49.371, 'max_score': 141.195, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE141195.jpg'}, {'end': 324.495, 'src': 'heatmap', 'start': 285.402, 'weight': 3, 'content': [{'end': 291.484, 'text': 'With linear regression, the values on the y-axis can, in theory, be any number.', 'start': 285.402, 'duration': 6.082}, {'end': 301.581, 'text': 'Unfortunately, with logistic regression, the y-axis is confined to probability values between 0 and 1.', 'start': 292.584, 'duration': 8.997}, {'end': 310.827, 'text': 'To solve this problem, the y-axis in logistic regression is transformed from the probability of obesity to the log odds of obesity.', 'start': 301.581, 'duration': 9.246}, {'end': 318.031, 'text': 'So, just like the y-axis in linear regression, it can go from negative infinity to positive infinity.', 'start': 311.267, 'duration': 6.764}, {'end': 324.495, 'text': "So we can see what we're doing, let's move the logistic regression to the left side.", 'start': 319.932, 'duration': 4.563}], 'summary': 'Logistic regression confines y-axis to probability values between 0 and 1, transformed to log odds.', 'duration': 25.425, 'max_score': 285.402, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE285402.jpg'}, {'end': 583.332, 'src': 'heatmap', 'start': 530.792, 'weight': 4, 'content': [{'end': 535.396, 'text': 'The first coefficient is the y-axis intercept when weight equals zero.', 'start': 530.792, 'duration': 4.604}, {'end': 545.563, 'text': 'It means that when weight equals zero, the log of the odds of obesity are negative 3.476.', 'start': 537.017, 'duration': 8.546}, {'end': 550.146, 'text': "In other words, if you don't weigh anything, the odds are against you being obese.", 'start': 545.563, 'duration': 4.583}, {'end': 555.05, 'text': "Duh Here's the standard error for the estimated intercept.", 'start': 550.747, 'duration': 4.303}, {'end': 560.574, 'text': 'And the Z value is the estimated intercept divided by the standard error.', 'start': 556.271, 'duration': 4.303}, {'end': 568.839, 'text': "In other words, it's the number of standard deviations the estimated intercept is away from zero on the standard normal curve.", 'start': 561.694, 'duration': 7.145}, {'end': 575.224, 'text': "That means that this is the Wald's test that we talked about in the odds ratio stat quest.", 'start': 570.561, 'duration': 4.663}, {'end': 583.332, 'text': 'Since the estimate is less than two standard deviations away from zero, we know it is not statistically significant.', 'start': 576.929, 'duration': 6.403}], 'summary': 'Intercept: -3.476, not statistically significant', 'duration': 29.782, 'max_score': 530.792, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE530792.jpg'}, {'end': 644.662, 'src': 'embed', 'start': 611.482, 'weight': 5, 'content': [{'end': 618.087, 'text': 'Again, the z value is the number of standard deviations the estimate is from zero on the standard normal curve.', 'start': 611.482, 'duration': 6.605}, {'end': 625.873, 'text': 'And again, the estimate is less than two standard deviations from zero, so it is not statistically significant.', 'start': 619.228, 'duration': 6.645}, {'end': 629.456, 'text': 'This is no surprise with such a small sample size.', 'start': 626.514, 'duration': 2.942}, {'end': 633.639, 'text': 'And this is confirmed with the large p value.', 'start': 630.957, 'duration': 2.682}, {'end': 644.662, 'text': 'Double bam! Now we know all about the logistic regression coefficients when we use a continuous variable like weight to predict obesity.', 'start': 634.9, 'duration': 9.762}], 'summary': 'Estimate is not statistically significant, with small sample size and large p value.', 'duration': 33.18, 'max_score': 611.482, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE611482.jpg'}], 'start': 141.195, 'title': 'Logistic regression and its application', 'summary': 'Provides an overview and explanation of logistic regression as a specific type of generalized linear model, emphasizing its application in predicting obesity using weight as a continuous variable and the assessment of coefficients through standard error, z value, and p-value.', 'chapters': [{'end': 257.968, 'start': 141.195, 'title': 'Logistic regression overview', 'summary': 'Discusses logistic regression as a specific type of generalized linear model, closely related to linear regression, and its application in predicting obesity using a continuous variable like weight, emphasizing its close connection to linear models and the ease of understanding for those familiar with linear models.', 'duration': 116.773, 'highlights': ['Logistic regression is a specific type of generalized linear model, closely related to linear regression, and shares concepts with regular linear models.', "It is used to predict obesity using a continuous variable like weight, similar to linear regression's application in predicting size based on weight.", 'Generalized linear models are a generalization of the concepts and abilities of regular linear models, making it easier for those familiar with linear models to understand logistic regression.', 'The equation for the line in linear regression has a y-axis intercept and a slope, enabling the prediction of values for size based on weight.', 'The equation in linear regression can predict the size of mice with weight equals zero, represented by the y-axis intercept.']}, {'end': 633.639, 'start': 257.968, 'title': 'Logistic regression explained', 'summary': 'Explains that logistic regression transforms the y-axis from probability of obesity to log odds of obesity, with the coefficients for the best fitting line indicating the intercept and slope, and the statistical significance of these coefficients is assessed through standard error, z value, and p-value.', 'duration': 375.671, 'highlights': ['Logistic regression transforms the y-axis from probability of obesity to log odds of obesity. This transformation is crucial for logistic regression as it allows for modeling with probability values confined between 0 and 1.', 'Coefficients for the best fitting line indicate the intercept and slope. The intercept indicates the log of the odds of obesity when weight equals zero, and the slope indicates the increase in log odds of obesity for every one unit of weight gained.', 'Assessment of statistical significance is done through standard error, z value, and p-value. The statistical significance of the coefficients is determined by evaluating the standard error, z value, and p-value, with values less than two standard deviations from zero indicating lack of statistical significance.']}], 'duration': 492.444, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE141195.jpg', 'highlights': ['Logistic regression is a specific type of generalized linear model, closely related to linear regression, and shares concepts with regular linear models.', "It is used to predict obesity using a continuous variable like weight, similar to linear regression's application in predicting size based on weight.", 'Generalized linear models are a generalization of the concepts and abilities of regular linear models, making it easier for those familiar with linear models to understand logistic regression.', 'Logistic regression transforms the y-axis from probability of obesity to log odds of obesity. This transformation is crucial for logistic regression as it allows for modeling with probability values confined between 0 and 1.', 'Coefficients for the best fitting line indicate the intercept and slope. The intercept indicates the log of the odds of obesity when weight equals zero, and the slope indicates the increase in log odds of obesity for every one unit of weight gained.', 'Assessment of statistical significance is done through standard error, z value, and p-value. The statistical significance of the coefficients is determined by evaluating the standard error, z value, and p-value, with values less than two standard deviations from zero indicating lack of statistical significance.']}, {'end': 1139.95, 'segs': [{'end': 661.927, 'src': 'embed', 'start': 634.9, 'weight': 2, 'content': [{'end': 644.662, 'text': 'Double bam! Now we know all about the logistic regression coefficients when we use a continuous variable like weight to predict obesity.', 'start': 634.9, 'duration': 9.762}, {'end': 657.046, 'text': "Now let's talk about logistic regression coefficients in the context of testing if a discrete variable like whether or not a mouse has a mutated gene is related to obesity.", 'start': 646.482, 'duration': 10.564}, {'end': 661.927, 'text': 'On the left side, we have mice that have a normal gene.', 'start': 658.726, 'duration': 3.201}], 'summary': 'Logistic regression predicts obesity using weight and gene mutation status in mice.', 'duration': 27.027, 'max_score': 634.9, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE634900.jpg'}, {'end': 766.253, 'src': 'embed', 'start': 721.209, 'weight': 3, 'content': [{'end': 726.074, 'text': 'The first line represents the mean size for the mice with the normal copy of the gene.', 'start': 721.209, 'duration': 4.865}, {'end': 732.22, 'text': 'The second line represents the mean size of the mice with the mutated copy of the gene.', 'start': 727.375, 'duration': 4.845}, {'end': 737.525, 'text': 'These two lines come together to form the coefficients in this equation.', 'start': 733.521, 'duration': 4.004}, {'end': 743.932, 'text': 'The mean value for size for the mice with the normal copy of the gene goes here.', 'start': 739.107, 'duration': 4.825}, {'end': 752.788, 'text': 'And the difference between the mean size of the mice with the mutated gene and the mean size of the mice with the normal gene goes here.', 'start': 745.205, 'duration': 7.583}, {'end': 761.931, 'text': 'We then pair this equation with a design matrix to predict the size of a mouse given that it has the normal or mutated version of the gene.', 'start': 754.148, 'duration': 7.783}, {'end': 766.253, 'text': 'This is the design matrix for the observed data.', 'start': 763.592, 'duration': 2.661}], 'summary': 'Equation coefficients predict size difference in mice with normal vs mutated gene.', 'duration': 45.044, 'max_score': 721.209, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE721209.jpg'}, {'end': 889.845, 'src': 'embed', 'start': 857.612, 'weight': 7, 'content': [{'end': 859.674, 'text': 'But you already know all this t-test stuff.', 'start': 857.612, 'duration': 2.062}, {'end': 864.477, 'text': 'What you really want to know is how it applies to logistic regression.', 'start': 860.835, 'duration': 3.642}, {'end': 874.385, 'text': 'The first thing we do is transform the y-axis from the probability of being obese to the log of the odds of obesity.', 'start': 866.539, 'duration': 7.846}, {'end': 878.297, 'text': 'Now we fit two lines to the data.', 'start': 876.235, 'duration': 2.062}, {'end': 889.845, 'text': 'For the first line, we take the normal gene data and use it to calculate the log of the odds of obesity for mice with the normal gene.', 'start': 880.178, 'duration': 9.667}], 'summary': 'Logistic regression transforms probability to log odds and fits two lines to data.', 'duration': 32.233, 'max_score': 857.612, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE857612.jpg'}, {'end': 1002.102, 'src': 'embed', 'start': 940.211, 'weight': 5, 'content': [{'end': 948.739, 'text': 'And since subtracting one log from another can be converted into division, this term is a log of the odds ratio.', 'start': 940.211, 'duration': 8.528}, {'end': 958.227, 'text': 'It tells us on a log scale how much having the mutated gene increases or decreases the odds of a mouse being obese.', 'start': 949.639, 'duration': 8.588}, {'end': 965.301, 'text': "Okay, now that we know what the equation is all about, let's substitute in the numbers.", 'start': 959.978, 'duration': 5.323}, {'end': 974.907, 'text': 'The log of the odds for gene normal is just the log of 2 divided by 9.', 'start': 966.962, 'duration': 7.945}, {'end': 982.951, 'text': 'And the log of the odds for gene mutated is just the log of 7 divided by 3.', 'start': 974.907, 'duration': 8.044}, {'end': 984.312, 'text': 'Now we just do the math.', 'start': 982.951, 'duration': 1.361}, {'end': 987.374, 'text': 'And that gives us these coefficients.', 'start': 985.573, 'duration': 1.801}, {'end': 991.593, 'text': 'And those are what you get when you do logistic regression.', 'start': 988.871, 'duration': 2.722}, {'end': 996.638, 'text': 'The intercept is the log of the odds for gene normal.', 'start': 993.235, 'duration': 3.403}, {'end': 1002.102, 'text': 'And the gene mutant term is the log of the odds ratio.', 'start': 998.119, 'duration': 3.983}], 'summary': "Logistic regression calculates odds ratio for mutated gene's effect on obesity.", 'duration': 61.891, 'max_score': 940.211, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE940211.jpg'}, {'end': 1110.572, 'src': 'embed', 'start': 1080.889, 'weight': 0, 'content': [{'end': 1086.233, 'text': 'And we have seen how some of the linear model concepts for t-tests apply to logistic regression.', 'start': 1080.889, 'duration': 5.344}, {'end': 1095.101, 'text': 'In short, in terms of the coefficients, logistic regression is the exact same as good old linear models,', 'start': 1087.735, 'duration': 7.366}, {'end': 1098.304, 'text': 'except the coefficients are in terms of the log odds.', 'start': 1095.101, 'duration': 3.203}, {'end': 1110.572, 'text': 'This means that all those fancy things we can do with linear models, like multiple regression and ANOVA, can be done using logistic regression.', 'start': 1100.407, 'duration': 10.165}], 'summary': 'Logistic regression uses log odds coefficients, like linear models, enabling multiple regression and anova.', 'duration': 29.683, 'max_score': 1080.889, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE1080889.jpg'}], 'start': 634.9, 'title': 'Logistic regression in statquest', 'summary': 'Delves into logistic regression coefficients in the context of testing the relationship between a discrete variable like mutated gene and obesity, featuring the transformation of the y-axis, fitting of two lines to the data, calculation of log odds, interpretation of log odds ratio, determination of coefficients, standard errors, z-values, and statistical significance, and the applicability of linear model concepts to logistic regression, with coefficients in terms of log odds.', 'chapters': [{'end': 855.671, 'start': 634.9, 'title': 'Logistic regression coefficients', 'summary': 'Explains logistic regression coefficients in the context of testing the relationship between a discrete variable like mutated gene and obesity, similar to a t-test using linear models.', 'duration': 220.771, 'highlights': ['The logistic regression coefficients relate to testing the relationship between a discrete variable like mutated gene and obesity, similar to a t-test using linear models.', 'The mean size for mice with the normal gene and the difference between the mean size of mice with mutated gene and the mean size of mice with the normal gene are used to form the coefficients in the equation.', 'The design matrix predicts the size of a mouse given the normal or mutated version of the gene, by turning coefficients off or on based on the gene type, and testing if the coefficient is equal to zero.']}, {'end': 1139.95, 'start': 857.612, 'title': 'Logistic regression in statquest', 'summary': 'Explains how linear model concepts for t-tests apply to logistic regression, featuring the transformation of the y-axis, fitting of two lines to the data, calculation of log odds for gene normal and gene mutated, interpretation of log odds ratio, determination of coefficients, standard errors, z-values, and statistical significance, and the applicability of linear model concepts to logistic regression, with coefficients in terms of log odds.', 'duration': 282.338, 'highlights': ['Logistic regression involves transforming the y-axis from probability to the log of the odds of obesity and fitting two lines to the data. The transformation of the y-axis and fitting of two lines are fundamental steps in logistic regression.', 'Calculation of log odds for gene normal and gene mutated is a key aspect of logistic regression. Understanding the log odds for gene normal and gene mutated is crucial in logistic regression.', 'Interpreting the log odds ratio helps in understanding the impact of having the mutated gene on the odds of being obese. The log odds ratio provides valuable insights into the effect of the mutated gene on the odds of obesity.', 'Determining coefficients, standard errors, z-values, and statistical significance is essential in logistic regression. The calculation of coefficients, standard errors, z-values, and statistical significance is crucial for understanding the logistic regression model.', 'Linear model concepts for t-tests apply to logistic regression, with coefficients expressed in terms of log odds. The application of linear model concepts to logistic regression, with coefficients in terms of log odds, enables the use of similar statistical techniques in both models.']}], 'duration': 505.05, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vN5cNN2-HWE/pics/vN5cNN2-HWE634900.jpg', 'highlights': ['The calculation of coefficients, standard errors, z-values, and statistical significance is crucial for understanding the logistic regression model.', 'The application of linear model concepts to logistic regression, with coefficients in terms of log odds, enables the use of similar statistical techniques in both models.', 'The logistic regression coefficients relate to testing the relationship between a discrete variable like mutated gene and obesity, similar to a t-test using linear models.', 'The mean size for mice with the normal gene and the difference between the mean size of mice with mutated gene and the mean size of mice with the normal gene are used to form the coefficients in the equation.', 'The design matrix predicts the size of a mouse given the normal or mutated version of the gene, by turning coefficients off or on based on the gene type, and testing if the coefficient is equal to zero.', 'Interpreting the log odds ratio helps in understanding the impact of having the mutated gene on the odds of being obese. The log odds ratio provides valuable insights into the effect of the mutated gene on the odds of obesity.', 'Calculation of log odds for gene normal and gene mutated is a key aspect of logistic regression. Understanding the log odds for gene normal and gene mutated is crucial in logistic regression.', 'Logistic regression involves transforming the y-axis from probability to the log of the odds of obesity and fitting two lines to the data. The transformation of the y-axis and fitting of two lines are fundamental steps in logistic regression.']}], 'highlights': ['The calculation of coefficients, standard errors, z-values, and statistical significance is crucial for understanding the logistic regression model.', 'The logistic regression coefficients relate to testing the relationship between a discrete variable like mutated gene and obesity, similar to a t-test using linear models.', 'Interpreting the log odds ratio helps in understanding the impact of having the mutated gene on the odds of being obese. The log odds ratio provides valuable insights into the effect of the mutated gene on the odds of obesity.', 'Logistic regression involves transforming the y-axis from probability to the log of the odds of obesity and fitting two lines to the data. The transformation of the y-axis and fitting of two lines are fundamental steps in logistic regression.', "A quick review of logistic regression's main ideas is provided.", 'An example demonstrates the concept of probability in logistic regression.', 'Generalized linear models are a generalization of the concepts and abilities of regular linear models, making it easier for those familiar with linear models to understand logistic regression.', 'Assessment of statistical significance is done through standard error, z value, and p-value. The statistical significance of the coefficients is determined by evaluating the standard error, z value, and p-value, with values less than two standard deviations from zero indicating lack of statistical significance.', 'The chapter delves into interpreting logistic regression coefficients for predicting obesity.', 'It discusses using continuous and discrete variables to predict obesity.', 'Logistic regression is a specific type of generalized linear model, closely related to linear regression, and shares concepts with regular linear models.', "It is used to predict obesity using a continuous variable like weight, similar to linear regression's application in predicting size based on weight.", 'The application of linear model concepts to logistic regression, with coefficients in terms of log odds, enables the use of similar statistical techniques in both models.', 'The mean size for mice with the normal gene and the difference between the mean size of mice with mutated gene and the mean size of mice with the normal gene are used to form the coefficients in the equation.', 'The design matrix predicts the size of a mouse given the normal or mutated version of the gene, by turning coefficients off or on based on the gene type, and testing if the coefficient is equal to zero.', 'Calculation of log odds for gene normal and gene mutated is a key aspect of logistic regression. Understanding the log odds for gene normal and gene mutated is crucial in logistic regression.']}