{"id":237,"date":"2026-10-03T16:46:50","date_gmt":"2026-10-03T16:46:50","guid":{"rendered":"https:\/\/stephendavies.org\/data419\/?p=237"},"modified":"2026-10-03T16:46:50","modified_gmt":"2026-10-03T16:46:50","slug":"sigmoid-function-notation","status":"publish","type":"post","link":"https:\/\/stephendavies.org\/data419\/index.php\/2026\/10\/03\/sigmoid-function-notation\/","title":{"rendered":"Sigmoid function notation"},"content":{"rendered":"<p>It has been pointed out to me that the notation I&#8217;m using in class for the sigmoid function is different than what the book uses on p. 139.<\/p>\n<p>In class, I said:<\/p>\n<p>$$\\sigma(z) = \\frac{1}{1 + e^{-z}}$$<\/p>\n<p>where <i>z<\/i> is the logit that logistic regression calculates for a data point <i>x<\/i>:<\/p>\n<p>$$z = \\beta_0 + \\beta_1 x$$<\/p>\n<p>Two differences between this notation choice and the book. First, realize that these two things are equivalent:<\/p>\n<p>$$\\frac{1}{1 + e^{-z}} = \\frac{e^{z}}{1 + e^{z}}$$.<\/p>\n<p>(Just multiply top and bottom by $e^{z}$ and rearrange terms.) I like the left side better because it seems slightly less cluttered, and the book uses the right side for whatever reasons. But these two expressions are exactly equivalent.<\/p>\n<p>Second, the book does my two steps all in one fell swoop, giving this equation at bottom of p.139:<\/p>\n<p>$$p(X) = \\frac{e^{\\beta_0 + \\beta_1 X}}{1 + e^{\\beta_0 + \\beta_1 X}}$$<\/p>\n<p>This is exactly the same as <\/p>\n<p>$$\\sigma(z) = \\sigma(\\beta_0 + \\beta_1 X) = \\frac{1}{1+e^{-(\\beta_0 + \\beta_1 X)}}$$<\/p>\n<p>which matches what we had in class.<\/p>\n<p>This has been a public service announcement.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It has been pointed out to me that the notation I&#8217;m using in class for the sigmoid function is different than what the book uses on p. 139. In class, I said: $$\\sigma(z) = \\frac{1}{1 + e^{-z}}$$ where z is the logit that logistic regression calculates for a data point x: $$z = \\beta_0 + [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[1],"tags":[],"class_list":["post-237","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/stephendavies.org\/data419\/index.php\/wp-json\/wp\/v2\/posts\/237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stephendavies.org\/data419\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stephendavies.org\/data419\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stephendavies.org\/data419\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stephendavies.org\/data419\/index.php\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":17,"href":"https:\/\/stephendavies.org\/data419\/index.php\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"predecessor-version":[{"id":254,"href":"https:\/\/stephendavies.org\/data419\/index.php\/wp-json\/wp\/v2\/posts\/237\/revisions\/254"}],"wp:attachment":[{"href":"https:\/\/stephendavies.org\/data419\/index.php\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stephendavies.org\/data419\/index.php\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stephendavies.org\/data419\/index.php\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}