{"id":3747,"date":"2022-02-27T16:55:00","date_gmt":"2022-02-27T19:55:00","guid":{"rendered":"https:\/\/www.blogs.unicamp.br\/zero\/?p=3747"},"modified":"2022-05-23T17:59:29","modified_gmt":"2022-05-23T20:59:29","slug":"what-does-multiple-linear-regression-teach-us-about-losing-weight","status":"publish","type":"post","link":"https:\/\/www.blogs.unicamp.br\/zero\/3747\/","title":{"rendered":"What does Multiple Linear Regression teach us about losing weight?"},"content":{"rendered":"\n<p class=\"has-text-align-center\"><em>This is a Math post, not a Nutrition post!<\/em><\/p>\n\n\n\n<p class=\"has-text-align-center\"><em>We suggest that before any change in your routine to lose\/gain weight, look for a specialist.<\/em><\/p>\n\n\n\n<p>A few years ago I needed to learn about Multiple Linear Regression to help a master&#8217;s student in Engineering. It was an interesting and reasonably effective learning experience to address the problem he was researching (Sewage Treatment Plants). However, there is more to this method than the calculations and values \u200b\u200bthat allow us to estimate linear models for the behavior of unknown functions from their observable data. I say there is an application of great interest to most of us who are concerned about getting overweight.<\/p>\n\n\n\n<p>For starters, let&#8217;s see exactly what Multiple Linear Regression does (in a very succinct and generic way).<\/p>\n\n\n\n<p>We have a record of measurements of various events\/equipment\/actions\u2026 and we suppose that there is a mathematical function that is linear and that explains from this set of \u201cvariables\u201d that we measure, the output of the system. So, for each variable that we recorded, we were able to stipulate how much it actually influences the output of the system (Calm down, maybe the conversation is a little complicated so far, but if you&#8217;ve made it this far, congratulations! from now).<\/p>\n\n\n\n<p>We will give our system a name, it will be called \u201cweight gain\u201d. Our intention, for example, may be that this output is close to zero (ie, we keep our weight as is).<\/p>\n\n\n\n<p>So, we started to list a series of 26 actions within our routine that we believe influence the \u201cweight gain\u201d system (I will creatively call them the 26 letters of the alphabet).<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>a, b, c, d, e, \u2026, x, y, z.<\/strong><\/p>\n\n\n\n<p>If this action-dependent system can be roughly expressed as a linear model, then, for each action, there must be an influence factor represented by a real number \u03b1i, where i is a natural number between 1 and 26, like this:<\/p>\n\n\n\n<p class=\"has-text-align-center\">\u03b1\u2081a + \u03b1\u2082b + \u03b1\u2083c + \u03b1\u2084d + \u03b1\u2085e + \u2026 + \u03b1\u2082\u2084x + \u03b1\u2082\u2085y + \u03b1\u2082\u2086z + ERROR = weight gain<\/p>\n\n\n\n<p>This \u201cERROR\u201d represents the very imprecision of the model. So, if the ERROR is 0, it means that we have actually found a linear model that explains our system. Although in the simplest exercises this occurs, in practice (or in the most fun exercises) the ERROR will always be different from 0, no matter how precise the model is and how much the system adapts to it. In case the ERROR is very large, this is an indication that the model in question is not good, and perhaps other variables should be included.<\/p>\n\n\n\n<p>If we have the measurements of these 26 variables at hand (for example, variable a, \u201chow many times a month do we eat chocolate\u201d, variable b, \u201chow many minutes a week do we practice moderate physical activity\u201d, \u2026) and we know how the \u201cweight gain\u201d varies \u201d, we were able to determine (if there is a linear model) what the values \u200b\u200bof \u03b1\u2081, \u03b1\u2082, \u03b1\u2083, \u03b1\u2084, \u03b1\u2085, \u2026 ,\u03b1\u2082\u2084, \u03b1\u2082\u2085, \u03b1\u2082\u2086 would be. So:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>if any \u03b1i is close to 0, its action seems to have little influence on weight gain or loss;<\/li><li>if any \u03b1i is less than 0, its action seems to lead to weight loss;<\/li><li>if any \u03b1i is greater than 0, its action seems to lead to weight gain;<\/li><\/ul>\n\n\n\n<p>Okay, you might be thinking that you already understand everything, that it&#8217;s just reducing the \u03b1i greater than 0, right? Wrong! This would be a mere instrumentalization of Mathematics and the plan could very well backfire.<\/p>\n\n\n\n<p>The first step in this case is to check if the data makes any sense for your routine. For example, I rarely eat chocolate and almost every day I am cycling, but if the data collected is for example between Christmas and New Years, I will probably not be cycling on these dates and I will eat a lot more chocolate than I usually do. how.<\/p>\n\n\n\n<p>This means that observing the situation in which the measurements were collected is strictly necessary to understand the influence of variables on the system. If the data were collected, for example, in a specific period of rain when I am not riding a bicycle, this does not represent the routine, but an atypical context that should not be considered. In summary, atypical periods (travels, holidays, parties, or even while we are recovering from some illness or injury) should not be considered in these models, they are cases that are outside the rule and trying to make them rules would not represent the system in its majority.<\/p>\n\n\n\n<p>Okay, not considering the exception dates, we can just take\/reduce everything that has an \u03b1i greater than 0, right? Wrong! Because we need to consider that there are related variables, that is, when we remove\/reduce the variable \u201ca\u201d, we may not have the following system:<\/p>\n\n\n\n<p class=\"has-text-align-center\">\u03b1\u2082b + \u03b1\u2083c + \u03b1\u2084d + \u03b1\u2085e + \u2026 + \u03b1\u2082\u2084x + \u03b1\u2082\u2085y + \u03b1\u2082\u2086z + ERROR = weight gain<\/p>\n\n\n\n<p>Instead, have the system:<\/p>\n\n\n\n<p class=\"has-text-align-center\">\u03b2\u2082b + \u03b2\u2083c + \u03b2\u2084d + \u03b2\u2085e + \u2026 + \u03b2\u2082\u2084x + \u03b2\u2082\u2085y + \u03b2\u2082\u2086z + ERROR = weight gain<\/p>\n\n\n\n<p>Where \u03b2 is a real number.<\/p>\n\n\n\n<p>This means that when we force the modification of a variable, the influence that each of the others exerts on the system can change. For example, cutting out my daily cup of chocolate milk from my routine, which reduced my willingness to ride a bike, also made me increase the amount of food at meals and the frequency with which I consume chocolate. That is, removing this variable that had an \u03b1i greater than 0 provided an increase in other \u03b1i so that the system output also increased.<\/p>\n\n\n\n<p>But this can only be noticed if, after changing one of the variables, we keep observing how the system is behaving. In this case, after a few weeks without the chocolate, I noticed that the weight gain increased and I understood what was causing this change. So, I thought it was good to resume the chocolate milk in my routine.<\/p>\n\n\n\n<p>If realizing this with changing one variable already seemed a bit complex, who would have thought if we changed several at once. We wouldn&#8217;t really have a clear understanding of what might be influencing the system. Hence the importance of this adjustment process being slow and with constant monitoring.<\/p>\n\n\n\n<p>I hope you enjoyed this discussion as I enjoyed learning about Multiple Linear Regression \ud83d\ude42<\/p>\n\n\n\n<p class=\"has-text-align-center\"><em>Finally, I reiterate that this is a post on Mathematics and not on Nutrition!<\/em><\/p>\n\n\n\n<p class=\"has-text-align-center\"><em>We suggest that before any change in your routine to lose\/gain weight, look for a specialist.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a Math post, not a Nutrition post! We suggest that before any change in your routine to lose\/gain<\/p>\n","protected":false},"author":434,"featured_media":3728,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"editor_plus_copied_stylings":"{}","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"pgc_sgb_lightbox_settings":"","_vp_format_video_url":"","_vp_image_focal_point":[],"footnotes":""},"categories":[1223],"tags":[],"class_list":["post-3747","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-v-7-ed-2"],"_links":{"self":[{"href":"https:\/\/www.blogs.unicamp.br\/zero\/wp-json\/wp\/v2\/posts\/3747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blogs.unicamp.br\/zero\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blogs.unicamp.br\/zero\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blogs.unicamp.br\/zero\/wp-json\/wp\/v2\/users\/434"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blogs.unicamp.br\/zero\/wp-json\/wp\/v2\/comments?post=3747"}],"version-history":[{"count":1,"href":"https:\/\/www.blogs.unicamp.br\/zero\/wp-json\/wp\/v2\/posts\/3747\/revisions"}],"predecessor-version":[{"id":3748,"href":"https:\/\/www.blogs.unicamp.br\/zero\/wp-json\/wp\/v2\/posts\/3747\/revisions\/3748"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.blogs.unicamp.br\/zero\/wp-json\/wp\/v2\/media\/3728"}],"wp:attachment":[{"href":"https:\/\/www.blogs.unicamp.br\/zero\/wp-json\/wp\/v2\/media?parent=3747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blogs.unicamp.br\/zero\/wp-json\/wp\/v2\/categories?post=3747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blogs.unicamp.br\/zero\/wp-json\/wp\/v2\/tags?post=3747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}