CINXE.COM
Logistic regression - Wikipedia
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Logistic regression - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"ad19e5e5-e1a3-4c87-9fe6-cafe623dcc1b","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Logistic_regression","wgTitle":"Logistic regression","wgCurRevisionId":1274853991,"wgRevisionId":1274853991,"wgArticleId":226631,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Wikipedia articles needing page number citations from May 2012","Wikipedia articles needing page number citations from October 2019","Articles with short description","Short description is different from Wikidata","Wikipedia articles needing clarification from February 2023","Articles that may contain original research from May 2022","All articles that may contain original research","Wikipedia articles needing clarification from May 2017", "All articles with unsourced statements","Articles with unsourced statements from October 2019","All articles with specifically marked weasel-worded phrases","Articles with specifically marked weasel-worded phrases from October 2019","Commons category link from Wikidata","Logistic regression","Predictive analytics","Regression models"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Logistic_regression","wgRelevantArticleId":226631,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false, "nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":100000,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q1132755","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.math.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready", "ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","mediawiki.page.media","ext.scribunto.logs","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.cite.styles%7Cext.math.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.16"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Exam_pass_logistic_curve.svg/1200px-Exam_pass_logistic_curve.svg.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="830"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Exam_pass_logistic_curve.svg/800px-Exam_pass_logistic_curve.svg.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="553"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Exam_pass_logistic_curve.svg/640px-Exam_pass_logistic_curve.svg.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="442"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Logistic regression - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Logistic_regression"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Logistic_regression&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Logistic_regression"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Logistic_regression rootpage-Logistic_regression skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" title="Main menu" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li><li id="n-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages"><span>Special pages</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=en.wikipedia.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=Logistic+regression" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=Logistic+regression" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=en.wikipedia.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=Logistic+regression" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=Logistic+regression" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Applications" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Applications"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Applications</span> </div> </a> <button aria-controls="toc-Applications-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Applications subsection</span> </button> <ul id="toc-Applications-sublist" class="vector-toc-list"> <li id="toc-General" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#General"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.1</span> <span>General</span> </div> </a> <ul id="toc-General-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Supervised_machine_learning" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Supervised_machine_learning"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.2</span> <span>Supervised machine learning</span> </div> </a> <ul id="toc-Supervised_machine_learning-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Example" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Example"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Example</span> </div> </a> <button aria-controls="toc-Example-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Example subsection</span> </button> <ul id="toc-Example-sublist" class="vector-toc-list"> <li id="toc-Problem" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Problem"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Problem</span> </div> </a> <ul id="toc-Problem-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Model" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Model"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Model</span> </div> </a> <ul id="toc-Model-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Fit" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Fit"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>Fit</span> </div> </a> <ul id="toc-Fit-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Parameter_estimation" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Parameter_estimation"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Parameter estimation</span> </div> </a> <ul id="toc-Parameter_estimation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Predictions" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Predictions"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>Predictions</span> </div> </a> <ul id="toc-Predictions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Model_evaluation" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Model_evaluation"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.6</span> <span>Model evaluation</span> </div> </a> <ul id="toc-Model_evaluation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Generalizations" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Generalizations"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.7</span> <span>Generalizations</span> </div> </a> <ul id="toc-Generalizations-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Background" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Background"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Background</span> </div> </a> <button aria-controls="toc-Background-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Background subsection</span> </button> <ul id="toc-Background-sublist" class="vector-toc-list"> <li id="toc-Definition_of_the_logistic_function" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Definition_of_the_logistic_function"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>Definition of the logistic function</span> </div> </a> <ul id="toc-Definition_of_the_logistic_function-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Definition_of_the_inverse_of_the_logistic_function" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Definition_of_the_inverse_of_the_logistic_function"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2</span> <span>Definition of the inverse of the logistic function</span> </div> </a> <ul id="toc-Definition_of_the_inverse_of_the_logistic_function-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Interpretation_of_these_terms" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Interpretation_of_these_terms"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3</span> <span>Interpretation of these terms</span> </div> </a> <ul id="toc-Interpretation_of_these_terms-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Definition_of_the_odds" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Definition_of_the_odds"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.4</span> <span>Definition of the odds</span> </div> </a> <ul id="toc-Definition_of_the_odds-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-The_odds_ratio" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#The_odds_ratio"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.5</span> <span>The odds ratio</span> </div> </a> <ul id="toc-The_odds_ratio-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Multiple_explanatory_variables" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Multiple_explanatory_variables"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.6</span> <span>Multiple explanatory variables</span> </div> </a> <ul id="toc-Multiple_explanatory_variables-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Definition" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Definition"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Definition</span> </div> </a> <button aria-controls="toc-Definition-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Definition subsection</span> </button> <ul id="toc-Definition-sublist" class="vector-toc-list"> <li id="toc-Many_explanatory_variables,_two_categories" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Many_explanatory_variables,_two_categories"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Many explanatory variables, two categories</span> </div> </a> <ul id="toc-Many_explanatory_variables,_two_categories-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Multinomial_logistic_regression:_Many_explanatory_variables_and_many_categories" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Multinomial_logistic_regression:_Many_explanatory_variables_and_many_categories"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2</span> <span>Multinomial logistic regression: Many explanatory variables and many categories</span> </div> </a> <ul id="toc-Multinomial_logistic_regression:_Many_explanatory_variables_and_many_categories-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Interpretations" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Interpretations"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Interpretations</span> </div> </a> <button aria-controls="toc-Interpretations-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Interpretations subsection</span> </button> <ul id="toc-Interpretations-sublist" class="vector-toc-list"> <li id="toc-As_a_generalized_linear_model" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#As_a_generalized_linear_model"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.1</span> <span>As a generalized linear model</span> </div> </a> <ul id="toc-As_a_generalized_linear_model-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-As_a_latent-variable_model" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#As_a_latent-variable_model"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.2</span> <span>As a latent-variable model</span> </div> </a> <ul id="toc-As_a_latent-variable_model-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Two-way_latent-variable_model" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Two-way_latent-variable_model"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.3</span> <span>Two-way latent-variable model</span> </div> </a> <ul id="toc-Two-way_latent-variable_model-sublist" class="vector-toc-list"> <li id="toc-Example_2" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Example_2"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.3.1</span> <span>Example</span> </div> </a> <ul id="toc-Example_2-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-As_a_"log-linear"_model" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#As_a_"log-linear"_model"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.4</span> <span>As a "log-linear" model</span> </div> </a> <ul id="toc-As_a_"log-linear"_model-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-As_a_single-layer_perceptron" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#As_a_single-layer_perceptron"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.5</span> <span>As a single-layer perceptron</span> </div> </a> <ul id="toc-As_a_single-layer_perceptron-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-In_terms_of_binomial_data" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#In_terms_of_binomial_data"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.6</span> <span>In terms of binomial data</span> </div> </a> <ul id="toc-In_terms_of_binomial_data-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Model_fitting" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Model_fitting"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Model fitting</span> </div> </a> <button aria-controls="toc-Model_fitting-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Model fitting subsection</span> </button> <ul id="toc-Model_fitting-sublist" class="vector-toc-list"> <li id="toc-Maximum_likelihood_estimation_(MLE)" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Maximum_likelihood_estimation_(MLE)"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1</span> <span>Maximum likelihood estimation (MLE)</span> </div> </a> <ul id="toc-Maximum_likelihood_estimation_(MLE)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Iteratively_reweighted_least_squares_(IRLS)" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Iteratively_reweighted_least_squares_(IRLS)"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.2</span> <span>Iteratively reweighted least squares (IRLS)</span> </div> </a> <ul id="toc-Iteratively_reweighted_least_squares_(IRLS)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Bayesian" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Bayesian"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.3</span> <span>Bayesian</span> </div> </a> <ul id="toc-Bayesian-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-"Rule_of_ten"" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#"Rule_of_ten""> <div class="vector-toc-text"> <span class="vector-toc-numb">6.4</span> <span>"Rule of ten"</span> </div> </a> <ul id="toc-"Rule_of_ten"-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Error_and_significance_of_fit" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Error_and_significance_of_fit"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Error and significance of fit</span> </div> </a> <button aria-controls="toc-Error_and_significance_of_fit-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Error and significance of fit subsection</span> </button> <ul id="toc-Error_and_significance_of_fit-sublist" class="vector-toc-list"> <li id="toc-Deviance_and_likelihood_ratio_test_─_a_simple_case" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Deviance_and_likelihood_ratio_test_─_a_simple_case"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.1</span> <span>Deviance and likelihood ratio test ─ a simple case</span> </div> </a> <ul id="toc-Deviance_and_likelihood_ratio_test_─_a_simple_case-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Goodness_of_fit_summary" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Goodness_of_fit_summary"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.2</span> <span>Goodness of fit summary</span> </div> </a> <ul id="toc-Goodness_of_fit_summary-sublist" class="vector-toc-list"> <li id="toc-Deviance_and_likelihood_ratio_tests" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Deviance_and_likelihood_ratio_tests"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.2.1</span> <span>Deviance and likelihood ratio tests</span> </div> </a> <ul id="toc-Deviance_and_likelihood_ratio_tests-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Pseudo-R-squared" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Pseudo-R-squared"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.2.2</span> <span>Pseudo-R-squared</span> </div> </a> <ul id="toc-Pseudo-R-squared-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Hosmer–Lemeshow_test" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Hosmer–Lemeshow_test"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.2.3</span> <span>Hosmer–Lemeshow test</span> </div> </a> <ul id="toc-Hosmer–Lemeshow_test-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Coefficient_significance" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Coefficient_significance"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.3</span> <span>Coefficient significance</span> </div> </a> <ul id="toc-Coefficient_significance-sublist" class="vector-toc-list"> <li id="toc-Likelihood_ratio_test" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Likelihood_ratio_test"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.3.1</span> <span>Likelihood ratio test</span> </div> </a> <ul id="toc-Likelihood_ratio_test-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Wald_statistic" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Wald_statistic"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.3.2</span> <span>Wald statistic</span> </div> </a> <ul id="toc-Wald_statistic-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Case-control_sampling" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Case-control_sampling"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.3.3</span> <span>Case-control sampling</span> </div> </a> <ul id="toc-Case-control_sampling-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-Discussion" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Discussion"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Discussion</span> </div> </a> <ul id="toc-Discussion-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Maximum_entropy" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Maximum_entropy"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>Maximum entropy</span> </div> </a> <button aria-controls="toc-Maximum_entropy-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Maximum entropy subsection</span> </button> <ul id="toc-Maximum_entropy-sublist" class="vector-toc-list"> <li id="toc-Proof" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Proof"> <div class="vector-toc-text"> <span class="vector-toc-numb">9.1</span> <span>Proof</span> </div> </a> <ul id="toc-Proof-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Other_approaches" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Other_approaches"> <div class="vector-toc-text"> <span class="vector-toc-numb">9.2</span> <span>Other approaches</span> </div> </a> <ul id="toc-Other_approaches-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Comparison_with_linear_regression" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Comparison_with_linear_regression"> <div class="vector-toc-text"> <span class="vector-toc-numb">10</span> <span>Comparison with linear regression</span> </div> </a> <ul id="toc-Comparison_with_linear_regression-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Alternatives" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Alternatives"> <div class="vector-toc-text"> <span class="vector-toc-numb">11</span> <span>Alternatives</span> </div> </a> <ul id="toc-Alternatives-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-History" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#History"> <div class="vector-toc-text"> <span class="vector-toc-numb">12</span> <span>History</span> </div> </a> <ul id="toc-History-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Extensions" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Extensions"> <div class="vector-toc-text"> <span class="vector-toc-numb">13</span> <span>Extensions</span> </div> </a> <ul id="toc-Extensions-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">14</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">15</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Sources" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#Sources"> <div class="vector-toc-text"> <span class="vector-toc-numb">16</span> <span>Sources</span> </div> </a> <ul id="toc-Sources-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_links" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#External_links"> <div class="vector-toc-text"> <span class="vector-toc-numb">17</span> <span>External links</span> </div> </a> <ul id="toc-External_links-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" title="Table of Contents" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Logistic regression</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 25 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-25" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">25 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%A7%D9%86%D8%AD%D8%AF%D8%A7%D8%B1_%D9%84%D9%88%D8%AC%D8%B3%D8%AA%D9%8A" title="انحدار لوجستي – Arabic" lang="ar" hreflang="ar" data-title="انحدار لوجستي" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Regressi%C3%B3_log%C3%ADstica" title="Regressió logística – Catalan" lang="ca" hreflang="ca" data-title="Regressió logística" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Logistick%C3%A1_regrese" title="Logistická regrese – Czech" lang="cs" hreflang="cs" data-title="Logistická regrese" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Logistische_Regression" title="Logistische Regression – German" lang="de" hreflang="de" data-title="Logistische Regression" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-et mw-list-item"><a href="https://et.wikipedia.org/wiki/Logistiline_regressioon" title="Logistiline regressioon – Estonian" lang="et" hreflang="et" data-title="Logistiline regressioon" data-language-autonym="Eesti" data-language-local-name="Estonian" class="interlanguage-link-target"><span>Eesti</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Regresi%C3%B3n_log%C3%ADstica" title="Regresión logística – Spanish" lang="es" hreflang="es" data-title="Regresión logística" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Erregresio_logistiko" title="Erregresio logistiko – Basque" lang="eu" hreflang="eu" data-title="Erregresio logistiko" data-language-autonym="Euskara" data-language-local-name="Basque" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%B1%DA%AF%D8%B1%D8%B3%DB%8C%D9%88%D9%86_%D9%84%D8%AC%D8%B3%D8%AA%DB%8C%DA%A9" title="رگرسیون لجستیک – Persian" lang="fa" hreflang="fa" data-title="رگرسیون لجستیک" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/R%C3%A9gression_logistique" title="Régression logistique – French" lang="fr" hreflang="fr" data-title="Régression logistique" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EB%A1%9C%EC%A7%80%EC%8A%A4%ED%8B%B1_%ED%9A%8C%EA%B7%80" title="로지스틱 회귀 – Korean" lang="ko" hreflang="ko" data-title="로지스틱 회귀" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Regresi_logistik" title="Regresi logistik – Indonesian" lang="id" hreflang="id" data-title="Regresi logistik" data-language-autonym="Bahasa Indonesia" data-language-local-name="Indonesian" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Modello_logit" title="Modello logit – Italian" lang="it" hreflang="it" data-title="Modello logit" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%A8%D7%92%D7%A8%D7%A1%D7%99%D7%94_%D7%9C%D7%95%D7%92%D7%99%D7%A1%D7%98%D7%99%D7%AA" title="רגרסיה לוגיסטית – Hebrew" lang="he" hreflang="he" data-title="רגרסיה לוגיסטית" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Logistische_regressie" title="Logistische regressie – Dutch" lang="nl" hreflang="nl" data-title="Logistische regressie" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E3%83%AD%E3%82%B8%E3%82%B9%E3%83%86%E3%82%A3%E3%83%83%E3%82%AF%E5%9B%9E%E5%B8%B0" title="ロジスティック回帰 – Japanese" lang="ja" hreflang="ja" data-title="ロジスティック回帰" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Regresja_logistyczna" title="Regresja logistyczna – Polish" lang="pl" hreflang="pl" data-title="Regresja logistyczna" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Regress%C3%A3o_log%C3%ADstica" title="Regressão logística – Portuguese" lang="pt" hreflang="pt" data-title="Regressão logística" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%9B%D0%BE%D0%B3%D0%B8%D1%81%D1%82%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B0%D1%8F_%D1%80%D0%B5%D0%B3%D1%80%D0%B5%D1%81%D1%81%D0%B8%D1%8F" title="Логистическая регрессия – Russian" lang="ru" hreflang="ru" data-title="Логистическая регрессия" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Logistic_regression" title="Logistic regression – Simple English" lang="en-simple" hreflang="en-simple" data-title="Logistic regression" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Logistinen_regressio" title="Logistinen regressio – Finnish" lang="fi" hreflang="fi" data-title="Logistinen regressio" data-language-autonym="Suomi" data-language-local-name="Finnish" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Enkel_logistisk_regression" title="Enkel logistisk regression – Swedish" lang="sv" hreflang="sv" data-title="Enkel logistisk regression" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%96%E0%B8%94%E0%B8%96%E0%B8%AD%E0%B8%A2%E0%B9%82%E0%B8%A5%E0%B8%88%E0%B8%B4%E0%B8%AA%E0%B8%95%E0%B8%B4%E0%B8%81" title="การถดถอยโลจิสติก – Thai" lang="th" hreflang="th" data-title="การถดถอยโลจิสติก" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%9B%D0%BE%D0%B3%D1%96%D1%81%D1%82%D0%B8%D1%87%D0%BD%D0%B0_%D1%80%D0%B5%D0%B3%D1%80%D0%B5%D1%81%D1%96%D1%8F" title="Логістична регресія – Ukrainian" lang="uk" hreflang="uk" data-title="Логістична регресія" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E9%82%8F%E8%BC%AF%E8%BF%B4%E6%AD%B8" title="邏輯迴歸 – Cantonese" lang="yue" hreflang="yue" data-title="邏輯迴歸" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E9%82%8F%E8%BC%AF%E6%96%AF%E8%AB%A6%E8%BF%B4%E6%AD%B8" title="邏輯斯諦迴歸 – Chinese" lang="zh" hreflang="zh" data-title="邏輯斯諦迴歸" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q1132755#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Logistic_regression" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Logistic_regression" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Logistic_regression"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Logistic_regression&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Logistic_regression&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Logistic_regression"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Logistic_regression&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Logistic_regression&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Logistic_regression" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Logistic_regression" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Logistic_regression&oldid=1274853991" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Logistic_regression&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&page=Logistic_regression&id=1274853991&wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FLogistic_regression"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FLogistic_regression"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Logistic_regression&action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Logistic_regression&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Category:Logistic_regression" hreflang="en"><span>Wikimedia Commons</span></a></li><li class="wb-otherproject-link wb-otherproject-wikiversity mw-list-item"><a href="https://en.wikiversity.org/wiki/Logistic_regression" hreflang="en"><span>Wikiversity</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q1132755" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Statistical model for a binary dependent variable</div> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">"Logit model" redirects here. Not to be confused with <a href="/wiki/Logit_function" class="mw-redirect" title="Logit function">Logit function</a>.</div> <figure typeof="mw:File/Thumb"><a href="/wiki/File:Exam_pass_logistic_curve.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Exam_pass_logistic_curve.svg/400px-Exam_pass_logistic_curve.svg.png" decoding="async" width="400" height="277" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Exam_pass_logistic_curve.svg/600px-Exam_pass_logistic_curve.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Exam_pass_logistic_curve.svg/800px-Exam_pass_logistic_curve.svg.png 2x" data-file-width="609" data-file-height="421" /></a><figcaption>Example graph of a logistic regression curve fitted to data. The curve shows the estimated probability of passing an exam (binary dependent variable) versus hours studying (scalar independent variable). See <a href="#Example">§ Example</a> for worked details.</figcaption></figure> <p>In <a href="/wiki/Statistics" title="Statistics">statistics</a>, the <b>logistic model</b> (or <b>logit model</b>) is a <a href="/wiki/Statistical_model" title="Statistical model">statistical model</a> that models the <a href="/wiki/Logit" title="Logit">log-odds</a> of an event as a <a href="/wiki/Linear_function_(calculus)" title="Linear function (calculus)">linear combination</a> of one or more <a href="/wiki/Independent_variable" class="mw-redirect" title="Independent variable">independent variables</a>. In <a href="/wiki/Regression_analysis" title="Regression analysis">regression analysis</a>, <b>logistic regression</b><sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> (or <b>logit regression</b>) <a href="/wiki/Estimation_theory" title="Estimation theory">estimates</a> the parameters of a logistic model (the coefficients in the linear or non linear combinations). In binary logistic regression there is a single <a href="/wiki/Binary_variable" class="mw-redirect" title="Binary variable">binary</a> <a href="/wiki/Dependent_variable" class="mw-redirect" title="Dependent variable">dependent variable</a>, coded by an <a href="/wiki/Indicator_variable" class="mw-redirect" title="Indicator variable">indicator variable</a>, where the two values are labeled "0" and "1", while the <a href="/wiki/Independent_variable" class="mw-redirect" title="Independent variable">independent variables</a> can each be a binary variable (two classes, coded by an indicator variable) or a <a href="/wiki/Continuous_variable" class="mw-redirect" title="Continuous variable">continuous variable</a> (any real value). The corresponding probability of the value labeled "1" can vary between 0 (certainly the value "0") and 1 (certainly the value "1"), hence the labeling;<sup id="cite_ref-Hosmer_2-0" class="reference"><a href="#cite_note-Hosmer-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> the function that converts log-odds to probability is the <a href="/wiki/Logistic_function" title="Logistic function">logistic function</a>, hence the name. The <a href="/wiki/Unit_of_measurement" title="Unit of measurement">unit of measurement</a> for the log-odds scale is called a <i><a href="/wiki/Logit" title="Logit">logit</a></i>, from <i><b>log</b>istic un<b>it</b></i>, hence the alternative names. See <a href="#Background">§ Background</a> and <a href="#Definition">§ Definition</a> for formal mathematics, and <a href="#Example">§ Example</a> for a worked example. </p><p>Binary variables are widely used in statistics to model the probability of a certain class or event taking place, such as the probability of a team winning, of a patient being healthy, etc. (see <a href="#Applications">§ Applications</a>), and the logistic model has been the most commonly used model for <a href="/wiki/Binary_regression" title="Binary regression">binary regression</a> since about 1970.<sup id="cite_ref-FOOTNOTECramer200210–11_3-0" class="reference"><a href="#cite_note-FOOTNOTECramer200210–11-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> Binary variables can be generalized to <a href="/wiki/Categorical_variable" title="Categorical variable">categorical variables</a> when there are more than two possible values (e.g. whether an image is of a cat, dog, lion, etc.), and the binary logistic regression generalized to <a href="/wiki/Multinomial_logistic_regression" title="Multinomial logistic regression">multinomial logistic regression</a>. If the multiple categories are <a href="/wiki/Level_of_measurement#Ordinal_scale" title="Level of measurement">ordered</a>, one can use the <a href="/wiki/Ordinal_logistic_regression" class="mw-redirect" title="Ordinal logistic regression">ordinal logistic regression</a> (for example the proportional odds ordinal logistic model<sup id="cite_ref-wal67est_4-0" class="reference"><a href="#cite_note-wal67est-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>). See <a href="#Extensions">§ Extensions</a> for further extensions. The logistic regression model itself simply models probability of output in terms of input and does not perform <a href="/wiki/Statistical_classification" title="Statistical classification">statistical classification</a> (it is not a classifier), though it can be used to make a classifier, for instance by choosing a cutoff value and classifying inputs with probability greater than the cutoff as one class, below the cutoff as the other; this is a common way to make a <a href="/wiki/Binary_classifier" class="mw-redirect" title="Binary classifier">binary classifier</a>. </p><p>Analogous linear models for binary variables with a different <a href="/wiki/Sigmoid_function" title="Sigmoid function">sigmoid function</a> instead of the logistic function (to convert the linear combination to a probability) can also be used, most notably the <a href="/wiki/Probit_model" title="Probit model">probit model</a>; see <a href="#Alternatives">§ Alternatives</a>. The defining characteristic of the logistic model is that increasing one of the independent variables multiplicatively scales the odds of the given outcome at a <i>constant</i> rate, with each independent variable having its own parameter; for a binary dependent variable this generalizes the <a href="/wiki/Odds_ratio" title="Odds ratio">odds ratio</a>. More abstractly, the logistic function is the <a href="/wiki/Natural_parameter" class="mw-redirect" title="Natural parameter">natural parameter</a> for the <a href="/wiki/Bernoulli_distribution" title="Bernoulli distribution">Bernoulli distribution</a>, and in this sense is the "simplest" way to convert a real number to a probability. In particular, it maximizes entropy (minimizes added information), and in this sense makes the fewest assumptions of the data being modeled; see <a href="#Maximum_entropy">§ Maximum entropy</a>. </p><p>The parameters of a logistic regression are most commonly estimated by <a href="/wiki/Maximum-likelihood_estimation" class="mw-redirect" title="Maximum-likelihood estimation">maximum-likelihood estimation</a> (MLE). This does not have a closed-form expression, unlike <a href="/wiki/Linear_least_squares_(mathematics)" class="mw-redirect" title="Linear least squares (mathematics)">linear least squares</a>; see <a href="#Model_fitting">§ Model fitting</a>. Logistic regression by MLE plays a similarly basic role for binary or categorical responses as linear regression by <a href="/wiki/Ordinary_least_squares" title="Ordinary least squares">ordinary least squares</a> (OLS) plays for <a href="/wiki/Scalar_(mathematics)" title="Scalar (mathematics)">scalar</a> responses: it is a simple, well-analyzed baseline model; see <a href="#Comparison_with_linear_regression">§ Comparison with linear regression</a> for discussion. The logistic regression as a general statistical model was originally developed and popularized primarily by <a href="/wiki/Joseph_Berkson" title="Joseph Berkson">Joseph Berkson</a>,<sup id="cite_ref-FOOTNOTECramer20028_5-0" class="reference"><a href="#cite_note-FOOTNOTECramer20028-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> beginning in <a href="#CITEREFBerkson1944">Berkson (1944)</a>, where he coined "logit"; see <a href="#History">§ History</a>. </p> <style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1246091330">.mw-parser-output .sidebar{width:22em;float:right;clear:right;margin:0.5em 0 1em 1em;background:var(--background-color-neutral-subtle,#f8f9fa);border:1px solid var(--border-color-base,#a2a9b1);padding:0.2em;text-align:center;line-height:1.4em;font-size:88%;border-collapse:collapse;display:table}body.skin-minerva .mw-parser-output .sidebar{display:table!important;float:right!important;margin:0.5em 0 1em 1em!important}.mw-parser-output .sidebar-subgroup{width:100%;margin:0;border-spacing:0}.mw-parser-output .sidebar-left{float:left;clear:left;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-none{float:none;clear:both;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-outer-title{padding:0 0.4em 0.2em;font-size:125%;line-height:1.2em;font-weight:bold}.mw-parser-output .sidebar-top-image{padding:0.4em}.mw-parser-output .sidebar-top-caption,.mw-parser-output .sidebar-pretitle-with-top-image,.mw-parser-output .sidebar-caption{padding:0.2em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-pretitle{padding:0.4em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-title,.mw-parser-output .sidebar-title-with-pretitle{padding:0.2em 0.8em;font-size:145%;line-height:1.2em}.mw-parser-output .sidebar-title-with-pretitle{padding:0.1em 0.4em}.mw-parser-output .sidebar-image{padding:0.2em 0.4em 0.4em}.mw-parser-output .sidebar-heading{padding:0.1em 0.4em}.mw-parser-output .sidebar-content{padding:0 0.5em 0.4em}.mw-parser-output .sidebar-content-with-subgroup{padding:0.1em 0.4em 0.2em}.mw-parser-output .sidebar-above,.mw-parser-output .sidebar-below{padding:0.3em 0.8em;font-weight:bold}.mw-parser-output .sidebar-collapse .sidebar-above,.mw-parser-output .sidebar-collapse .sidebar-below{border-top:1px solid #aaa;border-bottom:1px solid #aaa}.mw-parser-output .sidebar-navbar{text-align:right;font-size:115%;padding:0 0.4em 0.4em}.mw-parser-output .sidebar-list-title{padding:0 0.4em;text-align:left;font-weight:bold;line-height:1.6em;font-size:105%}.mw-parser-output .sidebar-list-title-c{padding:0 0.4em;text-align:center;margin:0 3.3em}@media(max-width:640px){body.mediawiki .mw-parser-output .sidebar{width:100%!important;clear:both;float:none!important;margin-left:0!important;margin-right:0!important}}body.skin--responsive .mw-parser-output .sidebar a>img{max-width:none!important}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle{background:transparent!important}html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle a{color:var(--color-progressive)!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle{background:transparent!important}html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle a{color:var(--color-progressive)!important}}@media print{body.ns-0 .mw-parser-output .sidebar{display:none!important}}</style><table class="sidebar nomobile nowraplinks hlist"><tbody><tr><td class="sidebar-pretitle">Part of a series on</td></tr><tr><th class="sidebar-title-with-pretitle"><a href="/wiki/Regression_analysis" title="Regression analysis">Regression analysis</a></th></tr><tr><th class="sidebar-heading"> Models</th></tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/Linear_regression" title="Linear regression">Linear regression</a></li> <li><a href="/wiki/Simple_linear_regression" title="Simple linear regression">Simple regression</a></li> <li><a href="/wiki/Polynomial_regression" title="Polynomial regression">Polynomial regression</a></li> <li><a href="/wiki/General_linear_model" title="General linear model">General linear model</a></li></ul></td> </tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/Generalized_linear_model" title="Generalized linear model">Generalized linear model</a></li> <li><a href="/wiki/Vector_generalized_linear_model" title="Vector generalized linear model">Vector generalized linear model</a></li> <li><a href="/wiki/Discrete_choice" title="Discrete choice">Discrete choice</a></li> <li><a href="/wiki/Binomial_regression" title="Binomial regression">Binomial regression</a></li> <li><a href="/wiki/Binary_regression" title="Binary regression">Binary regression</a></li> <li><a class="mw-selflink selflink">Logistic regression</a></li> <li><a href="/wiki/Multinomial_logistic_regression" title="Multinomial logistic regression">Multinomial logistic regression</a></li> <li><a href="/wiki/Mixed_logit" title="Mixed logit">Mixed logit</a></li> <li><a href="/wiki/Probit_model" title="Probit model">Probit</a></li> <li><a href="/wiki/Multinomial_probit" title="Multinomial probit">Multinomial probit</a></li> <li><a href="/wiki/Ordered_logit" title="Ordered logit">Ordered logit</a></li> <li><a href="/wiki/Ordered_probit" class="mw-redirect" title="Ordered probit">Ordered probit</a></li> <li><a href="/wiki/Poisson_regression" title="Poisson regression">Poisson</a></li></ul></td> </tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/Multilevel_model" title="Multilevel model">Multilevel model</a></li> <li><a href="/wiki/Fixed_effects_model" title="Fixed effects model">Fixed effects</a></li> <li><a href="/wiki/Random_effects_model" title="Random effects model">Random effects</a></li> <li><a href="/wiki/Mixed_model" title="Mixed model">Linear mixed-effects model</a></li> <li><a href="/wiki/Nonlinear_mixed-effects_model" title="Nonlinear mixed-effects model">Nonlinear mixed-effects model</a></li></ul></td> </tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/Nonlinear_regression" title="Nonlinear regression">Nonlinear regression</a></li> <li><a href="/wiki/Nonparametric_regression" title="Nonparametric regression">Nonparametric</a></li> <li><a href="/wiki/Semiparametric_regression" title="Semiparametric regression">Semiparametric</a></li> <li><a href="/wiki/Robust_regression" title="Robust regression">Robust</a></li> <li><a href="/wiki/Quantile_regression" title="Quantile regression">Quantile</a></li> <li><a href="/wiki/Isotonic_regression" title="Isotonic regression">Isotonic</a></li> <li><a href="/wiki/Principal_component_regression" title="Principal component regression">Principal components</a></li> <li><a href="/wiki/Least-angle_regression" title="Least-angle regression">Least angle</a></li> <li><a href="/wiki/Local_regression" title="Local regression">Local</a></li> <li><a href="/wiki/Segmented_regression" title="Segmented regression">Segmented</a></li></ul></td> </tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/Errors-in-variables_models" class="mw-redirect" title="Errors-in-variables models">Errors-in-variables</a></li></ul></td> </tr><tr><th class="sidebar-heading"> Estimation</th></tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/Least_squares" title="Least squares">Least squares</a></li> <li><a href="/wiki/Linear_least_squares" title="Linear least squares">Linear</a></li> <li><a href="/wiki/Non-linear_least_squares" title="Non-linear least squares">Non-linear</a></li></ul></td> </tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/Ordinary_least_squares" title="Ordinary least squares">Ordinary</a></li> <li><a href="/wiki/Weighted_least_squares" title="Weighted least squares">Weighted</a></li> <li><a href="/wiki/Generalized_least_squares" title="Generalized least squares">Generalized</a></li> <li><a href="/wiki/Generalized_estimating_equation" title="Generalized estimating equation">Generalized estimating equation</a></li></ul></td> </tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/Partial_least_squares_regression" title="Partial least squares regression">Partial</a></li> <li><a href="/wiki/Total_least_squares" title="Total least squares">Total</a></li> <li><a href="/wiki/Non-negative_least_squares" title="Non-negative least squares">Non-negative</a></li> <li><a href="/wiki/Tikhonov_regularization" class="mw-redirect" title="Tikhonov regularization">Ridge regression</a></li> <li><a href="/wiki/Regularized_least_squares" title="Regularized least squares">Regularized</a></li></ul></td> </tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/Least_absolute_deviations" title="Least absolute deviations">Least absolute deviations</a></li> <li><a href="/wiki/Iteratively_reweighted_least_squares" title="Iteratively reweighted least squares">Iteratively reweighted</a></li> <li><a href="/wiki/Bayesian_linear_regression" title="Bayesian linear regression">Bayesian</a></li> <li><a href="/wiki/Bayesian_multivariate_linear_regression" title="Bayesian multivariate linear regression">Bayesian multivariate</a></li> <li><a href="/wiki/Least-squares_spectral_analysis" title="Least-squares spectral analysis">Least-squares spectral analysis</a></li></ul></td> </tr><tr><th class="sidebar-heading"> Background</th></tr><tr><td class="sidebar-content"> <ul><li><a href="/wiki/Regression_validation" title="Regression validation">Regression validation</a></li> <li><a href="/wiki/Mean_and_predicted_response" class="mw-redirect" title="Mean and predicted response">Mean and predicted response</a></li> <li><a href="/wiki/Errors_and_residuals" title="Errors and residuals">Errors and residuals</a></li> <li><a href="/wiki/Goodness_of_fit" title="Goodness of fit">Goodness of fit</a></li> <li><a href="/wiki/Studentized_residual" title="Studentized residual">Studentized residual</a></li> <li><a href="/wiki/Gauss%E2%80%93Markov_theorem" title="Gauss–Markov theorem">Gauss–Markov theorem</a></li></ul></td> </tr><tr><td class="sidebar-below"> <ul><li><span class="nowrap"><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Nuvola_apps_edu_mathematics_blue-p.svg" class="mw-file-description"><img alt="icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/28px-Nuvola_apps_edu_mathematics_blue-p.svg.png" decoding="async" width="28" height="28" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/42px-Nuvola_apps_edu_mathematics_blue-p.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/56px-Nuvola_apps_edu_mathematics_blue-p.svg.png 2x" data-file-width="128" data-file-height="128" /></a></span> </span><a href="/wiki/Portal:Mathematics" title="Portal:Mathematics">Mathematics portal</a></li></ul></td></tr><tr><td class="sidebar-navbar"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><style data-mw-deduplicate="TemplateStyles:r1239400231">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Regression_bar" title="Template:Regression bar"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Regression_bar" title="Template talk:Regression bar"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Regression_bar" title="Special:EditPage/Template:Regression bar"><abbr title="Edit this template">e</abbr></a></li></ul></div></td></tr></tbody></table> <style data-mw-deduplicate="TemplateStyles:r886046785">.mw-parser-output .toclimit-2 .toclevel-1 ul,.mw-parser-output .toclimit-3 .toclevel-2 ul,.mw-parser-output .toclimit-4 .toclevel-3 ul,.mw-parser-output .toclimit-5 .toclevel-4 ul,.mw-parser-output .toclimit-6 .toclevel-5 ul,.mw-parser-output .toclimit-7 .toclevel-6 ul{display:none}</style><div class="toclimit-3"><meta property="mw:PageProp/toc" /></div> <div class="mw-heading mw-heading2"><h2 id="Applications">Applications</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=1" title="Edit section: Applications"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="General">General</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=2" title="Edit section: General"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Logistic regression is used in various fields, including machine learning, most medical fields, and social sciences. For example, the Trauma and Injury Severity Score (<a href="/wiki/TRISS" class="mw-redirect" title="TRISS">TRISS</a>), which is widely used to predict mortality in injured patients, was originally developed by Boyd <i><abbr title="''et alia'', with others - usually other authors">et al.</abbr></i> using logistic regression.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> Many other medical scales used to assess severity of a patient have been developed using logistic regression.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> Logistic regression may be used to predict the risk of developing a given disease (e.g. <a href="/wiki/Diabetes_mellitus" class="mw-redirect" title="Diabetes mellitus">diabetes</a>; <a href="/wiki/Coronary_artery_disease" title="Coronary artery disease">coronary heart disease</a>), based on observed characteristics of the patient (age, sex, <a href="/wiki/Body_mass_index" title="Body mass index">body mass index</a>, results of various <a href="/wiki/Blood_test" title="Blood test">blood tests</a>, etc.).<sup id="cite_ref-Freedman09_11-0" class="reference"><a href="#cite_note-Freedman09-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> Another example might be to predict whether a Nepalese voter will vote Nepali Congress or Communist Party of Nepal or Any Other Party, based on age, income, sex, race, state of residence, votes in previous elections, etc.<sup id="cite_ref-rms_13-0" class="reference"><a href="#cite_note-rms-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> The technique can also be used in <a href="/wiki/Engineering" title="Engineering">engineering</a>, especially for predicting the probability of failure of a given process, system or product.<sup id="cite_ref-strano05_14-0" class="reference"><a href="#cite_note-strano05-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-safety_15-0" class="reference"><a href="#cite_note-safety-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup> It is also used in <a href="/wiki/Marketing" title="Marketing">marketing</a> applications such as prediction of a customer's propensity to purchase a product or halt a subscription, etc.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> In <a href="/wiki/Economics" title="Economics">economics</a>, it can be used to predict the likelihood of a person ending up in the labor force, and a business application would be to predict the likelihood of a homeowner defaulting on a <a href="/wiki/Mortgage" title="Mortgage">mortgage</a>. <a href="/wiki/Conditional_random_field" title="Conditional random field">Conditional random fields</a>, an extension of logistic regression to sequential data, are used in <a href="/wiki/Natural_language_processing" title="Natural language processing">natural language processing</a>. Disaster planners and engineers rely on these models to predict decision take by householders or building occupants in small-scale and large-scales evacuations, such as building fires, wildfires, hurricanes among others.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup> These models help in the development of reliable <a href="/wiki/Emergency_management" title="Emergency management">disaster managing plans</a> and safer design for the <a href="/wiki/Built_environment" title="Built environment">built environment</a>. </p> <div class="mw-heading mw-heading3"><h3 id="Supervised_machine_learning">Supervised machine learning</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=3" title="Edit section: Supervised machine learning"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Logistic regression is a <a href="/wiki/Supervised_machine_learning" class="mw-redirect" title="Supervised machine learning">supervised machine learning</a> algorithm widely used for <a href="/wiki/Binary_classification" title="Binary classification">binary classification</a> tasks, such as identifying whether an email is spam or not and diagnosing diseases by assessing the presence or absence of specific conditions based on patient test results. This approach utilizes the logistic (or sigmoid) function to transform a linear combination of input features into a probability value ranging between 0 and 1. This probability indicates the likelihood that a given input corresponds to one of two predefined categories. The essential mechanism of logistic regression is grounded in the logistic function's ability to model the probability of binary outcomes accurately. With its distinctive S-shaped curve, the logistic function effectively maps any real-valued number to a value within the 0 to 1 interval. This feature renders it particularly suitable for binary classification tasks, such as sorting emails into "spam" or "not spam". By calculating the probability that the dependent variable will be categorized into a specific group, logistic regression provides a probabilistic framework that supports informed decision-making.<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Example">Example</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=4" title="Edit section: Example"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Problem">Problem</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=5" title="Edit section: Problem"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>As a simple example, we can use a logistic regression with one explanatory variable and two categories to answer the following question: </p> <blockquote> <p>A group of 20 students spends between 0 and 6 hours studying for an exam. How does the number of hours spent studying affect the probability of the student passing the exam? </p> </blockquote> <p>The reason for using logistic regression for this problem is that the values of the dependent variable, pass and fail, while represented by "1" and "0", are not <a href="/wiki/Cardinal_number" title="Cardinal number">cardinal numbers</a>. If the problem was changed so that pass/fail was replaced with the grade 0–100 (cardinal numbers), then simple <a href="/wiki/Regression_analysis" title="Regression analysis">regression analysis</a> could be used. </p><p>The table shows the number of hours each student spent studying, and whether they passed (1) or failed (0). </p> <table class="wikitable"> <tbody><tr> <th>Hours (<i>x<sub>k</sub></i>) </th> <td>0.50</td> <td>0.75</td> <td>1.00</td> <td>1.25</td> <td>1.50</td> <td>1.75</td> <td>1.75</td> <td>2.00</td> <td>2.25</td> <td>2.50</td> <td>2.75</td> <td>3.00</td> <td>3.25</td> <td>3.50</td> <td>4.00</td> <td>4.25</td> <td>4.50</td> <td>4.75</td> <td>5.00</td> <td>5.50 </td></tr> <tr> <th>Pass (<i>y<sub>k</sub></i>) </th> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>1</td> <td>0</td> <td>1</td> <td>0</td> <td>1</td> <td>0</td> <td>1</td> <td>0</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1</td> <td>1 </td></tr></tbody></table> <p>We wish to fit a logistic function to the data consisting of the hours studied (<i>x<sub>k</sub></i>) and the outcome of the test (<i>y<sub>k</sub></i> =1 for pass, 0 for fail). The data points are indexed by the subscript <i>k</i> which runs from <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle k=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6c035ffa69b5bca8bf2d16c3da3aaad79a8bcbfa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.472ex; height:2.176ex;" alt="{\displaystyle k=1}"></span> to <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k=K=20}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>k</mi> <mo>=</mo> <mi>K</mi> <mo>=</mo> <mn>20</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle k=K=20}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3fe2074562c947708e8c6fc3be561a4bda8fe13b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:11.799ex; height:2.176ex;" alt="{\displaystyle k=K=20}"></span>. The <i>x</i> variable is called the "<a href="/wiki/Explanatory_variable" class="mw-redirect" title="Explanatory variable">explanatory variable</a>", and the <i>y</i> variable is called the "<a href="/wiki/Categorical_variable" title="Categorical variable">categorical variable</a>" consisting of two categories: "pass" or "fail" corresponding to the categorical values 1 and 0 respectively. </p> <div class="mw-heading mw-heading3"><h3 id="Model">Model</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=6" title="Edit section: Model"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure typeof="mw:File/Thumb"><a href="/wiki/File:Exam_pass_logistic_curve.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Exam_pass_logistic_curve.svg/400px-Exam_pass_logistic_curve.svg.png" decoding="async" width="400" height="277" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Exam_pass_logistic_curve.svg/600px-Exam_pass_logistic_curve.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Exam_pass_logistic_curve.svg/800px-Exam_pass_logistic_curve.svg.png 2x" data-file-width="609" data-file-height="421" /></a><figcaption>Graph of a logistic regression curve fitted to the (<i>x<sub>m</sub></i>,<i>y<sub>m</sub></i>) data. The curve shows the probability of passing an exam versus hours studying.</figcaption></figure> <p>The <a href="/wiki/Logistic_function" title="Logistic function">logistic function</a> is of the form: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(x)={\frac {1}{1+e^{-(x-\mu )/s}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo>−<!-- − --></mo> <mi>μ<!-- μ --></mi> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mi>s</mi> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(x)={\frac {1}{1+e^{-(x-\mu )/s}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/83175b453c5fe1104b867f6b9e25f4628f851778" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-left: -0.089ex; width:21.012ex; height:5.676ex;" alt="{\displaystyle p(x)={\frac {1}{1+e^{-(x-\mu )/s}}}}"></span></dd></dl> <p>where <i>μ</i> is a <a href="/wiki/Location_parameter" title="Location parameter">location parameter</a> (the midpoint of the curve, where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(\mu )=1/2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>μ<!-- μ --></mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(\mu )=1/2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8f4236caf59c2885fc3557b1e672dabdee0ae5ab" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:11.056ex; height:2.843ex;" alt="{\displaystyle p(\mu )=1/2}"></span>) and <i>s</i> is a <a href="/wiki/Scale_parameter" title="Scale parameter">scale parameter</a>. This expression may be rewritten as: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(x)={\frac {1}{1+e^{-(\beta _{0}+\beta _{1}x)}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mo stretchy="false">(</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(x)={\frac {1}{1+e^{-(\beta _{0}+\beta _{1}x)}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1dc4446600ce7fb020de7295e517ff24f4d18ccc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-left: -0.089ex; width:21.952ex; height:5.676ex;" alt="{\displaystyle p(x)={\frac {1}{1+e^{-(\beta _{0}+\beta _{1}x)}}}}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}=-\mu /s}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <mo>−<!-- − --></mo> <mi>μ<!-- μ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mi>s</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}=-\mu /s}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f9a88d7f038e142a8a06be28821a8dae238c7840" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.931ex; height:2.843ex;" alt="{\displaystyle \beta _{0}=-\mu /s}"></span> and is known as the <a href="/wiki/Vertical_intercept" class="mw-redirect" title="Vertical intercept">intercept</a> (it is the <i>vertical</i> intercept or <i>y</i>-intercept of the line <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=\beta _{0}+\beta _{1}x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=\beta _{0}+\beta _{1}x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3e648dba6a90fd70d788feff29f96e316a5c40ce" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:13.164ex; height:2.509ex;" alt="{\displaystyle y=\beta _{0}+\beta _{1}x}"></span>), and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}=1/s}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mi>s</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}=1/s}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5f8e89f89f612e89d4b68d6278eb844d85c01bcd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.884ex; height:2.843ex;" alt="{\displaystyle \beta _{1}=1/s}"></span> (inverse scale parameter or <a href="/wiki/Rate_parameter" class="mw-redirect" title="Rate parameter">rate parameter</a>): these are the <i>y</i>-intercept and slope of the log-odds as a function of <i>x</i>. Conversely, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mu =-\beta _{0}/\beta _{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>μ<!-- μ --></mi> <mo>=</mo> <mo>−<!-- − --></mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mu =-\beta _{0}/\beta _{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/03f0cbdc88f68c2e73110da3a7ae3cb5aa8a095e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.211ex; height:2.843ex;" alt="{\displaystyle \mu =-\beta _{0}/\beta _{1}}"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle s=1/\beta _{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>s</mi> <mo>=</mo> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle s=1/\beta _{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/023451f0376981695854349f2814300ea052c775" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.884ex; height:2.843ex;" alt="{\displaystyle s=1/\beta _{1}}"></span>. </p><p>Remark: This model is actually an oversimplification, since it assumes everybody will pass if they learn long enough (limit = 1). The limit value should be a variable parameter too, if you want to make it more realistic. </p> <div class="mw-heading mw-heading3"><h3 id="Fit">Fit</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=7" title="Edit section: Fit"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The usual measure of <a href="/wiki/Goodness_of_fit" title="Goodness of fit">goodness of fit</a> for a logistic regression uses <a href="/wiki/Logistic_loss" class="mw-redirect" title="Logistic loss">logistic loss</a> (or <a href="/wiki/Log_loss" class="mw-redirect" title="Log loss">log loss</a>), the negative <a href="/wiki/Log-likelihood" class="mw-redirect" title="Log-likelihood">log-likelihood</a>. For a given <i>x<sub>k</sub></i> and <i>y<sub>k</sub></i>, write <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{k}=p(x_{k})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mi>p</mi> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{k}=p(x_{k})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a6e639c58c4ea19013521ec809215f4d0574a03f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:10.843ex; height:2.843ex;" alt="{\displaystyle p_{k}=p(x_{k})}"></span>. The <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/01084a31964201514f3e6bd0136989e11ea6e58a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:2.348ex; height:2.009ex;" alt="{\displaystyle p_{k}}"></span>⁠</span> are the probabilities that the corresponding <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b2ab0248723a410cc2c67ce06ad5c043dcbb933" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.228ex; height:2.009ex;" alt="{\displaystyle y_{k}}"></span>⁠</span> will equal one and <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1-p_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1-p_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/09de1a1a6ffff0377302de2994b0c9806fc9cddf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.261ex; height:2.509ex;" alt="{\displaystyle 1-p_{k}}"></span>⁠</span> are the probabilities that they will be zero (see <a href="/wiki/Bernoulli_distribution" title="Bernoulli distribution">Bernoulli distribution</a>). We wish to find the values of <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/40b42f71f244103a8fca3c76885c7580a92831c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{0}}"></span>⁠</span> and <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eeeccd8b585b819e38f9c1fe5e9816a3ea01804c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{1}}"></span>⁠</span> which give the "best fit" to the data. In the case of linear regression, the sum of the squared deviations of the fit from the data points (<i>y<sub>k</sub></i>), the <a href="/wiki/Squared_error_loss" class="mw-redirect" title="Squared error loss">squared error loss</a>, is taken as a measure of the goodness of fit, and the best fit is obtained when that function is <i>minimized</i>. </p><p>The log loss for the <i>k</i>-th point <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ell _{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>ℓ<!-- ℓ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \ell _{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3e680d25f46737df0643f00b667f5529ab3c0a0b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.058ex; height:2.509ex;" alt="{\displaystyle \ell _{k}}"></span>⁠</span> is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ell _{k}={\begin{cases}-\ln p_{k}&{\text{ if }}y_{k}=1,\\-\ln(1-p_{k})&{\text{ if }}y_{k}=0.\end{cases}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>ℓ<!-- ℓ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mo>−<!-- − --></mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext> if </mtext> </mrow> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mo>−<!-- − --></mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext> if </mtext> </mrow> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>0.</mn> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \ell _{k}={\begin{cases}-\ln p_{k}&{\text{ if }}y_{k}=1,\\-\ln(1-p_{k})&{\text{ if }}y_{k}=0.\end{cases}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/97117df7437bcf5b810e6336111c9cdc9e0e3279" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:31.835ex; height:6.176ex;" alt="{\displaystyle \ell _{k}={\begin{cases}-\ln p_{k}&{\text{ if }}y_{k}=1,\\-\ln(1-p_{k})&{\text{ if }}y_{k}=0.\end{cases}}}"></span></dd></dl> <p>The log loss can be interpreted as the "<a href="/wiki/Surprisal" class="mw-redirect" title="Surprisal">surprisal</a>" of the actual outcome <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b2ab0248723a410cc2c67ce06ad5c043dcbb933" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.228ex; height:2.009ex;" alt="{\displaystyle y_{k}}"></span>⁠</span> relative to the prediction <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/01084a31964201514f3e6bd0136989e11ea6e58a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:2.348ex; height:2.009ex;" alt="{\displaystyle p_{k}}"></span>⁠</span>, and is a measure of <a href="/wiki/Information_content" title="Information content">information content</a>. Log loss is always greater than or equal to 0, equals 0 only in case of a perfect prediction (i.e., when <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{k}=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{k}=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/90de42f34f1a88d8e8b35345138e26946194ac7d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:6.608ex; height:2.509ex;" alt="{\displaystyle p_{k}=1}"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y_{k}=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y_{k}=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2709a8017a902166c87d33778a7d535c58033df8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.489ex; height:2.509ex;" alt="{\displaystyle y_{k}=1}"></span>, or <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{k}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{k}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/93aefef6d6c29b18697ba615307674dcf471586a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:6.608ex; height:2.509ex;" alt="{\displaystyle p_{k}=0}"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y_{k}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y_{k}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/77d4a6bf47eb89fbc345289ef5c264485cc93622" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.489ex; height:2.509ex;" alt="{\displaystyle y_{k}=0}"></span>), and approaches infinity as the prediction gets worse (i.e., when <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y_{k}=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y_{k}=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2709a8017a902166c87d33778a7d535c58033df8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.489ex; height:2.509ex;" alt="{\displaystyle y_{k}=1}"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{k}\to 0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">→<!-- → --></mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{k}\to 0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/df161288b235ddcc0d899f80430bfe8b078b7caf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:7.124ex; height:2.509ex;" alt="{\displaystyle p_{k}\to 0}"></span> or <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y_{k}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y_{k}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/77d4a6bf47eb89fbc345289ef5c264485cc93622" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.489ex; height:2.509ex;" alt="{\displaystyle y_{k}=0}"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{k}\to 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">→<!-- → --></mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{k}\to 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a648aae9291a5490c91d89f4a3b644561d09b5dc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:7.124ex; height:2.509ex;" alt="{\displaystyle p_{k}\to 1}"></span>), meaning the actual outcome is "more surprising". Since the value of the logistic function is always strictly between zero and one, the log loss is always greater than zero and less than infinity. Unlike in a linear regression, where the model can have zero loss at a point by passing through a data point (and zero loss overall if all points are on a line), in a logistic regression it is not possible to have zero loss at any points, since <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b2ab0248723a410cc2c67ce06ad5c043dcbb933" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.228ex; height:2.009ex;" alt="{\displaystyle y_{k}}"></span>⁠</span> is either 0 or 1, but <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0<p_{k}<1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> <mo><</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo><</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0<p_{k}<1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/31eaa37a6055c0773f54ff0f20ab86939f07b4dd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:10.78ex; height:2.509ex;" alt="{\displaystyle 0<p_{k}<1}"></span>⁠</span>. </p><p>These can be combined into a single expression: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ell _{k}=-y_{k}\ln p_{k}-(1-y_{k})\ln(1-p_{k}).}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>ℓ<!-- ℓ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mo>−<!-- − --></mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mi>ln</mi> <mo>⁡<!-- --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>−<!-- − --></mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \ell _{k}=-y_{k}\ln p_{k}-(1-y_{k})\ln(1-p_{k}).}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c34dd2e190d3c19a42740d3dc0815adea691992d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:36.089ex; height:2.843ex;" alt="{\displaystyle \ell _{k}=-y_{k}\ln p_{k}-(1-y_{k})\ln(1-p_{k}).}"></span></dd></dl> <p>This expression is more formally known as the <a href="/wiki/Cross-entropy" title="Cross-entropy">cross-entropy</a> of the predicted distribution <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\big (}p_{k},(1-p_{k}){\big )}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> </mrow> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>,</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\big (}p_{k},(1-p_{k}){\big )}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/627bed511aebad985f1d99b8397a37c51f256abc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:13.492ex; height:3.176ex;" alt="{\displaystyle {\big (}p_{k},(1-p_{k}){\big )}}"></span> from the actual distribution <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\big (}y_{k},(1-y_{k}){\big )}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">(</mo> </mrow> </mrow> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>,</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo maxsize="1.2em" minsize="1.2em">)</mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\big (}y_{k},(1-y_{k}){\big )}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9030b73a136b5c553f41037e8ddc938019db4dcc" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:13.432ex; height:3.176ex;" alt="{\displaystyle {\big (}y_{k},(1-y_{k}){\big )}}"></span>, as probability distributions on the two-element space of (pass, fail). </p><p>The sum of these, the total loss, is the overall negative log-likelihood <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle -\ell }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>−<!-- − --></mo> <mi>ℓ<!-- ℓ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle -\ell }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6617a5bac8bc1d6dd6ab60bfbcf20850fb5061e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:2.778ex; height:2.343ex;" alt="{\displaystyle -\ell }"></span>⁠</span>, and the best fit is obtained for those choices of <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/40b42f71f244103a8fca3c76885c7580a92831c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{0}}"></span>⁠</span> and <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eeeccd8b585b819e38f9c1fe5e9816a3ea01804c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{1}}"></span>⁠</span> for which <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle -\ell }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>−<!-- − --></mo> <mi>ℓ<!-- ℓ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle -\ell }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6617a5bac8bc1d6dd6ab60bfbcf20850fb5061e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:2.778ex; height:2.343ex;" alt="{\displaystyle -\ell }"></span>⁠</span> is <i>minimized</i>. </p><p>Alternatively, instead of <i>minimizing</i> the loss, one can <i>maximize</i> its inverse, the (positive) log-likelihood: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ell =\sum _{k:y_{k}=1}\ln(p_{k})+\sum _{k:y_{k}=0}\ln(1-p_{k})=\sum _{k=1}^{K}\left(\,y_{k}\ln(p_{k})+(1-y_{k})\ln(1-p_{k})\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>ℓ<!-- ℓ --></mi> <mo>=</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>:</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> </mrow> </munder> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>+</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>:</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>0</mn> </mrow> </munder> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mrow> <mo>(</mo> <mrow> <mspace width="thinmathspace" /> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>+</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \ell =\sum _{k:y_{k}=1}\ln(p_{k})+\sum _{k:y_{k}=0}\ln(1-p_{k})=\sum _{k=1}^{K}\left(\,y_{k}\ln(p_{k})+(1-y_{k})\ln(1-p_{k})\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8c6c75d57410239f9e2af79cc300f362e3240964" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.505ex; width:72.794ex; height:7.843ex;" alt="{\displaystyle \ell =\sum _{k:y_{k}=1}\ln(p_{k})+\sum _{k:y_{k}=0}\ln(1-p_{k})=\sum _{k=1}^{K}\left(\,y_{k}\ln(p_{k})+(1-y_{k})\ln(1-p_{k})\right)}"></span></dd></dl> <p>or equivalently maximize the <a href="/wiki/Likelihood_function" title="Likelihood function">likelihood function</a> itself, which is the probability that the given data set is produced by a particular logistic function: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle L=\prod _{k:y_{k}=1}p_{k}\,\prod _{k:y_{k}=0}(1-p_{k})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>L</mi> <mo>=</mo> <munder> <mo>∏<!-- ∏ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>:</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> </mrow> </munder> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mspace width="thinmathspace" /> <munder> <mo>∏<!-- ∏ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>:</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>0</mn> </mrow> </munder> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle L=\prod _{k:y_{k}=1}p_{k}\,\prod _{k:y_{k}=0}(1-p_{k})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a21f31aeb66d5840584ea61b6ddc0b06aa93d89c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.505ex; width:26.33ex; height:6.009ex;" alt="{\displaystyle L=\prod _{k:y_{k}=1}p_{k}\,\prod _{k:y_{k}=0}(1-p_{k})}"></span></dd></dl> <p>This method is known as <a href="/wiki/Maximum_likelihood_estimation" title="Maximum likelihood estimation">maximum likelihood estimation</a>. </p> <div class="mw-heading mw-heading3"><h3 id="Parameter_estimation">Parameter estimation</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=8" title="Edit section: Parameter estimation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Since <i>ℓ</i> is nonlinear in <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/40b42f71f244103a8fca3c76885c7580a92831c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{0}}"></span>⁠</span> and <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eeeccd8b585b819e38f9c1fe5e9816a3ea01804c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{1}}"></span>⁠</span>, determining their optimum values will require numerical methods. One method of maximizing <i>ℓ</i> is to require the derivatives of <i>ℓ</i> with respect to <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/40b42f71f244103a8fca3c76885c7580a92831c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{0}}"></span>⁠</span> and <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eeeccd8b585b819e38f9c1fe5e9816a3ea01804c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{1}}"></span>⁠</span> to be zero: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0={\frac {\partial \ell }{\partial \beta _{0}}}=\sum _{k=1}^{K}(y_{k}-p_{k})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <mi>ℓ<!-- ℓ --></mi> </mrow> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mrow> </mfrac> </mrow> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mo stretchy="false">(</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0={\frac {\partial \ell }{\partial \beta _{0}}}=\sum _{k=1}^{K}(y_{k}-p_{k})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/964c55ab8e54a715333492ef58dda69488def060" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:24.374ex; height:7.343ex;" alt="{\displaystyle 0={\frac {\partial \ell }{\partial \beta _{0}}}=\sum _{k=1}^{K}(y_{k}-p_{k})}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0={\frac {\partial \ell }{\partial \beta _{1}}}=\sum _{k=1}^{K}(y_{k}-p_{k})x_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>0</mn> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <mi>ℓ<!-- ℓ --></mi> </mrow> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mrow> </mfrac> </mrow> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mo stretchy="false">(</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 0={\frac {\partial \ell }{\partial \beta _{1}}}=\sum _{k=1}^{K}(y_{k}-p_{k})x_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d82d3adab06ee7eec93aab871784111149d873c1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:26.793ex; height:7.343ex;" alt="{\displaystyle 0={\frac {\partial \ell }{\partial \beta _{1}}}=\sum _{k=1}^{K}(y_{k}-p_{k})x_{k}}"></span></dd></dl> <p>and the maximization procedure can be accomplished by solving the above two equations for <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/40b42f71f244103a8fca3c76885c7580a92831c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{0}}"></span>⁠</span> and <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eeeccd8b585b819e38f9c1fe5e9816a3ea01804c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{1}}"></span>⁠</span>, which, again, will generally require the use of numerical methods. </p><p>The values of <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/40b42f71f244103a8fca3c76885c7580a92831c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{0}}"></span>⁠</span> and <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eeeccd8b585b819e38f9c1fe5e9816a3ea01804c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{1}}"></span>⁠</span> which maximize <i>ℓ</i> and <i>L</i> using the above data are found to be: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}\approx -4.1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>≈<!-- ≈ --></mo> <mo>−<!-- − --></mo> <mn>4.1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}\approx -4.1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/dcdcbfeb3edc7d74a0fc94283b4058c55af4c0c1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:10.248ex; height:2.509ex;" alt="{\displaystyle \beta _{0}\approx -4.1}"></span></dd> <dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}\approx 1.5}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>≈<!-- ≈ --></mo> <mn>1.5</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}\approx 1.5}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e02b2605c1cfa91b8d33018a6c57c25d607d722a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.44ex; height:2.509ex;" alt="{\displaystyle \beta _{1}\approx 1.5}"></span></dd></dl> <p>which yields a value for <i>μ</i> and <i>s</i> of: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mu =-\beta _{0}/\beta _{1}\approx 2.7}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>μ<!-- μ --></mi> <mo>=</mo> <mo>−<!-- − --></mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>≈<!-- ≈ --></mo> <mn>2.7</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mu =-\beta _{0}/\beta _{1}\approx 2.7}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/962baa9c4e4a3ac68b40cb3db3ce07bcd1c63704" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.281ex; height:2.843ex;" alt="{\displaystyle \mu =-\beta _{0}/\beta _{1}\approx 2.7}"></span></dd> <dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle s=1/\beta _{1}\approx 0.67}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>s</mi> <mo>=</mo> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>≈<!-- ≈ --></mo> <mn>0.67</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle s=1/\beta _{1}\approx 0.67}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8cda4c1d56dda01ee05d06c7a763b6e93b369746" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.116ex; height:2.843ex;" alt="{\displaystyle s=1/\beta _{1}\approx 0.67}"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Predictions">Predictions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=9" title="Edit section: Predictions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/40b42f71f244103a8fca3c76885c7580a92831c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{0}}"></span>⁠</span> and <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eeeccd8b585b819e38f9c1fe5e9816a3ea01804c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{1}}"></span>⁠</span> coefficients may be entered into the logistic regression equation to estimate the probability of passing the exam. </p><p>For example, for a student who studies 2 hours, entering the value <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x=2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mo>=</mo> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x=2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9f39b6e42e5ffb81ac7b051b9e48b9a91d0713c7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.591ex; height:2.176ex;" alt="{\displaystyle x=2}"></span> into the equation gives the estimated probability of passing the exam of 0.25: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t=\beta _{0}+2\beta _{1}\approx -4.1+2\cdot 1.5=-1.1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <mn>2</mn> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>≈<!-- ≈ --></mo> <mo>−<!-- − --></mo> <mn>4.1</mn> <mo>+</mo> <mn>2</mn> <mo>⋅<!-- ⋅ --></mo> <mn>1.5</mn> <mo>=</mo> <mo>−<!-- − --></mo> <mn>1.1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t=\beta _{0}+2\beta _{1}\approx -4.1+2\cdot 1.5=-1.1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b5edf5ba40446b6e6d4be2cc1e6a64e889ff1db8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:37.091ex; height:2.509ex;" alt="{\displaystyle t=\beta _{0}+2\beta _{1}\approx -4.1+2\cdot 1.5=-1.1}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p={\frac {1}{1+e^{-t}}}\approx 0.25={\text{Probability of passing exam}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>t</mi> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>≈<!-- ≈ --></mo> <mn>0.25</mn> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext>Probability of passing exam</mtext> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p={\frac {1}{1+e^{-t}}}\approx 0.25={\text{Probability of passing exam}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9dbf376d7afe7fbe897445d51e0840150334965e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.171ex; margin-left: -0.089ex; width:50.556ex; height:5.509ex;" alt="{\displaystyle p={\frac {1}{1+e^{-t}}}\approx 0.25={\text{Probability of passing exam}}}"></span></dd></dl> <p>Similarly, for a student who studies 4 hours, the estimated probability of passing the exam is 0.87: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t=\beta _{0}+4\beta _{1}\approx -4.1+4\cdot 1.5=1.9}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <mn>4</mn> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>≈<!-- ≈ --></mo> <mo>−<!-- − --></mo> <mn>4.1</mn> <mo>+</mo> <mn>4</mn> <mo>⋅<!-- ⋅ --></mo> <mn>1.5</mn> <mo>=</mo> <mn>1.9</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t=\beta _{0}+4\beta _{1}\approx -4.1+4\cdot 1.5=1.9}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a2bd263ae962b9a535e378abeb57fce6072639f9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:35.283ex; height:2.509ex;" alt="{\displaystyle t=\beta _{0}+4\beta _{1}\approx -4.1+4\cdot 1.5=1.9}"></span></dd></dl> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p={\frac {1}{1+e^{-t}}}\approx 0.87={\text{Probability of passing exam}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>t</mi> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>≈<!-- ≈ --></mo> <mn>0.87</mn> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext>Probability of passing exam</mtext> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p={\frac {1}{1+e^{-t}}}\approx 0.87={\text{Probability of passing exam}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/23cfa4fe3ae2b38e9b5cf2a300fc02b078007b85" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.171ex; margin-left: -0.089ex; width:50.556ex; height:5.509ex;" alt="{\displaystyle p={\frac {1}{1+e^{-t}}}\approx 0.87={\text{Probability of passing exam}}}"></span></dd></dl> <p>This table shows the estimated probability of passing the exam for several values of hours studying. </p> <table class="wikitable"> <tbody><tr> <th rowspan="2">Hours<br />of study<br />(x) </th> <th colspan="3">Passing exam </th></tr> <tr> <th>Log-odds (t)</th> <th>Odds (e<sup>t</sup>)</th> <th>Probability (p) </th></tr> <tr style="text-align: right;"> <td>1</td> <td>−2.57</td> <td>0.076 ≈ 1:13.1</td> <td>0.07 </td></tr> <tr style="text-align: right;"> <td>2</td> <td>−1.07</td> <td>0.34 ≈ 1:2.91</td> <td>0.26 </td></tr> <tr style="text-align: right;"> <td><span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mu \approx 2.7}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>μ<!-- μ --></mi> <mo>≈<!-- ≈ --></mo> <mn>2.7</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mu \approx 2.7}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/05f97d06132ed8211c0773f3039e39f7c420ca54" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.472ex; height:2.676ex;" alt="{\displaystyle \mu \approx 2.7}"></span>⁠</span></td> <td>0</td> <td>1</td> <td><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\tfrac {1}{2}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mstyle> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\tfrac {1}{2}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/edef8290613648790a8ac1a95c2fb7c3972aea2f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:1.658ex; height:3.509ex;" alt="{\displaystyle {\tfrac {1}{2}}}"></span> = 0.50 </td></tr> <tr style="text-align: right;"> <td>3</td> <td>0.44</td> <td>1.55</td> <td>0.61 </td></tr> <tr style="text-align: right;"> <td>4</td> <td>1.94</td> <td>6.96</td> <td>0.87 </td></tr> <tr style="text-align: right;"> <td>5</td> <td>3.45</td> <td>31.4</td> <td>0.97 </td></tr></tbody></table> <div class="mw-heading mw-heading3"><h3 id="Model_evaluation">Model evaluation</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=10" title="Edit section: Model evaluation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The logistic regression analysis gives the following output. </p> <table class="wikitable"> <tbody><tr> <th></th> <th>Coefficient</th> <th>Std. Error</th> <th><i>z</i>-value</th> <th><i>p</i>-value (Wald) </th></tr> <tr style="text-align:right;"> <th>Intercept (<i>β</i><sub>0</sub>) </th> <td>−4.1</td> <td>1.8</td> <td>−2.3</td> <td>0.021 </td></tr> <tr style="text-align:right;"> <th>Hours (<i>β</i><sub>1</sub>) </th> <td>1.5</td> <td>0.9 </td> <td>2.4</td> <td>0.017 </td></tr></tbody></table> <p>By the <a href="/wiki/Wald_test" title="Wald test">Wald test</a>, the output indicates that hours studying is significantly associated with the probability of passing the exam (<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p=0.017}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo>=</mo> <mn>0.017</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p=0.017}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8c6f0823f25327875a426b5a17cf437689a2bca7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:9.654ex; height:2.509ex;" alt="{\displaystyle p=0.017}"></span>). Rather than the Wald method, the recommended method<sup id="cite_ref-NeymanPearson1933_21-0" class="reference"><a href="#cite_note-NeymanPearson1933-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup> to calculate the <i>p</i>-value for logistic regression is the <a href="/wiki/Likelihood-ratio_test" title="Likelihood-ratio test">likelihood-ratio test</a> (LRT), which for these data give <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p\approx 0.00064}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo>≈<!-- ≈ --></mo> <mn>0.00064</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p\approx 0.00064}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/665cfd8defe5d7384dc615c2cbb5264170b5266d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:11.979ex; height:2.509ex;" alt="{\displaystyle p\approx 0.00064}"></span> (see <a href="#Deviance_and_likelihood_ratio_tests">§ Deviance and likelihood ratio tests</a> below). </p> <div class="mw-heading mw-heading3"><h3 id="Generalizations">Generalizations</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=11" title="Edit section: Generalizations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This simple model is an example of binary logistic regression, and has one explanatory variable and a binary categorical variable which can assume one of two categorical values. <a href="/wiki/Multinomial_logistic_regression" title="Multinomial logistic regression">Multinomial logistic regression</a> is the generalization of binary logistic regression to include any number of explanatory variables and any number of categories. </p> <div class="mw-heading mw-heading2"><h2 id="Background">Background</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=12" title="Edit section: Background"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Logistic-curve.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/8/88/Logistic-curve.svg/320px-Logistic-curve.svg.png" decoding="async" width="320" height="213" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/8/88/Logistic-curve.svg/480px-Logistic-curve.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/8/88/Logistic-curve.svg/640px-Logistic-curve.svg.png 2x" data-file-width="600" data-file-height="400" /></a><figcaption>Figure 1. The standard logistic function <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sigma (t)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>σ<!-- σ --></mi> <mo stretchy="false">(</mo> <mi>t</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sigma (t)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/37d0ec2fbe49749b21f2d391656ef60cfb269735" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.979ex; height:2.843ex;" alt="{\displaystyle \sigma (t)}"></span>; <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sigma (t)\in (0,1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>σ<!-- σ --></mi> <mo stretchy="false">(</mo> <mi>t</mi> <mo stretchy="false">)</mo> <mo>∈<!-- ∈ --></mo> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sigma (t)\in (0,1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5daec00a45ed0a0231be48d3f99ab5fc8b361d6c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.987ex; height:2.843ex;" alt="{\displaystyle \sigma (t)\in (0,1)}"></span> for all <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/65658b7b223af9e1acc877d848888ecdb4466560" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}"></span>.</figcaption></figure> <div class="mw-heading mw-heading3"><h3 id="Definition_of_the_logistic_function">Definition of the logistic function</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=13" title="Edit section: Definition of the logistic function"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>An explanation of logistic regression can begin with an explanation of the standard <a href="/wiki/Logistic_function" title="Logistic function">logistic function</a>. The logistic function is a <a href="/wiki/Sigmoid_function" title="Sigmoid function">sigmoid function</a>, which takes any <a href="/wiki/Real_number" title="Real number">real</a> input <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/65658b7b223af9e1acc877d848888ecdb4466560" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}"></span>, and outputs a value between zero and one.<sup id="cite_ref-Hosmer_2-1" class="reference"><a href="#cite_note-Hosmer-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> For the logit, this is interpreted as taking input <a href="/wiki/Log-odds" class="mw-redirect" title="Log-odds">log-odds</a> and having output <a href="/wiki/Probability" title="Probability">probability</a>. The <i>standard</i> logistic function <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sigma :\mathbb {R} \rightarrow (0,1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>σ<!-- σ --></mi> <mo>:</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">R</mi> </mrow> <mo stretchy="false">→<!-- → --></mo> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sigma :\mathbb {R} \rightarrow (0,1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/327e60eac9c4e38d6d67fd4864645758a29b43a5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.727ex; height:2.843ex;" alt="{\displaystyle \sigma :\mathbb {R} \rightarrow (0,1)}"></span> is defined as follows: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sigma (t)={\frac {e^{t}}{e^{t}+1}}={\frac {1}{1+e^{-t}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>σ<!-- σ --></mi> <mo stretchy="false">(</mo> <mi>t</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>t</mi> </mrow> </msup> <mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>t</mi> </mrow> </msup> <mo>+</mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>t</mi> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sigma (t)={\frac {e^{t}}{e^{t}+1}}={\frac {1}{1+e^{-t}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5e648e1dd38ef843d57777cd34c67465bbca694f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.171ex; width:24.951ex; height:5.843ex;" alt="{\displaystyle \sigma (t)={\frac {e^{t}}{e^{t}+1}}={\frac {1}{1+e^{-t}}}}"></span></dd></dl> <p>A graph of the logistic function on the <i>t</i>-interval (−6,6) is shown in Figure 1. </p><p>Let us assume that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/65658b7b223af9e1acc877d848888ecdb4466560" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}"></span> is a linear function of a single <a href="/wiki/Dependent_and_independent_variables" title="Dependent and independent variables">explanatory variable</a> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}"></span> (the case where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/65658b7b223af9e1acc877d848888ecdb4466560" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}"></span> is a <i>linear combination</i> of multiple explanatory variables is treated similarly). We can then express <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/65658b7b223af9e1acc877d848888ecdb4466560" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}"></span> as follows: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t=\beta _{0}+\beta _{1}x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t=\beta _{0}+\beta _{1}x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/836d93163447344be4715ec00638c1cd829e376c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:12.848ex; height:2.509ex;" alt="{\displaystyle t=\beta _{0}+\beta _{1}x}"></span></dd></dl> <p>And the general logistic function <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p:\mathbb {R} \rightarrow (0,1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo>:</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">R</mi> </mrow> <mo stretchy="false">→<!-- → --></mo> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p:\mathbb {R} \rightarrow (0,1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4687bcc1936d9b9a4d1562edeb8dc58b34519821" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:13.656ex; height:2.843ex;" alt="{\displaystyle p:\mathbb {R} \rightarrow (0,1)}"></span> can now be written as: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(x)=\sigma (t)={\frac {1}{1+e^{-(\beta _{0}+\beta _{1}x)}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>σ<!-- σ --></mi> <mo stretchy="false">(</mo> <mi>t</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mo stretchy="false">(</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(x)=\sigma (t)={\frac {1}{1+e^{-(\beta _{0}+\beta _{1}x)}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e376fe69caee24c914fab1360de36900b7bb9c24" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-left: -0.089ex; width:29.029ex; height:5.676ex;" alt="{\displaystyle p(x)=\sigma (t)={\frac {1}{1+e^{-(\beta _{0}+\beta _{1}x)}}}}"></span></dd></dl> <p>In the logistic model, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8cb7afced134ef75572e5314a5d278c2d644f438" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:4.398ex; height:2.843ex;" alt="{\displaystyle p(x)}"></span> is interpreted as the probability of the dependent variable <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/961d67d6b454b4df2301ac571808a3538b3a6d3f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.171ex; width:1.773ex; height:2.009ex;" alt="{\displaystyle Y}"></span> equaling a success/case rather than a failure/non-case. It is clear that the <a href="/wiki/Dependent_and_independent_variables" title="Dependent and independent variables">response variables</a> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Y_{i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Y_{i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d57be496fff95ee2a97ee43c7f7fe244b4dbf8ae" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.15ex; height:2.509ex;" alt="{\displaystyle Y_{i}}"></span> are not identically distributed: <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P(Y_{i}=1\mid X)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>P</mi> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle P(Y_{i}=1\mid X)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6b15fb14aa841ab1d415b65d2058f0c1212e9125" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.883ex; height:2.843ex;" alt="{\displaystyle P(Y_{i}=1\mid X)}"></span> differs from one data point <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle X_{i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>X</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle X_{i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/af4a0955af42beb5f85aa05fb8c07abedc13990d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.724ex; height:2.509ex;" alt="{\displaystyle X_{i}}"></span> to another, though they are independent given <a href="/wiki/Design_matrix" title="Design matrix">design matrix</a> <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle X}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>X</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle X}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/68baa052181f707c662844a465bfeeb135e82bab" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.98ex; height:2.176ex;" alt="{\displaystyle X}"></span> and shared parameters <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>β<!-- β --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7ed48a5e36207156fb792fa79d29925d2f7901e8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.332ex; height:2.509ex;" alt="{\displaystyle \beta }"></span>.<sup id="cite_ref-Freedman09_11-1" class="reference"><a href="#cite_note-Freedman09-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Definition_of_the_inverse_of_the_logistic_function">Definition of the inverse of the logistic function</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=14" title="Edit section: Definition of the inverse of the logistic function"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>We can now define the <a href="/wiki/Logit" title="Logit">logit</a> (log odds) function as the inverse <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g=\sigma ^{-1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> <mo>=</mo> <msup> <mi>σ<!-- σ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g=\sigma ^{-1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/74af9b48e275a7ed04881fe9e406306500bd7dd6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:7.878ex; height:3.009ex;" alt="{\displaystyle g=\sigma ^{-1}}"></span> of the standard logistic function. It is easy to see that it satisfies: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g(p(x))=\sigma ^{-1}(p(x))=\operatorname {logit} p(x)=\ln \left({\frac {p(x)}{1-p(x)}}\right)=\beta _{0}+\beta _{1}x,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> <mo stretchy="false">(</mo> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>=</mo> <msup> <mi>σ<!-- σ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> <mo stretchy="false">(</mo> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>=</mo> <mi>logit</mi> <mo>⁡<!-- --></mo> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g(p(x))=\sigma ^{-1}(p(x))=\operatorname {logit} p(x)=\ln \left({\frac {p(x)}{1-p(x)}}\right)=\beta _{0}+\beta _{1}x,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d5e8b239c25debd50d089a064d3b902c21391575" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:62.692ex; height:6.509ex;" alt="{\displaystyle g(p(x))=\sigma ^{-1}(p(x))=\operatorname {logit} p(x)=\ln \left({\frac {p(x)}{1-p(x)}}\right)=\beta _{0}+\beta _{1}x,}"></span></dd></dl> <p>and equivalently, after exponentiating both sides we have the odds: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {p(x)}{1-p(x)}}=e^{\beta _{0}+\beta _{1}x}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {p(x)}{1-p(x)}}=e^{\beta _{0}+\beta _{1}x}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/504648d8b5e4bc600a26f4094d13b4dde104d643" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:19.951ex; height:6.509ex;" alt="{\displaystyle {\frac {p(x)}{1-p(x)}}=e^{\beta _{0}+\beta _{1}x}.}"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Interpretation_of_these_terms">Interpretation of these terms</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=15" title="Edit section: Interpretation of these terms"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In the above equations, the terms are as follows: </p> <ul><li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d3556280e66fe2c0d0140df20935a6f057381d77" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.116ex; height:2.009ex;" alt="{\displaystyle g}"></span> is the logit function. The equation for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g(p(x))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>g</mi> <mo stretchy="false">(</mo> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle g(p(x))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9d8ae4abe22d4ff74e61b963a849fc42e04e8975" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.234ex; height:2.843ex;" alt="{\displaystyle g(p(x))}"></span> illustrates that the <a href="/wiki/Logit" title="Logit">logit</a> (i.e., log-odds or natural logarithm of the odds) is equivalent to the linear regression expression.</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ln }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>ln</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \ln }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c0de5ba4f372ede555d00035e70c50ed0b9625d0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.939ex; height:2.176ex;" alt="{\displaystyle \ln }"></span> denotes the <a href="/wiki/Natural_logarithm" title="Natural logarithm">natural logarithm</a>.</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8cb7afced134ef75572e5314a5d278c2d644f438" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:4.398ex; height:2.843ex;" alt="{\displaystyle p(x)}"></span> is the probability that the dependent variable equals a case, given some linear combination of the predictors. The formula for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8cb7afced134ef75572e5314a5d278c2d644f438" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:4.398ex; height:2.843ex;" alt="{\displaystyle p(x)}"></span> illustrates that the probability of the dependent variable equaling a case is equal to the value of the logistic function of the linear regression expression. This is important in that it shows that the value of the linear regression expression can vary from negative to positive infinity and yet, after transformation, the resulting expression for the probability <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8cb7afced134ef75572e5314a5d278c2d644f438" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:4.398ex; height:2.843ex;" alt="{\displaystyle p(x)}"></span> ranges between 0 and 1.</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/40b42f71f244103a8fca3c76885c7580a92831c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{0}}"></span> is the <a href="/wiki/Y-intercept" title="Y-intercept">intercept</a> from the linear regression equation (the value of the criterion when the predictor is equal to zero).</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8054fed54c314532ef4e5105b6edd0eb65a378e7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.7ex; height:2.509ex;" alt="{\displaystyle \beta _{1}x}"></span> is the regression coefficient multiplied by some value of the predictor.</li> <li>base <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>e</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle e}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cd253103f0876afc68ebead27a5aa9867d927467" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.083ex; height:1.676ex;" alt="{\displaystyle e}"></span> denotes the exponential function.</li></ul> <div class="mw-heading mw-heading3"><h3 id="Definition_of_the_odds">Definition of the odds</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=16" title="Edit section: Definition of the odds"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The odds of the dependent variable equaling a case (given some linear combination <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}"></span> of the predictors) is equivalent to the exponential function of the linear regression expression. This illustrates how the <a href="/wiki/Logit" title="Logit">logit</a> serves as a link function between the probability and the linear regression expression. Given that the logit ranges between negative and positive infinity, it provides an adequate criterion upon which to conduct linear regression and the logit is easily converted back into the odds.<sup id="cite_ref-Hosmer_2-2" class="reference"><a href="#cite_note-Hosmer-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> </p><p>So we define odds of the dependent variable equaling a case (given some linear combination <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}"></span> of the predictors) as follows: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\text{odds}}=e^{\beta _{0}+\beta _{1}x}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtext>odds</mtext> </mrow> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\text{odds}}=e^{\beta _{0}+\beta _{1}x}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8b5acc9cf67be7974971e0f520029f356969ba90" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:15.467ex; height:2.676ex;" alt="{\displaystyle {\text{odds}}=e^{\beta _{0}+\beta _{1}x}.}"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="The_odds_ratio">The odds ratio</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=17" title="Edit section: The odds ratio"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For a continuous independent variable the odds ratio can be defined as: </p> <dl><dd><figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Odds_Ratio-1.jpg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/7/77/Odds_Ratio-1.jpg/220px-Odds_Ratio-1.jpg" decoding="async" width="220" height="115" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/77/Odds_Ratio-1.jpg/330px-Odds_Ratio-1.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/77/Odds_Ratio-1.jpg/440px-Odds_Ratio-1.jpg 2x" data-file-width="1528" data-file-height="802" /></a><figcaption>The image represents an outline of what an odds ratio looks like in writing, through a template in addition to the test score example in the "Example" section of the contents. In simple terms, if we hypothetically get an odds ratio of 2 to 1, we can say... "For every one-unit increase in hours studied, the odds of passing (group 1) or failing (group 0) are (expectedly) 2 to 1 (Denis, 2019).</figcaption></figure><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathrm {OR} ={\frac {\operatorname {odds} (x+1)}{\operatorname {odds} (x)}}={\frac {\left({\frac {p(x+1)}{1-p(x+1)}}\right)}{\left({\frac {p(x)}{1-p(x)}}\right)}}={\frac {e^{\beta _{0}+\beta _{1}(x+1)}}{e^{\beta _{0}+\beta _{1}x}}}=e^{\beta _{1}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">O</mi> <mi mathvariant="normal">R</mi> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>odds</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mrow> <mi>odds</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> </msup> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> </mrow> </msup> </mfrac> </mrow> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathrm {OR} ={\frac {\operatorname {odds} (x+1)}{\operatorname {odds} (x)}}={\frac {\left({\frac {p(x+1)}{1-p(x+1)}}\right)}{\left({\frac {p(x)}{1-p(x)}}\right)}}={\frac {e^{\beta _{0}+\beta _{1}(x+1)}}{e^{\beta _{0}+\beta _{1}x}}}=e^{\beta _{1}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/451dc30a46a3fd5beb6c48b9de8bed20a8b7f0d3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.505ex; width:54.602ex; height:10.176ex;" alt="{\displaystyle \mathrm {OR} ={\frac {\operatorname {odds} (x+1)}{\operatorname {odds} (x)}}={\frac {\left({\frac {p(x+1)}{1-p(x+1)}}\right)}{\left({\frac {p(x)}{1-p(x)}}\right)}}={\frac {e^{\beta _{0}+\beta _{1}(x+1)}}{e^{\beta _{0}+\beta _{1}x}}}=e^{\beta _{1}}}"></span></dd></dl> <p>This exponential relationship provides an interpretation for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eeeccd8b585b819e38f9c1fe5e9816a3ea01804c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{1}}"></span>: The odds multiply by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e^{\beta _{1}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle e^{\beta _{1}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2525a52012c4903148201b741a010bb7f2f4197b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.078ex; height:2.676ex;" alt="{\displaystyle e^{\beta _{1}}}"></span> for every 1-unit increase in x.<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup> </p><p>For a binary independent variable the odds ratio is defined as <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {ad}{bc}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi>a</mi> <mi>d</mi> </mrow> <mrow> <mi>b</mi> <mi>c</mi> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {ad}{bc}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bf85a97636710d178d1802494a36c36d12f02ad1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:3.282ex; height:5.509ex;" alt="{\displaystyle {\frac {ad}{bc}}}"></span> where <i>a</i>, <i>b</i>, <i>c</i> and <i>d</i> are cells in a 2×2 <a href="/wiki/Contingency_table" title="Contingency table">contingency table</a>.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Multiple_explanatory_variables">Multiple explanatory variables</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=18" title="Edit section: Multiple explanatory variables"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>If there are multiple explanatory variables, the above expression <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}+\beta _{1}x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}+\beta _{1}x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/413f0918db1f01e559350b98d49ee22be2f36dea" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.91ex; height:2.509ex;" alt="{\displaystyle \beta _{0}+\beta _{1}x}"></span> can be revised to <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{m}x_{m}=\beta _{0}+\sum _{i=1}^{m}\beta _{i}x_{i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </munderover> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{m}x_{m}=\beta _{0}+\sum _{i=1}^{m}\beta _{i}x_{i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/faa7cfcfb9f91ae36fcd35766373bf48c094be85" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:48.254ex; height:6.843ex;" alt="{\displaystyle \beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{m}x_{m}=\beta _{0}+\sum _{i=1}^{m}\beta _{i}x_{i}}"></span>. Then when this is used in the equation relating the log odds of a success to the values of the predictors, the linear regression will be a <a href="/wiki/Multiple_regression" class="mw-redirect" title="Multiple regression">multiple regression</a> with <i>m</i> explanators; the parameters <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f111c43e5cfce37bcffc6121a19b81c6efd825ed" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.115ex; height:2.509ex;" alt="{\displaystyle \beta _{i}}"></span> for all <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i=0,1,2,\dots ,m}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>i</mi> <mo>=</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo>,</mo> <mn>2</mn> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <mi>m</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle i=0,1,2,\dots ,m}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8ba0ff9a1739b65fcaba7679233f4b1f8d995957" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:16.675ex; height:2.509ex;" alt="{\displaystyle i=0,1,2,\dots ,m}"></span> are all estimated. </p><p>Again, the more traditional equations are: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \log {\frac {p}{1-p}}=\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{m}x_{m}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>log</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>p</mi> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>p</mi> </mrow> </mfrac> </mrow> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \log {\frac {p}{1-p}}=\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{m}x_{m}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c6fbaf6182755b528d3232d60408a2414b6d76c1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:44.424ex; height:5.343ex;" alt="{\displaystyle \log {\frac {p}{1-p}}=\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{m}x_{m}}"></span></dd></dl> <p>and </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p={\frac {1}{1+b^{-(\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{m}x_{m})}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mo stretchy="false">(</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p={\frac {1}{1+b^{-(\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{m}x_{m})}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/da88d81e6a0169ec2da7d7bc0e0f4efef4b9e2c7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-left: -0.089ex; width:33.395ex; height:5.676ex;" alt="{\displaystyle p={\frac {1}{1+b^{-(\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{m}x_{m})}}}}"></span></dd></dl> <p>where usually <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b=e}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>b</mi> <mo>=</mo> <mi>e</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle b=e}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bc20630fca3169208fadd9eb539de8de26b045d0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.18ex; height:2.176ex;" alt="{\displaystyle b=e}"></span>. </p> <div class="mw-heading mw-heading2"><h2 id="Definition">Definition</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=19" title="Edit section: Definition"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A dataset contains <i>N</i> points. Each point <i>i</i> consists of a set of <i>m</i> input variables <i>x</i><sub>1,<i>i</i></sub> ... <i>x</i><sub><i>m,i</i></sub> (also called <a href="/wiki/Independent_variable" class="mw-redirect" title="Independent variable">independent variables</a>, explanatory variables, predictor variables, features, or attributes), and a <a href="/wiki/Binary_variable" class="mw-redirect" title="Binary variable">binary</a> outcome variable <i>Y</i><sub><i>i</i></sub> (also known as a <a href="/wiki/Dependent_variable" class="mw-redirect" title="Dependent variable">dependent variable</a>, response variable, output variable, or class), i.e. it can assume only the two possible values 0 (often meaning "no" or "failure") or 1 (often meaning "yes" or "success"). The goal of logistic regression is to use the dataset to create a predictive model of the outcome variable. </p><p>As in linear regression, the outcome variables <i>Y</i><sub><i>i</i></sub> are assumed to depend on the explanatory variables <i>x</i><sub>1,<i>i</i></sub> ... <i>x</i><sub><i>m,i</i></sub>. </p> <dl><dt>Explanatory variables</dt></dl> <p>The explanatory variables may be of any <a href="/wiki/Statistical_data_type" title="Statistical data type">type</a>: <a href="/wiki/Real-valued" class="mw-redirect" title="Real-valued">real-valued</a>, <a href="/wiki/Binary_variable" class="mw-redirect" title="Binary variable">binary</a>, <a href="/wiki/Categorical_variable" title="Categorical variable">categorical</a>, etc. The main distinction is between <a href="/wiki/Continuous_variable" class="mw-redirect" title="Continuous variable">continuous variables</a> and <a href="/wiki/Discrete_variable" class="mw-redirect" title="Discrete variable">discrete variables</a>. </p><p>(Discrete variables referring to more than two possible choices are typically coded using <a href="/wiki/Dummy_variable_(statistics)" title="Dummy variable (statistics)">dummy variables</a> (or <a href="/wiki/Indicator_variable" class="mw-redirect" title="Indicator variable">indicator variables</a>), that is, separate explanatory variables taking the value 0 or 1 are created for each possible value of the discrete variable, with a 1 meaning "variable does have the given value" and a 0 meaning "variable does not have that value".) </p> <dl><dt>Outcome variables</dt></dl> <p>Formally, the outcomes <i>Y</i><sub><i>i</i></sub> are described as being <a href="/wiki/Bernoulli_distribution" title="Bernoulli distribution">Bernoulli-distributed</a> data, where each outcome is determined by an unobserved probability <i>p</i><sub><i>i</i></sub> that is specific to the outcome at hand, but related to the explanatory variables. This can be expressed in any of the following equivalent forms: </p> <dl><dd><dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}Y_{i}\mid x_{1,i},\ldots ,x_{m,i}\ &\sim \operatorname {Bernoulli} (p_{i})\\[5pt]\operatorname {\mathbb {E} } [Y_{i}\mid x_{1,i},\ldots ,x_{m,i}]&=p_{i}\\[5pt]\Pr(Y_{i}=y\mid x_{1,i},\ldots ,x_{m,i})&={\begin{cases}p_{i}&{\text{if }}y=1\\1-p_{i}&{\text{if }}y=0\end{cases}}\\[5pt]\Pr(Y_{i}=y\mid x_{1,i},\ldots ,x_{m,i})&=p_{i}^{y}(1-p_{i})^{(1-y)}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.8em 0.8em 0.8em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>∣<!-- ∣ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mtext> </mtext> </mtd> <mtd> <mi></mi> <mo>∼<!-- ∼ --></mo> <mi>Bernoulli</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">E</mi> </mrow> </mrow> <mo>⁡<!-- --></mo> <mo stretchy="false">[</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>∣<!-- ∣ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo stretchy="false">]</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mtd> </mtr> <mtr> <mtd> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mi>y</mi> <mo>∣<!-- ∣ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if </mtext> </mrow> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mtd> </mtr> <mtr> <mtd> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if </mtext> </mrow> <mi>y</mi> <mo>=</mo> <mn>0</mn> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mtd> </mtr> <mtr> <mtd> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mi>y</mi> <mo>∣<!-- ∣ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <msubsup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>y</mi> </mrow> </msubsup> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>y</mi> <mo stretchy="false">)</mo> </mrow> </msup> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}Y_{i}\mid x_{1,i},\ldots ,x_{m,i}\ &\sim \operatorname {Bernoulli} (p_{i})\\[5pt]\operatorname {\mathbb {E} } [Y_{i}\mid x_{1,i},\ldots ,x_{m,i}]&=p_{i}\\[5pt]\Pr(Y_{i}=y\mid x_{1,i},\ldots ,x_{m,i})&={\begin{cases}p_{i}&{\text{if }}y=1\\1-p_{i}&{\text{if }}y=0\end{cases}}\\[5pt]\Pr(Y_{i}=y\mid x_{1,i},\ldots ,x_{m,i})&=p_{i}^{y}(1-p_{i})^{(1-y)}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4ee94ccc27b24a90f962038768fc751e882f183d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -9.171ex; width:47.256ex; height:19.509ex;" alt="{\displaystyle {\begin{aligned}Y_{i}\mid x_{1,i},\ldots ,x_{m,i}\ &\sim \operatorname {Bernoulli} (p_{i})\\[5pt]\operatorname {\mathbb {E} } [Y_{i}\mid x_{1,i},\ldots ,x_{m,i}]&=p_{i}\\[5pt]\Pr(Y_{i}=y\mid x_{1,i},\ldots ,x_{m,i})&={\begin{cases}p_{i}&{\text{if }}y=1\\1-p_{i}&{\text{if }}y=0\end{cases}}\\[5pt]\Pr(Y_{i}=y\mid x_{1,i},\ldots ,x_{m,i})&=p_{i}^{y}(1-p_{i})^{(1-y)}\end{aligned}}}"></span></dd></dl></dd></dl> <p>The meanings of these four lines are: </p> <ol><li>The first line expresses the <a href="/wiki/Probability_distribution" title="Probability distribution">probability distribution</a> of each <i>Y</i><sub><i>i</i></sub> : conditioned on the explanatory variables, it follows a <a href="/wiki/Bernoulli_distribution" title="Bernoulli distribution">Bernoulli distribution</a> with parameters <i>p</i><sub><i>i</i></sub>, the probability of the outcome of 1 for trial <i>i</i>. As noted above, each separate trial has its own probability of success, just as each trial has its own explanatory variables. The probability of success <i>p</i><sub><i>i</i></sub> is not observed, only the outcome of an individual Bernoulli trial using that probability.</li> <li>The second line expresses the fact that the <a href="/wiki/Expected_value" title="Expected value">expected value</a> of each <i>Y</i><sub><i>i</i></sub> is equal to the probability of success <i>p</i><sub><i>i</i></sub>, which is a general property of the Bernoulli distribution. In other words, if we run a large number of Bernoulli trials using the same probability of success <i>p</i><sub><i>i</i></sub>, then take the average of all the 1 and 0 outcomes, then the result would be close to <i>p</i><sub><i>i</i></sub>. This is because doing an average this way simply computes the proportion of successes seen, which we expect to converge to the underlying probability of success.</li> <li>The third line writes out the <a href="/wiki/Probability_mass_function" title="Probability mass function">probability mass function</a> of the Bernoulli distribution, specifying the probability of seeing each of the two possible outcomes.</li> <li>The fourth line is another way of writing the probability mass function, which avoids having to write separate cases and is more convenient for certain types of calculations. This relies on the fact that <i>Y</i><sub><i>i</i></sub> can take only the value 0 or 1. In each case, one of the exponents will be 1, "choosing" the value under it, while the other is 0, "canceling out" the value under it. Hence, the outcome is either <i>p</i><sub><i>i</i></sub> or 1 − <i>p</i><sub><i>i</i></sub>, as in the previous line.</li></ol> <dl><dt>Linear predictor function</dt></dl> <p>The basic idea of logistic regression is to use the mechanism already developed for <a href="/wiki/Linear_regression" title="Linear regression">linear regression</a> by modeling the probability <i>p</i><sub><i>i</i></sub> using a <a href="/wiki/Linear_predictor_function" title="Linear predictor function">linear predictor function</a>, i.e. a <a href="/wiki/Linear_combination" title="Linear combination">linear combination</a> of the explanatory variables and a set of <a href="/wiki/Regression_coefficient" class="mw-redirect" title="Regression coefficient">regression coefficients</a> that are specific to the model at hand but the same for all trials. The linear predictor function <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(i)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f(i)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/de02d30f303aef8641ffe02de0d367140bd4753d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.89ex; height:2.843ex;" alt="{\displaystyle f(i)}"></span> for a particular data point <i>i</i> is written as: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(i)=\beta _{0}+\beta _{1}x_{1,i}+\cdots +\beta _{m}x_{m,i},}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f(i)=\beta _{0}+\beta _{1}x_{1,i}+\cdots +\beta _{m}x_{m,i},}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f8ae27f3a3f2355c05fcf59865ad85bbb0f4426c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:34.049ex; height:3.009ex;" alt="{\displaystyle f(i)=\beta _{0}+\beta _{1}x_{1,i}+\cdots +\beta _{m}x_{m,i},}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0},\ldots ,\beta _{m}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0},\ldots ,\beta _{m}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/89eea4a4786e0a36e85b23922f685fed83a3617b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:10.539ex; height:2.509ex;" alt="{\displaystyle \beta _{0},\ldots ,\beta _{m}}"></span> are <a href="/wiki/Regression_coefficient" class="mw-redirect" title="Regression coefficient">regression coefficients</a> indicating the relative effect of a particular explanatory variable on the outcome. </p><p>The model is usually put into a more compact form as follows: </p> <ul><li>The regression coefficients <i>β</i><sub>0</sub>, <i>β</i><sub>1</sub>, ..., <i>β</i><sub><i>m</i></sub> are grouped into a single vector <i><b>β</b></i> of size <i>m</i> + 1.</li> <li>For each data point <i>i</i>, an additional explanatory pseudo-variable <i>x</i><sub>0,<i>i</i></sub> is added, with a fixed value of 1, corresponding to the <a href="/wiki/Y-intercept" title="Y-intercept">intercept</a> coefficient <i>β</i><sub>0</sub>.</li> <li>The resulting explanatory variables <i>x</i><sub>0,<i>i</i></sub>, <i>x</i><sub>1,<i>i</i></sub>, ..., <i>x</i><sub><i>m,i</i></sub> are then grouped into a single vector <i><b>X<sub>i</sub></b></i> of size <i>m</i> + 1.</li></ul> <p>This makes it possible to write the linear predictor function as follows: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f(i)={\boldsymbol {\beta }}\cdot \mathbf {X} _{i},}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>f</mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle f(i)={\boldsymbol {\beta }}\cdot \mathbf {X} _{i},}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bbbbaaa0af22f9f1cd374944b6aeaec30b36e7a0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.668ex; height:2.843ex;" alt="{\displaystyle f(i)={\boldsymbol {\beta }}\cdot \mathbf {X} _{i},}"></span></dd></dl> <p>using the notation for a <a href="/wiki/Dot_product" title="Dot product">dot product</a> between two vectors. </p> <figure typeof="mw:File/Thumb"><a href="/wiki/File:Logistic_Regression_in_SPSS.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Logistic_Regression_in_SPSS.png/356px-Logistic_Regression_in_SPSS.png" decoding="async" width="356" height="112" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Logistic_Regression_in_SPSS.png/534px-Logistic_Regression_in_SPSS.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Logistic_Regression_in_SPSS.png/712px-Logistic_Regression_in_SPSS.png 2x" data-file-width="1188" data-file-height="373" /></a><figcaption>This is an example of an SPSS output for a logistic regression model using three explanatory variables (coffee use per week, energy drink use per week, and soda use per week) and two categories (male and female).</figcaption></figure> <div class="mw-heading mw-heading3"><h3 id="Many_explanatory_variables,_two_categories"><span id="Many_explanatory_variables.2C_two_categories"></span>Many explanatory variables, two categories</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=20" title="Edit section: Many explanatory variables, two categories"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The above example of binary logistic regression on one explanatory variable can be generalized to binary logistic regression on any number of explanatory variables <i>x<sub>1</sub>, x<sub>2</sub>,...</i> and any number of categorical values <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=0,1,2,\dots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo>,</mo> <mn>2</mn> <mo>,</mo> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=0,1,2,\dots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5e6fdd26982492d75ac168027bcd44c43151049c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:13.566ex; height:2.509ex;" alt="{\displaystyle y=0,1,2,\dots }"></span>. </p><p>To begin with, we may consider a logistic model with <i>M</i> explanatory variables, <i>x<sub>1</sub></i>, <i>x<sub>2</sub></i> ... <i>x<sub>M</sub></i> and, as in the example above, two categorical values (<i>y</i> = 0 and 1). For the simple binary logistic regression model, we assumed a <a href="/wiki/Linear_model" title="Linear model">linear relationship</a> between the predictor variable and the log-odds (also called <a href="/wiki/Logit" title="Logit">logit</a>) of the event that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span>. This linear relationship may be extended to the case of <i>M</i> explanatory variables: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t=\log _{b}{\frac {p}{1-p}}=\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{M}x_{M}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> <mo>=</mo> <msub> <mi>log</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msub> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>p</mi> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>p</mi> </mrow> </mfrac> </mrow> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>M</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>M</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t=\log _{b}{\frac {p}{1-p}}=\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{M}x_{M}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e65dae313334b99bb9efbf7df7d30bef4d07279c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:49.868ex; height:5.343ex;" alt="{\displaystyle t=\log _{b}{\frac {p}{1-p}}=\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\cdots +\beta _{M}x_{M}}"></span></dd></dl> <p>where <i>t</i> is the log-odds and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f111c43e5cfce37bcffc6121a19b81c6efd825ed" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.115ex; height:2.509ex;" alt="{\displaystyle \beta _{i}}"></span> are parameters of the model. An additional generalization has been introduced in which the base of the model (<i>b</i>) is not restricted to <a href="/wiki/Euler%27s_number" class="mw-redirect" title="Euler's number">Euler's number</a> <i>e</i>. In most applications, the base <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>b</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle b}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f11423fbb2e967f986e36804a8ae4271734917c3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.998ex; height:2.176ex;" alt="{\displaystyle b}"></span> of the logarithm is usually taken to be <i><a href="/wiki/E_(mathematical_constant)" title="E (mathematical constant)">e</a></i>. However, in some cases it can be easier to communicate results by working in base 2 or base 10. </p><p>For a more compact notation, we will specify the explanatory variables and the <i>β</i> coefficients as <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (M+1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>M</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (M+1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/440d5e798f3bea16c54a8cd9c9c386fe7195be3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.254ex; height:2.843ex;" alt="{\displaystyle (M+1)}"></span>⁠</span>-dimensional vectors: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {x}}=\{x_{0},x_{1},x_{2},\dots ,x_{M}\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo>=</mo> <mo fence="false" stretchy="false">{</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>M</mi> </mrow> </msub> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {x}}=\{x_{0},x_{1},x_{2},\dots ,x_{M}\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/99e738e901989184b0b964f6f7c9e570d4be202e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:24.642ex; height:2.843ex;" alt="{\displaystyle {\boldsymbol {x}}=\{x_{0},x_{1},x_{2},\dots ,x_{M}\}}"></span></dd> <dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\beta }}=\{\beta _{0},\beta _{1},\beta _{2},\dots ,\beta _{M}\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>=</mo> <mo fence="false" stretchy="false">{</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>,</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>M</mi> </mrow> </msub> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\beta }}=\{\beta _{0},\beta _{1},\beta _{2},\dots ,\beta _{M}\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/621d5d83539537f352d559602b64abd2f2917943" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:24.588ex; height:2.843ex;" alt="{\displaystyle {\boldsymbol {\beta }}=\{\beta _{0},\beta _{1},\beta _{2},\dots ,\beta _{M}\}}"></span></dd></dl> <p>with an added explanatory variable <i>x<sub>0</sub></i> =1. The logit may now be written as: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t=\sum _{m=0}^{M}\beta _{m}x_{m}={\boldsymbol {\beta }}\cdot x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>M</mi> </mrow> </munderover> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t=\sum _{m=0}^{M}\beta _{m}x_{m}={\boldsymbol {\beta }}\cdot x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f10c3bf032c0ce63b2d9c94a70a61388176ec4ee" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:21.505ex; height:7.343ex;" alt="{\displaystyle t=\sum _{m=0}^{M}\beta _{m}x_{m}={\boldsymbol {\beta }}\cdot x}"></span></dd></dl> <p>Solving for the probability <i>p</i> that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span> yields: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p({\boldsymbol {x}})={\frac {b^{{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}{1+b^{{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}}={\frac {1}{1+b^{-{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}}=S_{b}(t)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> </mrow> </msup> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>=</mo> <msub> <mi>S</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>t</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p({\boldsymbol {x}})={\frac {b^{{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}{1+b^{{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}}={\frac {1}{1+b^{-{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}}=S_{b}(t)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a20b9e1ab4377d75eb7fed5ad211fbab4b5b259b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-left: -0.089ex; width:37.573ex; height:6.176ex;" alt="{\displaystyle p({\boldsymbol {x}})={\frac {b^{{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}{1+b^{{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}}={\frac {1}{1+b^{-{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}}=S_{b}(t)}"></span>,</dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle S_{b}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>S</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle S_{b}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/123a09b5f5583879c4d30785a1e29d1297b9be94" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.363ex; height:2.509ex;" alt="{\displaystyle S_{b}}"></span> is the <a href="/wiki/Sigmoid_function" title="Sigmoid function">sigmoid function</a> with base <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>b</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle b}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f11423fbb2e967f986e36804a8ae4271734917c3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.998ex; height:2.176ex;" alt="{\displaystyle b}"></span>. The above formula shows that once the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{m}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{m}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5e066616c9ed741f3d70ef4ce962bcef909c4d62" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.991ex; height:2.509ex;" alt="{\displaystyle \beta _{m}}"></span> are fixed, we can easily compute either the log-odds that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span> for a given observation, or the probability that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span> for a given observation. The main use-case of a logistic model is to be given an observation <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {x}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {x}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/606b7680d510560a505937143775ea80fa958051" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.532ex; height:1.676ex;" alt="{\displaystyle {\boldsymbol {x}}}"></span>, and estimate the probability <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p({\boldsymbol {x}})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p({\boldsymbol {x}})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5b905c04004b256bc410ab02cbfe1915f8ed85bf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:4.6ex; height:2.843ex;" alt="{\displaystyle p({\boldsymbol {x}})}"></span> that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span>. The optimum beta coefficients may again be found by maximizing the log-likelihood. For <i>K</i> measurements, defining <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {x}}_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {x}}_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3aaaf8ac33e398bf1a773899488ecc06fbf18ab4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.62ex; height:2.009ex;" alt="{\displaystyle {\boldsymbol {x}}_{k}}"></span> as the explanatory vector of the <i>k</i>-th measurement, and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b2ab0248723a410cc2c67ce06ad5c043dcbb933" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.228ex; height:2.009ex;" alt="{\displaystyle y_{k}}"></span> as the categorical outcome of that measurement, the log likelihood may be written in a form very similar to the simple <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle M=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>M</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle M=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ca00f82608101fe96e18b56e5a0626193feff2c6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.703ex; height:2.176ex;" alt="{\displaystyle M=1}"></span> case above: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ell =\sum _{k=1}^{K}y_{k}\log _{b}(p({\boldsymbol {x_{k}}}))+\sum _{k=1}^{K}(1-y_{k})\log _{b}(1-p({\boldsymbol {x_{k}}}))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>ℓ<!-- ℓ --></mi> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <msub> <mi>log</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msub> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>p</mi> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi mathvariant="bold-italic">x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">k</mi> </mrow> </msub> </mrow> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>+</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <msub> <mi>log</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>b</mi> </mrow> </msub> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>p</mi> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi mathvariant="bold-italic">x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">k</mi> </mrow> </msub> </mrow> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \ell =\sum _{k=1}^{K}y_{k}\log _{b}(p({\boldsymbol {x_{k}}}))+\sum _{k=1}^{K}(1-y_{k})\log _{b}(1-p({\boldsymbol {x_{k}}}))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8a351c40db9dcace46e80c493cab33d51d3a9719" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:51.959ex; height:7.343ex;" alt="{\displaystyle \ell =\sum _{k=1}^{K}y_{k}\log _{b}(p({\boldsymbol {x_{k}}}))+\sum _{k=1}^{K}(1-y_{k})\log _{b}(1-p({\boldsymbol {x_{k}}}))}"></span></dd></dl> <p>As in the simple example above, finding the optimum <i>β</i> parameters will require numerical methods. One useful technique is to equate the derivatives of the log likelihood with respect to each of the <i>β</i> parameters to zero yielding a set of equations which will hold at the maximum of the log likelihood: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {\partial \ell }{\partial \beta _{m}}}=0=\sum _{k=1}^{K}y_{k}x_{mk}-\sum _{k=1}^{K}p({\boldsymbol {x}}_{k})x_{mk}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <mi>ℓ<!-- ℓ --></mi> </mrow> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> </mrow> </mfrac> </mrow> <mo>=</mo> <mn>0</mn> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>k</mi> </mrow> </msub> <mo>−<!-- − --></mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mi>p</mi> <mo stretchy="false">(</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {\partial \ell }{\partial \beta _{m}}}=0=\sum _{k=1}^{K}y_{k}x_{mk}-\sum _{k=1}^{K}p({\boldsymbol {x}}_{k})x_{mk}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ce91a96f51cb566e1c6e011ec6c4ce4fa78a1922" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:38.378ex; height:7.343ex;" alt="{\displaystyle {\frac {\partial \ell }{\partial \beta _{m}}}=0=\sum _{k=1}^{K}y_{k}x_{mk}-\sum _{k=1}^{K}p({\boldsymbol {x}}_{k})x_{mk}}"></span></dd></dl> <p>where <i>x<sub>mk</sub></i> is the value of the <i>x<sub>m</sub></i> explanatory variable from the <i>k-th</i> measurement. </p><p>Consider an example with <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle M=2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>M</mi> <mo>=</mo> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle M=2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2801ac77396e68de0b640087e1531a2329067e9f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.703ex; height:2.176ex;" alt="{\displaystyle M=2}"></span> explanatory variables, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b=10}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>b</mi> <mo>=</mo> <mn>10</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle b=10}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c9f18909115d13fe45f000359b476549db54a104" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.421ex; height:2.176ex;" alt="{\displaystyle b=10}"></span>, and coefficients <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}=-3}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <mo>−<!-- − --></mo> <mn>3</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}=-3}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0521041c41762d6f00e678170ee82df4e9b493a5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.439ex; height:2.509ex;" alt="{\displaystyle \beta _{0}=-3}"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7da89f832c8d1433585b3e6bb5756c436e021f08" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.631ex; height:2.509ex;" alt="{\displaystyle \beta _{1}=1}"></span>, and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{2}=2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>=</mo> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{2}=2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/64ef09ec048862b79025c07c6acb0805e86af6d8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.631ex; height:2.509ex;" alt="{\displaystyle \beta _{2}=2}"></span> which have been determined by the above method. To be concrete, the model is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t=\log _{10}{\frac {p}{1-p}}=-3+x_{1}+2x_{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> <mo>=</mo> <msub> <mi>log</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>10</mn> </mrow> </msub> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>p</mi> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>p</mi> </mrow> </mfrac> </mrow> <mo>=</mo> <mo>−<!-- − --></mo> <mn>3</mn> <mo>+</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>+</mo> <mn>2</mn> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t=\log _{10}{\frac {p}{1-p}}=-3+x_{1}+2x_{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/aecfbe409f0c022fc042d61f50c0b7381481de32" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:32.862ex; height:5.343ex;" alt="{\displaystyle t=\log _{10}{\frac {p}{1-p}}=-3+x_{1}+2x_{2}}"></span></dd> <dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p={\frac {b^{{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}{1+b^{{\boldsymbol {\beta }}\cdot x}}}={\frac {b^{\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}}}{1+b^{\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}}}}={\frac {1}{1+b^{-(\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2})}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> </mrow> </msup> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <mi>x</mi> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> </mrow> </msup> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mo stretchy="false">(</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo stretchy="false">)</mo> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p={\frac {b^{{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}{1+b^{{\boldsymbol {\beta }}\cdot x}}}={\frac {b^{\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}}}{1+b^{\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}}}}={\frac {1}{1+b^{-(\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2})}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d0b1894420970601427bf9769540bd0000e9fa8c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-left: -0.089ex; width:56.574ex; height:6.176ex;" alt="{\displaystyle p={\frac {b^{{\boldsymbol {\beta }}\cdot {\boldsymbol {x}}}}{1+b^{{\boldsymbol {\beta }}\cdot x}}}={\frac {b^{\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}}}{1+b^{\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}}}}={\frac {1}{1+b^{-(\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2})}}}}"></span>,</dd></dl> <p>where <i>p</i> is the probability of the event that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span>. This can be interpreted as follows: </p> <ul><li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}=-3}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <mo>−<!-- − --></mo> <mn>3</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}=-3}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0521041c41762d6f00e678170ee82df4e9b493a5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.439ex; height:2.509ex;" alt="{\displaystyle \beta _{0}=-3}"></span> is the <a href="/wiki/Y-intercept" title="Y-intercept"><i>y</i>-intercept</a>. It is the log-odds of the event that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span>, when the predictors <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{1}=x_{2}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{1}=x_{2}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2c0873810a88ac66888c47d92433b7854b594d32" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:12.127ex; height:2.509ex;" alt="{\displaystyle x_{1}=x_{2}=0}"></span>. By exponentiating, we can see that when <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{1}=x_{2}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{1}=x_{2}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2c0873810a88ac66888c47d92433b7854b594d32" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:12.127ex; height:2.509ex;" alt="{\displaystyle x_{1}=x_{2}=0}"></span> the odds of the event that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span> are 1-to-1000, or <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 10^{-3}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>3</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 10^{-3}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c78cf9ec2db87a7a95990ef3a2e59ac4320c49e8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.658ex; height:2.676ex;" alt="{\displaystyle 10^{-3}}"></span>. Similarly, the probability of the event that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span> when <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{1}=x_{2}=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{1}=x_{2}=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2c0873810a88ac66888c47d92433b7854b594d32" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:12.127ex; height:2.509ex;" alt="{\displaystyle x_{1}=x_{2}=0}"></span> can be computed as <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1/(1000+1)=1/1001.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mo stretchy="false">(</mo> <mn>1000</mn> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>1001.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1/(1000+1)=1/1001.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c0bd77eefb6cdb7481a447b254401426b88b5d27" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:23.507ex; height:2.843ex;" alt="{\displaystyle 1/(1000+1)=1/1001.}"></span></li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{1}=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{1}=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7da89f832c8d1433585b3e6bb5756c436e021f08" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.631ex; height:2.509ex;" alt="{\displaystyle \beta _{1}=1}"></span> means that increasing <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a8788bf85d532fa88d1fb25eff6ae382a601c308" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.384ex; height:2.009ex;" alt="{\displaystyle x_{1}}"></span> by 1 increases the log-odds by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/92d98b82a3778f043108d4e20960a9193df57cbf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 1}"></span>. So if <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a8788bf85d532fa88d1fb25eff6ae382a601c308" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.384ex; height:2.009ex;" alt="{\displaystyle x_{1}}"></span> increases by 1, the odds that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span> increase by a factor of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 10^{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 10^{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2f89eb50e31c21a232c81e0c880681945a550fc0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.379ex; height:2.676ex;" alt="{\displaystyle 10^{1}}"></span>. The <b>probability</b> of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span> has also increased, but it has not increased by as much as the odds have increased.</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{2}=2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>=</mo> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{2}=2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/64ef09ec048862b79025c07c6acb0805e86af6d8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.631ex; height:2.509ex;" alt="{\displaystyle \beta _{2}=2}"></span> means that increasing <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d7af1b928f06e4c7e3e8ebfd60704656719bd766" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.384ex; height:2.009ex;" alt="{\displaystyle x_{2}}"></span> by 1 increases the log-odds by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>2</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 2}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/901fc910c19990d0dbaaefe4726ceb1a4e217a0f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 2}"></span>. So if <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d7af1b928f06e4c7e3e8ebfd60704656719bd766" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.384ex; height:2.009ex;" alt="{\displaystyle x_{2}}"></span> increases by 1, the odds that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span> increase by a factor of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 10^{2}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mn>10</mn> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 10^{2}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/84c4f432a4d0cb76a4fadf6f0db7990ee47242e9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.026ex; height:2.676ex;" alt="{\displaystyle 10^{2}.}"></span> Note how the effect of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d7af1b928f06e4c7e3e8ebfd60704656719bd766" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.384ex; height:2.009ex;" alt="{\displaystyle x_{2}}"></span> on the log-odds is twice as great as the effect of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a8788bf85d532fa88d1fb25eff6ae382a601c308" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.384ex; height:2.009ex;" alt="{\displaystyle x_{1}}"></span>, but the effect on the odds is 10 times greater. But the effect on the <b>probability</b> of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span> is not as much as 10 times greater, it's only the effect on the odds that is 10 times greater.</li></ul> <div class="mw-heading mw-heading3"><h3 id="Multinomial_logistic_regression:_Many_explanatory_variables_and_many_categories">Multinomial logistic regression: Many explanatory variables and many categories</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=21" title="Edit section: Multinomial logistic regression: Many explanatory variables and many categories"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Multinomial_logistic_regression" title="Multinomial logistic regression">Multinomial logistic regression</a></div> <p>In the above cases of two categories (binomial logistic regression), the categories were indexed by "0" and "1", and we had two probabilities: The probability that the outcome was in category 1 was given by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p({\boldsymbol {x}})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p({\boldsymbol {x}})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5b905c04004b256bc410ab02cbfe1915f8ed85bf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:4.6ex; height:2.843ex;" alt="{\displaystyle p({\boldsymbol {x}})}"></span>and the probability that the outcome was in category 0 was given by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1-p({\boldsymbol {x}})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> <mo>−<!-- − --></mo> <mi>p</mi> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1-p({\boldsymbol {x}})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/01bc5226788ebc5196d57f5f42466fd7c668f590" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.513ex; height:2.843ex;" alt="{\displaystyle 1-p({\boldsymbol {x}})}"></span>. The sum of these probabilities equals 1, which must be true, since "0" and "1" are the only possible categories in this setup. </p><p>In general, if we have <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle M+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>M</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle M+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/03c0b0dc5ee6ec29023977ea04ad152977fcba18" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.445ex; height:2.343ex;" alt="{\displaystyle M+1}"></span>⁠</span> explanatory variables (including <i>x<sub>0</sub></i>) and <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle N+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>N</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle N+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fdf2b9cbfe9051fd4e7b50c8028866d497eac35b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.066ex; height:2.343ex;" alt="{\displaystyle N+1}"></span>⁠</span> categories, we will need <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle N+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>N</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle N+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fdf2b9cbfe9051fd4e7b50c8028866d497eac35b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.066ex; height:2.343ex;" alt="{\displaystyle N+1}"></span>⁠</span> separate probabilities, one for each category, indexed by <i>n</i>, which describe the probability that the categorical outcome <i>y</i> will be in category <i>y=n</i>, conditional on the vector of covariates <b>x</b>. The sum of these probabilities over all categories must equal 1. Using the mathematically convenient base <i>e</i>, these probabilities are: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{n}({\boldsymbol {x}})={\frac {e^{{\boldsymbol {\beta }}_{n}\cdot {\boldsymbol {x}}}}{1+\sum _{u=1}^{N}e^{{\boldsymbol {\beta }}_{u}\cdot {\boldsymbol {x}}}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> </mrow> </msup> <mrow> <mn>1</mn> <mo>+</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>u</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>u</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{n}({\boldsymbol {x}})={\frac {e^{{\boldsymbol {\beta }}_{n}\cdot {\boldsymbol {x}}}}{1+\sum _{u=1}^{N}e^{{\boldsymbol {\beta }}_{u}\cdot {\boldsymbol {x}}}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f2293d541d2ad1a10b5b1240261f219c95a11373" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; margin-left: -0.089ex; width:24.738ex; height:7.009ex;" alt="{\displaystyle p_{n}({\boldsymbol {x}})={\frac {e^{{\boldsymbol {\beta }}_{n}\cdot {\boldsymbol {x}}}}{1+\sum _{u=1}^{N}e^{{\boldsymbol {\beta }}_{u}\cdot {\boldsymbol {x}}}}}}"></span> for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n=1,2,\dots ,N}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>=</mo> <mn>1</mn> <mo>,</mo> <mn>2</mn> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <mi>N</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n=1,2,\dots ,N}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6c353e45e89b2f247da65f1328902e3b30d412da" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:15.094ex; height:2.509ex;" alt="{\displaystyle n=1,2,\dots ,N}"></span></dd> <dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{0}({\boldsymbol {x}})=1-\sum _{n=1}^{N}p_{n}({\boldsymbol {x}})={\frac {1}{1+\sum _{u=1}^{N}e^{{\boldsymbol {\beta }}_{u}\cdot {\boldsymbol {x}}}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo>−<!-- − --></mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>u</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>u</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{0}({\boldsymbol {x}})=1-\sum _{n=1}^{N}p_{n}({\boldsymbol {x}})={\frac {1}{1+\sum _{u=1}^{N}e^{{\boldsymbol {\beta }}_{u}\cdot {\boldsymbol {x}}}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/008a0d0abff9d06daa6c1683bd51d9c733a1aac4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; margin-left: -0.089ex; width:41.146ex; height:7.509ex;" alt="{\displaystyle p_{0}({\boldsymbol {x}})=1-\sum _{n=1}^{N}p_{n}({\boldsymbol {x}})={\frac {1}{1+\sum _{u=1}^{N}e^{{\boldsymbol {\beta }}_{u}\cdot {\boldsymbol {x}}}}}}"></span></dd></dl> <p>Each of the probabilities except <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{0}({\boldsymbol {x}})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{0}({\boldsymbol {x}})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/03851ba5c2ac6bb8e26fe951cb9eec39cae50b55" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:5.654ex; height:2.843ex;" alt="{\displaystyle p_{0}({\boldsymbol {x}})}"></span> will have their own set of regression coefficients <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\beta }}_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\beta }}_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4076e08b2900aa6429e8b2212e1ccea18d5fda51" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.753ex; height:2.676ex;" alt="{\displaystyle {\boldsymbol {\beta }}_{n}}"></span>. It can be seen that, as required, the sum of the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{n}({\boldsymbol {x}})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{n}({\boldsymbol {x}})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a3d6a3910ece34b00b39f1d7adc020831955a1d9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:5.818ex; height:2.843ex;" alt="{\displaystyle p_{n}({\boldsymbol {x}})}"></span> over all categories <i>n</i> is 1. The selection of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{0}({\boldsymbol {x}})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{0}({\boldsymbol {x}})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/03851ba5c2ac6bb8e26fe951cb9eec39cae50b55" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:5.654ex; height:2.843ex;" alt="{\displaystyle p_{0}({\boldsymbol {x}})}"></span> to be defined in terms of the other probabilities is artificial. Any of the probabilities could have been selected to be so defined. This special value of <i>n</i> is termed the "pivot index", and the log-odds (<i>t<sub>n</sub></i>) are expressed in terms of the pivot probability and are again expressed as a linear combination of the explanatory variables: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t_{n}=\ln \left({\frac {p_{n}({\boldsymbol {x}})}{p_{0}({\boldsymbol {x}})}}\right)={\boldsymbol {\beta }}_{n}\cdot {\boldsymbol {x}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>t</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>=</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> </mrow> <mrow> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t_{n}=\ln \left({\frac {p_{n}({\boldsymbol {x}})}{p_{0}({\boldsymbol {x}})}}\right)={\boldsymbol {\beta }}_{n}\cdot {\boldsymbol {x}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cd6dcee23afd6402551dc962e75422c86490cf2f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:26.144ex; height:6.509ex;" alt="{\displaystyle t_{n}=\ln \left({\frac {p_{n}({\boldsymbol {x}})}{p_{0}({\boldsymbol {x}})}}\right)={\boldsymbol {\beta }}_{n}\cdot {\boldsymbol {x}}}"></span></dd></dl> <p>Note also that for the simple case of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle N=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>N</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle N=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/85982022b9eb1f295b44de55023687a490db0a39" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.325ex; height:2.176ex;" alt="{\displaystyle N=1}"></span>, the two-category case is recovered, with <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p({\boldsymbol {x}})=p_{1}({\boldsymbol {x}})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> <mo>=</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p({\boldsymbol {x}})=p_{1}({\boldsymbol {x}})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2d1cc24bb8b6b6c30bc6b20625a4c14190cacfac" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:13.263ex; height:2.843ex;" alt="{\displaystyle p({\boldsymbol {x}})=p_{1}({\boldsymbol {x}})}"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{0}({\boldsymbol {x}})=1-p_{1}({\boldsymbol {x}})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{0}({\boldsymbol {x}})=1-p_{1}({\boldsymbol {x}})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e587d3334adba643f9a803591ba52630036ac31a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:18.32ex; height:2.843ex;" alt="{\displaystyle p_{0}({\boldsymbol {x}})=1-p_{1}({\boldsymbol {x}})}"></span>. </p><p>The log-likelihood that a particular set of <i>K</i> measurements or data points will be generated by the above probabilities can now be calculated. Indexing each measurement by <i>k</i>, let the <i>k</i>-th set of measured explanatory variables be denoted by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {x}}_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {x}}_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3aaaf8ac33e398bf1a773899488ecc06fbf18ab4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.62ex; height:2.009ex;" alt="{\displaystyle {\boldsymbol {x}}_{k}}"></span> and their categorical outcomes be denoted by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b2ab0248723a410cc2c67ce06ad5c043dcbb933" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.228ex; height:2.009ex;" alt="{\displaystyle y_{k}}"></span> which can be equal to any integer in [0,N]. The log-likelihood is then: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ell =\sum _{k=1}^{K}\sum _{n=0}^{N}\Delta (n,y_{k})\,\ln(p_{n}({\boldsymbol {x}}_{k}))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>ℓ<!-- ℓ --></mi> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <mi mathvariant="normal">Δ<!-- Δ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \ell =\sum _{k=1}^{K}\sum _{n=0}^{N}\Delta (n,y_{k})\,\ln(p_{n}({\boldsymbol {x}}_{k}))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/2793484c8e3b8b66e29c02cba944a9ab89a58a37" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:31.295ex; height:7.343ex;" alt="{\displaystyle \ell =\sum _{k=1}^{K}\sum _{n=0}^{N}\Delta (n,y_{k})\,\ln(p_{n}({\boldsymbol {x}}_{k}))}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Delta (n,y_{k})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">Δ<!-- Δ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Delta (n,y_{k})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6c24257a6667c5b1b30062c1d25a511a24acd895" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.402ex; height:2.843ex;" alt="{\displaystyle \Delta (n,y_{k})}"></span> is an <a href="/wiki/Indicator_function" title="Indicator function">indicator function</a> which equals 1 if <i>y<sub>k</sub> = n</i> and zero otherwise. In the case of two explanatory variables, this indicator function was defined as <i>y<sub>k</sub></i> when <i>n</i> = 1 and <i>1-y<sub>k</sub></i> when <i>n</i> = 0. This was convenient, but not necessary.<sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup> Again, the optimum beta coefficients may be found by maximizing the log-likelihood function generally using numerical methods. A possible method of solution is to set the derivatives of the log-likelihood with respect to each beta coefficient equal to zero and solve for the beta coefficients: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {\partial \ell }{\partial \beta _{nm}}}=0=\sum _{k=1}^{K}\Delta (n,y_{k})x_{mk}-\sum _{k=1}^{K}p_{n}({\boldsymbol {x}}_{k})x_{mk}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <mi>ℓ<!-- ℓ --></mi> </mrow> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>m</mi> </mrow> </msub> </mrow> </mfrac> </mrow> <mo>=</mo> <mn>0</mn> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mi mathvariant="normal">Δ<!-- Δ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>k</mi> </mrow> </msub> <mo>−<!-- − --></mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {\partial \ell }{\partial \beta _{nm}}}=0=\sum _{k=1}^{K}\Delta (n,y_{k})x_{mk}-\sum _{k=1}^{K}p_{n}({\boldsymbol {x}}_{k})x_{mk}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/30cc731a29769006c283066eeb8e61f9773fbfc2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:46.757ex; height:7.343ex;" alt="{\displaystyle {\frac {\partial \ell }{\partial \beta _{nm}}}=0=\sum _{k=1}^{K}\Delta (n,y_{k})x_{mk}-\sum _{k=1}^{K}p_{n}({\boldsymbol {x}}_{k})x_{mk}}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{nm}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>m</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{nm}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/65c6a64c7d226a8601b3c60893214065166719aa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.977ex; height:2.509ex;" alt="{\displaystyle \beta _{nm}}"></span> is the <i>m</i>-th coefficient of the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\beta }}_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\beta }}_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4076e08b2900aa6429e8b2212e1ccea18d5fda51" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.753ex; height:2.676ex;" alt="{\displaystyle {\boldsymbol {\beta }}_{n}}"></span> vector and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{mk}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{mk}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87a00940542b288c0aa54715abfb7e8daada881e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.861ex; height:2.009ex;" alt="{\displaystyle x_{mk}}"></span> is the <i>m</i>-th explanatory variable of the <i>k</i>-th measurement. Once the beta coefficients have been estimated from the data, we will be able to estimate the probability that any subsequent set of explanatory variables will result in any of the possible outcome categories. </p> <div class="mw-heading mw-heading2"><h2 id="Interpretations">Interpretations</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=22" title="Edit section: Interpretations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are various equivalent specifications and interpretations of logistic regression, which fit into different types of more general models, and allow different generalizations. </p> <div class="mw-heading mw-heading3"><h3 id="As_a_generalized_linear_model">As a generalized linear model</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=23" title="Edit section: As a generalized linear model"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The particular model used by logistic regression, which distinguishes it from standard <a href="/wiki/Linear_regression" title="Linear regression">linear regression</a> and from other types of <a href="/wiki/Regression_analysis" title="Regression analysis">regression analysis</a> used for <a href="/wiki/Binary-valued" class="mw-redirect" title="Binary-valued">binary-valued</a> outcomes, is the way the probability of a particular outcome is linked to the linear predictor function: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {logit} (\operatorname {\mathbb {E} } [Y_{i}\mid x_{1,i},\ldots ,x_{m,i}])=\operatorname {logit} (p_{i})=\ln \left({\frac {p_{i}}{1-p_{i}}}\right)=\beta _{0}+\beta _{1}x_{1,i}+\cdots +\beta _{m}x_{m,i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>logit</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">E</mi> </mrow> </mrow> <mo>⁡<!-- --></mo> <mo stretchy="false">[</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>∣<!-- ∣ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo stretchy="false">]</mo> <mo stretchy="false">)</mo> <mo>=</mo> <mi>logit</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>,</mo> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \operatorname {logit} (\operatorname {\mathbb {E} } [Y_{i}\mid x_{1,i},\ldots ,x_{m,i}])=\operatorname {logit} (p_{i})=\ln \left({\frac {p_{i}}{1-p_{i}}}\right)=\beta _{0}+\beta _{1}x_{1,i}+\cdots +\beta _{m}x_{m,i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/be13d1b675b8fb6e9db4835cd151b5fc9076e282" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:82.06ex; height:6.176ex;" alt="{\displaystyle \operatorname {logit} (\operatorname {\mathbb {E} } [Y_{i}\mid x_{1,i},\ldots ,x_{m,i}])=\operatorname {logit} (p_{i})=\ln \left({\frac {p_{i}}{1-p_{i}}}\right)=\beta _{0}+\beta _{1}x_{1,i}+\cdots +\beta _{m}x_{m,i}}"></span></dd></dl> <p>Written using the more compact notation described above, this is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {logit} (\operatorname {\mathbb {E} } [Y_{i}\mid \mathbf {X} _{i}])=\operatorname {logit} (p_{i})=\ln \left({\frac {p_{i}}{1-p_{i}}}\right)={\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>logit</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">E</mi> </mrow> </mrow> <mo>⁡<!-- --></mo> <mo stretchy="false">[</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>∣<!-- ∣ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">]</mo> <mo stretchy="false">)</mo> <mo>=</mo> <mi>logit</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \operatorname {logit} (\operatorname {\mathbb {E} } [Y_{i}\mid \mathbf {X} _{i}])=\operatorname {logit} (p_{i})=\ln \left({\frac {p_{i}}{1-p_{i}}}\right)={\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/55adb25231d3cea8f63c4fe56a8677f6eb59415f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:51.881ex; height:6.176ex;" alt="{\displaystyle \operatorname {logit} (\operatorname {\mathbb {E} } [Y_{i}\mid \mathbf {X} _{i}])=\operatorname {logit} (p_{i})=\ln \left({\frac {p_{i}}{1-p_{i}}}\right)={\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}"></span></dd></dl> <p>This formulation expresses logistic regression as a type of <a href="/wiki/Generalized_linear_model" title="Generalized linear model">generalized linear model</a>, which predicts variables with various types of <a href="/wiki/Probability_distribution" title="Probability distribution">probability distributions</a> by fitting a linear predictor function of the above form to some sort of arbitrary transformation of the expected value of the variable. </p><p>The intuition for transforming using the logit function (the natural log of the odds) was explained above<sup class="noprint Inline-Template" style="margin-left:0.1em; white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Please_clarify" title="Wikipedia:Please clarify"><span title="What exactly was explained? (February 2023)">clarification needed</span></a></i>]</sup>. It also has the practical effect of converting the probability (which is bounded to be between 0 and 1) to a variable that ranges over <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (-\infty ,+\infty )}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mo>−<!-- − --></mo> <mi mathvariant="normal">∞<!-- ∞ --></mi> <mo>,</mo> <mo>+</mo> <mi mathvariant="normal">∞<!-- ∞ --></mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (-\infty ,+\infty )}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e577bfa9ed1c0f83ed643206abae3cd2f234cf9c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.107ex; height:2.843ex;" alt="{\displaystyle (-\infty ,+\infty )}"></span> — thereby matching the potential range of the linear prediction function on the right side of the equation. </p><p>Both the probabilities <i>p</i><sub><i>i</i></sub> and the regression coefficients are unobserved, and the means of determining them is not part of the model itself. They are typically determined by some sort of optimization procedure, e.g. <a href="/wiki/Maximum_likelihood_estimation" title="Maximum likelihood estimation">maximum likelihood estimation</a>, that finds values that best fit the observed data (i.e. that give the most accurate predictions for the data already observed), usually subject to <a href="/wiki/Regularization_(mathematics)" title="Regularization (mathematics)">regularization</a> conditions that seek to exclude unlikely values, e.g. extremely large values for any of the regression coefficients. The use of a regularization condition is equivalent to doing <a href="/wiki/Maximum_a_posteriori" class="mw-redirect" title="Maximum a posteriori">maximum a posteriori</a> (MAP) estimation, an extension of maximum likelihood. (Regularization is most commonly done using <a href="/wiki/Ridge_regression" title="Ridge regression">a squared regularizing function</a>, which is equivalent to placing a zero-mean <a href="/wiki/Gaussian_distribution" class="mw-redirect" title="Gaussian distribution">Gaussian</a> <a href="/wiki/Prior_distribution" class="mw-redirect" title="Prior distribution">prior distribution</a> on the coefficients, but other regularizers are also possible.) Whether or not regularization is used, it is usually not possible to find a closed-form solution; instead, an iterative numerical method must be used, such as <a href="/wiki/Iteratively_reweighted_least_squares" title="Iteratively reweighted least squares">iteratively reweighted least squares</a> (IRLS) or, more commonly these days, a <a href="/wiki/Quasi-Newton_method" title="Quasi-Newton method">quasi-Newton method</a> such as the <a href="/wiki/L-BFGS" class="mw-redirect" title="L-BFGS">L-BFGS method</a>.<sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup> </p><p>The interpretation of the <i>β</i><sub><i>j</i></sub> parameter estimates is as the additive effect on the log of the <a href="/wiki/Odds" title="Odds">odds</a> for a unit change in the <i>j</i> the explanatory variable. In the case of a dichotomous explanatory variable, for instance, gender <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e^{\beta }}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>β<!-- β --></mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle e^{\beta }}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/828688a27628ed5f06a50a9c9f161c85238f953c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.258ex; height:2.676ex;" alt="{\displaystyle e^{\beta }}"></span> is the estimate of the odds of having the outcome for, say, males compared with females. </p><p>An equivalent formula uses the inverse of the logit function, which is the <a href="/wiki/Logistic_function" title="Logistic function">logistic function</a>, i.e.: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {\mathbb {E} } [Y_{i}\mid \mathbf {X} _{i}]=p_{i}=\operatorname {logit} ^{-1}({\boldsymbol {\beta }}\cdot \mathbf {X} _{i})={\frac {1}{1+e^{-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">E</mi> </mrow> </mrow> <mo>⁡<!-- --></mo> <mo stretchy="false">[</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>∣<!-- ∣ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">]</mo> <mo>=</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <msup> <mi>logit</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \operatorname {\mathbb {E} } [Y_{i}\mid \mathbf {X} _{i}]=p_{i}=\operatorname {logit} ^{-1}({\boldsymbol {\beta }}\cdot \mathbf {X} _{i})={\frac {1}{1+e^{-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/337230f2ea410541cdcf94442ce37b92515dd364" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:46.741ex; height:5.676ex;" alt="{\displaystyle \operatorname {\mathbb {E} } [Y_{i}\mid \mathbf {X} _{i}]=p_{i}=\operatorname {logit} ^{-1}({\boldsymbol {\beta }}\cdot \mathbf {X} _{i})={\frac {1}{1+e^{-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}}"></span></dd></dl> <p>The formula can also be written as a <a href="/wiki/Probability_distribution" title="Probability distribution">probability distribution</a> (specifically, using a <a href="/wiki/Probability_mass_function" title="Probability mass function">probability mass function</a>): </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(Y_{i}=y\mid \mathbf {X} _{i})={p_{i}}^{y}(1-p_{i})^{1-y}=\left({\frac {e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}{1+e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{y}\left(1-{\frac {e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}{1+e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{1-y}={\frac {e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}\cdot y}}{1+e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mi>y</mi> <mo>∣<!-- ∣ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <msup> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>y</mi> </mrow> </msup> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>−<!-- − --></mo> <mi>y</mi> </mrow> </msup> <mo>=</mo> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>y</mi> </mrow> </msup> <msup> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>−<!-- − --></mo> <mi>y</mi> </mrow> </msup> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <mi>y</mi> </mrow> </msup> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(Y_{i}=y\mid \mathbf {X} _{i})={p_{i}}^{y}(1-p_{i})^{1-y}=\left({\frac {e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}{1+e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{y}\left(1-{\frac {e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}{1+e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{1-y}={\frac {e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}\cdot y}}{1+e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/73c44072fc930a6de2097d3f78e474579374d239" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:83.003ex; height:6.843ex;" alt="{\displaystyle \Pr(Y_{i}=y\mid \mathbf {X} _{i})={p_{i}}^{y}(1-p_{i})^{1-y}=\left({\frac {e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}{1+e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{y}\left(1-{\frac {e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}{1+e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{1-y}={\frac {e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}\cdot y}}{1+e^{{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}}"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="As_a_latent-variable_model">As a latent-variable model</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=24" title="Edit section: As a latent-variable model"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The logistic model has an equivalent formulation as a <a href="/wiki/Latent-variable_model" class="mw-redirect" title="Latent-variable model">latent-variable model</a>. This formulation is common in the theory of <a href="/wiki/Discrete_choice" title="Discrete choice">discrete choice</a> models and makes it easier to extend to certain more complicated models with multiple, correlated choices, as well as to compare logistic regression to the closely related <a href="/wiki/Probit_model" title="Probit model">probit model</a>. </p><p>Imagine that, for each trial <i>i</i>, there is a continuous <a href="/wiki/Latent_variable" class="mw-redirect" title="Latent variable">latent variable</a> <i>Y</i><sub><i>i</i></sub><sup>*</sup> (i.e. an unobserved <a href="/wiki/Random_variable" title="Random variable">random variable</a>) that is distributed as follows: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Y_{i}^{\ast }={\boldsymbol {\beta }}\cdot \mathbf {X} _{i}+\varepsilon _{i}\,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>+</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mspace width="thinmathspace" /> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Y_{i}^{\ast }={\boldsymbol {\beta }}\cdot \mathbf {X} _{i}+\varepsilon _{i}\,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b47b6a98f0ec6b7837ae0141ae3a3089185da4b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:17.196ex; height:2.843ex;" alt="{\displaystyle Y_{i}^{\ast }={\boldsymbol {\beta }}\cdot \mathbf {X} _{i}+\varepsilon _{i}\,}"></span></dd></dl> <p>where </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon _{i}\sim \operatorname {Logistic} (0,1)\,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>∼<!-- ∼ --></mo> <mi>Logistic</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mspace width="thinmathspace" /> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varepsilon _{i}\sim \operatorname {Logistic} (0,1)\,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e68d4c133a5b52f17b61def1416dde85946f8f01" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.462ex; height:2.843ex;" alt="{\displaystyle \varepsilon _{i}\sim \operatorname {Logistic} (0,1)\,}"></span></dd></dl> <p>i.e. the latent variable can be written directly in terms of the linear predictor function and an additive random <a href="/wiki/Error_variable" class="mw-redirect" title="Error variable">error variable</a> that is distributed according to a standard <a href="/wiki/Logistic_distribution" title="Logistic distribution">logistic distribution</a>. </p><p>Then <i>Y</i><sub><i>i</i></sub> can be viewed as an indicator for whether this latent variable is positive: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Y_{i}={\begin{cases}1&{\text{if }}Y_{i}^{\ast }>0\ {\text{ i.e. }}{-\varepsilon _{i}}<{\boldsymbol {\beta }}\cdot \mathbf {X} _{i},\\0&{\text{otherwise.}}\end{cases}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mn>1</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if </mtext> </mrow> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> <mo>></mo> <mn>0</mn> <mtext> </mtext> <mrow class="MJX-TeXAtom-ORD"> <mtext> i.e. </mtext> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> <mo><</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>otherwise.</mtext> </mrow> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Y_{i}={\begin{cases}1&{\text{if }}Y_{i}^{\ast }>0\ {\text{ i.e. }}{-\varepsilon _{i}}<{\boldsymbol {\beta }}\cdot \mathbf {X} _{i},\\0&{\text{otherwise.}}\end{cases}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0cba35fc217b141ba310bdbdd56f926d859e5806" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:38.567ex; height:6.176ex;" alt="{\displaystyle Y_{i}={\begin{cases}1&{\text{if }}Y_{i}^{\ast }>0\ {\text{ i.e. }}{-\varepsilon _{i}}<{\boldsymbol {\beta }}\cdot \mathbf {X} _{i},\\0&{\text{otherwise.}}\end{cases}}}"></span></dd></dl> <p>The choice of modeling the error variable specifically with a standard logistic distribution, rather than a general logistic distribution with the location and scale set to arbitrary values, seems restrictive, but in fact, it is not. It must be kept in mind that we can choose the regression coefficients ourselves, and very often can use them to offset changes in the parameters of the error variable's distribution. For example, a logistic error-variable distribution with a non-zero location parameter <i>μ</i> (which sets the mean) is equivalent to a distribution with a zero location parameter, where <i>μ</i> has been added to the intercept coefficient. Both situations produce the same value for <i>Y</i><sub><i>i</i></sub><sup>*</sup> regardless of settings of explanatory variables. Similarly, an arbitrary scale parameter <i>s</i> is equivalent to setting the scale parameter to 1 and then dividing all regression coefficients by <i>s</i>. In the latter case, the resulting value of <i>Y</i><sub><i>i</i></sub><sup><i>*</i></sup> will be smaller by a factor of <i>s</i> than in the former case, for all sets of explanatory variables — but critically, it will always remain on the same side of 0, and hence lead to the same <i>Y</i><sub><i>i</i></sub> choice. </p><p>(This predicts that the irrelevancy of the scale parameter may not carry over into more complex models where more than two choices are available.) </p><p>It turns out that this formulation is exactly equivalent to the preceding one, phrased in terms of the <a href="/wiki/Generalized_linear_model" title="Generalized linear model">generalized linear model</a> and without any <a href="/wiki/Latent_variable" class="mw-redirect" title="Latent variable">latent variables</a>. This can be shown as follows, using the fact that the <a href="/wiki/Cumulative_distribution_function" title="Cumulative distribution function">cumulative distribution function</a> (CDF) of the standard <a href="/wiki/Logistic_distribution" title="Logistic distribution">logistic distribution</a> is the <a href="/wiki/Logistic_function" title="Logistic function">logistic function</a>, which is the inverse of the <a href="/wiki/Logit_function" class="mw-redirect" title="Logit function">logit function</a>, i.e. </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(\varepsilon _{i}<x)=\operatorname {logit} ^{-1}(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo><</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msup> <mi>logit</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(\varepsilon _{i}<x)=\operatorname {logit} ^{-1}(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3cdc1300b059594727321d749e45e893251af4d5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:23.709ex; height:3.176ex;" alt="{\displaystyle \Pr(\varepsilon _{i}<x)=\operatorname {logit} ^{-1}(x)}"></span></dd></dl> <p>Then: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\Pr(Y_{i}=1\mid \mathbf {X} _{i})&=\Pr(Y_{i}^{\ast }>0\mid \mathbf {X} _{i})\\[5pt]&=\Pr({\boldsymbol {\beta }}\cdot \mathbf {X} _{i}+\varepsilon _{i}>0)\\[5pt]&=\Pr(\varepsilon _{i}>-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})\\[5pt]&=\Pr(\varepsilon _{i}<{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&&{\text{(because the logistic distribution is symmetric)}}\\[5pt]&=\operatorname {logit} ^{-1}({\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&\\[5pt]&=p_{i}&&{\text{(see above)}}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.8em 0.8em 0.8em 0.8em 0.8em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo>∣<!-- ∣ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> <mo>></mo> <mn>0</mn> <mo>∣<!-- ∣ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>+</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>></mo> <mn>0</mn> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>></mo> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo><</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd /> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>(because the logistic distribution is symmetric)</mtext> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <msup> <mi>logit</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd /> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mtd> <mtd /> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>(see above)</mtext> </mrow> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\Pr(Y_{i}=1\mid \mathbf {X} _{i})&=\Pr(Y_{i}^{\ast }>0\mid \mathbf {X} _{i})\\[5pt]&=\Pr({\boldsymbol {\beta }}\cdot \mathbf {X} _{i}+\varepsilon _{i}>0)\\[5pt]&=\Pr(\varepsilon _{i}>-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})\\[5pt]&=\Pr(\varepsilon _{i}<{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&&{\text{(because the logistic distribution is symmetric)}}\\[5pt]&=\operatorname {logit} ^{-1}({\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&\\[5pt]&=p_{i}&&{\text{(see above)}}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/67ce399af3b2241cc7121b48c60ceaf626e430c5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -11.569ex; margin-bottom: -0.269ex; width:90.125ex; height:24.843ex;" alt="{\displaystyle {\begin{aligned}\Pr(Y_{i}=1\mid \mathbf {X} _{i})&=\Pr(Y_{i}^{\ast }>0\mid \mathbf {X} _{i})\\[5pt]&=\Pr({\boldsymbol {\beta }}\cdot \mathbf {X} _{i}+\varepsilon _{i}>0)\\[5pt]&=\Pr(\varepsilon _{i}>-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})\\[5pt]&=\Pr(\varepsilon _{i}<{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&&{\text{(because the logistic distribution is symmetric)}}\\[5pt]&=\operatorname {logit} ^{-1}({\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&\\[5pt]&=p_{i}&&{\text{(see above)}}\end{aligned}}}"></span></dd></dl> <p>This formulation—which is standard in <a href="/wiki/Discrete_choice" title="Discrete choice">discrete choice</a> models—makes clear the relationship between logistic regression (the "logit model") and the <a href="/wiki/Probit_model" title="Probit model">probit model</a>, which uses an error variable distributed according to a standard <a href="/wiki/Normal_distribution" title="Normal distribution">normal distribution</a> instead of a standard logistic distribution. Both the logistic and normal distributions are symmetric with a basic unimodal, "bell curve" shape. The only difference is that the logistic distribution has somewhat <a href="/wiki/Heavy-tailed_distribution" title="Heavy-tailed distribution">heavier tails</a>, which means that it is less sensitive to outlying data (and hence somewhat more <a href="/wiki/Robust_statistics" title="Robust statistics">robust</a> to model mis-specifications or erroneous data). </p> <div class="mw-heading mw-heading3"><h3 id="Two-way_latent-variable_model">Two-way latent-variable model</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=25" title="Edit section: Two-way latent-variable model"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Yet another formulation uses two separate latent variables: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}Y_{i}^{0\ast }&={\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}+\varepsilon _{0}\,\\Y_{i}^{1\ast }&={\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}+\varepsilon _{1}\,\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> </mtd> <mtd> <mi></mi> <mo>=</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>+</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mspace width="thinmathspace" /> </mtd> </mtr> <mtr> <mtd> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> </mtd> <mtd> <mi></mi> <mo>=</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>+</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mspace width="thinmathspace" /> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}Y_{i}^{0\ast }&={\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}+\varepsilon _{0}\,\\Y_{i}^{1\ast }&={\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}+\varepsilon _{1}\,\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9e84a03b86249184b96b031e2eeaf9de2515b404" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:20.078ex; height:6.509ex;" alt="{\displaystyle {\begin{aligned}Y_{i}^{0\ast }&={\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}+\varepsilon _{0}\,\\Y_{i}^{1\ast }&={\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}+\varepsilon _{1}\,\end{aligned}}}"></span></dd></dl> <p>where </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\varepsilon _{0}&\sim \operatorname {EV} _{1}(0,1)\\\varepsilon _{1}&\sim \operatorname {EV} _{1}(0,1)\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mtd> <mtd> <mi></mi> <mo>∼<!-- ∼ --></mo> <msub> <mi>EV</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mtd> <mtd> <mi></mi> <mo>∼<!-- ∼ --></mo> <msub> <mi>EV</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\varepsilon _{0}&\sim \operatorname {EV} _{1}(0,1)\\\varepsilon _{1}&\sim \operatorname {EV} _{1}(0,1)\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/21f99d933b1af2401223c7b35cbe95ab50968174" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:15.536ex; height:6.176ex;" alt="{\displaystyle {\begin{aligned}\varepsilon _{0}&\sim \operatorname {EV} _{1}(0,1)\\\varepsilon _{1}&\sim \operatorname {EV} _{1}(0,1)\end{aligned}}}"></span></dd></dl> <p>where <i>EV</i><sub>1</sub>(0,1) is a standard type-1 <a href="/wiki/Extreme_value_distribution" class="mw-redirect" title="Extreme value distribution">extreme value distribution</a>: i.e. </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(\varepsilon _{0}=x)=\Pr(\varepsilon _{1}=x)=e^{-x}e^{-e^{-x}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>x</mi> </mrow> </msup> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>x</mi> </mrow> </msup> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(\varepsilon _{0}=x)=\Pr(\varepsilon _{1}=x)=e^{-x}e^{-e^{-x}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1480ec9aab56bbefb6916698be309a6fe35f85f7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:36.797ex; height:3.509ex;" alt="{\displaystyle \Pr(\varepsilon _{0}=x)=\Pr(\varepsilon _{1}=x)=e^{-x}e^{-e^{-x}}}"></span></dd></dl> <p>Then </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Y_{i}={\begin{cases}1&{\text{if }}Y_{i}^{1\ast }>Y_{i}^{0\ast },\\0&{\text{otherwise.}}\end{cases}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>{</mo> <mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false"> <mtr> <mtd> <mn>1</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>if </mtext> </mrow> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> <mo>></mo> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> <mo>,</mo> </mtd> </mtr> <mtr> <mtd> <mn>0</mn> </mtd> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>otherwise.</mtext> </mrow> </mtd> </mtr> </mtable> <mo fence="true" stretchy="true" symmetric="true"></mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Y_{i}={\begin{cases}1&{\text{if }}Y_{i}^{1\ast }>Y_{i}^{0\ast },\\0&{\text{otherwise.}}\end{cases}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3d267a820539ad6e4f16ced8f8bdfe4bd908d8c6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:24.466ex; height:6.176ex;" alt="{\displaystyle Y_{i}={\begin{cases}1&{\text{if }}Y_{i}^{1\ast }>Y_{i}^{0\ast },\\0&{\text{otherwise.}}\end{cases}}}"></span></dd></dl> <p>This model has a separate latent variable and a separate set of regression coefficients for each possible outcome of the dependent variable. The reason for this separation is that it makes it easy to extend logistic regression to multi-outcome categorical variables, as in the <a href="/wiki/Multinomial_logit" class="mw-redirect" title="Multinomial logit">multinomial logit</a> model. In such a model, it is natural to model each possible outcome using a different set of regression coefficients. It is also possible to motivate each of the separate latent variables as the theoretical <a href="/wiki/Utility" title="Utility">utility</a> associated with making the associated choice, and thus motivate logistic regression in terms of <a href="/wiki/Utility_theory" class="mw-redirect" title="Utility theory">utility theory</a>. (In terms of utility theory, a rational actor always chooses the choice with the greatest associated utility.) This is the approach taken by economists when formulating <a href="/wiki/Discrete_choice" title="Discrete choice">discrete choice</a> models, because it both provides a theoretically strong foundation and facilitates intuitions about the model, which in turn makes it easy to consider various sorts of extensions. (See the example below.) </p><p>The choice of the type-1 <a href="/wiki/Extreme_value_distribution" class="mw-redirect" title="Extreme value distribution">extreme value distribution</a> seems fairly arbitrary, but it makes the mathematics work out, and it may be possible to justify its use through <a href="/wiki/Rational_choice_theory" class="mw-redirect" title="Rational choice theory">rational choice theory</a>. </p><p>It turns out that this model is equivalent to the previous model, although this seems non-obvious, since there are now two sets of regression coefficients and error variables, and the error variables have a different distribution. In fact, this model reduces directly to the previous one with the following substitutions: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\beta }}={\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>=</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\beta }}={\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/49df8c4dd8daebedc2d4e53a7b68251c6cb0defe" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.65ex; height:2.676ex;" alt="{\displaystyle {\boldsymbol {\beta }}={\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0}}"></span></dd> <dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon =\varepsilon _{1}-\varepsilon _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>ε<!-- ε --></mi> <mo>=</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varepsilon =\varepsilon _{1}-\varepsilon _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a2f90360eb707a28a0ac9c073ad6fdf6f912085c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:11.298ex; height:2.343ex;" alt="{\displaystyle \varepsilon =\varepsilon _{1}-\varepsilon _{0}}"></span></dd></dl> <p>An intuition for this comes from the fact that, since we choose based on the maximum of two values, only their difference matters, not the exact values — and this effectively removes one <a href="/wiki/Degrees_of_freedom_(statistics)" title="Degrees of freedom (statistics)">degree of freedom</a>. Another critical fact is that the difference of two type-1 extreme-value-distributed variables is a logistic distribution, i.e. <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon =\varepsilon _{1}-\varepsilon _{0}\sim \operatorname {Logistic} (0,1).}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>ε<!-- ε --></mi> <mo>=</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>∼<!-- ∼ --></mo> <mi>Logistic</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varepsilon =\varepsilon _{1}-\varepsilon _{0}\sim \operatorname {Logistic} (0,1).}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/dea982933f4abd111b5de86634cff1bcd2ea12fa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:28.136ex; height:2.843ex;" alt="{\displaystyle \varepsilon =\varepsilon _{1}-\varepsilon _{0}\sim \operatorname {Logistic} (0,1).}"></span> We can demonstrate the equivalent as follows: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\Pr(Y_{i}=1\mid \mathbf {X} _{i})={}&\Pr \left(Y_{i}^{1\ast }>Y_{i}^{0\ast }\mid \mathbf {X} _{i}\right)&\\[5pt]={}&\Pr \left(Y_{i}^{1\ast }-Y_{i}^{0\ast }>0\mid \mathbf {X} _{i}\right)&\\[5pt]={}&\Pr \left({\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}+\varepsilon _{1}-\left({\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}+\varepsilon _{0}\right)>0\right)&\\[5pt]={}&\Pr \left(({\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}-{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i})+(\varepsilon _{1}-\varepsilon _{0})>0\right)&\\[5pt]={}&\Pr(({\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0})\cdot \mathbf {X} _{i}+(\varepsilon _{1}-\varepsilon _{0})>0)&\\[5pt]={}&\Pr(({\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0})\cdot \mathbf {X} _{i}+\varepsilon >0)&&{\text{(substitute }}\varepsilon {\text{ as above)}}\\[5pt]={}&\Pr({\boldsymbol {\beta }}\cdot \mathbf {X} _{i}+\varepsilon >0)&&{\text{(substitute }}{\boldsymbol {\beta }}{\text{ as above)}}\\[5pt]={}&\Pr(\varepsilon >-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&&{\text{(now, same as above model)}}\\[5pt]={}&\Pr(\varepsilon <{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&\\[5pt]={}&\operatorname {logit} ^{-1}({\boldsymbol {\beta }}\cdot \mathbf {X} _{i})\\[5pt]={}&p_{i}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.8em 0.8em 0.8em 0.8em 0.8em 0.8em 0.8em 0.8em 0.8em 0.8em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo>∣<!-- ∣ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <mi></mi> <mo movablelimits="true" form="prefix">Pr</mo> <mrow> <mo>(</mo> <mrow> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> <mo>></mo> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> <mo>∣<!-- ∣ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> <mo>)</mo> </mrow> </mtd> <mtd /> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <mi></mi> <mo movablelimits="true" form="prefix">Pr</mo> <mrow> <mo>(</mo> <mrow> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> <mo>−<!-- − --></mo> <msubsup> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> <mo>></mo> <mn>0</mn> <mo>∣<!-- ∣ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> <mo>)</mo> </mrow> </mtd> <mtd /> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <mi></mi> <mo movablelimits="true" form="prefix">Pr</mo> <mrow> <mo>(</mo> <mrow> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>+</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>−<!-- − --></mo> <mrow> <mo>(</mo> <mrow> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>+</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mrow> <mo>)</mo> </mrow> <mo>></mo> <mn>0</mn> </mrow> <mo>)</mo> </mrow> </mtd> <mtd /> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <mi></mi> <mo movablelimits="true" form="prefix">Pr</mo> <mrow> <mo>(</mo> <mrow> <mo stretchy="false">(</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>+</mo> <mo stretchy="false">(</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo stretchy="false">)</mo> <mo>></mo> <mn>0</mn> </mrow> <mo>)</mo> </mrow> </mtd> <mtd /> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <mi></mi> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mo stretchy="false">(</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo stretchy="false">)</mo> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>+</mo> <mo stretchy="false">(</mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo stretchy="false">)</mo> <mo>></mo> <mn>0</mn> <mo stretchy="false">)</mo> </mtd> <mtd /> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <mi></mi> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mo stretchy="false">(</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo stretchy="false">)</mo> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>+</mo> <mi>ε<!-- ε --></mi> <mo>></mo> <mn>0</mn> <mo stretchy="false">)</mo> </mtd> <mtd /> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>(substitute </mtext> </mrow> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mtext> as above)</mtext> </mrow> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <mi></mi> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>+</mo> <mi>ε<!-- ε --></mi> <mo>></mo> <mn>0</mn> <mo stretchy="false">)</mo> </mtd> <mtd /> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>(substitute </mtext> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mtext> as above)</mtext> </mrow> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <mi></mi> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>ε<!-- ε --></mi> <mo>></mo> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd /> <mtd> <mrow class="MJX-TeXAtom-ORD"> <mtext>(now, same as above model)</mtext> </mrow> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <mi></mi> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>ε<!-- ε --></mi> <mo><</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> <mtd /> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <msup> <mi>logit</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\Pr(Y_{i}=1\mid \mathbf {X} _{i})={}&\Pr \left(Y_{i}^{1\ast }>Y_{i}^{0\ast }\mid \mathbf {X} _{i}\right)&\\[5pt]={}&\Pr \left(Y_{i}^{1\ast }-Y_{i}^{0\ast }>0\mid \mathbf {X} _{i}\right)&\\[5pt]={}&\Pr \left({\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}+\varepsilon _{1}-\left({\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}+\varepsilon _{0}\right)>0\right)&\\[5pt]={}&\Pr \left(({\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}-{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i})+(\varepsilon _{1}-\varepsilon _{0})>0\right)&\\[5pt]={}&\Pr(({\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0})\cdot \mathbf {X} _{i}+(\varepsilon _{1}-\varepsilon _{0})>0)&\\[5pt]={}&\Pr(({\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0})\cdot \mathbf {X} _{i}+\varepsilon >0)&&{\text{(substitute }}\varepsilon {\text{ as above)}}\\[5pt]={}&\Pr({\boldsymbol {\beta }}\cdot \mathbf {X} _{i}+\varepsilon >0)&&{\text{(substitute }}{\boldsymbol {\beta }}{\text{ as above)}}\\[5pt]={}&\Pr(\varepsilon >-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&&{\text{(now, same as above model)}}\\[5pt]={}&\Pr(\varepsilon <{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&\\[5pt]={}&\operatorname {logit} ^{-1}({\boldsymbol {\beta }}\cdot \mathbf {X} _{i})\\[5pt]={}&p_{i}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/be3b57ca6773ef745cdfd82367611e9394215f9e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -22.838ex; width:91.879ex; height:46.843ex;" alt="{\displaystyle {\begin{aligned}\Pr(Y_{i}=1\mid \mathbf {X} _{i})={}&\Pr \left(Y_{i}^{1\ast }>Y_{i}^{0\ast }\mid \mathbf {X} _{i}\right)&\\[5pt]={}&\Pr \left(Y_{i}^{1\ast }-Y_{i}^{0\ast }>0\mid \mathbf {X} _{i}\right)&\\[5pt]={}&\Pr \left({\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}+\varepsilon _{1}-\left({\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}+\varepsilon _{0}\right)>0\right)&\\[5pt]={}&\Pr \left(({\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}-{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i})+(\varepsilon _{1}-\varepsilon _{0})>0\right)&\\[5pt]={}&\Pr(({\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0})\cdot \mathbf {X} _{i}+(\varepsilon _{1}-\varepsilon _{0})>0)&\\[5pt]={}&\Pr(({\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0})\cdot \mathbf {X} _{i}+\varepsilon >0)&&{\text{(substitute }}\varepsilon {\text{ as above)}}\\[5pt]={}&\Pr({\boldsymbol {\beta }}\cdot \mathbf {X} _{i}+\varepsilon >0)&&{\text{(substitute }}{\boldsymbol {\beta }}{\text{ as above)}}\\[5pt]={}&\Pr(\varepsilon >-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&&{\text{(now, same as above model)}}\\[5pt]={}&\Pr(\varepsilon <{\boldsymbol {\beta }}\cdot \mathbf {X} _{i})&\\[5pt]={}&\operatorname {logit} ^{-1}({\boldsymbol {\beta }}\cdot \mathbf {X} _{i})\\[5pt]={}&p_{i}\end{aligned}}}"></span></dd></dl> <div class="mw-heading mw-heading4"><h4 id="Example_2">Example</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=26" title="Edit section: Example"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <dl><dd><style data-mw-deduplicate="TemplateStyles:r1251242444">.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}</style><table class="box-Original_research plainlinks metadata ambox ambox-content ambox-Original_research" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/b/b4/Ambox_important.svg/40px-Ambox_important.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/b/b4/Ambox_important.svg/60px-Ambox_important.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/b/b4/Ambox_important.svg/80px-Ambox_important.svg.png 2x" data-file-width="40" data-file-height="40" /></span></span></div></td><td class="mbox-text"><div class="mbox-text-span">This example <b>possibly contains <a href="/wiki/Wikipedia:No_original_research" title="Wikipedia:No original research">original research</a></b>.<span class="hide-when-compact"> Relevant discussion may be found on <a href="/wiki/Talk:Logistic_regression#Utility_theory_/_Elections_example_is_irrelevant" title="Talk:Logistic regression">Talk:Logistic regression</a>. Please <a class="external text" href="https://en.wikipedia.org/w/index.php?title=Logistic_regression&action=edit">improve it</a> by <a href="/wiki/Wikipedia:Verifiability" title="Wikipedia:Verifiability">verifying</a> the claims made and adding <a href="/wiki/Wikipedia:Citing_sources#Inline_citations" title="Wikipedia:Citing sources">inline citations</a>. Statements consisting only of original research should be removed.</span> <span class="date-container"><i>(<span class="date">May 2022</span>)</i></span><span class="hide-when-compact"><i> (<small><a href="/wiki/Help:Maintenance_template_removal" title="Help:Maintenance template removal">Learn how and when to remove this message</a></small>)</i></span></div></td></tr></tbody></table></dd></dl> <p>As an example, consider a province-level election where the choice is between a right-of-center party, a left-of-center party, and a secessionist party (e.g. the <a href="/wiki/Parti_Qu%C3%A9b%C3%A9cois" title="Parti Québécois">Parti Québécois</a>, which wants <a href="/wiki/Quebec" title="Quebec">Quebec</a> to secede from <a href="/wiki/Canada" title="Canada">Canada</a>). We would then use three latent variables, one for each choice. Then, in accordance with <a href="/wiki/Utility_theory" class="mw-redirect" title="Utility theory">utility theory</a>, we can then interpret the latent variables as expressing the <a href="/wiki/Utility" title="Utility">utility</a> that results from making each of the choices. We can also interpret the regression coefficients as indicating the strength that the associated factor (i.e. explanatory variable) has in contributing to the utility — or more correctly, the amount by which a unit change in an explanatory variable changes the utility of a given choice. A voter might expect that the right-of-center party would lower taxes, especially on rich people. This would give low-income people no benefit, i.e. no change in utility (since they usually don't pay taxes); would cause moderate benefit (i.e. somewhat more money, or moderate utility increase) for middle-incoming people; would cause significant benefits for high-income people. On the other hand, the left-of-center party might be expected to raise taxes and offset it with increased welfare and other assistance for the lower and middle classes. This would cause significant positive benefit to low-income people, perhaps a weak benefit to middle-income people, and significant negative benefit to high-income people. Finally, the secessionist party would take no direct actions on the economy, but simply secede. A low-income or middle-income voter might expect basically no clear utility gain or loss from this, but a high-income voter might expect negative utility since he/she is likely to own companies, which will have a harder time doing business in such an environment and probably lose money. </p><p>These intuitions can be expressed as follows: </p> <table class="wikitable"> <caption>Estimated strength of regression coefficient for different outcomes (party choices) and different values of explanatory variables </caption> <tbody><tr> <th></th> <th>Center-right</th> <th>Center-left</th> <th>Secessionist </th></tr> <tr> <th>High-income </th> <td>strong +</td> <td>strong −</td> <td>strong − </td></tr> <tr> <th>Middle-income </th> <td>moderate +</td> <td>weak +</td> <td>none </td></tr> <tr> <th>Low-income </th> <td>none</td> <td>strong +</td> <td>none </td></tr> </tbody></table> <p>This clearly shows that </p> <ol><li>Separate sets of regression coefficients need to exist for each choice. When phrased in terms of utility, this can be seen very easily. Different choices have different effects on net utility; furthermore, the effects vary in complex ways that depend on the characteristics of each individual, so there need to be separate sets of coefficients for each characteristic, not simply a single extra per-choice characteristic.</li> <li>Even though income is a continuous variable, its effect on utility is too complex for it to be treated as a single variable. Either it needs to be directly split up into ranges, or higher powers of income need to be added so that <a href="/wiki/Polynomial_regression" title="Polynomial regression">polynomial regression</a> on income is effectively done.</li></ol> <div class="mw-heading mw-heading3"><h3 id="As_a_"log-linear"_model"><span id="As_a_.22log-linear.22_model"></span><span class="anchor" id="log-linear_model"></span>As a "log-linear" model</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=27" title="Edit section: As a "log-linear" model"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Yet another formulation combines the two-way latent variable formulation above with the original formulation higher up without latent variables, and in the process provides a link to one of the standard formulations of the <a href="/wiki/Multinomial_logit" class="mw-redirect" title="Multinomial logit">multinomial logit</a>. </p><p>Here, instead of writing the <a href="/wiki/Logit" title="Logit">logit</a> of the probabilities <i>p</i><sub><i>i</i></sub> as a linear predictor, we separate the linear predictor into two, one for each of the two outcomes: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\ln \Pr(Y_{i}=0)&={\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}-\ln Z\\\ln \Pr(Y_{i}=1)&={\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}-\ln Z\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>0</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>−<!-- − --></mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mi>Z</mi> </mtd> </mtr> <mtr> <mtd> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>−<!-- − --></mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mi>Z</mi> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\ln \Pr(Y_{i}=0)&={\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}-\ln Z\\\ln \Pr(Y_{i}=1)&={\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}-\ln Z\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/68a7609c762d9da114d14f24baadcdbeacf2d0f9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:30.825ex; height:6.176ex;" alt="{\displaystyle {\begin{aligned}\ln \Pr(Y_{i}=0)&={\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}-\ln Z\\\ln \Pr(Y_{i}=1)&={\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}-\ln Z\end{aligned}}}"></span></dd></dl> <p>Two separate sets of regression coefficients have been introduced, just as in the two-way latent variable model, and the two equations appear a form that writes the <a href="/wiki/Logarithm" title="Logarithm">logarithm</a> of the associated probability as a linear predictor, with an extra term <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle -\ln Z}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo>−<!-- − --></mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mi>Z</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle -\ln Z}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bfc4529e0b901532d643b75ee89a2235538218ed" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.202ex; height:2.343ex;" alt="{\displaystyle -\ln Z}"></span> at the end. This term, as it turns out, serves as the <a href="/wiki/Normalizing_factor" class="mw-redirect" title="Normalizing factor">normalizing factor</a> ensuring that the result is a distribution. This can be seen by exponentiating both sides: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\Pr(Y_{i}=0)&={\frac {1}{Z}}e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}\\[5pt]\Pr(Y_{i}=1)&={\frac {1}{Z}}e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.8em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>0</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>Z</mi> </mfrac> </mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mtd> </mtr> <mtr> <mtd> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mi>Z</mi> </mfrac> </mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\Pr(Y_{i}=0)&={\frac {1}{Z}}e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}\\[5pt]\Pr(Y_{i}=1)&={\frac {1}{Z}}e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6e1e2a04fd15f2e5617c0606a7644fe719823960" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -5.338ex; width:22.824ex; height:11.843ex;" alt="{\displaystyle {\begin{aligned}\Pr(Y_{i}=0)&={\frac {1}{Z}}e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}\\[5pt]\Pr(Y_{i}=1)&={\frac {1}{Z}}e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}\end{aligned}}}"></span></dd></dl> <p>In this form it is clear that the purpose of <i>Z</i> is to ensure that the resulting distribution over <i>Y</i><sub><i>i</i></sub> is in fact a <a href="/wiki/Probability_distribution" title="Probability distribution">probability distribution</a>, i.e. it sums to 1. This means that <i>Z</i> is simply the sum of all un-normalized probabilities, and by dividing each probability by <i>Z</i>, the probabilities become "<a href="/wiki/Normalizing_constant" title="Normalizing constant">normalized</a>". That is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Z=e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Z</mi> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Z=e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9d8f5ec22dc094b990d333c5029f44a26ad9b167" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:19.104ex; height:2.843ex;" alt="{\displaystyle Z=e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}"></span></dd></dl> <p>and the resulting equations are </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\Pr(Y_{i}=0)&={\frac {e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}\\[5pt]\Pr(Y_{i}=1)&={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}.\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.8em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>0</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\Pr(Y_{i}=0)&={\frac {e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}\\[5pt]\Pr(Y_{i}=1)&={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}.\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1fa489d73be139142872ddccccecd567635525d5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.171ex; width:30.373ex; height:13.509ex;" alt="{\displaystyle {\begin{aligned}\Pr(Y_{i}=0)&={\frac {e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}\\[5pt]\Pr(Y_{i}=1)&={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}.\end{aligned}}}"></span></dd></dl> <p>Or generally: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(Y_{i}=c)={\frac {e^{{\boldsymbol {\beta }}_{c}\cdot \mathbf {X} _{i}}}{\sum _{h}e^{{\boldsymbol {\beta }}_{h}\cdot \mathbf {X} _{i}}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mi>c</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>c</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mrow> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>h</mi> </mrow> </munder> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>h</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(Y_{i}=c)={\frac {e^{{\boldsymbol {\beta }}_{c}\cdot \mathbf {X} _{i}}}{\sum _{h}e^{{\boldsymbol {\beta }}_{h}\cdot \mathbf {X} _{i}}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/be55e41e8219dc418ff595eb8608277d0aeea383" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.838ex; width:24.358ex; height:6.676ex;" alt="{\displaystyle \Pr(Y_{i}=c)={\frac {e^{{\boldsymbol {\beta }}_{c}\cdot \mathbf {X} _{i}}}{\sum _{h}e^{{\boldsymbol {\beta }}_{h}\cdot \mathbf {X} _{i}}}}}"></span></dd></dl> <p>This shows clearly how to generalize this formulation to more than two outcomes, as in <a href="/wiki/Multinomial_logit" class="mw-redirect" title="Multinomial logit">multinomial logit</a>. This general formulation is exactly the <a href="/wiki/Softmax_function" title="Softmax function">softmax function</a> as in </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(Y_{i}=c)=\operatorname {softmax} (c,{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i},{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i},\dots ).}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mi>c</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mi>softmax</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>c</mi> <mo>,</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>,</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo stretchy="false">)</mo> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(Y_{i}=c)=\operatorname {softmax} (c,{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i},{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i},\dots ).}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/539b06c6344cdf78f43c63c718010ae7122618aa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:45.14ex; height:2.843ex;" alt="{\displaystyle \Pr(Y_{i}=c)=\operatorname {softmax} (c,{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i},{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i},\dots ).}"></span></dd></dl> <p>In order to prove that this is equivalent to the previous model, the above model is overspecified, in that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(Y_{i}=0)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>0</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(Y_{i}=0)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cb4bcb8a4afdecbbaab37429964d882951ec9972" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.715ex; height:2.843ex;" alt="{\displaystyle \Pr(Y_{i}=0)}"></span> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(Y_{i}=1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(Y_{i}=1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0ffc9c8c6d317b0a86429cc7326906f9a23988c5" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.715ex; height:2.843ex;" alt="{\displaystyle \Pr(Y_{i}=1)}"></span> cannot be independently specified: rather <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(Y_{i}=0)+\Pr(Y_{i}=1)=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>0</mn> <mo stretchy="false">)</mo> <mo>+</mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(Y_{i}=0)+\Pr(Y_{i}=1)=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e217d34b09640af68f0bcf075013f5aaf91253b6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:28.531ex; height:2.843ex;" alt="{\displaystyle \Pr(Y_{i}=0)+\Pr(Y_{i}=1)=1}"></span> so knowing one automatically determines the other. As a result, the model is <a href="/wiki/Nonidentifiable" class="mw-redirect" title="Nonidentifiable">nonidentifiable</a>, in that multiple combinations of <i><b>β</b></i><sub>0</sub> and <i><b>β</b></i><sub>1</sub> will produce the same probabilities for all possible explanatory variables. In fact, it can be seen that adding any constant vector to both of them will produce the same probabilities: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}\Pr(Y_{i}=1)&={\frac {e^{({\boldsymbol {\beta }}_{1}+\mathbf {C} )\cdot \mathbf {X} _{i}}}{e^{({\boldsymbol {\beta }}_{0}+\mathbf {C} )\cdot \mathbf {X} _{i}}+e^{({\boldsymbol {\beta }}_{1}+\mathbf {C} )\cdot \mathbf {X} _{i}}}}\\[5pt]&={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}e^{\mathbf {C} \cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}e^{\mathbf {C} \cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}e^{\mathbf {C} \cdot \mathbf {X} _{i}}}}\\[5pt]&={\frac {e^{\mathbf {C} \cdot \mathbf {X} _{i}}e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{e^{\mathbf {C} \cdot \mathbf {X} _{i}}(e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}})}}\\[5pt]&={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}.\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.8em 0.8em 0.8em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">C</mi> </mrow> <mo stretchy="false">)</mo> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">C</mi> </mrow> <mo stretchy="false">)</mo> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">C</mi> </mrow> <mo stretchy="false">)</mo> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">C</mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> <mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">C</mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">C</mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">C</mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> <mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">C</mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo stretchy="false">(</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mrow> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}\Pr(Y_{i}=1)&={\frac {e^{({\boldsymbol {\beta }}_{1}+\mathbf {C} )\cdot \mathbf {X} _{i}}}{e^{({\boldsymbol {\beta }}_{0}+\mathbf {C} )\cdot \mathbf {X} _{i}}+e^{({\boldsymbol {\beta }}_{1}+\mathbf {C} )\cdot \mathbf {X} _{i}}}}\\[5pt]&={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}e^{\mathbf {C} \cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}e^{\mathbf {C} \cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}e^{\mathbf {C} \cdot \mathbf {X} _{i}}}}\\[5pt]&={\frac {e^{\mathbf {C} \cdot \mathbf {X} _{i}}e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{e^{\mathbf {C} \cdot \mathbf {X} _{i}}(e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}})}}\\[5pt]&={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}.\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4f545a36890435f35e006242acda552c8f62dcd0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -14.005ex; width:40.109ex; height:29.176ex;" alt="{\displaystyle {\begin{aligned}\Pr(Y_{i}=1)&={\frac {e^{({\boldsymbol {\beta }}_{1}+\mathbf {C} )\cdot \mathbf {X} _{i}}}{e^{({\boldsymbol {\beta }}_{0}+\mathbf {C} )\cdot \mathbf {X} _{i}}+e^{({\boldsymbol {\beta }}_{1}+\mathbf {C} )\cdot \mathbf {X} _{i}}}}\\[5pt]&={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}e^{\mathbf {C} \cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}e^{\mathbf {C} \cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}e^{\mathbf {C} \cdot \mathbf {X} _{i}}}}\\[5pt]&={\frac {e^{\mathbf {C} \cdot \mathbf {X} _{i}}e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{e^{\mathbf {C} \cdot \mathbf {X} _{i}}(e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}})}}\\[5pt]&={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}.\end{aligned}}}"></span></dd></dl> <p>As a result, we can simplify matters, and restore identifiability, by picking an arbitrary value for one of the two vectors. We choose to set <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\beta }}_{0}=\mathbf {0} .}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mn mathvariant="bold">0</mn> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\beta }}_{0}=\mathbf {0} .}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c671c8171bc7c312f616371b5b5bc6fc47976bfd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.67ex; height:2.676ex;" alt="{\displaystyle {\boldsymbol {\beta }}_{0}=\mathbf {0} .}"></span> Then, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}=e^{\mathbf {0} \cdot \mathbf {X} _{i}}=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mn mathvariant="bold">0</mn> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}=e^{\mathbf {0} \cdot \mathbf {X} _{i}}=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/93f649a6e984da4db90a162308eb4b39a7e1300f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:17.873ex; height:2.676ex;" alt="{\displaystyle e^{{\boldsymbol {\beta }}_{0}\cdot \mathbf {X} _{i}}=e^{\mathbf {0} \cdot \mathbf {X} _{i}}=1}"></span></dd></dl> <p>and so </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(Y_{i}=1)={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{1+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}={\frac {1}{1+e^{-{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}=p_{i}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>=</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(Y_{i}=1)={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{1+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}={\frac {1}{1+e^{-{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}=p_{i}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a3038b77f1fe296261ff0f7ced39b1593a545dcd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:44.421ex; height:6.176ex;" alt="{\displaystyle \Pr(Y_{i}=1)={\frac {e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}{1+e^{{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}={\frac {1}{1+e^{-{\boldsymbol {\beta }}_{1}\cdot \mathbf {X} _{i}}}}=p_{i}}"></span></dd></dl> <p>which shows that this formulation is indeed equivalent to the previous formulation. (As in the two-way latent variable formulation, any settings where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\beta }}={\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>=</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\beta }}={\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/49df8c4dd8daebedc2d4e53a7b68251c6cb0defe" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.65ex; height:2.676ex;" alt="{\displaystyle {\boldsymbol {\beta }}={\boldsymbol {\beta }}_{1}-{\boldsymbol {\beta }}_{0}}"></span> will produce equivalent results.) </p><p>Most treatments of the <a href="/wiki/Multinomial_logit" class="mw-redirect" title="Multinomial logit">multinomial logit</a> model start out either by extending the "log-linear" formulation presented here or the two-way latent variable formulation presented above, since both clearly show the way that the model could be extended to multi-way outcomes. In general, the presentation with latent variables is more common in <a href="/wiki/Econometrics" title="Econometrics">econometrics</a> and <a href="/wiki/Political_science" title="Political science">political science</a>, where <a href="/wiki/Discrete_choice" title="Discrete choice">discrete choice</a> models and <a href="/wiki/Utility_theory" class="mw-redirect" title="Utility theory">utility theory</a> reign, while the "log-linear" formulation here is more common in <a href="/wiki/Computer_science" title="Computer science">computer science</a>, e.g. <a href="/wiki/Machine_learning" title="Machine learning">machine learning</a> and <a href="/wiki/Natural_language_processing" title="Natural language processing">natural language processing</a>. </p> <div class="mw-heading mw-heading3"><h3 id="As_a_single-layer_perceptron">As a single-layer perceptron</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=28" title="Edit section: As a single-layer perceptron"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The model has an equivalent formulation </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{i}={\frac {1}{1+e^{-(\beta _{0}+\beta _{1}x_{1,i}+\cdots +\beta _{k}x_{k,i})}}}.\,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mo stretchy="false">(</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>+</mo> <mo>⋯<!-- ⋯ --></mo> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>.</mo> <mspace width="thinmathspace" /> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{i}={\frac {1}{1+e^{-(\beta _{0}+\beta _{1}x_{1,i}+\cdots +\beta _{k}x_{k,i})}}}.\,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/28c28cab676ce201ebdb31b7c860bfa089a8494d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; margin-left: -0.089ex; width:31.214ex; height:6.009ex;" alt="{\displaystyle p_{i}={\frac {1}{1+e^{-(\beta _{0}+\beta _{1}x_{1,i}+\cdots +\beta _{k}x_{k,i})}}}.\,}"></span></dd></dl> <p>This functional form is commonly called a single-layer <a href="/wiki/Perceptron" title="Perceptron">perceptron</a> or single-layer <a href="/wiki/Artificial_neural_network" class="mw-redirect" title="Artificial neural network">artificial neural network</a>. A single-layer neural network computes a continuous output instead of a <a href="/wiki/Step_function" title="Step function">step function</a>. The derivative of <i>p<sub>i</sub></i> with respect to <i>X</i> = (<i>x</i><sub>1</sub>, ..., <i>x</i><sub><i>k</i></sub>) is computed from the general form: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y={\frac {1}{1+e^{-f(X)}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>f</mi> <mo stretchy="false">(</mo> <mi>X</mi> <mo stretchy="false">)</mo> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y={\frac {1}{1+e^{-f(X)}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9f9655dad99527a46d3d532543360135b492dfd2" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:15.271ex; height:5.676ex;" alt="{\displaystyle y={\frac {1}{1+e^{-f(X)}}}}"></span></dd></dl> <p>where <i>f</i>(<i>X</i>) is an <a href="/wiki/Analytic_function" title="Analytic function">analytic function</a> in <i>X</i>. With this choice, the single-layer neural network is identical to the logistic regression model. This function has a continuous derivative, which allows it to be used in <a href="/wiki/Backpropagation" title="Backpropagation">backpropagation</a>. This function is also preferred because its derivative is easily calculated: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {\mathrm {d} y}{\mathrm {d} X}}=y(1-y){\frac {\mathrm {d} f}{\mathrm {d} X}}.\,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">d</mi> </mrow> <mi>y</mi> </mrow> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">d</mi> </mrow> <mi>X</mi> </mrow> </mfrac> </mrow> <mo>=</mo> <mi>y</mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>y</mi> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">d</mi> </mrow> <mi>f</mi> </mrow> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="normal">d</mi> </mrow> <mi>X</mi> </mrow> </mfrac> </mrow> <mo>.</mo> <mspace width="thinmathspace" /> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {\mathrm {d} y}{\mathrm {d} X}}=y(1-y){\frac {\mathrm {d} f}{\mathrm {d} X}}.\,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/77aa53a6933926d63b0871c778c2b49f86eccef0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:20.473ex; height:5.509ex;" alt="{\displaystyle {\frac {\mathrm {d} y}{\mathrm {d} X}}=y(1-y){\frac {\mathrm {d} f}{\mathrm {d} X}}.\,}"></span></dd></dl> <div class="mw-heading mw-heading3"><h3 id="In_terms_of_binomial_data">In terms of binomial data</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=29" title="Edit section: In terms of binomial data"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A closely related model assumes that each <i>i</i> is associated not with a single Bernoulli trial but with <i>n</i><sub><i>i</i></sub> <a href="/wiki/Independent_identically_distributed" class="mw-redirect" title="Independent identically distributed">independent identically distributed</a> trials, where the observation <i>Y</i><sub><i>i</i></sub> is the number of successes observed (the sum of the individual Bernoulli-distributed random variables), and hence follows a <a href="/wiki/Binomial_distribution" title="Binomial distribution">binomial distribution</a>: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Y_{i}\,\sim \operatorname {Bin} (n_{i},p_{i}),{\text{ for }}i=1,\dots ,n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mspace width="thinmathspace" /> <mo>∼<!-- ∼ --></mo> <mi>Bin</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>,</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>,</mo> <mrow class="MJX-TeXAtom-ORD"> <mtext> for </mtext> </mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Y_{i}\,\sim \operatorname {Bin} (n_{i},p_{i}),{\text{ for }}i=1,\dots ,n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6d89709f0e733ae25fcb3619258e948a66aa1668" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:32.845ex; height:2.843ex;" alt="{\displaystyle Y_{i}\,\sim \operatorname {Bin} (n_{i},p_{i}),{\text{ for }}i=1,\dots ,n}"></span></dd></dl> <p>An example of this distribution is the fraction of seeds (<i>p</i><sub><i>i</i></sub>) that germinate after <i>n</i><sub><i>i</i></sub> are planted. </p><p>In terms of <a href="/wiki/Expected_value" title="Expected value">expected values</a>, this model is expressed as follows: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{i}=\operatorname {\mathbb {E} } \left[\left.{\frac {Y_{i}}{n_{i}}}\,\right|\,\mathbf {X} _{i}\right]\,,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">E</mi> </mrow> </mrow> <mo>⁡<!-- --></mo> <mrow> <mo>[</mo> <mrow> <mrow> <mo fence="true" stretchy="true" symmetric="true"></mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <msub> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mfrac> </mrow> <mspace width="thinmathspace" /> </mrow> <mo>|</mo> </mrow> <mspace width="thinmathspace" /> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> <mo>]</mo> </mrow> <mspace width="thinmathspace" /> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{i}=\operatorname {\mathbb {E} } \left[\left.{\frac {Y_{i}}{n_{i}}}\,\right|\,\mathbf {X} _{i}\right]\,,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/e2b159f2ac064c09122cc087d3d9e8d3bbb415f9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; margin-left: -0.089ex; width:17.854ex; height:6.176ex;" alt="{\displaystyle p_{i}=\operatorname {\mathbb {E} } \left[\left.{\frac {Y_{i}}{n_{i}}}\,\right|\,\mathbf {X} _{i}\right]\,,}"></span></dd></dl> <p>so that </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {logit} \left(\operatorname {\mathbb {E} } \left[\left.{\frac {Y_{i}}{n_{i}}}\,\right|\,\mathbf {X} _{i}\right]\right)=\operatorname {logit} (p_{i})=\ln \left({\frac {p_{i}}{1-p_{i}}}\right)={\boldsymbol {\beta }}\cdot \mathbf {X} _{i}\,,}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>logit</mi> <mo>⁡<!-- --></mo> <mrow> <mo>(</mo> <mrow> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">E</mi> </mrow> </mrow> <mo>⁡<!-- --></mo> <mrow> <mo>[</mo> <mrow> <mrow> <mo fence="true" stretchy="true" symmetric="true"></mo> <mrow> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <msub> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mfrac> </mrow> <mspace width="thinmathspace" /> </mrow> <mo>|</mo> </mrow> <mspace width="thinmathspace" /> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> <mo>]</mo> </mrow> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mi>logit</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mspace width="thinmathspace" /> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \operatorname {logit} \left(\operatorname {\mathbb {E} } \left[\left.{\frac {Y_{i}}{n_{i}}}\,\right|\,\mathbf {X} _{i}\right]\right)=\operatorname {logit} (p_{i})=\ln \left({\frac {p_{i}}{1-p_{i}}}\right)={\boldsymbol {\beta }}\cdot \mathbf {X} _{i}\,,}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4629c0d5675907b48d10f5173bbc338f262e540a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:56.439ex; height:6.176ex;" alt="{\displaystyle \operatorname {logit} \left(\operatorname {\mathbb {E} } \left[\left.{\frac {Y_{i}}{n_{i}}}\,\right|\,\mathbf {X} _{i}\right]\right)=\operatorname {logit} (p_{i})=\ln \left({\frac {p_{i}}{1-p_{i}}}\right)={\boldsymbol {\beta }}\cdot \mathbf {X} _{i}\,,}"></span></dd></dl> <p>Or equivalently: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(Y_{i}=y\mid \mathbf {X} _{i})={n_{i} \choose y}p_{i}^{y}(1-p_{i})^{n_{i}-y}={n_{i} \choose y}\left({\frac {1}{1+e^{-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{y}\left(1-{\frac {1}{1+e^{-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{n_{i}-y}\,.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>=</mo> <mi>y</mi> <mo>∣<!-- ∣ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="2.047em" minsize="2.047em">(</mo> </mrow> <mfrac linethickness="0"> <msub> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mi>y</mi> </mfrac> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="2.047em" minsize="2.047em">)</mo> </mrow> </mrow> </mrow> <msubsup> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>y</mi> </mrow> </msubsup> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>−<!-- − --></mo> <mi>y</mi> </mrow> </msup> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="2.047em" minsize="2.047em">(</mo> </mrow> <mfrac linethickness="0"> <msub> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mi>y</mi> </mfrac> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="2.047em" minsize="2.047em">)</mo> </mrow> </mrow> </mrow> <msup> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>y</mi> </mrow> </msup> <msup> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>−<!-- − --></mo> <mi>y</mi> </mrow> </msup> <mspace width="thinmathspace" /> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(Y_{i}=y\mid \mathbf {X} _{i})={n_{i} \choose y}p_{i}^{y}(1-p_{i})^{n_{i}-y}={n_{i} \choose y}\left({\frac {1}{1+e^{-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{y}\left(1-{\frac {1}{1+e^{-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{n_{i}-y}\,.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9e57d563ad325d2ddecf0f88a4149198ad728b57" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:85.755ex; height:6.509ex;" alt="{\displaystyle \Pr(Y_{i}=y\mid \mathbf {X} _{i})={n_{i} \choose y}p_{i}^{y}(1-p_{i})^{n_{i}-y}={n_{i} \choose y}\left({\frac {1}{1+e^{-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{y}\left(1-{\frac {1}{1+e^{-{\boldsymbol {\beta }}\cdot \mathbf {X} _{i}}}}\right)^{n_{i}-y}\,.}"></span></dd></dl> <p>This model can be fit using the same sorts of methods as the above more basic model. </p> <div class="mw-heading mw-heading2"><h2 id="Model_fitting">Model fitting</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=30" title="Edit section: Model fitting"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Maximum_likelihood_estimation_(MLE)"><span id="Maximum_likelihood_estimation_.28MLE.29"></span>Maximum likelihood estimation (MLE)</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=31" title="Edit section: Maximum likelihood estimation (MLE)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The regression coefficients are usually estimated using <a href="/wiki/Maximum_likelihood_estimation" title="Maximum likelihood estimation">maximum likelihood estimation</a>.<sup id="cite_ref-Menard_26-0" class="reference"><a href="#cite_note-Menard-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup> Unlike linear regression with normally distributed residuals, it is not possible to find a closed-form expression for the coefficient values that maximize the likelihood function so an iterative process must be used instead; for example <a href="/wiki/Newton%27s_method" title="Newton's method">Newton's method</a>. This process begins with a tentative solution, revises it slightly to see if it can be improved, and repeats this revision until no more improvement is made, at which point the process is said to have converged.<sup id="cite_ref-Menard_26-1" class="reference"><a href="#cite_note-Menard-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup> </p><p>In some instances, the model may not reach convergence. Non-convergence of a model indicates that the coefficients are not meaningful because the iterative process was unable to find appropriate solutions. A failure to converge may occur for a number of reasons: having a large ratio of predictors to cases, <a href="/wiki/Multicollinearity" title="Multicollinearity">multicollinearity</a>, <a href="/wiki/Sparse_matrix" title="Sparse matrix">sparseness</a>, or complete <a href="/wiki/Separation_(statistics)" title="Separation (statistics)">separation</a>. </p> <ul><li>Having a large ratio of variables to cases results in an overly conservative Wald statistic (discussed below) and can lead to non-convergence. <a href="/wiki/Regularization_(mathematics)" title="Regularization (mathematics)">Regularized</a> logistic regression is specifically intended to be used in this situation.</li> <li>Multicollinearity refers to unacceptably high correlations between predictors. As multicollinearity increases, coefficients remain unbiased but standard errors increase and the likelihood of model convergence decreases.<sup id="cite_ref-Menard_26-2" class="reference"><a href="#cite_note-Menard-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup> To detect multicollinearity amongst the predictors, one can conduct a linear regression analysis with the predictors of interest for the sole purpose of examining the tolerance statistic <sup id="cite_ref-Menard_26-3" class="reference"><a href="#cite_note-Menard-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup> used to assess whether multicollinearity is unacceptably high.</li> <li>Sparseness in the data refers to having a large proportion of empty cells (cells with zero counts). Zero cell counts are particularly problematic with categorical predictors. With continuous predictors, the model can infer values for the zero cell counts, but this is not the case with categorical predictors. The model will not converge with zero cell counts for categorical predictors because the natural logarithm of zero is an undefined value so that the final solution to the model cannot be reached. To remedy this problem, researchers may collapse categories in a theoretically meaningful way or add a constant to all cells.<sup id="cite_ref-Menard_26-4" class="reference"><a href="#cite_note-Menard-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup></li> <li>Another numerical problem that may lead to a lack of convergence is complete separation, which refers to the instance in which the predictors perfectly predict the criterion – all cases are accurately classified and the likelihood maximized with infinite coefficients. In such instances, one should re-examine the data, as there may be some kind of error.<sup id="cite_ref-Hosmer_2-3" class="reference"><a href="#cite_note-Hosmer-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup class="noprint Inline-Template" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Please_clarify" title="Wikipedia:Please clarify"><span title="Why is there likely some kind of error? How can this be remedied? (May 2017)">further explanation needed</span></a></i>]</sup></li> <li>One can also take semi-parametric or non-parametric approaches, e.g., via local-likelihood or nonparametric quasi-likelihood methods, which avoid assumptions of a parametric form for the index function and is robust to the choice of the link function (e.g., probit or logit).<sup id="cite_ref-sciencedirect.com_28-0" class="reference"><a href="#cite_note-sciencedirect.com-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup></li></ul> <div class="mw-heading mw-heading3"><h3 id="Iteratively_reweighted_least_squares_(IRLS)"><span id="Iteratively_reweighted_least_squares_.28IRLS.29"></span>Iteratively reweighted least squares (IRLS)</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=32" title="Edit section: Iteratively reweighted least squares (IRLS)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Binary logistic regression (<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/094f824655138f6b11d96a0da32e7f0716ba6959" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=0}"></span> or <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span>) can, for example, be calculated using <i>iteratively reweighted least squares</i> (IRLS), which is equivalent to maximizing the <a href="/wiki/Log-likelihood" class="mw-redirect" title="Log-likelihood">log-likelihood</a> of a <a href="/wiki/Bernoulli_distribution" title="Bernoulli distribution">Bernoulli distributed</a> process using <a href="/wiki/Newton%27s_method" title="Newton's method">Newton's method</a>. If the problem is written in vector matrix form, with parameters <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {w} ^{T}=[\beta _{0},\beta _{1},\beta _{2},\ldots ]}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">w</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>T</mi> </mrow> </msup> <mo>=</mo> <mo stretchy="false">[</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>,</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo>,</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo stretchy="false">]</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {w} ^{T}=[\beta _{0},\beta _{1},\beta _{2},\ldots ]}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/daccbf84c2c936e0559016491efe98eaf0eca430" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:20.648ex; height:3.176ex;" alt="{\displaystyle \mathbf {w} ^{T}=[\beta _{0},\beta _{1},\beta _{2},\ldots ]}"></span>, explanatory variables <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {x} (i)=[1,x_{1}(i),x_{2}(i),\ldots ]^{T}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">x</mi> </mrow> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mo stretchy="false">[</mo> <mn>1</mn> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo>,</mo> <mo>…<!-- … --></mo> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>T</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {x} (i)=[1,x_{1}(i),x_{2}(i),\ldots ]^{T}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c8fc5f11bdd42f672417a3f4e44b3a4e5be28faa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:26.783ex; height:3.176ex;" alt="{\displaystyle \mathbf {x} (i)=[1,x_{1}(i),x_{2}(i),\ldots ]^{T}}"></span> and expected value of the Bernoulli distribution <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mu (i)={\frac {1}{1+e^{-\mathbf {w} ^{T}\mathbf {x} (i)}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>μ<!-- μ --></mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <msup> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">w</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>T</mi> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">x</mi> </mrow> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mu (i)={\frac {1}{1+e^{-\mathbf {w} ^{T}\mathbf {x} (i)}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/26ff55360dd3fe181a036aa5ed2c5a59525a7e22" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:19.859ex; height:5.843ex;" alt="{\displaystyle \mu (i)={\frac {1}{1+e^{-\mathbf {w} ^{T}\mathbf {x} (i)}}}}"></span>, the parameters <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {w} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">w</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {w} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/20795664b5b048744a2fd88977851104cc5816f8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.931ex; height:1.676ex;" alt="{\displaystyle \mathbf {w} }"></span> can be found using the following iterative algorithm: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {w} _{k+1}=\left(\mathbf {X} ^{T}\mathbf {S} _{k}\mathbf {X} \right)^{-1}\mathbf {X} ^{T}\left(\mathbf {S} _{k}\mathbf {X} \mathbf {w} _{k}+\mathbf {y} -\mathbf {\boldsymbol {\mu }} _{k}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">w</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> <mo>=</mo> <msup> <mrow> <mo>(</mo> <mrow> <msup> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>T</mi> </mrow> </msup> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">S</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> </mrow> <mo>)</mo> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> <msup> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>T</mi> </mrow> </msup> <mrow> <mo>(</mo> <mrow> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">S</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">w</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">y</mi> </mrow> <mo>−<!-- − --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">μ<!-- μ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {w} _{k+1}=\left(\mathbf {X} ^{T}\mathbf {S} _{k}\mathbf {X} \right)^{-1}\mathbf {X} ^{T}\left(\mathbf {S} _{k}\mathbf {X} \mathbf {w} _{k}+\mathbf {y} -\mathbf {\boldsymbol {\mu }} _{k}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/53dc6989a6158beef2a0e6187b01ff6a8c013af0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:43.729ex; height:3.843ex;" alt="{\displaystyle \mathbf {w} _{k+1}=\left(\mathbf {X} ^{T}\mathbf {S} _{k}\mathbf {X} \right)^{-1}\mathbf {X} ^{T}\left(\mathbf {S} _{k}\mathbf {X} \mathbf {w} _{k}+\mathbf {y} -\mathbf {\boldsymbol {\mu }} _{k}\right)}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {S} =\operatorname {diag} (\mu (i)(1-\mu (i)))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">S</mi> </mrow> <mo>=</mo> <mi>diag</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>μ<!-- μ --></mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>μ<!-- μ --></mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {S} =\operatorname {diag} (\mu (i)(1-\mu (i)))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/285bd788d0906c1b2a9e4d4bbe412a9d030d30aa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:24.496ex; height:2.843ex;" alt="{\displaystyle \mathbf {S} =\operatorname {diag} (\mu (i)(1-\mu (i)))}"></span> is a diagonal weighting matrix, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\mu }}=[\mu (1),\mu (2),\ldots ]}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">μ<!-- μ --></mi> </mrow> <mo>=</mo> <mo stretchy="false">[</mo> <mi>μ<!-- μ --></mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>,</mo> <mi>μ<!-- μ --></mi> <mo stretchy="false">(</mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo>,</mo> <mo>…<!-- … --></mo> <mo stretchy="false">]</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\mu }}=[\mu (1),\mu (2),\ldots ]}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/800927e9be36f4cac166a68862c04234cffd67b8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.576ex; height:2.843ex;" alt="{\displaystyle {\boldsymbol {\mu }}=[\mu (1),\mu (2),\ldots ]}"></span> the vector of expected values, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {X} ={\begin{bmatrix}1&x_{1}(1)&x_{2}(1)&\ldots \\1&x_{1}(2)&x_{2}(2)&\ldots \\\vdots &\vdots &\vdots \end{bmatrix}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">X</mi> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mo>[</mo> <mtable rowspacing="4pt" columnspacing="1em"> <mtr> <mtd> <mn>1</mn> </mtd> <mtd> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mo>…<!-- … --></mo> </mtd> </mtr> <mtr> <mtd> <mn>1</mn> </mtd> <mtd> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mn>2</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msub> <mo stretchy="false">(</mo> <mn>2</mn> <mo stretchy="false">)</mo> </mtd> <mtd> <mo>…<!-- … --></mo> </mtd> </mtr> <mtr> <mtd> <mo>⋮<!-- ⋮ --></mo> </mtd> <mtd> <mo>⋮<!-- ⋮ --></mo> </mtd> <mtd> <mo>⋮<!-- ⋮ --></mo> </mtd> </mtr> </mtable> <mo>]</mo> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {X} ={\begin{bmatrix}1&x_{1}(1)&x_{2}(1)&\ldots \\1&x_{1}(2)&x_{2}(2)&\ldots \\\vdots &\vdots &\vdots \end{bmatrix}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/25d4496bfe9cc2d30b15c274f8c9eee5619eb183" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.838ex; width:30.535ex; height:10.843ex;" alt="{\displaystyle \mathbf {X} ={\begin{bmatrix}1&x_{1}(1)&x_{2}(1)&\ldots \\1&x_{1}(2)&x_{2}(2)&\ldots \\\vdots &\vdots &\vdots \end{bmatrix}}}"></span></dd></dl> <p>The regressor matrix and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {y} (i)=[y(1),y(2),\ldots ]^{T}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold">y</mi> </mrow> <mo stretchy="false">(</mo> <mi>i</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mo stretchy="false">[</mo> <mi>y</mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> <mo>,</mo> <mi>y</mi> <mo stretchy="false">(</mo> <mn>2</mn> <mo stretchy="false">)</mo> <mo>,</mo> <mo>…<!-- … --></mo> <msup> <mo stretchy="false">]</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>T</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbf {y} (i)=[y(1),y(2),\ldots ]^{T}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/33cbd315328b6ccfc7f216d65e39f92a8ec48694" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:22.85ex; height:3.176ex;" alt="{\displaystyle \mathbf {y} (i)=[y(1),y(2),\ldots ]^{T}}"></span> the vector of response variables. More details can be found in the literature.<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Bayesian">Bayesian</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=33" title="Edit section: Bayesian"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Logistic-sigmoid-vs-scaled-probit.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Logistic-sigmoid-vs-scaled-probit.svg/300px-Logistic-sigmoid-vs-scaled-probit.svg.png" decoding="async" width="300" height="300" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Logistic-sigmoid-vs-scaled-probit.svg/450px-Logistic-sigmoid-vs-scaled-probit.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Logistic-sigmoid-vs-scaled-probit.svg/600px-Logistic-sigmoid-vs-scaled-probit.svg.png 2x" data-file-width="630" data-file-height="630" /></a><figcaption>Comparison of <a href="/wiki/Logistic_function" title="Logistic function">logistic function</a> with a scaled inverse <a href="/wiki/Probit_function" class="mw-redirect" title="Probit function">probit function</a> (i.e. the <a href="/wiki/Cumulative_distribution_function" title="Cumulative distribution function">CDF</a> of the <a href="/wiki/Normal_distribution" title="Normal distribution">normal distribution</a>), comparing <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sigma (x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>σ<!-- σ --></mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sigma (x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ae09ff47b50183fbfd1ea5697c63963ec9eefa20" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.469ex; height:2.843ex;" alt="{\displaystyle \sigma (x)}"></span> vs. <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\textstyle \Phi ({\sqrt {\frac {\pi }{8}}}x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="false" scriptlevel="0"> <mi mathvariant="normal">Φ<!-- Φ --></mi> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <msqrt> <mfrac> <mi>π<!-- π --></mi> <mn>8</mn> </mfrac> </msqrt> </mrow> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\textstyle \Phi ({\sqrt {\frac {\pi }{8}}}x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fca7cbd3059cdfd4650e82f67a05a3e531b68a3e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:8.919ex; height:4.843ex;" alt="{\textstyle \Phi ({\sqrt {\frac {\pi }{8}}}x)}"></span>, which makes the slopes the same at the origin. This shows the <a href="/wiki/Heavy-tailed_distribution" title="Heavy-tailed distribution">heavier tails</a> of the logistic distribution.</figcaption></figure> <p>In a <a href="/wiki/Bayesian_statistics" title="Bayesian statistics">Bayesian statistics</a> context, <a href="/wiki/Prior_distribution" class="mw-redirect" title="Prior distribution">prior distributions</a> are normally placed on the regression coefficients, for example in the form of <a href="/wiki/Gaussian_distribution" class="mw-redirect" title="Gaussian distribution">Gaussian distributions</a>. There is no <a href="/wiki/Conjugate_prior" title="Conjugate prior">conjugate prior</a> of the <a href="/wiki/Likelihood_function" title="Likelihood function">likelihood function</a> in logistic regression. When Bayesian inference was performed analytically, this made the <a href="/wiki/Posterior_distribution" class="mw-redirect" title="Posterior distribution">posterior distribution</a> difficult to calculate except in very low dimensions. Now, though, automatic software such as <a href="/wiki/OpenBUGS" title="OpenBUGS">OpenBUGS</a>, <a href="/wiki/Just_another_Gibbs_sampler" title="Just another Gibbs sampler">JAGS</a>, <a href="/wiki/PyMC" title="PyMC">PyMC</a>, <a href="/wiki/Stan_(software)" title="Stan (software)">Stan</a> or <a href="/wiki/Turing.jl" class="mw-redirect" title="Turing.jl">Turing.jl</a> allows these posteriors to be computed using simulation, so lack of conjugacy is not a concern. However, when the sample size or the number of parameters is large, full Bayesian simulation can be slow, and people often use approximate methods such as <a href="/wiki/Variational_Bayesian_methods" title="Variational Bayesian methods">variational Bayesian methods</a> and <a href="/wiki/Expectation_propagation" title="Expectation propagation">expectation propagation</a>. </p> <div class="mw-heading mw-heading3"><h3 id=""Rule_of_ten""><span id=".22Rule_of_ten.22"></span>"Rule of ten"</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=34" title="Edit section: "Rule of ten""><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/One_in_ten_rule" title="One in ten rule">One in ten rule</a></div> <p>Widely used, the "<a href="/wiki/One_in_ten_rule" title="One in ten rule">one in ten rule</a>", states that logistic regression models give stable values for the explanatory variables if based on a minimum of about 10 events per explanatory variable (EPV); where <i>event</i> denotes the cases belonging to the less frequent category in the dependent variable. Thus a study designed to use <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>k</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle k}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}"></span> explanatory variables for an event (e.g. <a href="/wiki/Myocardial_infarction" title="Myocardial infarction">myocardial infarction</a>) expected to occur in a proportion <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/81eac1e205430d1f40810df36a0edffdc367af36" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:1.259ex; height:2.009ex;" alt="{\displaystyle p}"></span> of participants in the study will require a total of <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 10k/p}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>10</mn> <mi>k</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mi>p</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 10k/p}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3efcd5bca6797314284127bfc91e8a37f1810d53" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.868ex; height:2.843ex;" alt="{\displaystyle 10k/p}"></span> participants. However, there is considerable debate about the reliability of this rule, which is based on simulation studies and lacks a secure theoretical underpinning.<sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup> According to some authors<sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup> the rule is overly conservative in some circumstances, with the authors stating, "If we (somewhat subjectively) regard confidence interval coverage less than 93 percent, type I error greater than 7 percent, or relative bias greater than 15 percent as problematic, our results indicate that problems are fairly frequent with 2–4 EPV, uncommon with 5–9 EPV, and still observed with 10–16 EPV. The worst instances of each problem were not severe with 5–9 EPV and usually comparable to those with 10–16 EPV".<sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup> </p><p>Others have found results that are not consistent with the above, using different criteria. A useful criterion is whether the fitted model will be expected to achieve the same predictive discrimination in a new sample as it appeared to achieve in the model development sample. For that criterion, 20 events per candidate variable may be required.<sup id="cite_ref-plo14mod_33-0" class="reference"><a href="#cite_note-plo14mod-33"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup> Also, one can argue that 96 observations are needed only to estimate the model's intercept precisely enough that the margin of error in predicted probabilities is ±0.1 with a 0.95 confidence level.<sup id="cite_ref-rms_13-1" class="reference"><a href="#cite_note-rms-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Error_and_significance_of_fit">Error and significance of fit</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=35" title="Edit section: Error and significance of fit"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Deviance_and_likelihood_ratio_test_─_a_simple_case"><span id="Deviance_and_likelihood_ratio_test_.E2.94.80_a_simple_case"></span>Deviance and likelihood ratio test ─ a simple case</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=36" title="Edit section: Deviance and likelihood ratio test ─ a simple case"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In any fitting procedure, the addition of another fitting parameter to a model (e.g. the beta parameters in a logistic regression model) will almost always improve the ability of the model to predict the measured outcomes. This will be true even if the additional term has no predictive value, since the model will simply be "<a href="/wiki/Overfitting" title="Overfitting">overfitting</a>" to the noise in the data. The question arises as to whether the improvement gained by the addition of another fitting parameter is significant enough to recommend the inclusion of the additional term, or whether the improvement is simply that which may be expected from overfitting. </p><p>In short, for logistic regression, a statistic known as the <a href="/wiki/Deviance_(statistics)" title="Deviance (statistics)">deviance</a> is defined which is a measure of the error between the logistic model fit and the outcome data. In the limit of a large number of data points, the deviance is <a href="/wiki/Chi-squared_distribution" title="Chi-squared distribution">chi-squared</a> distributed, which allows a <a href="/wiki/Chi-squared_test" title="Chi-squared test">chi-squared test</a> to be implemented in order to determine the significance of the explanatory variables. </p><p>Linear regression and logistic regression have many similarities. For example, in simple linear regression, a set of <i>K</i> data points (<i>x<sub>k</sub></i>, <i>y<sub>k</sub></i>) are fitted to a proposed model function of the form <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=b_{0}+b_{1}x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <msub> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=b_{0}+b_{1}x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9a3d9d6e57eb15ad18c3daed7e8b699a5983b2ea" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:12.528ex; height:2.509ex;" alt="{\displaystyle y=b_{0}+b_{1}x}"></span>. The fit is obtained by choosing the <i>b</i> parameters which minimize the sum of the squares of the residuals (the squared error term) for each data point: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon ^{2}=\sum _{k=1}^{K}(b_{0}+b_{1}x_{k}-y_{k})^{2}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mo stretchy="false">(</mo> <msub> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varepsilon ^{2}=\sum _{k=1}^{K}(b_{0}+b_{1}x_{k}-y_{k})^{2}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a211283d325de7eb7009c33116bf0549abbd843c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:26.532ex; height:7.343ex;" alt="{\displaystyle \varepsilon ^{2}=\sum _{k=1}^{K}(b_{0}+b_{1}x_{k}-y_{k})^{2}.}"></span></dd></dl> <p>The minimum value which constitutes the fit will be denoted by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\hat {\varepsilon }}^{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ε<!-- ε --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\hat {\varepsilon }}^{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/238cdb07978e8bb44b364c3bf97e65ccd8f50e4f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.41ex; height:2.676ex;" alt="{\displaystyle {\hat {\varepsilon }}^{2}}"></span> </p><p>The idea of a <a href="/wiki/Null_model" title="Null model">null model</a> may be introduced, in which it is assumed that the <i>x</i> variable is of no use in predicting the y<sub>k</sub> outcomes: The data points are fitted to a null model function of the form <i>y</i> = <i>b</i><sub>0</sub> with a squared error term: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon ^{2}=\sum _{k=1}^{K}(b_{0}-y_{k})^{2}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mo stretchy="false">(</mo> <msub> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varepsilon ^{2}=\sum _{k=1}^{K}(b_{0}-y_{k})^{2}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1dcd110a39376256f6111e5f1a8a3326d22ef0bd" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:19.222ex; height:7.343ex;" alt="{\displaystyle \varepsilon ^{2}=\sum _{k=1}^{K}(b_{0}-y_{k})^{2}.}"></span></dd></dl> <p>The fitting process consists of choosing a value of <i>b</i><sub>0</sub> which minimizes <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon ^{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varepsilon ^{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0a1591f10527a7ef577ba047da0be86820772330" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.138ex; height:2.676ex;" alt="{\displaystyle \varepsilon ^{2}}"></span> of the fit to the null model, denoted by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon _{\varphi }^{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varepsilon _{\varphi }^{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cb6b3b827fb42fbb7a4cbbd8c6b33f07a13cb529" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.391ex; height:3.176ex;" alt="{\displaystyle \varepsilon _{\varphi }^{2}}"></span> where the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>φ<!-- φ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varphi }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/33ee699558d09cf9d653f6351f9fda0b2f4aaa3e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:1.52ex; height:2.176ex;" alt="{\displaystyle \varphi }"></span> subscript denotes the null model. It is seen that the null model is optimized by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b_{0}={\overline {y}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>y</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle b_{0}={\overline {y}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/14af79d6889f1202c13be8943ba150460ecdd3f0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.431ex; height:2.676ex;" alt="{\displaystyle b_{0}={\overline {y}}}"></span> where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\overline {y}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>y</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\overline {y}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fca7adf9164266bae2b7a13f09a953c43d23d7b7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.281ex; height:2.676ex;" alt="{\displaystyle {\overline {y}}}"></span> is the mean of the <i>y<sub>k</sub></i> values, and the optimized <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon _{\varphi }^{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varepsilon _{\varphi }^{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cb6b3b827fb42fbb7a4cbbd8c6b33f07a13cb529" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.391ex; height:3.176ex;" alt="{\displaystyle \varepsilon _{\varphi }^{2}}"></span> is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\hat {\varepsilon }}_{\varphi }^{2}=\sum _{k=1}^{K}({\overline {y}}-y_{k})^{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ε<!-- ε --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>y</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> <mo>−<!-- − --></mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\hat {\varepsilon }}_{\varphi }^{2}=\sum _{k=1}^{K}({\overline {y}}-y_{k})^{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4ccc9a257fbd0012628e2b1b4224d9516333cb68" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:18.329ex; height:7.343ex;" alt="{\displaystyle {\hat {\varepsilon }}_{\varphi }^{2}=\sum _{k=1}^{K}({\overline {y}}-y_{k})^{2}}"></span></dd></dl> <p>which is proportional to the square of the (uncorrected) sample standard deviation of the <i>y<sub>k</sub></i> data points. </p><p>We can imagine a case where the <i>y<sub>k</sub></i> data points are randomly assigned to the various <i>x<sub>k</sub></i>, and then fitted using the proposed model. Specifically, we can consider the fits of the proposed model to every permutation of the <i>y<sub>k</sub></i> outcomes. It can be shown that the optimized error of any of these fits will never be less than the optimum error of the null model, and that the difference between these minimum error will follow a <a href="/wiki/Chi-squared_distribution" title="Chi-squared distribution">chi-squared distribution</a>, with degrees of freedom equal those of the proposed model minus those of the null model which, in this case, will be <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2-1=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>2</mn> <mo>−<!-- − --></mo> <mn>1</mn> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 2-1=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8e790a95dd451fdb4c8e2f74f60823807ca50f2b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:9.426ex; height:2.343ex;" alt="{\displaystyle 2-1=1}"></span>. Using the <a href="/wiki/Chi-squared_test" title="Chi-squared test">chi-squared test</a>, we may then estimate how many of these permuted sets of <i>y<sub>k</sub></i> will yield a minimum error less than or equal to the minimum error using the original <i>y<sub>k</sub></i>, and so we can estimate how significant an improvement is given by the inclusion of the <i>x</i> variable in the proposed model. </p><p>For logistic regression, the measure of goodness-of-fit is the likelihood function <i>L</i>, or its logarithm, the log-likelihood <i>ℓ</i>. The likelihood function <i>L</i> is analogous to the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varepsilon ^{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>ε<!-- ε --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varepsilon ^{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0a1591f10527a7ef577ba047da0be86820772330" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.138ex; height:2.676ex;" alt="{\displaystyle \varepsilon ^{2}}"></span> in the linear regression case, except that the likelihood is maximized rather than minimized. Denote the maximized log-likelihood of the proposed model by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\hat {\ell }}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\hat {\ell }}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3df3867289c3773fb81372e257fc0c89972b6825" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.42ex; height:2.843ex;" alt="{\displaystyle {\hat {\ell }}}"></span>. </p><p>In the case of simple binary logistic regression, the set of <i>K</i> data points are fitted in a probabilistic sense to a function of the form: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(x)={\frac {1}{1+e^{-t}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mi>t</mi> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(x)={\frac {1}{1+e^{-t}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b034d257ef3f48859e8cb30774017a60debbdf98" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.171ex; margin-left: -0.089ex; width:15.523ex; height:5.509ex;" alt="{\displaystyle p(x)={\frac {1}{1+e^{-t}}}}"></span></dd></dl> <p>where <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(x)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>p</mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p(x)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8cb7afced134ef75572e5314a5d278c2d644f438" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:4.398ex; height:2.843ex;" alt="{\displaystyle p(x)}"></span>⁠</span> is the probability that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span>. The log-odds are given by: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t=\beta _{0}+\beta _{1}x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>t</mi> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t=\beta _{0}+\beta _{1}x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/836d93163447344be4715ec00638c1cd829e376c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:12.848ex; height:2.509ex;" alt="{\displaystyle t=\beta _{0}+\beta _{1}x}"></span></dd></dl> <p>and the log-likelihood is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ell =\sum _{k=1}^{K}\left(y_{k}\ln(p(x_{k}))+(1-y_{k})\ln(1-p(x_{k}))\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>ℓ<!-- ℓ --></mi> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mrow> <mo>(</mo> <mrow> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>p</mi> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> <mo>+</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>p</mi> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \ell =\sum _{k=1}^{K}\left(y_{k}\ln(p(x_{k}))+(1-y_{k})\ln(1-p(x_{k}))\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5f3cb0547208b6133edc3c65fa3b0429e08e1309" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:45.797ex; height:7.343ex;" alt="{\displaystyle \ell =\sum _{k=1}^{K}\left(y_{k}\ln(p(x_{k}))+(1-y_{k})\ln(1-p(x_{k}))\right)}"></span></dd></dl> <p>For the null model, the probability that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/10f53b404b1fdd041a589f1f2425e45a2edba110" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.416ex; height:2.509ex;" alt="{\displaystyle y=1}"></span> is given by: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{\varphi }(x)={\frac {1}{1+e^{-t_{\varphi }}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <msub> <mi>t</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{\varphi }(x)={\frac {1}{1+e^{-t_{\varphi }}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3dedb240434652bf1da2305bd5c10b4cdb11963e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-left: -0.089ex; width:17.867ex; height:5.676ex;" alt="{\displaystyle p_{\varphi }(x)={\frac {1}{1+e^{-t_{\varphi }}}}}"></span></dd></dl> <p>The log-odds for the null model are given by: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t_{\varphi }=\beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>t</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle t_{\varphi }=\beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1ed1f7e60f9ce3c9fde387c7985ba825d2cb76d3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:7.615ex; height:2.843ex;" alt="{\displaystyle t_{\varphi }=\beta _{0}}"></span></dd></dl> <p>and the log-likelihood is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ell _{\varphi }=\sum _{k=1}^{K}\left(y_{k}\ln(p_{\varphi })+(1-y_{k})\ln(1-p_{\varphi })\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>ℓ<!-- ℓ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mrow> <mo>(</mo> <mrow> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>+</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> <mo stretchy="false">)</mo> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \ell _{\varphi }=\sum _{k=1}^{K}\left(y_{k}\ln(p_{\varphi })+(1-y_{k})\ln(1-p_{\varphi })\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c66e0b3b90149587150b518d2ada7bc65ab79a04" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:41.263ex; height:7.343ex;" alt="{\displaystyle \ell _{\varphi }=\sum _{k=1}^{K}\left(y_{k}\ln(p_{\varphi })+(1-y_{k})\ln(1-p_{\varphi })\right)}"></span></dd></dl> <p>Since we have <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{\varphi }={\overline {y}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>y</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{\varphi }={\overline {y}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/92a4f7b513f158376f2d10ab686b74bc4b1bbf33" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; margin-left: -0.089ex; width:6.946ex; height:3.009ex;" alt="{\displaystyle p_{\varphi }={\overline {y}}}"></span> at the maximum of <i>L</i>, the maximum log-likelihood for the null model is </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\hat {\ell }}_{\varphi }=K(\,{\overline {y}}\ln({\overline {y}})+(1-{\overline {y}})\ln(1-{\overline {y}}))}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> <mo>=</mo> <mi>K</mi> <mo stretchy="false">(</mo> <mspace width="thinmathspace" /> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>y</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>y</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> <mo stretchy="false">)</mo> <mo>+</mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>y</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> <mo stretchy="false">)</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>y</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> <mo stretchy="false">)</mo> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\hat {\ell }}_{\varphi }=K(\,{\overline {y}}\ln({\overline {y}})+(1-{\overline {y}})\ln(1-{\overline {y}}))}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f2267114e0b77adc9b0edf192499a00b9b156968" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:36.139ex; height:3.509ex;" alt="{\displaystyle {\hat {\ell }}_{\varphi }=K(\,{\overline {y}}\ln({\overline {y}})+(1-{\overline {y}})\ln(1-{\overline {y}}))}"></span></dd></dl> <p>The optimum <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/40b42f71f244103a8fca3c76885c7580a92831c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{0}}"></span> is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}=\ln \left({\frac {\overline {y}}{1-{\overline {y}}}}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mover> <mi>y</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>y</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mrow> </mfrac> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}=\ln \left({\frac {\overline {y}}{1-{\overline {y}}}}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/11ad8ff17564f97112969e1f23884644826ebc73" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:16.949ex; height:6.176ex;" alt="{\displaystyle \beta _{0}=\ln \left({\frac {\overline {y}}{1-{\overline {y}}}}\right)}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\overline {y}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>y</mi> <mo accent="false">¯<!-- ¯ --></mo> </mover> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\overline {y}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fca7adf9164266bae2b7a13f09a953c43d23d7b7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.281ex; height:2.676ex;" alt="{\displaystyle {\overline {y}}}"></span> is again the mean of the <i>y<sub>k</sub></i> values. Again, we can conceptually consider the fit of the proposed model to every permutation of the <i>y<sub>k</sub></i> and it can be shown that the maximum log-likelihood of these permutation fits will never be smaller than that of the null model: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\hat {\ell }}\geq {\hat {\ell }}_{\varphi }}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mo>≥<!-- ≥ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\hat {\ell }}\geq {\hat {\ell }}_{\varphi }}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a50565e311fc48bba59342b6906dbd62438421a6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:7.246ex; height:3.509ex;" alt="{\displaystyle {\hat {\ell }}\geq {\hat {\ell }}_{\varphi }}"></span></dd></dl> <p>Also, as an analog to the error of the linear regression case, we may define the <a href="/wiki/Deviance_(statistics)" title="Deviance (statistics)">deviance</a> of a logistic regression fit as: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle D=\ln \left({\frac {{\hat {L}}^{2}}{{\hat {L}}_{\varphi }^{2}}}\right)=2({\hat {\ell }}-{\hat {\ell }}_{\varphi })}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>D</mi> <mo>=</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>L</mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <msubsup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>L</mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> </mfrac> </mrow> <mo>)</mo> </mrow> <mo>=</mo> <mn>2</mn> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mo>−<!-- − --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle D=\ln \left({\frac {{\hat {L}}^{2}}{{\hat {L}}_{\varphi }^{2}}}\right)=2({\hat {\ell }}-{\hat {\ell }}_{\varphi })}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f7fa2053698781bea214097cd75fa7fbbe173a34" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.838ex; width:27.813ex; height:8.843ex;" alt="{\displaystyle D=\ln \left({\frac {{\hat {L}}^{2}}{{\hat {L}}_{\varphi }^{2}}}\right)=2({\hat {\ell }}-{\hat {\ell }}_{\varphi })}"></span></dd></dl> <p>which will always be positive or zero. The reason for this choice is that not only is the deviance a good measure of the goodness of fit, it is also approximately chi-squared distributed, with the approximation improving as the number of data points (<i>K</i>) increases, becoming exactly chi-square distributed in the limit of an infinite number of data points. As in the case of linear regression, we may use this fact to estimate the probability that a random set of data points will give a better fit than the fit obtained by the proposed model, and so have an estimate how significantly the model is improved by including the <i>x<sub>k</sub></i> data points in the proposed model. </p><p>For the simple model of student test scores described above, the maximum value of the log-likelihood of the null model is <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\hat {\ell }}_{\varphi }=-13.8629\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> <mo>=</mo> <mo>−<!-- − --></mo> <mn>13.8629</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\hat {\ell }}_{\varphi }=-13.8629\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/ee63f5c0538123c8c3df3b0f32827ff7ad9ade77" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:18.366ex; height:3.509ex;" alt="{\displaystyle {\hat {\ell }}_{\varphi }=-13.8629\ldots }"></span> The maximum value of the log-likelihood for the simple model is <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\hat {\ell }}=-8.02988\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mo>=</mo> <mo>−<!-- − --></mo> <mn>8.02988</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\hat {\ell }}=-8.02988\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/73fa3979239eb75038c2423c3c92a358139e2317" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:17.059ex; height:3.009ex;" alt="{\displaystyle {\hat {\ell }}=-8.02988\ldots }"></span> so that the deviance is <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle D=2({\hat {\ell }}-{\hat {\ell }}_{\varphi })=11.6661\ldots }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>D</mi> <mo>=</mo> <mn>2</mn> <mo stretchy="false">(</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mo>−<!-- − --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>ℓ<!-- ℓ --></mi> <mo stretchy="false">^<!-- ^ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>φ<!-- φ --></mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>=</mo> <mn>11.6661</mn> <mo>…<!-- … --></mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle D=2({\hat {\ell }}-{\hat {\ell }}_{\varphi })=11.6661\ldots }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d64e917bd825b02e2901f06c451a89132ee3a592" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:28.813ex; height:3.509ex;" alt="{\displaystyle D=2({\hat {\ell }}-{\hat {\ell }}_{\varphi })=11.6661\ldots }"></span> </p><p>Using the <a href="/wiki/Chi-squared_test" title="Chi-squared test">chi-squared test</a> of significance, the integral of the <a href="/wiki/Chi-squared_distribution" title="Chi-squared distribution">chi-squared distribution</a> with one degree of freedom from 11.6661... to infinity is equal to 0.00063649... </p><p>This effectively means that about 6 out of a 10,000 fits to random <i>y<sub>k</sub></i> can be expected to have a better fit (smaller deviance) than the given <i>y<sub>k</sub></i> and so we can conclude that the inclusion of the <i>x</i> variable and data in the proposed model is a very significant improvement over the null model. In other words, we reject the <a href="/wiki/Null_hypothesis" title="Null hypothesis">null hypothesis</a> with <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1-D\approx 99.94\%}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mn>1</mn> <mo>−<!-- − --></mo> <mi>D</mi> <mo>≈<!-- ≈ --></mo> <mn>99.94</mn> <mi mathvariant="normal">%<!-- % --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 1-D\approx 99.94\%}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6ef75f68e0b52b4d2acebadc39d09eb09c74efa1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:16.258ex; height:2.509ex;" alt="{\displaystyle 1-D\approx 99.94\%}"></span> confidence. </p> <div class="mw-heading mw-heading3"><h3 id="Goodness_of_fit_summary">Goodness of fit summary</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=37" title="Edit section: Goodness of fit summary"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Goodness_of_fit" title="Goodness of fit">Goodness of fit</a> in linear regression models is generally measured using <a href="/wiki/R_square" class="mw-redirect" title="R square">R<sup>2</sup></a>. Since this has no direct analog in logistic regression, various methods<sup id="cite_ref-Greene_34-0" class="reference"><a href="#cite_note-Greene-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: ch.21">: ch.21 </span></sup> including the following can be used instead. </p> <div class="mw-heading mw-heading4"><h4 id="Deviance_and_likelihood_ratio_tests">Deviance and likelihood ratio tests</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=38" title="Edit section: Deviance and likelihood ratio tests"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In linear regression analysis, one is concerned with partitioning variance via the <a href="/wiki/Partition_of_sums_of_squares" title="Partition of sums of squares">sum of squares</a> calculations – variance in the criterion is essentially divided into variance accounted for by the predictors and residual variance. In logistic regression analysis, <a href="/wiki/Deviance_(statistics)" title="Deviance (statistics)">deviance</a> is used in lieu of a sum of squares calculations.<sup id="cite_ref-Cohen_35-0" class="reference"><a href="#cite_note-Cohen-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> Deviance is analogous to the sum of squares calculations in linear regression<sup id="cite_ref-Hosmer_2-4" class="reference"><a href="#cite_note-Hosmer-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> and is a measure of the lack of fit to the data in a logistic regression model.<sup id="cite_ref-Cohen_35-1" class="reference"><a href="#cite_note-Cohen-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> When a "saturated" model is available (a model with a theoretically perfect fit), deviance is calculated by comparing a given model with the saturated model.<sup id="cite_ref-Hosmer_2-5" class="reference"><a href="#cite_note-Hosmer-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> This computation gives the <a href="/wiki/Likelihood-ratio_test" title="Likelihood-ratio test">likelihood-ratio test</a>:<sup id="cite_ref-Hosmer_2-6" class="reference"><a href="#cite_note-Hosmer-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle D=-2\ln {\frac {\text{likelihood of the fitted model}}{\text{likelihood of the saturated model}}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>D</mi> <mo>=</mo> <mo>−<!-- − --></mo> <mn>2</mn> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mtext>likelihood of the fitted model</mtext> <mtext>likelihood of the saturated model</mtext> </mfrac> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle D=-2\ln {\frac {\text{likelihood of the fitted model}}{\text{likelihood of the saturated model}}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/22795d3f01fb325980a16b1a83b9ca361d983498" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:45.023ex; height:5.509ex;" alt="{\displaystyle D=-2\ln {\frac {\text{likelihood of the fitted model}}{\text{likelihood of the saturated model}}}.}"></span></dd></dl> <p>In the above equation, <span class="texhtml mvar" style="font-style:italic;">D</span> represents the deviance and ln represents the natural logarithm. The log of this likelihood ratio (the ratio of the fitted model to the saturated model) will produce a negative value, hence the need for a negative sign. <span class="texhtml mvar" style="font-style:italic;">D</span> can be shown to follow an approximate <a href="/wiki/Chi-squared_distribution" title="Chi-squared distribution">chi-squared distribution</a>.<sup id="cite_ref-Hosmer_2-7" class="reference"><a href="#cite_note-Hosmer-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> Smaller values indicate better fit as the fitted model deviates less from the saturated model. When assessed upon a chi-square distribution, nonsignificant chi-square values indicate very little unexplained variance and thus, good model fit. Conversely, a significant chi-square value indicates that a significant amount of the variance is unexplained. </p><p>When the saturated model is not available (a common case), deviance is calculated simply as −2·(log likelihood of the fitted model), and the reference to the saturated model's log likelihood can be removed from all that follows without harm. </p><p>Two measures of deviance are particularly important in logistic regression: null deviance and model deviance. The null deviance represents the difference between a model with only the intercept (which means "no predictors") and the saturated model. The model deviance represents the difference between a model with at least one predictor and the saturated model.<sup id="cite_ref-Cohen_35-2" class="reference"><a href="#cite_note-Cohen-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> In this respect, the null model provides a baseline upon which to compare predictor models. Given that deviance is a measure of the difference between a given model and the saturated model, smaller values indicate better fit. Thus, to assess the contribution of a predictor or set of predictors, one can subtract the model deviance from the null deviance and assess the difference on a <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \chi _{s-p}^{2},}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi>χ<!-- χ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>s</mi> <mo>−<!-- − --></mo> <mi>p</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mo>,</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \chi _{s-p}^{2},}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c480ccb8d7afbd4f5b63fda6a5c1f2e34bb025c1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:5.211ex; height:3.343ex;" alt="{\displaystyle \chi _{s-p}^{2},}"></span> chi-square distribution with <a href="/wiki/Degrees_of_freedom_(statistics)" title="Degrees of freedom (statistics)">degrees of freedom</a><sup id="cite_ref-Hosmer_2-8" class="reference"><a href="#cite_note-Hosmer-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> equal to the difference in the number of parameters estimated. </p><p>Let </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}D_{\text{null}}&=-2\ln {\frac {\text{likelihood of null model}}{\text{likelihood of the saturated model}}}\\[6pt]D_{\text{fitted}}&=-2\ln {\frac {\text{likelihood of fitted model}}{\text{likelihood of the saturated model}}}.\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.9em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <msub> <mi>D</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>null</mtext> </mrow> </msub> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo>−<!-- − --></mo> <mn>2</mn> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mtext>likelihood of null model</mtext> <mtext>likelihood of the saturated model</mtext> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd> <msub> <mi>D</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>fitted</mtext> </mrow> </msub> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo>−<!-- − --></mo> <mn>2</mn> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mtext>likelihood of fitted model</mtext> <mtext>likelihood of the saturated model</mtext> </mfrac> </mrow> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}D_{\text{null}}&=-2\ln {\frac {\text{likelihood of null model}}{\text{likelihood of the saturated model}}}\\[6pt]D_{\text{fitted}}&=-2\ln {\frac {\text{likelihood of fitted model}}{\text{likelihood of the saturated model}}}.\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d85ab8f60a3e7685815b132b3a80d03d26d9745a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -5.671ex; width:49.891ex; height:12.509ex;" alt="{\displaystyle {\begin{aligned}D_{\text{null}}&=-2\ln {\frac {\text{likelihood of null model}}{\text{likelihood of the saturated model}}}\\[6pt]D_{\text{fitted}}&=-2\ln {\frac {\text{likelihood of fitted model}}{\text{likelihood of the saturated model}}}.\end{aligned}}}"></span></dd></dl> <p>Then the difference of both is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}D_{\text{null}}-D_{\text{fitted}}&=-2\left(\ln {\frac {\text{likelihood of null model}}{\text{likelihood of the saturated model}}}-\ln {\frac {\text{likelihood of fitted model}}{\text{likelihood of the saturated model}}}\right)\\[6pt]&=-2\ln {\frac {\left({\dfrac {\text{likelihood of null model}}{\text{likelihood of the saturated model}}}\right)}{\left({\dfrac {\text{likelihood of fitted model}}{\text{likelihood of the saturated model}}}\right)}}\\[6pt]&=-2\ln {\frac {\text{likelihood of the null model}}{\text{likelihood of fitted model}}}.\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.9em 0.9em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <msub> <mi>D</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>null</mtext> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mi>D</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>fitted</mtext> </mrow> </msub> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo>−<!-- − --></mo> <mn>2</mn> <mrow> <mo>(</mo> <mrow> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mtext>likelihood of null model</mtext> <mtext>likelihood of the saturated model</mtext> </mfrac> </mrow> <mo>−<!-- − --></mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mtext>likelihood of fitted model</mtext> <mtext>likelihood of the saturated model</mtext> </mfrac> </mrow> </mrow> <mo>)</mo> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mo>−<!-- − --></mo> <mn>2</mn> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mtext>likelihood of null model</mtext> <mtext>likelihood of the saturated model</mtext> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> <mrow> <mo>(</mo> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mfrac> <mtext>likelihood of fitted model</mtext> <mtext>likelihood of the saturated model</mtext> </mfrac> </mstyle> </mrow> <mo>)</mo> </mrow> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <mo>−<!-- − --></mo> <mn>2</mn> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mtext>likelihood of the null model</mtext> <mtext>likelihood of fitted model</mtext> </mfrac> </mrow> <mo>.</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}D_{\text{null}}-D_{\text{fitted}}&=-2\left(\ln {\frac {\text{likelihood of null model}}{\text{likelihood of the saturated model}}}-\ln {\frac {\text{likelihood of fitted model}}{\text{likelihood of the saturated model}}}\right)\\[6pt]&=-2\ln {\frac {\left({\dfrac {\text{likelihood of null model}}{\text{likelihood of the saturated model}}}\right)}{\left({\dfrac {\text{likelihood of fitted model}}{\text{likelihood of the saturated model}}}\right)}}\\[6pt]&=-2\ln {\frac {\text{likelihood of the null model}}{\text{likelihood of fitted model}}}.\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/bd851b7e234a5483dbb21da9fff7d9d2419e3e3e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -12.962ex; margin-bottom: -0.209ex; width:99.241ex; height:27.509ex;" alt="{\displaystyle {\begin{aligned}D_{\text{null}}-D_{\text{fitted}}&=-2\left(\ln {\frac {\text{likelihood of null model}}{\text{likelihood of the saturated model}}}-\ln {\frac {\text{likelihood of fitted model}}{\text{likelihood of the saturated model}}}\right)\\[6pt]&=-2\ln {\frac {\left({\dfrac {\text{likelihood of null model}}{\text{likelihood of the saturated model}}}\right)}{\left({\dfrac {\text{likelihood of fitted model}}{\text{likelihood of the saturated model}}}\right)}}\\[6pt]&=-2\ln {\frac {\text{likelihood of the null model}}{\text{likelihood of fitted model}}}.\end{aligned}}}"></span></dd></dl> <p>If the model deviance is significantly smaller than the null deviance then one can conclude that the predictor or set of predictors significantly improve the model's fit. This is analogous to the <span class="texhtml mvar" style="font-style:italic;">F</span>-test used in linear regression analysis to assess the significance of prediction.<sup id="cite_ref-Cohen_35-3" class="reference"><a href="#cite_note-Cohen-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading4"><h4 id="Pseudo-R-squared">Pseudo-R-squared</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=39" title="Edit section: Pseudo-R-squared"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Pseudo-R-squared" title="Pseudo-R-squared">Pseudo-R-squared</a></div> <p>In linear regression the squared multiple correlation, <span class="texhtml mvar" style="font-style:italic;">R</span><sup>2</sup> is used to assess goodness of fit as it represents the proportion of variance in the criterion that is explained by the predictors.<sup id="cite_ref-Cohen_35-4" class="reference"><a href="#cite_note-Cohen-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> In logistic regression analysis, there is no agreed upon analogous measure, but there are several competing measures each with limitations.<sup id="cite_ref-Cohen_35-5" class="reference"><a href="#cite_note-Cohen-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-:0_36-0" class="reference"><a href="#cite_note-:0-36"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup> </p><p>Four of the most commonly used indices and one less commonly used one are examined on this page: </p> <ul><li>Likelihood ratio <span class="texhtml mvar" style="font-style:italic;">R</span><sup>2</sup><sub>L</sub></li> <li>Cox and Snell <span class="texhtml mvar" style="font-style:italic;">R</span><sup>2</sup><sub>CS</sub></li> <li>Nagelkerke <span class="texhtml mvar" style="font-style:italic;">R</span><sup>2</sup><sub>N</sub></li> <li>McFadden <span class="texhtml mvar" style="font-style:italic;">R</span><sup>2</sup><sub>McF</sub></li> <li>Tjur <span class="texhtml mvar" style="font-style:italic;">R</span><sup>2</sup><sub>T</sub></li></ul> <div class="mw-heading mw-heading4"><h4 id="Hosmer–Lemeshow_test"><span id="Hosmer.E2.80.93Lemeshow_test"></span>Hosmer–Lemeshow test</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=40" title="Edit section: Hosmer–Lemeshow test"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <a href="/wiki/Hosmer%E2%80%93Lemeshow_test" title="Hosmer–Lemeshow test">Hosmer–Lemeshow test</a> uses a test statistic that asymptotically follows a <a href="/wiki/Chi-squared_distribution" title="Chi-squared distribution"><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \chi ^{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>χ<!-- χ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \chi ^{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8c0cc9237ec72a1da6d18bc8e7fb24cdda43a49a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.509ex; height:3.009ex;" alt="{\displaystyle \chi ^{2}}"></span> distribution</a> to assess whether or not the observed event rates match expected event rates in subgroups of the model population. This test is considered to be obsolete by some statisticians because of its dependence on arbitrary binning of predicted probabilities and relative low power.<sup id="cite_ref-37" class="reference"><a href="#cite_note-37"><span class="cite-bracket">[</span>37<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Coefficient_significance">Coefficient significance</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=41" title="Edit section: Coefficient significance"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>After fitting the model, it is likely that researchers will want to examine the contribution of individual predictors. To do so, they will want to examine the regression coefficients. In linear regression, the regression coefficients represent the change in the criterion for each unit change in the predictor.<sup id="cite_ref-Cohen_35-6" class="reference"><a href="#cite_note-Cohen-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> In logistic regression, however, the regression coefficients represent the change in the logit for each unit change in the predictor. Given that the logit is not intuitive, researchers are likely to focus on a predictor's effect on the exponential function of the regression coefficient – the odds ratio (see <a href="#Logistic_function,_odds,_odds_ratio,_and_logit">definition</a>). In linear regression, the significance of a regression coefficient is assessed by computing a <i>t</i> test. In logistic regression, there are several different tests designed to assess the significance of an individual predictor, most notably the likelihood ratio test and the Wald statistic. </p> <div class="mw-heading mw-heading4"><h4 id="Likelihood_ratio_test">Likelihood ratio test</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=42" title="Edit section: Likelihood ratio test"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <a href="/wiki/Likelihood-ratio_test" title="Likelihood-ratio test">likelihood-ratio test</a> discussed above to assess model fit is also the recommended procedure to assess the contribution of individual "predictors" to a given model.<sup id="cite_ref-Hosmer_2-9" class="reference"><a href="#cite_note-Hosmer-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Menard_26-5" class="reference"><a href="#cite_note-Menard-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Cohen_35-7" class="reference"><a href="#cite_note-Cohen-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> In the case of a single predictor model, one simply compares the deviance of the predictor model with that of the null model on a chi-square distribution with a single degree of freedom. If the predictor model has significantly smaller deviance (c.f. chi-square using the difference in degrees of freedom of the two models), then one can conclude that there is a significant association between the "predictor" and the outcome. Although some common statistical packages (e.g. SPSS) do provide likelihood ratio test statistics, without this computationally intensive test it would be more difficult to assess the contribution of individual predictors in the multiple logistic regression case.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (October 2019)">citation needed</span></a></i>]</sup> To assess the contribution of individual predictors one can enter the predictors hierarchically, comparing each new model with the previous to determine the contribution of each predictor.<sup id="cite_ref-Cohen_35-8" class="reference"><a href="#cite_note-Cohen-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> There is some debate among statisticians about the appropriateness of so-called "stepwise" procedures.<sup class="noprint Inline-Template" style="margin-left:0.1em; white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Avoid_weasel_words" class="mw-redirect" title="Wikipedia:Avoid weasel words"><span title="Who says this? (October 2019)">weasel words</span></a></i>]</sup> The fear is that they may not preserve nominal statistical properties and may become misleading.<sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">[</span>38<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading4"><h4 id="Wald_statistic">Wald statistic</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=43" title="Edit section: Wald statistic"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Alternatively, when assessing the contribution of individual predictors in a given model, one may examine the significance of the <a href="/wiki/Wald_test" title="Wald test">Wald statistic</a>. The Wald statistic, analogous to the <i>t</i>-test in linear regression, is used to assess the significance of coefficients. The Wald statistic is the ratio of the square of the regression coefficient to the square of the standard error of the coefficient and is asymptotically distributed as a chi-square distribution.<sup id="cite_ref-Menard_26-6" class="reference"><a href="#cite_note-Menard-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle W_{j}={\frac {\beta _{j}^{2}}{SE_{\beta _{j}}^{2}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>W</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msubsup> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> <mrow> <mi>S</mi> <msubsup> <mi>E</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> </mrow> </msub> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msubsup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle W_{j}={\frac {\beta _{j}^{2}}{SE_{\beta _{j}}^{2}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/dca446e50b9831877835f14bb316c41d0f351e81" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.671ex; width:12.129ex; height:8.009ex;" alt="{\displaystyle W_{j}={\frac {\beta _{j}^{2}}{SE_{\beta _{j}}^{2}}}}"></span></dd></dl> <p>Although several statistical packages (e.g., SPSS, SAS) report the Wald statistic to assess the contribution of individual predictors, the Wald statistic has limitations. When the regression coefficient is large, the standard error of the regression coefficient also tends to be larger increasing the probability of <a href="/wiki/Type_I_and_Type_II_errors" class="mw-redirect" title="Type I and Type II errors">Type-II error</a>. The Wald statistic also tends to be biased when data are sparse.<sup id="cite_ref-Cohen_35-9" class="reference"><a href="#cite_note-Cohen-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading4"><h4 id="Case-control_sampling">Case-control sampling</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=44" title="Edit section: Case-control sampling"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Suppose cases are rare. Then we might wish to sample them more frequently than their prevalence in the population. For example, suppose there is a disease that affects 1 person in 10,000 and to collect our data we need to do a complete physical. It may be too expensive to do thousands of physicals of healthy people in order to obtain data for only a few diseased individuals. Thus, we may evaluate more diseased individuals, perhaps all of the rare outcomes. This is also retrospective sampling, or equivalently it is called unbalanced data. As a rule of thumb, sampling controls at a rate of five times the number of cases will produce sufficient control data.<sup id="cite_ref-islr_39-0" class="reference"><a href="#cite_note-islr-39"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup> </p><p>Logistic regression is unique in that it may be estimated on unbalanced data, rather than randomly sampled data, and still yield correct coefficient estimates of the effects of each independent variable on the outcome. That is to say, if we form a logistic model from such data, if the model is correct in the general population, the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{j}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>j</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{j}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/83edf0558c67ad56ca5c05096b550bd733d62c4b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.225ex; height:2.843ex;" alt="{\displaystyle \beta _{j}}"></span> parameters are all correct except for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/40b42f71f244103a8fca3c76885c7580a92831c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{0}}"></span>. We can correct <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \beta _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \beta _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/40b42f71f244103a8fca3c76885c7580a92831c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.37ex; height:2.509ex;" alt="{\displaystyle \beta _{0}}"></span> if we know the true prevalence as follows:<sup id="cite_ref-islr_39-1" class="reference"><a href="#cite_note-islr-39"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup> </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\widehat {\beta }}_{0}^{*}={\widehat {\beta }}_{0}+\log {\frac {\pi }{1-\pi }}-\log {{\tilde {\pi }} \over {1-{\tilde {\pi }}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>β<!-- β --></mi> <mo>^<!-- ^ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>∗<!-- ∗ --></mo> </mrow> </msubsup> <mo>=</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>β<!-- β --></mi> <mo>^<!-- ^ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>π<!-- π --></mi> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>π<!-- π --></mi> </mrow> </mfrac> </mrow> <mo>−<!-- − --></mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>π<!-- π --></mi> <mo stretchy="false">~<!-- ~ --></mo> </mover> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>−<!-- − --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>π<!-- π --></mi> <mo stretchy="false">~<!-- ~ --></mo> </mover> </mrow> </mrow> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\widehat {\beta }}_{0}^{*}={\widehat {\beta }}_{0}+\log {\frac {\pi }{1-\pi }}-\log {{\tilde {\pi }} \over {1-{\tilde {\pi }}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fa822460baff63bee2104c856a0eacb9d57240c8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; width:32.98ex; height:5.343ex;" alt="{\displaystyle {\widehat {\beta }}_{0}^{*}={\widehat {\beta }}_{0}+\log {\frac {\pi }{1-\pi }}-\log {{\tilde {\pi }} \over {1-{\tilde {\pi }}}}}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \pi }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>π<!-- π --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \pi }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9be4ba0bb8df3af72e90a0535fabcc17431e540a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.332ex; height:1.676ex;" alt="{\displaystyle \pi }"></span> is the true prevalence and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\tilde {\pi }}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mover> <mi>π<!-- π --></mi> <mo stretchy="false">~<!-- ~ --></mo> </mover> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\tilde {\pi }}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eac615e0ddacbe0ab3aa62f183f69560afec8095" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.332ex; height:2.009ex;" alt="{\displaystyle {\tilde {\pi }}}"></span> is the prevalence in the sample. </p> <div class="mw-heading mw-heading2"><h2 id="Discussion">Discussion</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=45" title="Edit section: Discussion"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Like other forms of <a href="/wiki/Regression_analysis" title="Regression analysis">regression analysis</a>, logistic regression makes use of one or more predictor variables that may be either continuous or categorical. Unlike ordinary linear regression, however, logistic regression is used for predicting dependent variables that take <a href="/wiki/Categorical_variable" title="Categorical variable">membership in one of a limited number of categories</a> (treating the dependent variable in the binomial case as the outcome of a <a href="/wiki/Bernoulli_trial" title="Bernoulli trial">Bernoulli trial</a>) rather than a continuous outcome. Given this difference, the assumptions of linear regression are violated. In particular, the residuals cannot be normally distributed. In addition, linear regression may make nonsensical predictions for a binary dependent variable. What is needed is a way to convert a binary variable into a continuous one that can take on any real value (negative or positive). To do that, binomial logistic regression first calculates the <a href="/wiki/Odds" title="Odds">odds</a> of the event happening for different levels of each independent variable, and then takes its <a href="/wiki/Logarithm" title="Logarithm">logarithm</a> to create a continuous criterion as a transformed version of the dependent variable. The logarithm of the odds is the <span class="texhtml"><a href="/wiki/Logit" title="Logit">logit</a></span> of the probability, the <span class="texhtml">logit</span> is defined as follows: <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {logit} p=\ln {\frac {p}{1-p}}\quad {\text{for }}0<p<1\,.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>logit</mi> <mo>⁡<!-- --></mo> <mi>p</mi> <mo>=</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mi>p</mi> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <mi>p</mi> </mrow> </mfrac> </mrow> <mspace width="1em" /> <mrow class="MJX-TeXAtom-ORD"> <mtext>for </mtext> </mrow> <mn>0</mn> <mo><</mo> <mi>p</mi> <mo><</mo> <mn>1</mn> <mspace width="thinmathspace" /> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \operatorname {logit} p=\ln {\frac {p}{1-p}}\quad {\text{for }}0<p<1\,.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cf1e8208609a374a4f593d4268466c080fc56602" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:33.927ex; height:5.343ex;" alt="{\displaystyle \operatorname {logit} p=\ln {\frac {p}{1-p}}\quad {\text{for }}0<p<1\,.}"></span> </p><p>Although the dependent variable in logistic regression is Bernoulli, the logit is on an unrestricted scale.<sup id="cite_ref-Hosmer_2-10" class="reference"><a href="#cite_note-Hosmer-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> The logit function is the <a href="/wiki/Link_function" class="mw-redirect" title="Link function">link function</a> in this kind of generalized linear model, i.e. <span class="mwe-math-element"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {logit} \operatorname {\mathcal {E}} (Y)=\beta _{0}+\beta _{1}x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>logit</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-OP MJX-fixedlimits"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">E</mi> </mrow> </mrow> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mi>Y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \operatorname {logit} \operatorname {\mathcal {E}} (Y)=\beta _{0}+\beta _{1}x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/eee3651f2390846a5dfa5d3ef719f4b7604e30c1" class="mwe-math-fallback-image-display mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:21.813ex; height:2.843ex;" alt="{\displaystyle \operatorname {logit} \operatorname {\mathcal {E}} (Y)=\beta _{0}+\beta _{1}x}"></span> </p><p><span class="texhtml mvar" style="font-style:italic;">Y</span> is the Bernoulli-distributed response variable and <span class="texhtml mvar" style="font-style:italic;">x</span> is the predictor variable; the <span class="texhtml mvar" style="font-style:italic;">β</span> values are the linear parameters. </p><p>The <span class="texhtml">logit</span> of the probability of success is then fitted to the predictors. The predicted value of the <span class="texhtml">logit</span> is converted back into predicted odds, via the inverse of the natural logarithm – the <a href="/wiki/Exponential_function" title="Exponential function">exponential function</a>. Thus, although the observed dependent variable in binary logistic regression is a 0-or-1 variable, the logistic regression estimates the odds, as a continuous variable, that the dependent variable is a 'success'. In some applications, the odds are all that is needed. In others, a specific yes-or-no prediction is needed for whether the dependent variable is or is not a 'success'; this categorical prediction can be based on the computed odds of success, with predicted odds above some chosen cutoff value being translated into a prediction of success. </p> <div class="mw-heading mw-heading2"><h2 id="Maximum_entropy">Maximum entropy</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=46" title="Edit section: Maximum entropy"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Of all the functional forms used for estimating the probabilities of a particular categorical outcome which optimize the fit by maximizing the likelihood function (e.g. <a href="/wiki/Probit_model" title="Probit model">probit regression</a>, <a href="/wiki/Poisson_regression" title="Poisson regression">Poisson regression</a>, etc.), the logistic regression solution is unique in that it is a <a href="/wiki/Maximum_entropy_probability_distribution" title="Maximum entropy probability distribution">maximum entropy</a> solution.<sup id="cite_ref-Mount2011_40-0" class="reference"><a href="#cite_note-Mount2011-40"><span class="cite-bracket">[</span>40<span class="cite-bracket">]</span></a></sup> This is a case of a general property: an <a href="/wiki/Exponential_family" title="Exponential family">exponential family</a> of distributions maximizes entropy, given an expected value. In the case of the logistic model, the logistic function is the <a href="/wiki/Natural_parameter" class="mw-redirect" title="Natural parameter">natural parameter</a> of the Bernoulli distribution (it is in "<a href="/wiki/Canonical_form" title="Canonical form">canonical form</a>", and the logistic function is the canonical link function), while other sigmoid functions are non-canonical link functions; this underlies its mathematical elegance and ease of optimization. See <a href="/wiki/Exponential_family#Maximum_entropy_derivation" title="Exponential family">Exponential family § Maximum entropy derivation</a> for details. </p> <div class="mw-heading mw-heading3"><h3 id="Proof">Proof</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=47" title="Edit section: Proof"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In order to show this, we use the method of <a href="/wiki/Lagrange_multipliers" class="mw-redirect" title="Lagrange multipliers">Lagrange multipliers</a>. The Lagrangian is equal to the entropy plus the sum of the products of Lagrange multipliers times various constraint expressions. The general multinomial case will be considered, since the proof is not made that much simpler by considering simpler cases. Equating the derivative of the Lagrangian with respect to the various probabilities to zero yields a functional form for those probabilities which corresponds to those used in logistic regression.<sup id="cite_ref-Mount2011_40-1" class="reference"><a href="#cite_note-Mount2011-40"><span class="cite-bracket">[</span>40<span class="cite-bracket">]</span></a></sup> </p><p>As in the above section on <a href="#Multinomial_logistic_regression_:_Many_explanatory_variable_and_many_categories">multinomial logistic regression</a>, we will consider <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle M+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>M</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle M+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/03c0b0dc5ee6ec29023977ea04ad152977fcba18" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.445ex; height:2.343ex;" alt="{\displaystyle M+1}"></span>⁠</span> explanatory variables denoted <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{m}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{m}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7f12100e1dc5769ced8c9806b219abc06ab321d3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.005ex; height:2.009ex;" alt="{\displaystyle x_{m}}"></span>⁠</span> and which include <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{0}=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{0}=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1dd9ebf815134d1288a48491ff1529f06f477112" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.645ex; height:2.509ex;" alt="{\displaystyle x_{0}=1}"></span>. There will be a total of <i>K</i> data points, indexed by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k=\{1,2,\dots ,K\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>k</mi> <mo>=</mo> <mo fence="false" stretchy="false">{</mo> <mn>1</mn> <mo>,</mo> <mn>2</mn> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <mi>K</mi> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle k=\{1,2,\dots ,K\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/64880c0750cfac9974d4feeb2dfaa7e2366dbf3c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:17.238ex; height:2.843ex;" alt="{\displaystyle k=\{1,2,\dots ,K\}}"></span>, and the data points are given by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x_{mk}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x_{mk}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87a00940542b288c0aa54715abfb7e8daada881e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.861ex; height:2.009ex;" alt="{\displaystyle x_{mk}}"></span> and <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b2ab0248723a410cc2c67ce06ad5c043dcbb933" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.228ex; height:2.009ex;" alt="{\displaystyle y_{k}}"></span>⁠</span>. The <i>x<sub>mk</sub></i> will also be represented as an <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (M+1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>M</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (M+1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/440d5e798f3bea16c54a8cd9c9c386fe7195be3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.254ex; height:2.843ex;" alt="{\displaystyle (M+1)}"></span>⁠</span>-dimensional vector <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {x}}_{k}=\{x_{0k},x_{1k},\dots ,x_{Mk}\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mo fence="false" stretchy="false">{</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> <mi>k</mi> </mrow> </msub> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mi>k</mi> </mrow> </msub> <mo>,</mo> <mo>…<!-- … --></mo> <mo>,</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>M</mi> <mi>k</mi> </mrow> </msub> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {x}}_{k}=\{x_{0k},x_{1k},\dots ,x_{Mk}\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/28c2731ca50fbac89ef21905b742974e765e1c4d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:24.882ex; height:2.843ex;" alt="{\displaystyle {\boldsymbol {x}}_{k}=\{x_{0k},x_{1k},\dots ,x_{Mk}\}}"></span>. There will be <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle N+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>N</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle N+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fdf2b9cbfe9051fd4e7b50c8028866d497eac35b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.066ex; height:2.343ex;" alt="{\displaystyle N+1}"></span>⁠</span> possible values of the categorical variable <i>y</i> ranging from 0 to N. </p><p>Let <i>p<sub>n</sub>(<b>x</b>)</i> be the probability, given explanatory variable vector <b>x</b>, that the outcome will be <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y=n}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>=</mo> <mi>n</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y=n}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9f8eeed5dc5befed2fad1740a1d3d7fc1236a5e3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.649ex; height:2.009ex;" alt="{\displaystyle y=n}"></span>. Define <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{nk}=p_{n}({\boldsymbol {x}}_{k})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> <mo>=</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo stretchy="false">(</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{nk}=p_{n}({\boldsymbol {x}}_{k})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3d82d9de6b61f955c4519ea3126186c262faef36" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:13.25ex; height:2.843ex;" alt="{\displaystyle p_{nk}=p_{n}({\boldsymbol {x}}_{k})}"></span> which is the probability that for the <i>k</i>-th measurement, the categorical outcome is <i>n</i>. </p><p>The Lagrangian will be expressed as a function of the probabilities <i>p<sub>nk</sub></i> and will minimized by equating the derivatives of the Lagrangian with respect to these probabilities to zero. An important point is that the probabilities are treated equally and the fact that they sum to 1 is part of the Lagrangian formulation, rather than being assumed from the beginning. </p><p>The first contribution to the Lagrangian is the <a href="/wiki/Entropy_(information_theory)" title="Entropy (information theory)">entropy</a>: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathcal {L}}_{ent}=-\sum _{k=1}^{K}\sum _{n=0}^{N}p_{nk}\ln(p_{nk})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">L</mi> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>e</mi> <mi>n</mi> <mi>t</mi> </mrow> </msub> <mo>=</mo> <mo>−<!-- − --></mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\mathcal {L}}_{ent}=-\sum _{k=1}^{K}\sum _{n=0}^{N}p_{nk}\ln(p_{nk})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c02c78df6c5c85ec48348ffa9e6354ec960c3df0" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:27.584ex; height:7.343ex;" alt="{\displaystyle {\mathcal {L}}_{ent}=-\sum _{k=1}^{K}\sum _{n=0}^{N}p_{nk}\ln(p_{nk})}"></span></dd></dl> <p>The log-likelihood is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \ell =\sum _{k=1}^{K}\sum _{n=0}^{N}\Delta (n,y_{k})\ln(p_{nk})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>ℓ<!-- ℓ --></mi> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <mi mathvariant="normal">Δ<!-- Δ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \ell =\sum _{k=1}^{K}\sum _{n=0}^{N}\Delta (n,y_{k})\ln(p_{nk})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1c4022833f08f6251bbe7ce97efa546eeb2c36e3" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:27.334ex; height:7.343ex;" alt="{\displaystyle \ell =\sum _{k=1}^{K}\sum _{n=0}^{N}\Delta (n,y_{k})\ln(p_{nk})}"></span></dd></dl> <p>Assuming the multinomial logistic function, the derivative of the log-likelihood with respect the beta coefficients was found to be: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {\partial \ell }{\partial \beta _{nm}}}=\sum _{k=1}^{K}(p_{nk}x_{mk}-\Delta (n,y_{k})x_{mk})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <mi>ℓ<!-- ℓ --></mi> </mrow> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <msub> <mi>β<!-- β --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>m</mi> </mrow> </msub> </mrow> </mfrac> </mrow> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>k</mi> </mrow> </msub> <mo>−<!-- − --></mo> <mi mathvariant="normal">Δ<!-- Δ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {\partial \ell }{\partial \beta _{nm}}}=\sum _{k=1}^{K}(p_{nk}x_{mk}-\Delta (n,y_{k})x_{mk})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f7129380192471367a01d86322f1ae4fb2e22078" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:36.603ex; height:7.343ex;" alt="{\displaystyle {\frac {\partial \ell }{\partial \beta _{nm}}}=\sum _{k=1}^{K}(p_{nk}x_{mk}-\Delta (n,y_{k})x_{mk})}"></span></dd></dl> <p>A very important point here is that this expression is (remarkably) not an explicit function of the beta coefficients. It is only a function of the probabilities <i>p<sub>nk</sub></i> and the data. Rather than being specific to the assumed multinomial logistic case, it is taken to be a general statement of the condition at which the log-likelihood is maximized and makes no reference to the functional form of <i>p<sub>nk</sub></i>. There are then (<i>M</i>+1)(<i>N</i>+1) fitting constraints and the fitting constraint term in the Lagrangian is then: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathcal {L}}_{fit}=\sum _{n=0}^{N}\sum _{m=0}^{M}\lambda _{nm}\sum _{k=1}^{K}(p_{nk}x_{mk}-\Delta (n,y_{k})x_{mk})}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">L</mi> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>f</mi> <mi>i</mi> <mi>t</mi> </mrow> </msub> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>M</mi> </mrow> </munderover> <msub> <mi>λ<!-- λ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>m</mi> </mrow> </msub> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>k</mi> </mrow> </msub> <mo>−<!-- − --></mo> <mi mathvariant="normal">Δ<!-- Δ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>k</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\mathcal {L}}_{fit}=\sum _{n=0}^{N}\sum _{m=0}^{M}\lambda _{nm}\sum _{k=1}^{K}(p_{nk}x_{mk}-\Delta (n,y_{k})x_{mk})}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d831b258ce0ccd6e5a3605e3a1bc6277ee4252da" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:46.449ex; height:7.343ex;" alt="{\displaystyle {\mathcal {L}}_{fit}=\sum _{n=0}^{N}\sum _{m=0}^{M}\lambda _{nm}\sum _{k=1}^{K}(p_{nk}x_{mk}-\Delta (n,y_{k})x_{mk})}"></span></dd></dl> <p>where the <i>λ<sub>nm</sub></i> are the appropriate Lagrange multipliers. There are <i>K</i> normalization constraints which may be written: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{n=0}^{N}p_{nk}=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{n=0}^{N}p_{nk}=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/38da31dd79f1729aa6ccb7e98f4399355e006563" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:11.247ex; height:7.343ex;" alt="{\displaystyle \sum _{n=0}^{N}p_{nk}=1}"></span></dd></dl> <p>so that the normalization term in the Lagrangian is: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathcal {L}}_{norm}=\sum _{k=1}^{K}\alpha _{k}\left(1-\sum _{n=1}^{N}p_{nk}\right)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">L</mi> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>o</mi> <mi>r</mi> <mi>m</mi> </mrow> </msub> <mo>=</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>K</mi> </mrow> </munderover> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>−<!-- − --></mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> </mrow> <mo>)</mo> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\mathcal {L}}_{norm}=\sum _{k=1}^{K}\alpha _{k}\left(1-\sum _{n=1}^{N}p_{nk}\right)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9aefe6d6a1f6049ada8e6cfdbb192756b1f10a03" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:30.278ex; height:7.509ex;" alt="{\displaystyle {\mathcal {L}}_{norm}=\sum _{k=1}^{K}\alpha _{k}\left(1-\sum _{n=1}^{N}p_{nk}\right)}"></span></dd></dl> <p>where the <i>α<sub>k</sub></i> are the appropriate Lagrange multipliers. The Lagrangian is then the sum of the above three terms: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathcal {L}}={\mathcal {L}}_{ent}+{\mathcal {L}}_{fit}+{\mathcal {L}}_{norm}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">L</mi> </mrow> </mrow> <mo>=</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">L</mi> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>e</mi> <mi>n</mi> <mi>t</mi> </mrow> </msub> <mo>+</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">L</mi> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>f</mi> <mi>i</mi> <mi>t</mi> </mrow> </msub> <mo>+</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">L</mi> </mrow> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>o</mi> <mi>r</mi> <mi>m</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\mathcal {L}}={\mathcal {L}}_{ent}+{\mathcal {L}}_{fit}+{\mathcal {L}}_{norm}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/825b3afb9f565b9eb823cc8e35c929798247aa24" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:24.27ex; height:2.843ex;" alt="{\displaystyle {\mathcal {L}}={\mathcal {L}}_{ent}+{\mathcal {L}}_{fit}+{\mathcal {L}}_{norm}}"></span></dd></dl> <p>Setting the derivative of the Lagrangian with respect to one of the probabilities to zero yields: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {\partial {\mathcal {L}}}{\partial p_{n'k'}}}=0=-\ln(p_{n'k'})-1+\sum _{m=0}^{M}(\lambda _{n'm}x_{mk'})-\alpha _{k'}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">L</mi> </mrow> </mrow> </mrow> <mrow> <mi mathvariant="normal">∂<!-- ∂ --></mi> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mi>n</mi> <mo>′</mo> </msup> <msup> <mi>k</mi> <mo>′</mo> </msup> </mrow> </msub> </mrow> </mfrac> </mrow> <mo>=</mo> <mn>0</mn> <mo>=</mo> <mo>−<!-- − --></mo> <mi>ln</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mi>n</mi> <mo>′</mo> </msup> <msup> <mi>k</mi> <mo>′</mo> </msup> </mrow> </msub> <mo stretchy="false">)</mo> <mo>−<!-- − --></mo> <mn>1</mn> <mo>+</mo> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>M</mi> </mrow> </munderover> <mo stretchy="false">(</mo> <msub> <mi>λ<!-- λ --></mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mi>n</mi> <mo>′</mo> </msup> <mi>m</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <msup> <mi>k</mi> <mo>′</mo> </msup> </mrow> </msub> <mo stretchy="false">)</mo> <mo>−<!-- − --></mo> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <msup> <mi>k</mi> <mo>′</mo> </msup> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\frac {\partial {\mathcal {L}}}{\partial p_{n'k'}}}=0=-\ln(p_{n'k'})-1+\sum _{m=0}^{M}(\lambda _{n'm}x_{mk'})-\alpha _{k'}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b03141dbe7d18c8017b0daec2f46a54655e0bf05" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:51.157ex; height:7.343ex;" alt="{\displaystyle {\frac {\partial {\mathcal {L}}}{\partial p_{n'k'}}}=0=-\ln(p_{n'k'})-1+\sum _{m=0}^{M}(\lambda _{n'm}x_{mk'})-\alpha _{k'}}"></span></dd></dl> <p>Using the more condensed vector notation: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{m=0}^{M}\lambda _{nm}x_{mk}={\boldsymbol {\lambda }}_{n}\cdot {\boldsymbol {x}}_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>M</mi> </mrow> </munderover> <msub> <mi>λ<!-- λ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>m</mi> </mrow> </msub> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>m</mi> <mi>k</mi> </mrow> </msub> <mo>=</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \sum _{m=0}^{M}\lambda _{nm}x_{mk}={\boldsymbol {\lambda }}_{n}\cdot {\boldsymbol {x}}_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6203252a2fce9d56a4cfe8bcdd9b2ba63a9cb1df" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:21.984ex; height:7.343ex;" alt="{\displaystyle \sum _{m=0}^{M}\lambda _{nm}x_{mk}={\boldsymbol {\lambda }}_{n}\cdot {\boldsymbol {x}}_{k}}"></span></dd></dl> <p>and dropping the primes on the <i>n</i> and <i>k</i> indices, and then solving for <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{nk}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{nk}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a0a2c7c51258c9902c7c0908022ab2ac49a1a21b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:3.334ex; height:2.009ex;" alt="{\displaystyle p_{nk}}"></span> yields: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{nk}=e^{{\boldsymbol {\lambda }}_{n}\cdot {\boldsymbol {x}}_{k}}/Z_{k}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mrow> </msup> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <msub> <mi>Z</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{nk}=e^{{\boldsymbol {\lambda }}_{n}\cdot {\boldsymbol {x}}_{k}}/Z_{k}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/c75765435dcd835fadf619ac3c316975acedee31" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.089ex; width:16.054ex; height:3.176ex;" alt="{\displaystyle p_{nk}=e^{{\boldsymbol {\lambda }}_{n}\cdot {\boldsymbol {x}}_{k}}/Z_{k}}"></span></dd></dl> <p>where: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Z_{k}=e^{1+\alpha _{k}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>Z</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> <mo>+</mo> <msub> <mi>α<!-- α --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Z_{k}=e^{1+\alpha _{k}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d310d87b5fa2be806c529b3be322e4b460e23269" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:11.102ex; height:3.009ex;" alt="{\displaystyle Z_{k}=e^{1+\alpha _{k}}}"></span></dd></dl> <p>Imposing the normalization constraint, we can solve for the <i>Z<sub>k</sub></i> and write the probabilities as: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{nk}={\frac {e^{{\boldsymbol {\lambda }}_{n}\cdot {\boldsymbol {x}}_{k}}}{\sum _{u=0}^{N}e^{{\boldsymbol {\lambda }}_{u}\cdot {\boldsymbol {x}}_{k}}}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mrow> </msup> <mrow> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>u</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>u</mi> </mrow> </msub> <mo>⋅<!-- ⋅ --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">x</mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>k</mi> </mrow> </msub> </mrow> </msup> </mrow> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{nk}={\frac {e^{{\boldsymbol {\lambda }}_{n}\cdot {\boldsymbol {x}}_{k}}}{\sum _{u=0}^{N}e^{{\boldsymbol {\lambda }}_{u}\cdot {\boldsymbol {x}}_{k}}}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/58262f31082582921a660bbe95f65da0cbea8e81" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; margin-left: -0.089ex; width:19.128ex; height:7.009ex;" alt="{\displaystyle p_{nk}={\frac {e^{{\boldsymbol {\lambda }}_{n}\cdot {\boldsymbol {x}}_{k}}}{\sum _{u=0}^{N}e^{{\boldsymbol {\lambda }}_{u}\cdot {\boldsymbol {x}}_{k}}}}}"></span></dd></dl> <p>The <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\lambda }}_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\lambda }}_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8a85706a39d6b753f7653826799fc586fcc68022" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.778ex; height:2.509ex;" alt="{\displaystyle {\boldsymbol {\lambda }}_{n}}"></span> are not all independent. We can add any constant <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (M+1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>M</mi> <mo>+</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (M+1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/440d5e798f3bea16c54a8cd9c9c386fe7195be3b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.254ex; height:2.843ex;" alt="{\displaystyle (M+1)}"></span>⁠</span>-dimensional vector to each of the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\lambda }}_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\lambda }}_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8a85706a39d6b753f7653826799fc586fcc68022" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.778ex; height:2.509ex;" alt="{\displaystyle {\boldsymbol {\lambda }}_{n}}"></span> without changing the value of the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p_{nk}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>p</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> <mi>k</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle p_{nk}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a0a2c7c51258c9902c7c0908022ab2ac49a1a21b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.089ex; width:3.334ex; height:2.009ex;" alt="{\displaystyle p_{nk}}"></span> probabilities so that there are only <i>N</i> rather than <span class="nowrap">⁠<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle N+1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>N</mi> <mo>+</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle N+1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/fdf2b9cbfe9051fd4e7b50c8028866d497eac35b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.066ex; height:2.343ex;" alt="{\displaystyle N+1}"></span>⁠</span> independent <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\lambda }}_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\lambda }}_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8a85706a39d6b753f7653826799fc586fcc68022" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.778ex; height:2.509ex;" alt="{\displaystyle {\boldsymbol {\lambda }}_{n}}"></span>. In the <a href="#Multinomial_logistic_regression_:_Many_explanatory_variable_and_many_categories">multinomial logistic regression</a> section above, the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\lambda }}_{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\lambda }}_{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1993c8c2b4b51809ccc40574c93830364ab0ba89" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.614ex; height:2.509ex;" alt="{\displaystyle {\boldsymbol {\lambda }}_{0}}"></span> was subtracted from each <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\lambda }}_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\lambda }}_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8a85706a39d6b753f7653826799fc586fcc68022" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.778ex; height:2.509ex;" alt="{\displaystyle {\boldsymbol {\lambda }}_{n}}"></span> which set the exponential term involving <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\lambda }}_{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\lambda }}_{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1993c8c2b4b51809ccc40574c93830364ab0ba89" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.614ex; height:2.509ex;" alt="{\displaystyle {\boldsymbol {\lambda }}_{0}}"></span> to 1, and the beta coefficients were given by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {\beta }}_{n}={\boldsymbol {\lambda }}_{n}-{\boldsymbol {\lambda }}_{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">β<!-- β --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>=</mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>−<!-- − --></mo> <msub> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="bold-italic">λ<!-- λ --></mi> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {\beta }}_{n}={\boldsymbol {\lambda }}_{n}-{\boldsymbol {\lambda }}_{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8b58ec88f71c1ccc99d1e249587c018cd6d42f4e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.083ex; height:2.676ex;" alt="{\displaystyle {\boldsymbol {\beta }}_{n}={\boldsymbol {\lambda }}_{n}-{\boldsymbol {\lambda }}_{0}}"></span>. </p> <div class="mw-heading mw-heading3"><h3 id="Other_approaches">Other approaches</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=48" title="Edit section: Other approaches"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In machine learning applications where logistic regression is used for binary classification, the MLE minimises the <a href="/wiki/Cross-entropy" title="Cross-entropy">cross-entropy</a> loss function. </p><p>Logistic regression is an important <a href="/wiki/Machine_learning" title="Machine learning">machine learning</a> algorithm. The goal is to model the probability of a random variable <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/961d67d6b454b4df2301ac571808a3538b3a6d3f" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.171ex; width:1.773ex; height:2.009ex;" alt="{\displaystyle Y}"></span> being 0 or 1 given experimental data.<sup id="cite_ref-41" class="reference"><a href="#cite_note-41"><span class="cite-bracket">[</span>41<span class="cite-bracket">]</span></a></sup> </p><p>Consider a <a href="/wiki/Generalized_linear_model" title="Generalized linear model">generalized linear model</a> function parameterized by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \theta }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>θ<!-- θ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \theta }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6e5ab2664b422d53eb0c7df3b87e1360d75ad9af" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.09ex; height:2.176ex;" alt="{\displaystyle \theta }"></span>, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle h_{\theta }(X)={\frac {1}{1+e^{-\theta ^{T}X}}}=\Pr(Y=1\mid X;\theta )}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>h</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>θ<!-- θ --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>X</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mrow> <mn>1</mn> <mo>+</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <msup> <mi>θ<!-- θ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mi>T</mi> </mrow> </msup> <mi>X</mi> </mrow> </msup> </mrow> </mfrac> </mrow> <mo>=</mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>Y</mi> <mo>=</mo> <mn>1</mn> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo>;</mo> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle h_{\theta }(X)={\frac {1}{1+e^{-\theta ^{T}X}}}=\Pr(Y=1\mid X;\theta )}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/21e0ea802aab740282758837dcd3e292e6f1140a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.671ex; width:39.416ex; height:6.009ex;" alt="{\displaystyle h_{\theta }(X)={\frac {1}{1+e^{-\theta ^{T}X}}}=\Pr(Y=1\mid X;\theta )}"></span></dd></dl> <p>Therefore, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(Y=0\mid X;\theta )=1-h_{\theta }(X)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>Y</mi> <mo>=</mo> <mn>0</mn> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo>;</mo> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>h</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>θ<!-- θ --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>X</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(Y=0\mid X;\theta )=1-h_{\theta }(X)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/5adf33ed9399046e0812a899b179c538312f604b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:29.612ex; height:2.843ex;" alt="{\displaystyle \Pr(Y=0\mid X;\theta )=1-h_{\theta }(X)}"></span></dd></dl> <p>and since <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Y\in \{0,1\}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>Y</mi> <mo>∈<!-- ∈ --></mo> <mo fence="false" stretchy="false">{</mo> <mn>0</mn> <mo>,</mo> <mn>1</mn> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle Y\in \{0,1\}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/df11fa32315db6beccb24e945bcbdc8f0395b2b7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.298ex; height:2.843ex;" alt="{\displaystyle Y\in \{0,1\}}"></span>, we see that <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(y\mid X;\theta )}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>y</mi> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo>;</mo> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(y\mid X;\theta )}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8c415c108fc51baebbfbb85626025fd7df84303c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.501ex; height:2.843ex;" alt="{\displaystyle \Pr(y\mid X;\theta )}"></span> is given by <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Pr(y\mid X;\theta )=h_{\theta }(X)^{y}(1-h_{\theta }(X))^{(1-y)}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>y</mi> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo>;</mo> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> <mo>=</mo> <msub> <mi>h</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>θ<!-- θ --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>X</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>y</mi> </mrow> </msup> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>h</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>θ<!-- θ --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <mi>X</mi> <mo stretchy="false">)</mo> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mi>y</mi> <mo stretchy="false">)</mo> </mrow> </msup> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Pr(y\mid X;\theta )=h_{\theta }(X)^{y}(1-h_{\theta }(X))^{(1-y)}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/1e7ce51343f3071d5ee4c0036fc25361861ba7e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:38.8ex; height:3.343ex;" alt="{\displaystyle \Pr(y\mid X;\theta )=h_{\theta }(X)^{y}(1-h_{\theta }(X))^{(1-y)}.}"></span> We now calculate the <a href="/wiki/Likelihood_function" title="Likelihood function">likelihood function</a> assuming that all the observations in the sample are independently Bernoulli distributed, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}L(\theta \mid y;x)&=\Pr(Y\mid X;\theta )\\&=\prod _{i}\Pr(y_{i}\mid x_{i};\theta )\\&=\prod _{i}h_{\theta }(x_{i})^{y_{i}}(1-h_{\theta }(x_{i}))^{(1-y_{i})}\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd> <mi>L</mi> <mo stretchy="false">(</mo> <mi>θ<!-- θ --></mi> <mo>∣<!-- ∣ --></mo> <mi>y</mi> <mo>;</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mtd> <mtd> <mi></mi> <mo>=</mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>Y</mi> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo>;</mo> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <munder> <mo>∏<!-- ∏ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </munder> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>∣<!-- ∣ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>;</mo> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd /> <mtd> <mi></mi> <mo>=</mo> <munder> <mo>∏<!-- ∏ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </munder> <msub> <mi>h</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>θ<!-- θ --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> </mrow> </msup> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>h</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>θ<!-- θ --></mi> </mrow> </msub> <mo stretchy="false">(</mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">(</mo> <mn>1</mn> <mo>−<!-- − --></mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo stretchy="false">)</mo> </mrow> </msup> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}L(\theta \mid y;x)&=\Pr(Y\mid X;\theta )\\&=\prod _{i}\Pr(y_{i}\mid x_{i};\theta )\\&=\prod _{i}h_{\theta }(x_{i})^{y_{i}}(1-h_{\theta }(x_{i}))^{(1-y_{i})}\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d04dc6623a4c7901b0982191fb9c675df7db2960" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -6.505ex; width:42.225ex; height:14.176ex;" alt="{\displaystyle {\begin{aligned}L(\theta \mid y;x)&=\Pr(Y\mid X;\theta )\\&=\prod _{i}\Pr(y_{i}\mid x_{i};\theta )\\&=\prod _{i}h_{\theta }(x_{i})^{y_{i}}(1-h_{\theta }(x_{i}))^{(1-y_{i})}\end{aligned}}}"></span></dd></dl> <p>Typically, the log likelihood is maximized, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle N^{-1}\log L(\theta \mid y;x)=N^{-1}\sum _{i=1}^{N}\log \Pr(y_{i}\mid x_{i};\theta )}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>N</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>L</mi> <mo stretchy="false">(</mo> <mi>θ<!-- θ --></mi> <mo>∣<!-- ∣ --></mo> <mi>y</mi> <mo>;</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msup> <mi>N</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <mi>log</mi> <mo>⁡<!-- --></mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>∣<!-- ∣ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>;</mo> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle N^{-1}\log L(\theta \mid y;x)=N^{-1}\sum _{i=1}^{N}\log \Pr(y_{i}\mid x_{i};\theta )}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8b7b29d294e20049696d60dee58eb8c38b36fdd8" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:45.616ex; height:7.343ex;" alt="{\displaystyle N^{-1}\log L(\theta \mid y;x)=N^{-1}\sum _{i=1}^{N}\log \Pr(y_{i}\mid x_{i};\theta )}"></span></dd></dl> <p>which is maximized using optimization techniques such as <a href="/wiki/Gradient_descent" title="Gradient descent">gradient descent</a>. </p><p>Assuming the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (x,y)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (x,y)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/41cf50e4a314ca8e2c30964baa8d26e5be7a9386" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.328ex; height:2.843ex;" alt="{\displaystyle (x,y)}"></span> pairs are drawn uniformly from the underlying distribution, then in the limit of large <i>N</i>, </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}&\lim \limits _{N\rightarrow +\infty }N^{-1}\sum _{i=1}^{N}\log \Pr(y_{i}\mid x_{i};\theta )=\sum _{x\in {\mathcal {X}}}\sum _{y\in {\mathcal {Y}}}\Pr(X=x,Y=y)\log \Pr(Y=y\mid X=x;\theta )\\[6pt]={}&\sum _{x\in {\mathcal {X}}}\sum _{y\in {\mathcal {Y}}}\Pr(X=x,Y=y)\left(-\log {\frac {\Pr(Y=y\mid X=x)}{\Pr(Y=y\mid X=x;\theta )}}+\log \Pr(Y=y\mid X=x)\right)\\[6pt]={}&-D_{\text{KL}}(Y\parallel Y_{\theta })-H(Y\mid X)\end{aligned}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mtable columnalign="right left right left right left right left right left right left" rowspacing="0.9em 0.9em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"> <mtr> <mtd /> <mtd> <mi></mi> <munder> <mo form="prefix">lim</mo> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> <mo stretchy="false">→<!-- → --></mo> <mo>+</mo> <mi mathvariant="normal">∞<!-- ∞ --></mi> </mrow> </munder> <msup> <mi>N</mi> <mrow class="MJX-TeXAtom-ORD"> <mo>−<!-- − --></mo> <mn>1</mn> </mrow> </msup> <munderover> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mi>N</mi> </mrow> </munderover> <mi>log</mi> <mo>⁡<!-- --></mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <msub> <mi>y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>∣<!-- ∣ --></mo> <msub> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>i</mi> </mrow> </msub> <mo>;</mo> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> <mo>=</mo> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> <mo>∈<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">X</mi> </mrow> </mrow> </mrow> </munder> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>y</mi> <mo>∈<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">Y</mi> </mrow> </mrow> </mrow> </munder> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>X</mi> <mo>=</mo> <mi>x</mi> <mo>,</mo> <mi>Y</mi> <mo>=</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>Y</mi> <mo>=</mo> <mi>y</mi> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo>=</mo> <mi>x</mi> <mo>;</mo> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <mi></mi> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> <mo>∈<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">X</mi> </mrow> </mrow> </mrow> </munder> <munder> <mo>∑<!-- ∑ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi>y</mi> <mo>∈<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi class="MJX-tex-caligraphic" mathvariant="script">Y</mi> </mrow> </mrow> </mrow> </munder> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>X</mi> <mo>=</mo> <mi>x</mi> <mo>,</mo> <mi>Y</mi> <mo>=</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mrow> <mo>(</mo> <mrow> <mo>−<!-- − --></mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mrow> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>Y</mi> <mo>=</mo> <mi>y</mi> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo>=</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> <mrow> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>Y</mi> <mo>=</mo> <mi>y</mi> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo>=</mo> <mi>x</mi> <mo>;</mo> <mi>θ<!-- θ --></mi> <mo stretchy="false">)</mo> </mrow> </mfrac> </mrow> <mo>+</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mo movablelimits="true" form="prefix">Pr</mo> <mo stretchy="false">(</mo> <mi>Y</mi> <mo>=</mo> <mi>y</mi> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo>=</mo> <mi>x</mi> <mo stretchy="false">)</mo> </mrow> <mo>)</mo> </mrow> </mtd> </mtr> <mtr> <mtd> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> </mrow> </mtd> <mtd> <mi></mi> <mo>−<!-- − --></mo> <msub> <mi>D</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>KL</mtext> </mrow> </msub> <mo stretchy="false">(</mo> <mi>Y</mi> <mo>∥<!-- ∥ --></mo> <msub> <mi>Y</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>θ<!-- θ --></mi> </mrow> </msub> <mo stretchy="false">)</mo> <mo>−<!-- − --></mo> <mi>H</mi> <mo stretchy="false">(</mo> <mi>Y</mi> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo stretchy="false">)</mo> </mtd> </mtr> </mtable> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}&\lim \limits _{N\rightarrow +\infty }N^{-1}\sum _{i=1}^{N}\log \Pr(y_{i}\mid x_{i};\theta )=\sum _{x\in {\mathcal {X}}}\sum _{y\in {\mathcal {Y}}}\Pr(X=x,Y=y)\log \Pr(Y=y\mid X=x;\theta )\\[6pt]={}&\sum _{x\in {\mathcal {X}}}\sum _{y\in {\mathcal {Y}}}\Pr(X=x,Y=y)\left(-\log {\frac {\Pr(Y=y\mid X=x)}{\Pr(Y=y\mid X=x;\theta )}}+\log \Pr(Y=y\mid X=x)\right)\\[6pt]={}&-D_{\text{KL}}(Y\parallel Y_{\theta })-H(Y\mid X)\end{aligned}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9b300972d40831096c1ab7bdf34338a71eca96d9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -9.838ex; width:87.29ex; height:20.843ex;" alt="{\displaystyle {\begin{aligned}&\lim \limits _{N\rightarrow +\infty }N^{-1}\sum _{i=1}^{N}\log \Pr(y_{i}\mid x_{i};\theta )=\sum _{x\in {\mathcal {X}}}\sum _{y\in {\mathcal {Y}}}\Pr(X=x,Y=y)\log \Pr(Y=y\mid X=x;\theta )\\[6pt]={}&\sum _{x\in {\mathcal {X}}}\sum _{y\in {\mathcal {Y}}}\Pr(X=x,Y=y)\left(-\log {\frac {\Pr(Y=y\mid X=x)}{\Pr(Y=y\mid X=x;\theta )}}+\log \Pr(Y=y\mid X=x)\right)\\[6pt]={}&-D_{\text{KL}}(Y\parallel Y_{\theta })-H(Y\mid X)\end{aligned}}}"></span></dd></dl> <p>where <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle H(Y\mid X)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>H</mi> <mo stretchy="false">(</mo> <mi>Y</mi> <mo>∣<!-- ∣ --></mo> <mi>X</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle H(Y\mid X)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7cde9d54630c2425deeec9410a7eeca860acf8c9" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.563ex; height:2.843ex;" alt="{\displaystyle H(Y\mid X)}"></span> is the <a href="/wiki/Conditional_entropy" title="Conditional entropy">conditional entropy</a> and <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle D_{\text{KL}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>D</mi> <mrow class="MJX-TeXAtom-ORD"> <mtext>KL</mtext> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle D_{\text{KL}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/498862d3f9112329a1c9b0ce321eb2ba2fa8a99c" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:4.462ex; height:2.509ex;" alt="{\displaystyle D_{\text{KL}}}"></span> is the <a href="/wiki/Kullback%E2%80%93Leibler_divergence" title="Kullback–Leibler divergence">Kullback–Leibler divergence</a>. This leads to the intuition that by maximizing the log-likelihood of a model, you are minimizing the KL divergence of your model from the maximal entropy distribution. Intuitively searching for the model that makes the fewest assumptions in its parameters. </p> <div class="mw-heading mw-heading2"><h2 id="Comparison_with_linear_regression">Comparison with linear regression</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=49" title="Edit section: Comparison with linear regression"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Logistic regression can be seen as a special case of the <a href="/wiki/Generalized_linear_model" title="Generalized linear model">generalized linear model</a> and thus analogous to <a href="/wiki/Linear_regression" title="Linear regression">linear regression</a>. The model of logistic regression, however, is based on quite different assumptions (about the relationship between the dependent and independent variables) from those of linear regression. In particular, the key differences between these two models can be seen in the following two features of logistic regression. First, the conditional distribution <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y\mid x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> <mo>∣<!-- ∣ --></mo> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y\mid x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/9fed0364e2faac295815888b9762dcd1ea5f2fe6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.422ex; height:2.843ex;" alt="{\displaystyle y\mid x}"></span> is a <a href="/wiki/Bernoulli_distribution" title="Bernoulli distribution">Bernoulli distribution</a> rather than a <a href="/wiki/Gaussian_distribution" class="mw-redirect" title="Gaussian distribution">Gaussian distribution</a>, because the dependent variable is binary. Second, the predicted values are probabilities and are therefore restricted to (0,1) through the <a href="/wiki/Logistic_function" title="Logistic function">logistic distribution function</a> because logistic regression predicts the <b>probability</b> of particular outcomes rather than the outcomes themselves. </p> <div class="mw-heading mw-heading2"><h2 id="Alternatives">Alternatives</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=50" title="Edit section: Alternatives"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A common alternative to the logistic model (logit model) is the <a href="/wiki/Probit_model" title="Probit model">probit model</a>, as the related names suggest. From the perspective of <a href="/wiki/Generalized_linear_model" title="Generalized linear model">generalized linear models</a>, these differ in the choice of <a href="/wiki/Link_function" class="mw-redirect" title="Link function">link function</a>: the logistic model uses the <a href="/wiki/Logit_function" class="mw-redirect" title="Logit function">logit function</a> (inverse logistic function), while the probit model uses the <a href="/wiki/Probit_function" class="mw-redirect" title="Probit function">probit function</a> (inverse <a href="/wiki/Error_function" title="Error function">error function</a>). Equivalently, in the latent variable interpretations of these two methods, the first assumes a standard <a href="/wiki/Logistic_distribution" title="Logistic distribution">logistic distribution</a> of errors and the second a standard <a href="/wiki/Normal_distribution" title="Normal distribution">normal distribution</a> of errors.<sup id="cite_ref-42" class="reference"><a href="#cite_note-42"><span class="cite-bracket">[</span>42<span class="cite-bracket">]</span></a></sup> Other <a href="/wiki/Sigmoid_function" title="Sigmoid function">sigmoid functions</a> or error distributions can be used instead. </p><p>Logistic regression is an alternative to Fisher's 1936 method, <a href="/wiki/Linear_discriminant_analysis" title="Linear discriminant analysis">linear discriminant analysis</a>.<sup id="cite_ref-43" class="reference"><a href="#cite_note-43"><span class="cite-bracket">[</span>43<span class="cite-bracket">]</span></a></sup> If the assumptions of linear discriminant analysis hold, the conditioning can be reversed to produce logistic regression. The converse is not true, however, because logistic regression does not require the multivariate normal assumption of discriminant analysis.<sup id="cite_ref-44" class="reference"><a href="#cite_note-44"><span class="cite-bracket">[</span>44<span class="cite-bracket">]</span></a></sup> </p><p>The assumption of linear predictor effects can easily be relaxed using techniques such as <a href="/wiki/Spline_(mathematics)" title="Spline (mathematics)">spline functions</a>.<sup id="cite_ref-rms_13-2" class="reference"><a href="#cite_note-rms-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="History">History</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=51" title="Edit section: History"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A detailed history of the logistic regression is given in <a href="#CITEREFCramer2002">Cramer (2002)</a>. The logistic function was developed as a model of <a href="/wiki/Population_growth" title="Population growth">population growth</a> and named "logistic" by <a href="/wiki/Pierre_Fran%C3%A7ois_Verhulst" title="Pierre François Verhulst">Pierre François Verhulst</a> in the 1830s and 1840s, under the guidance of <a href="/wiki/Adolphe_Quetelet" title="Adolphe Quetelet">Adolphe Quetelet</a>; see <a href="/wiki/Logistic_function#History" title="Logistic function">Logistic function § History</a> for details.<sup id="cite_ref-FOOTNOTECramer20023–5_45-0" class="reference"><a href="#cite_note-FOOTNOTECramer20023–5-45"><span class="cite-bracket">[</span>45<span class="cite-bracket">]</span></a></sup> In his earliest paper (1838), Verhulst did not specify how he fit the curves to the data.<sup id="cite_ref-46" class="reference"><a href="#cite_note-46"><span class="cite-bracket">[</span>46<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-47" class="reference"><a href="#cite_note-47"><span class="cite-bracket">[</span>47<span class="cite-bracket">]</span></a></sup> In his more detailed paper (1845), Verhulst determined the three parameters of the model by making the curve pass through three observed points, which yielded poor predictions.<sup id="cite_ref-48" class="reference"><a href="#cite_note-48"><span class="cite-bracket">[</span>48<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-FOOTNOTECramer20024_49-0" class="reference"><a href="#cite_note-FOOTNOTECramer20024-49"><span class="cite-bracket">[</span>49<span class="cite-bracket">]</span></a></sup> </p><p>The logistic function was independently developed in chemistry as a model of <a href="/wiki/Autocatalysis" title="Autocatalysis">autocatalysis</a> (<a href="/wiki/Wilhelm_Ostwald" title="Wilhelm Ostwald">Wilhelm Ostwald</a>, 1883).<sup id="cite_ref-FOOTNOTECramer20027_50-0" class="reference"><a href="#cite_note-FOOTNOTECramer20027-50"><span class="cite-bracket">[</span>50<span class="cite-bracket">]</span></a></sup> An autocatalytic reaction is one in which one of the products is itself a <a href="/wiki/Catalyst" class="mw-redirect" title="Catalyst">catalyst</a> for the same reaction, while the supply of one of the reactants is fixed. This naturally gives rise to the logistic equation for the same reason as population growth: the reaction is self-reinforcing but constrained. </p><p>The logistic function was independently rediscovered as a model of population growth in 1920 by <a href="/wiki/Raymond_Pearl" title="Raymond Pearl">Raymond Pearl</a> and <a href="/wiki/Lowell_Reed" title="Lowell Reed">Lowell Reed</a>, published as <a href="#CITEREFPearlReed1920">Pearl & Reed (1920)</a>, which led to its use in modern statistics. They were initially unaware of Verhulst's work and presumably learned about it from <a href="/wiki/L._Gustave_du_Pasquier" title="L. Gustave du Pasquier">L. Gustave du Pasquier</a>, but they gave him little credit and did not adopt his terminology.<sup id="cite_ref-FOOTNOTECramer20026_51-0" class="reference"><a href="#cite_note-FOOTNOTECramer20026-51"><span class="cite-bracket">[</span>51<span class="cite-bracket">]</span></a></sup> Verhulst's priority was acknowledged and the term "logistic" revived by <a href="/wiki/Udny_Yule" title="Udny Yule">Udny Yule</a> in 1925 and has been followed since.<sup id="cite_ref-FOOTNOTECramer20026–7_52-0" class="reference"><a href="#cite_note-FOOTNOTECramer20026–7-52"><span class="cite-bracket">[</span>52<span class="cite-bracket">]</span></a></sup> Pearl and Reed first applied the model to the population of the United States, and also initially fitted the curve by making it pass through three points; as with Verhulst, this again yielded poor results.<sup id="cite_ref-FOOTNOTECramer20025_53-0" class="reference"><a href="#cite_note-FOOTNOTECramer20025-53"><span class="cite-bracket">[</span>53<span class="cite-bracket">]</span></a></sup> </p><p>In the 1930s, the <a href="/wiki/Probit_model" title="Probit model">probit model</a> was developed and systematized by <a href="/wiki/Chester_Ittner_Bliss" title="Chester Ittner Bliss">Chester Ittner Bliss</a>, who coined the term "probit" in <a href="#CITEREFBliss1934">Bliss (1934)</a>, and by <a href="/wiki/John_Gaddum" title="John Gaddum">John Gaddum</a> in <a href="#CITEREFGaddum1933">Gaddum (1933)</a>, and the model fit by <a href="/wiki/Maximum_likelihood_estimation" title="Maximum likelihood estimation">maximum likelihood estimation</a> by <a href="/wiki/Ronald_A._Fisher" class="mw-redirect" title="Ronald A. Fisher">Ronald A. Fisher</a> in <a href="#CITEREFFisher1935">Fisher (1935)</a>, as an addendum to Bliss's work. The probit model was principally used in <a href="/wiki/Bioassay" title="Bioassay">bioassay</a>, and had been preceded by earlier work dating to 1860; see <a href="/wiki/Probit_model#History" title="Probit model">Probit model § History</a>. The probit model influenced the subsequent development of the logit model and these models competed with each other.<sup id="cite_ref-FOOTNOTECramer20027–9_54-0" class="reference"><a href="#cite_note-FOOTNOTECramer20027–9-54"><span class="cite-bracket">[</span>54<span class="cite-bracket">]</span></a></sup> </p><p>The logistic model was likely first used as an alternative to the probit model in bioassay by <a href="/wiki/Edwin_Bidwell_Wilson" title="Edwin Bidwell Wilson">Edwin Bidwell Wilson</a> and his student <a href="/wiki/Jane_Worcester" title="Jane Worcester">Jane Worcester</a> in <a href="#CITEREFWilsonWorcester1943">Wilson & Worcester (1943)</a>.<sup id="cite_ref-FOOTNOTECramer20029_55-0" class="reference"><a href="#cite_note-FOOTNOTECramer20029-55"><span class="cite-bracket">[</span>55<span class="cite-bracket">]</span></a></sup> However, the development of the logistic model as a general alternative to the probit model was principally due to the work of <a href="/wiki/Joseph_Berkson" title="Joseph Berkson">Joseph Berkson</a> over many decades, beginning in <a href="#CITEREFBerkson1944">Berkson (1944)</a>, where he coined "logit", by analogy with "probit", and continuing through <a href="#CITEREFBerkson1951">Berkson (1951)</a> and following years.<sup id="cite_ref-56" class="reference"><a href="#cite_note-56"><span class="cite-bracket">[</span>56<span class="cite-bracket">]</span></a></sup> The logit model was initially dismissed as inferior to the probit model, but "gradually achieved an equal footing with the probit",<sup id="cite_ref-FOOTNOTECramer200211_57-0" class="reference"><a href="#cite_note-FOOTNOTECramer200211-57"><span class="cite-bracket">[</span>57<span class="cite-bracket">]</span></a></sup> particularly between 1960 and 1970. By 1970, the logit model achieved parity with the probit model in use in statistics journals and thereafter surpassed it. This relative popularity was due to the adoption of the logit outside of bioassay, rather than displacing the probit within bioassay, and its informal use in practice; the logit's popularity is credited to the logit model's computational simplicity, mathematical properties, and generality, allowing its use in varied fields.<sup id="cite_ref-FOOTNOTECramer200210–11_3-1" class="reference"><a href="#cite_note-FOOTNOTECramer200210–11-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> </p><p>Various refinements occurred during that time, notably by <a href="/wiki/David_Cox_(statistician)" title="David Cox (statistician)">David Cox</a>, as in <a href="#CITEREFCox1958">Cox (1958)</a>.<sup id="cite_ref-wal67est_4-1" class="reference"><a href="#cite_note-wal67est-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> </p><p>The multinomial logit model was introduced independently in <a href="#CITEREFCox1966">Cox (1966)</a> and <a href="#CITEREFTheil1969">Theil (1969)</a>, which greatly increased the scope of application and the popularity of the logit model.<sup id="cite_ref-FOOTNOTECramer200213_58-0" class="reference"><a href="#cite_note-FOOTNOTECramer200213-58"><span class="cite-bracket">[</span>58<span class="cite-bracket">]</span></a></sup> In 1973 <a href="/wiki/Daniel_McFadden" title="Daniel McFadden">Daniel McFadden</a> linked the multinomial logit to the theory of <a href="/wiki/Discrete_choice" title="Discrete choice">discrete choice</a>, specifically <a href="/wiki/Luce%27s_choice_axiom" title="Luce's choice axiom">Luce's choice axiom</a>, showing that the multinomial logit followed from the assumption of <a href="/wiki/Independence_of_irrelevant_alternatives" title="Independence of irrelevant alternatives">independence of irrelevant alternatives</a> and interpreting odds of alternatives as relative preferences;<sup id="cite_ref-59" class="reference"><a href="#cite_note-59"><span class="cite-bracket">[</span>59<span class="cite-bracket">]</span></a></sup> this gave a theoretical foundation for the logistic regression.<sup id="cite_ref-FOOTNOTECramer200213_58-1" class="reference"><a href="#cite_note-FOOTNOTECramer200213-58"><span class="cite-bracket">[</span>58<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Extensions">Extensions</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=52" title="Edit section: Extensions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are large numbers of extensions: </p> <ul><li><a href="/wiki/Multinomial_logistic_regression" title="Multinomial logistic regression">Multinomial logistic regression</a> (or <b>multinomial logit</b>) handles the case of a multi-way <a href="/wiki/Categorical_variable" title="Categorical variable">categorical</a> dependent variable (with unordered values, also called "classification"). The general case of having dependent variables with more than two values is termed <i>polytomous regression</i>.</li> <li><a href="/wiki/Ordered_logistic_regression" class="mw-redirect" title="Ordered logistic regression">Ordered logistic regression</a> (or <b>ordered logit</b>) handles <a href="/wiki/Levels_of_measurement#Ordinal_measurement" class="mw-redirect" title="Levels of measurement">ordinal</a> dependent variables (ordered values).</li> <li><a href="/wiki/Mixed_logit" title="Mixed logit">Mixed logit</a> is an extension of multinomial logit that allows for correlations among the choices of the dependent variable.</li> <li>An extension of the logistic model to sets of interdependent variables is the <a href="/wiki/Conditional_random_field" title="Conditional random field">conditional random field</a>.</li> <li><a href="/wiki/Conditional_logistic_regression" title="Conditional logistic regression">Conditional logistic regression</a> handles <a href="/wiki/Matching_(statistics)" title="Matching (statistics)">matched</a> or <a href="/wiki/Stratification_(clinical_trials)" title="Stratification (clinical trials)">stratified</a> data when the strata are small. It is mostly used in the analysis of <a href="/wiki/Observational_studies" class="mw-redirect" title="Observational studies">observational studies</a>.</li></ul> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=53" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1266661725">.mw-parser-output .portalbox{padding:0;margin:0.5em 0;display:table;box-sizing:border-box;max-width:175px;list-style:none}.mw-parser-output .portalborder{border:1px solid var(--border-color-base,#a2a9b1);padding:0.1em;background:var(--background-color-neutral-subtle,#f8f9fa)}.mw-parser-output .portalbox-entry{display:table-row;font-size:85%;line-height:110%;height:1.9em;font-style:italic;font-weight:bold}.mw-parser-output .portalbox-image{display:table-cell;padding:0.2em;vertical-align:middle;text-align:center}.mw-parser-output .portalbox-link{display:table-cell;padding:0.2em 0.2em 0.2em 0.3em;vertical-align:middle}@media(min-width:720px){.mw-parser-output .portalleft{margin:0.5em 1em 0.5em 0}.mw-parser-output .portalright{clear:right;float:right;margin:0.5em 0 0.5em 1em}}</style><ul role="navigation" aria-label="Portals" class="noprint portalbox portalborder portalright"> <li class="portalbox-entry"><span class="portalbox-image"><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Nuvola_apps_edu_mathematics_blue-p.svg" class="mw-file-description"><img alt="icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/28px-Nuvola_apps_edu_mathematics_blue-p.svg.png" decoding="async" width="28" height="28" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/42px-Nuvola_apps_edu_mathematics_blue-p.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/56px-Nuvola_apps_edu_mathematics_blue-p.svg.png 2x" data-file-width="128" data-file-height="128" /></a></span></span><span class="portalbox-link"><a href="/wiki/Portal:Mathematics" title="Portal:Mathematics">Mathematics portal</a></span></li></ul> <ul><li><a href="/wiki/Logistic_function" title="Logistic function">Logistic function</a></li> <li><a href="/wiki/Discrete_choice" title="Discrete choice">Discrete choice</a></li> <li><a href="/wiki/Jarrow%E2%80%93Turnbull_model" title="Jarrow–Turnbull model">Jarrow–Turnbull model</a></li> <li><a href="/wiki/Limited_dependent_variable" title="Limited dependent variable">Limited dependent variable</a></li> <li><a href="/wiki/Multinomial_logit" class="mw-redirect" title="Multinomial logit">Multinomial logit model</a></li> <li><a href="/wiki/Ordered_logit" title="Ordered logit">Ordered logit</a></li> <li><a href="/wiki/Hosmer%E2%80%93Lemeshow_test" title="Hosmer–Lemeshow test">Hosmer–Lemeshow test</a></li> <li><a href="/wiki/Brier_score" title="Brier score">Brier score</a></li> <li><a href="/wiki/Mlpack" title="Mlpack">mlpack</a> - contains a <a href="/wiki/C%2B%2B" title="C++">C++</a> implementation of logistic regression</li> <li><a href="/wiki/Local_case-control_sampling" title="Local case-control sampling">Local case-control sampling</a></li> <li><a href="/wiki/Logistic_model_tree" title="Logistic model tree">Logistic model tree</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=54" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist reflist-columns references-column-width" style="column-width: 32em;"> <ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite id="CITEREFTollesMeurer2016" class="citation journal cs1">Tolles, Juliana; Meurer, William J (2016). "Logistic Regression Relating Patient Characteristics to Outcomes". <i>JAMA</i>. <b>316</b> (5): <span class="nowrap">533–</span>4. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1001%2Fjama.2016.7653">10.1001/jama.2016.7653</a>. <a href="/wiki/ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0098-7484">0098-7484</a>. <a href="/wiki/OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/6823603312">6823603312</a>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/27483067">27483067</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=JAMA&rft.atitle=Logistic+Regression+Relating+Patient+Characteristics+to+Outcomes&rft.volume=316&rft.issue=5&rft.pages=%3Cspan+class%3D%22nowrap%22%3E533-%3C%2Fspan%3E4&rft.date=2016&rft_id=info%3Aoclcnum%2F6823603312&rft.issn=0098-7484&rft_id=info%3Apmid%2F27483067&rft_id=info%3Adoi%2F10.1001%2Fjama.2016.7653&rft.aulast=Tolles&rft.aufirst=Juliana&rft.au=Meurer%2C+William+J&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-Hosmer-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-Hosmer_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Hosmer_2-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Hosmer_2-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Hosmer_2-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Hosmer_2-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-Hosmer_2-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-Hosmer_2-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-Hosmer_2-7"><sup><i><b>h</b></i></sup></a> <a href="#cite_ref-Hosmer_2-8"><sup><i><b>i</b></i></sup></a> <a href="#cite_ref-Hosmer_2-9"><sup><i><b>j</b></i></sup></a> <a href="#cite_ref-Hosmer_2-10"><sup><i><b>k</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHosmerLemeshow2000" class="citation book cs1">Hosmer, David W.; Lemeshow, Stanley (2000). <i>Applied Logistic Regression</i> (2nd ed.). Wiley. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-471-35632-5" title="Special:BookSources/978-0-471-35632-5"><bdi>978-0-471-35632-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Applied+Logistic+Regression&rft.edition=2nd&rft.pub=Wiley&rft.date=2000&rft.isbn=978-0-471-35632-5&rft.aulast=Hosmer&rft.aufirst=David+W.&rft.au=Lemeshow%2C+Stanley&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span> <sup class="noprint Inline-Template" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citing_sources" title="Wikipedia:Citing sources"><span title="This citation requires a reference to the specific page or range of pages in which the material appears. (May 2012)">page needed</span></a></i>]</sup></span> </li> <li id="cite_note-FOOTNOTECramer200210–11-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-FOOTNOTECramer200210–11_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-FOOTNOTECramer200210–11_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 10–11.</span> </li> <li id="cite_note-wal67est-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-wal67est_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-wal67est_4-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWalkerDuncan1967" class="citation journal cs1">Walker, SH; Duncan, DB (1967). "Estimation of the probability of an event as a function of several independent variables". <i>Biometrika</i>. <b>54</b> (1/2): <span class="nowrap">167–</span>178. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2333860">10.2307/2333860</a>. <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2333860">2333860</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Biometrika&rft.atitle=Estimation+of+the+probability+of+an+event+as+a+function+of+several+independent+variables&rft.volume=54&rft.issue=1%2F2&rft.pages=%3Cspan+class%3D%22nowrap%22%3E167-%3C%2Fspan%3E178&rft.date=1967&rft_id=info%3Adoi%2F10.2307%2F2333860&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2333860%23id-name%3DJSTOR&rft.aulast=Walker&rft.aufirst=SH&rft.au=Duncan%2C+DB&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-FOOTNOTECramer20028-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTECramer20028_5-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 8.</span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBoydTolsonCopes1987" class="citation journal cs1">Boyd, C. R.; Tolson, M. A.; Copes, W. S. (1987). <a rel="nofollow" class="external text" href="https://doi.org/10.1097%2F00005373-198704000-00005">"Evaluating trauma care: The TRISS method. Trauma Score and the Injury Severity Score"</a>. <i>The Journal of Trauma</i>. <b>27</b> (4): <span class="nowrap">370–</span>378. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1097%2F00005373-198704000-00005">10.1097/00005373-198704000-00005</a></span>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/3106646">3106646</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=The+Journal+of+Trauma&rft.atitle=Evaluating+trauma+care%3A+The+TRISS+method.+Trauma+Score+and+the+Injury+Severity+Score&rft.volume=27&rft.issue=4&rft.pages=%3Cspan+class%3D%22nowrap%22%3E370-%3C%2Fspan%3E378&rft.date=1987&rft_id=info%3Adoi%2F10.1097%2F00005373-198704000-00005&rft_id=info%3Apmid%2F3106646&rft.aulast=Boyd&rft.aufirst=C.+R.&rft.au=Tolson%2C+M.+A.&rft.au=Copes%2C+W.+S.&rft_id=https%3A%2F%2Fdoi.org%2F10.1097%252F00005373-198704000-00005&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFKologluElkerAltunSayek2001" class="citation journal cs1">Kologlu, M.; Elker, D.; Altun, H.; Sayek, I. (2001). "Validation of MPI and PIA II in two different groups of patients with secondary peritonitis". <i>Hepato-Gastroenterology</i>. <b>48</b> (37): <span class="nowrap">147–</span>51. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/11268952">11268952</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Hepato-Gastroenterology&rft.atitle=Validation+of+MPI+and+PIA+II+in+two+different+groups+of+patients+with+secondary+peritonitis&rft.volume=48&rft.issue=37&rft.pages=%3Cspan+class%3D%22nowrap%22%3E147-%3C%2Fspan%3E51&rft.date=2001&rft_id=info%3Apmid%2F11268952&rft.aulast=Kologlu&rft.aufirst=M.&rft.au=Elker%2C+D.&rft.au=Altun%2C+H.&rft.au=Sayek%2C+I.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBiondoRamosDeirosRagué2000" class="citation journal cs1">Biondo, S.; Ramos, E.; Deiros, M.; Ragué, J. M.; De Oca, J.; Moreno, P.; Farran, L.; Jaurrieta, E. (2000). "Prognostic factors for mortality in left colonic peritonitis: A new scoring system". <i>Journal of the American College of Surgeons</i>. <b>191</b> (6): <span class="nowrap">635–</span>42. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2FS1072-7515%2800%2900758-4">10.1016/S1072-7515(00)00758-4</a>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/11129812">11129812</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Journal+of+the+American+College+of+Surgeons&rft.atitle=Prognostic+factors+for+mortality+in+left+colonic+peritonitis%3A+A+new+scoring+system&rft.volume=191&rft.issue=6&rft.pages=%3Cspan+class%3D%22nowrap%22%3E635-%3C%2Fspan%3E42&rft.date=2000&rft_id=info%3Adoi%2F10.1016%2FS1072-7515%2800%2900758-4&rft_id=info%3Apmid%2F11129812&rft.aulast=Biondo&rft.aufirst=S.&rft.au=Ramos%2C+E.&rft.au=Deiros%2C+M.&rft.au=Ragu%C3%A9%2C+J.+M.&rft.au=De+Oca%2C+J.&rft.au=Moreno%2C+P.&rft.au=Farran%2C+L.&rft.au=Jaurrieta%2C+E.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMarshallCookChristouBernard1995" class="citation journal cs1">Marshall, J. C.; Cook, D. J.; Christou, N. V.; Bernard, G. R.; Sprung, C. L.; Sibbald, W. J. (1995). "Multiple organ dysfunction score: A reliable descriptor of a complex clinical outcome". <i>Critical Care Medicine</i>. <b>23</b> (10): <span class="nowrap">1638–</span>52. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1097%2F00003246-199510000-00007">10.1097/00003246-199510000-00007</a>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/7587228">7587228</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Critical+Care+Medicine&rft.atitle=Multiple+organ+dysfunction+score%3A+A+reliable+descriptor+of+a+complex+clinical+outcome&rft.volume=23&rft.issue=10&rft.pages=%3Cspan+class%3D%22nowrap%22%3E1638-%3C%2Fspan%3E52&rft.date=1995&rft_id=info%3Adoi%2F10.1097%2F00003246-199510000-00007&rft_id=info%3Apmid%2F7587228&rft.aulast=Marshall&rft.aufirst=J.+C.&rft.au=Cook%2C+D.+J.&rft.au=Christou%2C+N.+V.&rft.au=Bernard%2C+G.+R.&rft.au=Sprung%2C+C.+L.&rft.au=Sibbald%2C+W.+J.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFLe_GallLemeshowSaulnier1993" class="citation journal cs1">Le Gall, J. R.; Lemeshow, S.; Saulnier, F. (1993). "A new Simplified Acute Physiology Score (SAPS II) based on a European/North American multicenter study". <i>JAMA</i>. <b>270</b> (24): <span class="nowrap">2957–</span>63. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1001%2Fjama.1993.03510240069035">10.1001/jama.1993.03510240069035</a>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/8254858">8254858</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=JAMA&rft.atitle=A+new+Simplified+Acute+Physiology+Score+%28SAPS+II%29+based+on+a+European%2FNorth+American+multicenter+study&rft.volume=270&rft.issue=24&rft.pages=%3Cspan+class%3D%22nowrap%22%3E2957-%3C%2Fspan%3E63&rft.date=1993&rft_id=info%3Adoi%2F10.1001%2Fjama.1993.03510240069035&rft_id=info%3Apmid%2F8254858&rft.aulast=Le+Gall&rft.aufirst=J.+R.&rft.au=Lemeshow%2C+S.&rft.au=Saulnier%2C+F.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-Freedman09-11"><span class="mw-cite-backlink">^ <a href="#cite_ref-Freedman09_11-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Freedman09_11-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFDavid_A._Freedman2009" class="citation book cs1"><a href="/wiki/David_A._Freedman" title="David A. Freedman">David A. Freedman</a> (2009). <i>Statistical Models: Theory and Practice</i>. <a href="/wiki/Cambridge_University_Press" title="Cambridge University Press">Cambridge University Press</a>. p. 128.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Statistical+Models%3A+Theory+and+Practice&rft.pages=128&rft.pub=Cambridge+University+Press&rft.date=2009&rft.au=David+A.+Freedman&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFTruettCornfieldKannel1967" class="citation journal cs1">Truett, J; Cornfield, J; Kannel, W (1967). "A multivariate analysis of the risk of coronary heart disease in Framingham". <i>Journal of Chronic Diseases</i>. <b>20</b> (7): <span class="nowrap">511–</span>24. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2F0021-9681%2867%2990082-3">10.1016/0021-9681(67)90082-3</a>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/6028270">6028270</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Journal+of+Chronic+Diseases&rft.atitle=A+multivariate+analysis+of+the+risk+of+coronary+heart+disease+in+Framingham&rft.volume=20&rft.issue=7&rft.pages=%3Cspan+class%3D%22nowrap%22%3E511-%3C%2Fspan%3E24&rft.date=1967&rft_id=info%3Adoi%2F10.1016%2F0021-9681%2867%2990082-3&rft_id=info%3Apmid%2F6028270&rft.aulast=Truett&rft.aufirst=J&rft.au=Cornfield%2C+J&rft.au=Kannel%2C+W&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-rms-13"><span class="mw-cite-backlink">^ <a href="#cite_ref-rms_13-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-rms_13-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-rms_13-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHarrell2015" class="citation book cs1">Harrell, Frank E. (2015). <i>Regression Modeling Strategies</i>. Springer Series in Statistics (2nd ed.). New York; Springer. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-3-319-19425-7">10.1007/978-3-319-19425-7</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-3-319-19424-0" title="Special:BookSources/978-3-319-19424-0"><bdi>978-3-319-19424-0</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Regression+Modeling+Strategies&rft.series=Springer+Series+in+Statistics&rft.edition=2nd&rft.pub=New+York%3B+Springer&rft.date=2015&rft_id=info%3Adoi%2F10.1007%2F978-3-319-19425-7&rft.isbn=978-3-319-19424-0&rft.aulast=Harrell&rft.aufirst=Frank+E.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-strano05-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-strano05_14-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFM._StranoB.M._Colosimo2006" class="citation journal cs1">M. Strano; B.M. Colosimo (2006). "Logistic regression analysis for experimental determination of forming limit diagrams". <i>International Journal of Machine Tools and Manufacture</i>. <b>46</b> (6): <span class="nowrap">673–</span>682. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fj.ijmachtools.2005.07.005">10.1016/j.ijmachtools.2005.07.005</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=International+Journal+of+Machine+Tools+and+Manufacture&rft.atitle=Logistic+regression+analysis+for+experimental+determination+of+forming+limit+diagrams&rft.volume=46&rft.issue=6&rft.pages=%3Cspan+class%3D%22nowrap%22%3E673-%3C%2Fspan%3E682&rft.date=2006&rft_id=info%3Adoi%2F10.1016%2Fj.ijmachtools.2005.07.005&rft.au=M.+Strano&rft.au=B.M.+Colosimo&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-safety-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-safety_15-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFPaleiDas2009" class="citation journal cs1">Palei, S. K.; Das, S. K. (2009). "Logistic regression model for prediction of roof fall risks in bord and pillar workings in coal mines: An approach". <i>Safety Science</i>. <b>47</b>: <span class="nowrap">88–</span>96. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fj.ssci.2008.01.002">10.1016/j.ssci.2008.01.002</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Safety+Science&rft.atitle=Logistic+regression+model+for+prediction+of+roof+fall+risks+in+bord+and+pillar+workings+in+coal+mines%3A+An+approach&rft.volume=47&rft.pages=%3Cspan+class%3D%22nowrap%22%3E88-%3C%2Fspan%3E96&rft.date=2009&rft_id=info%3Adoi%2F10.1016%2Fj.ssci.2008.01.002&rft.aulast=Palei&rft.aufirst=S.+K.&rft.au=Das%2C+S.+K.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBerry1997" class="citation book cs1">Berry, Michael J.A (1997). <i>Data Mining Techniques For Marketing, Sales and Customer Support</i>. Wiley. p. 10.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Data+Mining+Techniques+For+Marketing%2C+Sales+and+Customer+Support&rft.pages=10&rft.pub=Wiley&rft.date=1997&rft.aulast=Berry&rft.aufirst=Michael+J.A&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMesa-ArangoHasanUkkusuriMurray-Tuite2013" class="citation journal cs1">Mesa-Arango, Rodrigo; Hasan, Samiul; Ukkusuri, Satish V.; Murray-Tuite, Pamela (February 2013). <a rel="nofollow" class="external text" href="https://ascelibrary.org/doi/10.1061/%28ASCE%29NH.1527-6996.0000083">"Household-Level Model for Hurricane Evacuation Destination Type Choice Using Hurricane Ivan Data"</a>. <i>Natural Hazards Review</i>. <b>14</b> (1): <span class="nowrap">11–</span>20. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1061%2F%28ASCE%29NH.1527-6996.0000083">10.1061/(ASCE)NH.1527-6996.0000083</a>. <a href="/wiki/ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/1527-6988">1527-6988</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Natural+Hazards+Review&rft.atitle=Household-Level+Model+for+Hurricane+Evacuation+Destination+Type+Choice+Using+Hurricane+Ivan+Data&rft.volume=14&rft.issue=1&rft.pages=%3Cspan+class%3D%22nowrap%22%3E11-%3C%2Fspan%3E20&rft.date=2013-02&rft_id=info%3Adoi%2F10.1061%2F%28ASCE%29NH.1527-6996.0000083&rft.issn=1527-6988&rft.aulast=Mesa-Arango&rft.aufirst=Rodrigo&rft.au=Hasan%2C+Samiul&rft.au=Ukkusuri%2C+Satish+V.&rft.au=Murray-Tuite%2C+Pamela&rft_id=https%3A%2F%2Fascelibrary.org%2Fdoi%2F10.1061%2F%2528ASCE%2529NH.1527-6996.0000083&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWibbenmeyerHandCalkinVenn2013" class="citation journal cs1">Wibbenmeyer, Matthew J.; Hand, Michael S.; Calkin, David E.; Venn, Tyron J.; Thompson, Matthew P. (June 2013). <a rel="nofollow" class="external text" href="https://onlinelibrary.wiley.com/doi/10.1111/j.1539-6924.2012.01894.x">"Risk Preferences in Strategic Wildfire Decision Making: A Choice Experiment with U.S. Wildfire Managers"</a>. <i>Risk Analysis</i>. <b>33</b> (6): <span class="nowrap">1021–</span>1037. <a href="/wiki/Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/2013RiskA..33.1021W">2013RiskA..33.1021W</a>. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1111%2Fj.1539-6924.2012.01894.x">10.1111/j.1539-6924.2012.01894.x</a>. <a href="/wiki/ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0272-4332">0272-4332</a>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/23078036">23078036</a>. <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:45282555">45282555</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Risk+Analysis&rft.atitle=Risk+Preferences+in+Strategic+Wildfire+Decision+Making%3A+A+Choice+Experiment+with+U.S.+Wildfire+Managers&rft.volume=33&rft.issue=6&rft.pages=%3Cspan+class%3D%22nowrap%22%3E1021-%3C%2Fspan%3E1037&rft.date=2013-06&rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A45282555%23id-name%3DS2CID&rft_id=info%3Abibcode%2F2013RiskA..33.1021W&rft.issn=0272-4332&rft_id=info%3Adoi%2F10.1111%2Fj.1539-6924.2012.01894.x&rft_id=info%3Apmid%2F23078036&rft.aulast=Wibbenmeyer&rft.aufirst=Matthew+J.&rft.au=Hand%2C+Michael+S.&rft.au=Calkin%2C+David+E.&rft.au=Venn%2C+Tyron+J.&rft.au=Thompson%2C+Matthew+P.&rft_id=https%3A%2F%2Fonlinelibrary.wiley.com%2Fdoi%2F10.1111%2Fj.1539-6924.2012.01894.x&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFLovreglioBorridell’OlioIbeas2014" class="citation journal cs1">Lovreglio, Ruggiero; Borri, Dino; dell’Olio, Luigi; Ibeas, Angel (2014-02-01). <a rel="nofollow" class="external text" href="https://www.sciencedirect.com/science/article/pii/S0925753513002294">"A discrete choice model based on random utilities for exit choice in emergency evacuations"</a>. <i>Safety Science</i>. <b>62</b>: <span class="nowrap">418–</span>426. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fj.ssci.2013.10.004">10.1016/j.ssci.2013.10.004</a>. <a href="/wiki/ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0925-7535">0925-7535</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Safety+Science&rft.atitle=A+discrete+choice+model+based+on+random+utilities+for+exit+choice+in+emergency+evacuations&rft.volume=62&rft.pages=%3Cspan+class%3D%22nowrap%22%3E418-%3C%2Fspan%3E426&rft.date=2014-02-01&rft_id=info%3Adoi%2F10.1016%2Fj.ssci.2013.10.004&rft.issn=0925-7535&rft.aulast=Lovreglio&rft.aufirst=Ruggiero&rft.au=Borri%2C+Dino&rft.au=dell%E2%80%99Olio%2C+Luigi&rft.au=Ibeas%2C+Angel&rft_id=https%3A%2F%2Fwww.sciencedirect.com%2Fscience%2Farticle%2Fpii%2FS0925753513002294&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.mastersindatascience.org/learning/machine-learning-algorithms/logistic-regression/">"Logistic Regression"</a>. <i>CORP-MIDS1 (MDS)</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2024-03-16</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=CORP-MIDS1+%28MDS%29&rft.atitle=Logistic+Regression&rft_id=https%3A%2F%2Fwww.mastersindatascience.org%2Flearning%2Fmachine-learning-algorithms%2Flogistic-regression%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-NeymanPearson1933-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-NeymanPearson1933_21-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFNeymanPearson1933" class="citation cs2"><a href="/wiki/Jerzy_Neyman" title="Jerzy Neyman">Neyman, J.</a>; <a href="/wiki/Egon_Pearson" title="Egon Pearson">Pearson, E. S.</a> (1933), <a rel="nofollow" class="external text" href="http://www.stats.org.uk/statistical-inference/NeymanPearson1933.pdf">"On the problem of the most efficient tests of statistical hypotheses"</a> <span class="cs1-format">(PDF)</span>, <i><a href="/wiki/Philosophical_Transactions_of_the_Royal_Society_of_London_A" class="mw-redirect" title="Philosophical Transactions of the Royal Society of London A">Philosophical Transactions of the Royal Society of London A</a></i>, <b>231</b> (<span class="nowrap">694–</span>706): <span class="nowrap">289–</span>337, <a href="/wiki/Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/1933RSPTA.231..289N">1933RSPTA.231..289N</a>, <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1098%2Frsta.1933.0009">10.1098/rsta.1933.0009</a></span>, <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/91247">91247</a></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Philosophical+Transactions+of+the+Royal+Society+of+London+A&rft.atitle=On+the+problem+of+the+most+efficient+tests+of+statistical+hypotheses&rft.volume=231&rft.issue=%3Cspan+class%3D%22nowrap%22%3E694%E2%80%93%3C%2Fspan%3E706&rft.pages=%3Cspan+class%3D%22nowrap%22%3E289-%3C%2Fspan%3E337&rft.date=1933&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F91247%23id-name%3DJSTOR&rft_id=info%3Adoi%2F10.1098%2Frsta.1933.0009&rft_id=info%3Abibcode%2F1933RSPTA.231..289N&rft.aulast=Neyman&rft.aufirst=J.&rft.au=Pearson%2C+E.+S.&rft_id=http%3A%2F%2Fwww.stats.org.uk%2Fstatistical-inference%2FNeymanPearson1933.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://stats.idre.ucla.edu/stata/faq/how-do-i-interpret-odds-ratios-in-logistic-regression/">"How to Interpret Odds Ratio in Logistic Regression?"</a>. Institute for Digital Research and Education.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=How+to+Interpret+Odds+Ratio+in+Logistic+Regression%3F&rft.pub=Institute+for+Digital+Research+and+Education&rft_id=https%3A%2F%2Fstats.idre.ucla.edu%2Fstata%2Ffaq%2Fhow-do-i-interpret-odds-ratios-in-logistic-regression%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFEveritt1998" class="citation book cs1">Everitt, Brian (1998). <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/cambridgediction00ever_0"><i>The Cambridge Dictionary of Statistics</i></a></span>. Cambridge, UK New York: Cambridge University Press. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-521-59346-5" title="Special:BookSources/978-0-521-59346-5"><bdi>978-0-521-59346-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=The+Cambridge+Dictionary+of+Statistics&rft.place=Cambridge%2C+UK+New+York&rft.pub=Cambridge+University+Press&rft.date=1998&rft.isbn=978-0-521-59346-5&rft.aulast=Everitt&rft.aufirst=Brian&rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fcambridgediction00ever_0&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text">For example, the indicator function in this case could be defined as <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \Delta (n,y)=1-(y-n)^{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi mathvariant="normal">Δ<!-- Δ --></mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo>,</mo> <mi>y</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> <mo>−<!-- − --></mo> <mo stretchy="false">(</mo> <mi>y</mi> <mo>−<!-- − --></mo> <mi>n</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \Delta (n,y)=1-(y-n)^{2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/52fd8717c68fdd4d9cd9e9e321e0482fa6c97071" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:22.685ex; height:3.176ex;" alt="{\displaystyle \Delta (n,y)=1-(y-n)^{2}}"></span></span> </li> <li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMalouf2002" class="citation conference cs1">Malouf, Robert (2002). <a rel="nofollow" class="external text" href="https://dl.acm.org/citation.cfm?id=1118871">"A comparison of algorithms for maximum entropy parameter estimation"</a>. <i>Proceedings of the Sixth Conference on Natural Language Learning (CoNLL-2002)</i>. pp. <span class="nowrap">49–</span>55. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.3115%2F1118853.1118871">10.3115/1118853.1118871</a></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=conference&rft.atitle=A+comparison+of+algorithms+for+maximum+entropy+parameter+estimation&rft.btitle=Proceedings+of+the+Sixth+Conference+on+Natural+Language+Learning+%28CoNLL-2002%29&rft.pages=%3Cspan+class%3D%22nowrap%22%3E49-%3C%2Fspan%3E55&rft.date=2002&rft_id=info%3Adoi%2F10.3115%2F1118853.1118871&rft.aulast=Malouf&rft.aufirst=Robert&rft_id=https%3A%2F%2Fdl.acm.org%2Fcitation.cfm%3Fid%3D1118871&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-Menard-26"><span class="mw-cite-backlink">^ <a href="#cite_ref-Menard_26-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Menard_26-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Menard_26-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Menard_26-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Menard_26-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-Menard_26-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-Menard_26-6"><sup><i><b>g</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMenard2002" class="citation book cs1">Menard, Scott W. (2002). <i>Applied Logistic Regression</i> (2nd ed.). SAGE. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-7619-2208-7" title="Special:BookSources/978-0-7619-2208-7"><bdi>978-0-7619-2208-7</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Applied+Logistic+Regression&rft.edition=2nd&rft.pub=SAGE&rft.date=2002&rft.isbn=978-0-7619-2208-7&rft.aulast=Menard&rft.aufirst=Scott+W.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span> <sup class="noprint Inline-Template" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citing_sources" title="Wikipedia:Citing sources"><span title="This citation requires a reference to the specific page or range of pages in which the material appears. (May 2012)">page needed</span></a></i>]</sup></span> </li> <li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGourierouxMonfort1981" class="citation journal cs1">Gourieroux, Christian; Monfort, Alain (1981). "Asymptotic Properties of the Maximum Likelihood Estimator in Dichotomous Logit Models". <i>Journal of Econometrics</i>. <b>17</b> (1): <span class="nowrap">83–</span>97. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2F0304-4076%2881%2990060-9">10.1016/0304-4076(81)90060-9</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Journal+of+Econometrics&rft.atitle=Asymptotic+Properties+of+the+Maximum+Likelihood+Estimator+in+Dichotomous+Logit+Models&rft.volume=17&rft.issue=1&rft.pages=%3Cspan+class%3D%22nowrap%22%3E83-%3C%2Fspan%3E97&rft.date=1981&rft_id=info%3Adoi%2F10.1016%2F0304-4076%2881%2990060-9&rft.aulast=Gourieroux&rft.aufirst=Christian&rft.au=Monfort%2C+Alain&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-sciencedirect.com-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-sciencedirect.com_28-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFParkSimarZelenyuk2017" class="citation journal cs1">Park, Byeong U.; Simar, Léopold; Zelenyuk, Valentin (2017). <a rel="nofollow" class="external text" href="https://espace.library.uq.edu.au/view/UQ:415620/UQ415620_OA.pdf">"Nonparametric estimation of dynamic discrete choice models for time series data"</a> <span class="cs1-format">(PDF)</span>. <i>Computational Statistics & Data Analysis</i>. <b>108</b>: <span class="nowrap">97–</span>120. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fj.csda.2016.10.024">10.1016/j.csda.2016.10.024</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Computational+Statistics+%26+Data+Analysis&rft.atitle=Nonparametric+estimation+of+dynamic+discrete+choice+models+for+time+series+data&rft.volume=108&rft.pages=%3Cspan+class%3D%22nowrap%22%3E97-%3C%2Fspan%3E120&rft.date=2017&rft_id=info%3Adoi%2F10.1016%2Fj.csda.2016.10.024&rft.aulast=Park&rft.aufirst=Byeong+U.&rft.au=Simar%2C+L%C3%A9opold&rft.au=Zelenyuk%2C+Valentin&rft_id=https%3A%2F%2Fespace.library.uq.edu.au%2Fview%2FUQ%3A415620%2FUQ415620_OA.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMurphy2012" class="citation book cs1">Murphy, Kevin P. (2012). <i>Machine Learning – A Probabilistic Perspective</i>. The MIT Press. p. 245. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-262-01802-9" title="Special:BookSources/978-0-262-01802-9"><bdi>978-0-262-01802-9</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Machine+Learning+%E2%80%93+A+Probabilistic+Perspective&rft.pages=245&rft.pub=The+MIT+Press&rft.date=2012&rft.isbn=978-0-262-01802-9&rft.aulast=Murphy&rft.aufirst=Kevin+P.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-30">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFVan_SmedenDe_GrootMoonsCollins2016" class="citation journal cs1">Van Smeden, M.; De Groot, J. A.; Moons, K. G.; Collins, G. S.; Altman, D. G.; Eijkemans, M. J.; Reitsma, J. B. (2016). <a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5122171">"No rationale for 1 variable per 10 events criterion for binary logistic regression analysis"</a>. <i>BMC Medical Research Methodology</i>. <b>16</b> (1): 163. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1186%2Fs12874-016-0267-3">10.1186/s12874-016-0267-3</a></span>. <a href="/wiki/PMC_(identifier)" class="mw-redirect" title="PMC (identifier)">PMC</a> <span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5122171">5122171</a></span>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/27881078">27881078</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=BMC+Medical+Research+Methodology&rft.atitle=No+rationale+for+1+variable+per+10+events+criterion+for+binary+logistic+regression+analysis&rft.volume=16&rft.issue=1&rft.pages=163&rft.date=2016&rft_id=https%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fpmc%2Farticles%2FPMC5122171%23id-name%3DPMC&rft_id=info%3Apmid%2F27881078&rft_id=info%3Adoi%2F10.1186%2Fs12874-016-0267-3&rft.aulast=Van+Smeden&rft.aufirst=M.&rft.au=De+Groot%2C+J.+A.&rft.au=Moons%2C+K.+G.&rft.au=Collins%2C+G.+S.&rft.au=Altman%2C+D.+G.&rft.au=Eijkemans%2C+M.+J.&rft.au=Reitsma%2C+J.+B.&rft_id=https%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fpmc%2Farticles%2FPMC5122171&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFPeduzziConcato,_JKemper,_EHolford,_TR1996" class="citation journal cs1">Peduzzi, P; Concato, J; Kemper, E; Holford, TR; Feinstein, AR (December 1996). <a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fs0895-4356%2896%2900236-3">"A simulation study of the number of events per variable in logistic regression analysis"</a>. <i><a href="/wiki/Journal_of_Clinical_Epidemiology" title="Journal of Clinical Epidemiology">Journal of Clinical Epidemiology</a></i>. <b>49</b> (12): <span class="nowrap">1373–</span>9. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fs0895-4356%2896%2900236-3">10.1016/s0895-4356(96)00236-3</a></span>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/8970487">8970487</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Journal+of+Clinical+Epidemiology&rft.atitle=A+simulation+study+of+the+number+of+events+per+variable+in+logistic+regression+analysis&rft.volume=49&rft.issue=12&rft.pages=%3Cspan+class%3D%22nowrap%22%3E1373-%3C%2Fspan%3E9&rft.date=1996-12&rft_id=info%3Adoi%2F10.1016%2Fs0895-4356%2896%2900236-3&rft_id=info%3Apmid%2F8970487&rft.aulast=Peduzzi&rft.aufirst=P&rft.au=Concato%2C+J&rft.au=Kemper%2C+E&rft.au=Holford%2C+TR&rft.au=Feinstein%2C+AR&rft_id=https%3A%2F%2Fdoi.org%2F10.1016%252Fs0895-4356%252896%252900236-3&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-32">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFVittinghoffMcCulloch2007" class="citation journal cs1">Vittinghoff, E.; McCulloch, C. E. (12 January 2007). <a rel="nofollow" class="external text" href="https://doi.org/10.1093%2Faje%2Fkwk052">"Relaxing the Rule of Ten Events per Variable in Logistic and Cox Regression"</a>. <i>American Journal of Epidemiology</i>. <b>165</b> (6): <span class="nowrap">710–</span>718. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1093%2Faje%2Fkwk052">10.1093/aje/kwk052</a></span>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/17182981">17182981</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=American+Journal+of+Epidemiology&rft.atitle=Relaxing+the+Rule+of+Ten+Events+per+Variable+in+Logistic+and+Cox+Regression&rft.volume=165&rft.issue=6&rft.pages=%3Cspan+class%3D%22nowrap%22%3E710-%3C%2Fspan%3E718&rft.date=2007-01-12&rft_id=info%3Adoi%2F10.1093%2Faje%2Fkwk052&rft_id=info%3Apmid%2F17182981&rft.aulast=Vittinghoff&rft.aufirst=E.&rft.au=McCulloch%2C+C.+E.&rft_id=https%3A%2F%2Fdoi.org%2F10.1093%252Faje%252Fkwk052&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-plo14mod-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-plo14mod_33-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFvan_der_PloegAustinSteyerberg2014" class="citation journal cs1">van der Ploeg, Tjeerd; Austin, Peter C.; Steyerberg, Ewout W. (2014). <a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4289553">"Modern modelling techniques are data hungry: a simulation study for predicting dichotomous endpoints"</a>. <i>BMC Medical Research Methodology</i>. <b>14</b>: 137. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1186%2F1471-2288-14-137">10.1186/1471-2288-14-137</a></span>. <a href="/wiki/PMC_(identifier)" class="mw-redirect" title="PMC (identifier)">PMC</a> <span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4289553">4289553</a></span>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/25532820">25532820</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=BMC+Medical+Research+Methodology&rft.atitle=Modern+modelling+techniques+are+data+hungry%3A+a+simulation+study+for+predicting+dichotomous+endpoints&rft.volume=14&rft.pages=137&rft.date=2014&rft_id=https%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fpmc%2Farticles%2FPMC4289553%23id-name%3DPMC&rft_id=info%3Apmid%2F25532820&rft_id=info%3Adoi%2F10.1186%2F1471-2288-14-137&rft.aulast=van+der+Ploeg&rft.aufirst=Tjeerd&rft.au=Austin%2C+Peter+C.&rft.au=Steyerberg%2C+Ewout+W.&rft_id=https%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fpmc%2Farticles%2FPMC4289553&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-Greene-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-Greene_34-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGreene2003" class="citation book cs1">Greene, William N. (2003). <i>Econometric Analysis</i> (Fifth ed.). Prentice-Hall. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-13-066189-0" title="Special:BookSources/978-0-13-066189-0"><bdi>978-0-13-066189-0</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Econometric+Analysis&rft.edition=Fifth&rft.pub=Prentice-Hall&rft.date=2003&rft.isbn=978-0-13-066189-0&rft.aulast=Greene&rft.aufirst=William+N.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-Cohen-35"><span class="mw-cite-backlink">^ <a href="#cite_ref-Cohen_35-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Cohen_35-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Cohen_35-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Cohen_35-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Cohen_35-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-Cohen_35-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-Cohen_35-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-Cohen_35-7"><sup><i><b>h</b></i></sup></a> <a href="#cite_ref-Cohen_35-8"><sup><i><b>i</b></i></sup></a> <a href="#cite_ref-Cohen_35-9"><sup><i><b>j</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCohenCohenWestAiken2002" class="citation book cs1">Cohen, Jacob; Cohen, Patricia; West, Steven G.; <a href="/wiki/Leona_S._Aiken" title="Leona S. Aiken">Aiken, Leona S.</a> (2002). <i>Applied Multiple Regression/Correlation Analysis for the Behavioral Sciences</i> (3rd ed.). Routledge. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-8058-2223-6" title="Special:BookSources/978-0-8058-2223-6"><bdi>978-0-8058-2223-6</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Applied+Multiple+Regression%2FCorrelation+Analysis+for+the+Behavioral+Sciences&rft.edition=3rd&rft.pub=Routledge&rft.date=2002&rft.isbn=978-0-8058-2223-6&rft.aulast=Cohen&rft.aufirst=Jacob&rft.au=Cohen%2C+Patricia&rft.au=West%2C+Steven+G.&rft.au=Aiken%2C+Leona+S.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span> <sup class="noprint Inline-Template" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citing_sources" title="Wikipedia:Citing sources"><span title="This citation requires a reference to the specific page or range of pages in which the material appears. (May 2012)">page needed</span></a></i>]</sup></span> </li> <li id="cite_note-:0-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-:0_36-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAllison" class="citation web cs1">Allison, Paul D. <a rel="nofollow" class="external text" href="https://support.sas.com/resources/papers/proceedings14/1485-2014.pdf">"Measures of fit for logistic regression"</a> <span class="cs1-format">(PDF)</span>. Statistical Horizons LLC and the University of Pennsylvania.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Measures+of+fit+for+logistic+regression&rft.pub=Statistical+Horizons+LLC+and+the+University+of+Pennsylvania&rft.aulast=Allison&rft.aufirst=Paul+D.&rft_id=https%3A%2F%2Fsupport.sas.com%2Fresources%2Fpapers%2Fproceedings14%2F1485-2014.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-37">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHosmer1997" class="citation journal cs1">Hosmer, D.W. (1997). "A comparison of goodness-of-fit tests for the logistic regression model". <i>Stat Med</i>. <b>16</b> (9): <span class="nowrap">965–</span>980. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1002%2F%28sici%291097-0258%2819970515%2916%3A9%3C965%3A%3Aaid-sim509%3E3.3.co%3B2-f">10.1002/(sici)1097-0258(19970515)16:9<965::aid-sim509>3.3.co;2-f</a>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/9160492">9160492</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Stat+Med&rft.atitle=A+comparison+of+goodness-of-fit+tests+for+the+logistic+regression+model&rft.volume=16&rft.issue=9&rft.pages=%3Cspan+class%3D%22nowrap%22%3E965-%3C%2Fspan%3E980&rft.date=1997&rft_id=info%3Adoi%2F10.1002%2F%28sici%291097-0258%2819970515%2916%3A9%3C965%3A%3Aaid-sim509%3E3.3.co%3B2-f&rft_id=info%3Apmid%2F9160492&rft.aulast=Hosmer&rft.aufirst=D.W.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-38">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHarrell2010" class="citation book cs1">Harrell, Frank E. (2010). <i>Regression Modeling Strategies: With Applications to Linear Models, Logistic Regression, and Survival Analysis</i>. New York: Springer. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-1-4419-2918-1" title="Special:BookSources/978-1-4419-2918-1"><bdi>978-1-4419-2918-1</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Regression+Modeling+Strategies%3A+With+Applications+to+Linear+Models%2C+Logistic+Regression%2C+and+Survival+Analysis&rft.place=New+York&rft.pub=Springer&rft.date=2010&rft.isbn=978-1-4419-2918-1&rft.aulast=Harrell&rft.aufirst=Frank+E.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span><sup class="noprint Inline-Template" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citing_sources" title="Wikipedia:Citing sources"><span title="This citation requires a reference to the specific page or range of pages in which the material appears. (October 2019)">page needed</span></a></i>]</sup></span> </li> <li id="cite_note-islr-39"><span class="mw-cite-backlink">^ <a href="#cite_ref-islr_39-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-islr_39-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://class.stanford.edu/c4x/HumanitiesScience/StatLearning/asset/classification.pdf">https://class.stanford.edu/c4x/HumanitiesScience/StatLearning/asset/classification.pdf</a> slide 16</span> </li> <li id="cite_note-Mount2011-40"><span class="mw-cite-backlink">^ <a href="#cite_ref-Mount2011_40-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Mount2011_40-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMount2011" class="citation web cs1">Mount, J. (2011). <a rel="nofollow" class="external text" href="https://win-vector.com/2011/09/23/the-equivalence-of-logistic-regression-and-maximum-entropy-models/">"The Equivalence of Logistic Regression and Maximum Entropy models"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">Feb 23,</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=The+Equivalence+of+Logistic+Regression+and+Maximum+Entropy+models&rft.date=2011&rft.aulast=Mount&rft.aufirst=J.&rft_id=https%3A%2F%2Fwin-vector.com%2F2011%2F09%2F23%2Fthe-equivalence-of-logistic-regression-and-maximum-entropy-models%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-41"><span class="mw-cite-backlink"><b><a href="#cite_ref-41">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFNg2000" class="citation journal cs1">Ng, Andrew (2000). <a rel="nofollow" class="external text" href="http://akademik.bahcesehir.edu.tr/~tevfik/courses/cmp5101/cs229-notes1.pdf">"CS229 Lecture Notes"</a> <span class="cs1-format">(PDF)</span>. <i>CS229 Lecture Notes</i>: <span class="nowrap">16–</span>19.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=CS229+Lecture+Notes&rft.atitle=CS229+Lecture+Notes&rft.pages=%3Cspan+class%3D%22nowrap%22%3E16-%3C%2Fspan%3E19&rft.date=2000&rft.aulast=Ng&rft.aufirst=Andrew&rft_id=http%3A%2F%2Fakademik.bahcesehir.edu.tr%2F~tevfik%2Fcourses%2Fcmp5101%2Fcs229-notes1.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-42"><span class="mw-cite-backlink"><b><a href="#cite_ref-42">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRodríguez2007" class="citation book cs1">Rodríguez, G. (2007). <a rel="nofollow" class="external text" href="http://data.princeton.edu/wws509/notes/"><i>Lecture Notes on Generalized Linear Models</i></a>. pp. Chapter 3, page 45.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Lecture+Notes+on+Generalized+Linear+Models&rft.pages=Chapter+3%2C+page+45&rft.date=2007&rft.aulast=Rodr%C3%ADguez&rft.aufirst=G.&rft_id=http%3A%2F%2Fdata.princeton.edu%2Fwws509%2Fnotes%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-43"><span class="mw-cite-backlink"><b><a href="#cite_ref-43">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGareth_JamesDaniela_WittenTrevor_HastieRobert_Tibshirani2013" class="citation book cs1">Gareth James; Daniela Witten; Trevor Hastie; Robert Tibshirani (2013). <a rel="nofollow" class="external text" href="http://www-bcf.usc.edu/~gareth/ISL/"><i>An Introduction to Statistical Learning</i></a>. Springer. p. 6.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=An+Introduction+to+Statistical+Learning&rft.pages=6&rft.pub=Springer&rft.date=2013&rft.au=Gareth+James&rft.au=Daniela+Witten&rft.au=Trevor+Hastie&rft.au=Robert+Tibshirani&rft_id=http%3A%2F%2Fwww-bcf.usc.edu%2F~gareth%2FISL%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-44"><span class="mw-cite-backlink"><b><a href="#cite_ref-44">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFPoharBlasTurk2004" class="citation journal cs1">Pohar, Maja; Blas, Mateja; Turk, Sandra (2004). <a rel="nofollow" class="external text" href="https://www.researchgate.net/publication/229021894">"Comparison of Logistic Regression and Linear Discriminant Analysis: A Simulation Study"</a>. <i>Metodološki Zvezki</i>. <b>1</b> (1).</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Metodolo%C5%A1ki+Zvezki&rft.atitle=Comparison+of+Logistic+Regression+and+Linear+Discriminant+Analysis%3A+A+Simulation+Study&rft.volume=1&rft.issue=1&rft.date=2004&rft.aulast=Pohar&rft.aufirst=Maja&rft.au=Blas%2C+Mateja&rft.au=Turk%2C+Sandra&rft_id=https%3A%2F%2Fwww.researchgate.net%2Fpublication%2F229021894&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-FOOTNOTECramer20023–5-45"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTECramer20023–5_45-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, pp. 3–5.</span> </li> <li id="cite_note-46"><span class="mw-cite-backlink"><b><a href="#cite_ref-46">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFVerhulst1838" class="citation journal cs1">Verhulst, Pierre-François (1838). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=8GsEAAAAYAAJ">"Notice sur la loi que la population poursuit dans son accroissement"</a> <span class="cs1-format">(PDF)</span>. <i>Correspondance Mathématique et Physique</i>. <b>10</b>: <span class="nowrap">113–</span>121<span class="reference-accessdate">. Retrieved <span class="nowrap">3 December</span> 2014</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Correspondance+Math%C3%A9matique+et+Physique&rft.atitle=Notice+sur+la+loi+que+la+population+poursuit+dans+son+accroissement&rft.volume=10&rft.pages=%3Cspan+class%3D%22nowrap%22%3E113-%3C%2Fspan%3E121&rft.date=1838&rft.aulast=Verhulst&rft.aufirst=Pierre-Fran%C3%A7ois&rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3D8GsEAAAAYAAJ&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-47"><span class="mw-cite-backlink"><b><a href="#cite_ref-47">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 4, "He did not say how he fitted the curves."</span> </li> <li id="cite_note-48"><span class="mw-cite-backlink"><b><a href="#cite_ref-48">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFVerhulst1845" class="citation journal cs1">Verhulst, Pierre-François (1845). <a rel="nofollow" class="external text" href="http://gdz.sub.uni-goettingen.de/dms/load/img/?PPN=PPN129323640_0018&DMDID=dmdlog7">"Recherches mathématiques sur la loi d'accroissement de la population"</a> [Mathematical Researches into the Law of Population Growth Increase]. <i>Nouveaux Mémoires de l'Académie Royale des Sciences et Belles-Lettres de Bruxelles</i>. <b>18</b><span class="reference-accessdate">. Retrieved <span class="nowrap">2013-02-18</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Nouveaux+M%C3%A9moires+de+l%27Acad%C3%A9mie+Royale+des+Sciences+et+Belles-Lettres+de+Bruxelles&rft.atitle=Recherches+math%C3%A9matiques+sur+la+loi+d%27accroissement+de+la+population&rft.volume=18&rft.date=1845&rft.aulast=Verhulst&rft.aufirst=Pierre-Fran%C3%A7ois&rft_id=http%3A%2F%2Fgdz.sub.uni-goettingen.de%2Fdms%2Fload%2Fimg%2F%3FPPN%3DPPN129323640_0018%26DMDID%3Ddmdlog7&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> <li id="cite_note-FOOTNOTECramer20024-49"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTECramer20024_49-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 4.</span> </li> <li id="cite_note-FOOTNOTECramer20027-50"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTECramer20027_50-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 7.</span> </li> <li id="cite_note-FOOTNOTECramer20026-51"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTECramer20026_51-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 6.</span> </li> <li id="cite_note-FOOTNOTECramer20026–7-52"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTECramer20026–7_52-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 6–7.</span> </li> <li id="cite_note-FOOTNOTECramer20025-53"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTECramer20025_53-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 5.</span> </li> <li id="cite_note-FOOTNOTECramer20027–9-54"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTECramer20027–9_54-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 7–9.</span> </li> <li id="cite_note-FOOTNOTECramer20029-55"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTECramer20029_55-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 9.</span> </li> <li id="cite_note-56"><span class="mw-cite-backlink"><b><a href="#cite_ref-56">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 8, "As far as I can see the introduction of the logistics as an alternative to the normal probability function is the work of a single person, Joseph Berkson (1899–1982), ..."</span> </li> <li id="cite_note-FOOTNOTECramer200211-57"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTECramer200211_57-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 11.</span> </li> <li id="cite_note-FOOTNOTECramer200213-58"><span class="mw-cite-backlink">^ <a href="#cite_ref-FOOTNOTECramer200213_58-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-FOOTNOTECramer200213_58-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><a href="#CITEREFCramer2002">Cramer 2002</a>, p. 13.</span> </li> <li id="cite_note-59"><span class="mw-cite-backlink"><b><a href="#cite_ref-59">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMcFadden1973" class="citation book cs1"><a href="/wiki/Daniel_McFadden" title="Daniel McFadden">McFadden, Daniel</a> (1973). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20181127110612/https://eml.berkeley.edu/reprints/mcfadden/zarembka.pdf">"Conditional Logit Analysis of Qualitative Choice Behavior"</a> <span class="cs1-format">(PDF)</span>. In P. Zarembka (ed.). <i>Frontiers in Econometrics</i>. New York: Academic Press. pp. <span class="nowrap">105–</span>142. Archived from <a rel="nofollow" class="external text" href="https://eml.berkeley.edu/reprints/mcfadden/zarembka.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2018-11-27<span class="reference-accessdate">. Retrieved <span class="nowrap">2019-04-20</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Conditional+Logit+Analysis+of+Qualitative+Choice+Behavior&rft.btitle=Frontiers+in+Econometrics&rft.place=New+York&rft.pages=%3Cspan+class%3D%22nowrap%22%3E105-%3C%2Fspan%3E142&rft.pub=Academic+Press&rft.date=1973&rft.aulast=McFadden&rft.aufirst=Daniel&rft_id=https%3A%2F%2Feml.berkeley.edu%2Freprints%2Fmcfadden%2Fzarembka.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></span> </li> </ol></div> <div class="mw-heading mw-heading2"><h2 id="Sources">Sources</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=55" title="Edit section: Sources"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239549316">.mw-parser-output .refbegin{margin-bottom:0.5em}.mw-parser-output .refbegin-hanging-indents>ul{margin-left:0}.mw-parser-output .refbegin-hanging-indents>ul>li{margin-left:0;padding-left:3.2em;text-indent:-3.2em}.mw-parser-output .refbegin-hanging-indents ul,.mw-parser-output .refbegin-hanging-indents ul li{list-style:none}@media(max-width:720px){.mw-parser-output .refbegin-hanging-indents>ul>li{padding-left:1.6em;text-indent:-1.6em}}.mw-parser-output .refbegin-columns{margin-top:0.3em}.mw-parser-output .refbegin-columns ul{margin-top:0}.mw-parser-output .refbegin-columns li{page-break-inside:avoid;break-inside:avoid-column}@media screen{.mw-parser-output .refbegin{font-size:90%}}</style><div class="refbegin refbegin-columns references-column-width" style="column-width: 32em"> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBerkson1944" class="citation journal cs1">Berkson, Joseph (1944). "Application of the Logistic Function to Bio-Assay". <i>Journal of the American Statistical Association</i>. <b>39</b> (227): <span class="nowrap">357–</span>365. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1080%2F01621459.1944.10500699">10.1080/01621459.1944.10500699</a>. <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2280041">2280041</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Journal+of+the+American+Statistical+Association&rft.atitle=Application+of+the+Logistic+Function+to+Bio-Assay&rft.volume=39&rft.issue=227&rft.pages=%3Cspan+class%3D%22nowrap%22%3E357-%3C%2Fspan%3E365&rft.date=1944&rft_id=info%3Adoi%2F10.1080%2F01621459.1944.10500699&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2280041%23id-name%3DJSTOR&rft.aulast=Berkson&rft.aufirst=Joseph&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBerkson1951" class="citation journal cs1">Berkson, Joseph (1951). "Why I Prefer Logits to Probits". <i>Biometrics</i>. <b>7</b> (4): <span class="nowrap">327–</span>339. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F3001655">10.2307/3001655</a>. <a href="/wiki/ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0006-341X">0006-341X</a>. <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/3001655">3001655</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Biometrics&rft.atitle=Why+I+Prefer+Logits+to+Probits&rft.volume=7&rft.issue=4&rft.pages=%3Cspan+class%3D%22nowrap%22%3E327-%3C%2Fspan%3E339&rft.date=1951&rft.issn=0006-341X&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F3001655%23id-name%3DJSTOR&rft_id=info%3Adoi%2F10.2307%2F3001655&rft.aulast=Berkson&rft.aufirst=Joseph&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBliss1934" class="citation journal cs1">Bliss, C. I. (1934). "The Method of Probits". <i><a href="/wiki/Science_(journal)" title="Science (journal)">Science</a></i>. <b>79</b> (2037): <span class="nowrap">38–</span>39. <a href="/wiki/Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/1934Sci....79...38B">1934Sci....79...38B</a>. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1126%2Fscience.79.2037.38">10.1126/science.79.2037.38</a>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/17813446">17813446</a>. <q>These arbitrary probability units have been called 'probits'.</q></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Science&rft.atitle=The+Method+of+Probits&rft.volume=79&rft.issue=2037&rft.pages=%3Cspan+class%3D%22nowrap%22%3E38-%3C%2Fspan%3E39&rft.date=1934&rft_id=info%3Apmid%2F17813446&rft_id=info%3Adoi%2F10.1126%2Fscience.79.2037.38&rft_id=info%3Abibcode%2F1934Sci....79...38B&rft.aulast=Bliss&rft.aufirst=C.+I.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCox1958" class="citation journal cs1"><a href="/wiki/David_Cox_(statistician)" title="David Cox (statistician)">Cox, David R.</a> (1958). "The regression analysis of binary sequences (with discussion)". <i>J R Stat Soc B</i>. <b>20</b> (2): <span class="nowrap">215–</span>242. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1111%2Fj.2517-6161.1958.tb00292.x">10.1111/j.2517-6161.1958.tb00292.x</a>. <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2983890">2983890</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=J+R+Stat+Soc+B&rft.atitle=The+regression+analysis+of+binary+sequences+%28with+discussion%29&rft.volume=20&rft.issue=2&rft.pages=%3Cspan+class%3D%22nowrap%22%3E215-%3C%2Fspan%3E242&rft.date=1958&rft_id=info%3Adoi%2F10.1111%2Fj.2517-6161.1958.tb00292.x&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2983890%23id-name%3DJSTOR&rft.aulast=Cox&rft.aufirst=David+R.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCox1966" class="citation book cs1"><a href="/wiki/David_Cox_(statistician)" title="David Cox (statistician)">Cox, David R.</a> (1966). "Some procedures connected with the logistic qualitative response curve". In F. N. David (ed.). <i>Research Papers in Probability and Statistics (Festschrift for J. Neyman)</i>. London: Wiley. pp. <span class="nowrap">55–</span>71.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Some+procedures+connected+with+the+logistic+qualitative+response+curve&rft.btitle=Research+Papers+in+Probability+and+Statistics+%28Festschrift+for+J.+Neyman%29&rft.place=London&rft.pages=%3Cspan+class%3D%22nowrap%22%3E55-%3C%2Fspan%3E71&rft.pub=Wiley&rft.date=1966&rft.aulast=Cox&rft.aufirst=David+R.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCramer2002" class="citation techreport cs1">Cramer, J. S. (2002). <a rel="nofollow" class="external text" href="https://papers.tinbergen.nl/02119.pdf"><i>The origins of logistic regression</i></a> <span class="cs1-format">(PDF)</span> (Technical report). Vol. 119. Tinbergen Institute. pp. <span class="nowrap">167–</span>178. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2139%2Fssrn.360300">10.2139/ssrn.360300</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=report&rft.btitle=The+origins+of+logistic+regression&rft.pages=%3Cspan+class%3D%22nowrap%22%3E167-%3C%2Fspan%3E178&rft.pub=Tinbergen+Institute&rft.date=2002&rft_id=info%3Adoi%2F10.2139%2Fssrn.360300&rft.aulast=Cramer&rft.aufirst=J.+S.&rft_id=https%3A%2F%2Fpapers.tinbergen.nl%2F02119.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span> <ul><li>Published in: <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCramer2004" class="citation journal cs1">Cramer, J. S. (2004). "The early origins of the logit model". <i>Studies in History and Philosophy of Science Part C: Studies in History and Philosophy of Biological and Biomedical Sciences</i>. <b>35</b> (4): <span class="nowrap">613–</span>626. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fj.shpsc.2004.09.003">10.1016/j.shpsc.2004.09.003</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Studies+in+History+and+Philosophy+of+Science+Part+C%3A+Studies+in+History+and+Philosophy+of+Biological+and+Biomedical+Sciences&rft.atitle=The+early+origins+of+the+logit+model&rft.volume=35&rft.issue=4&rft.pages=%3Cspan+class%3D%22nowrap%22%3E613-%3C%2Fspan%3E626&rft.date=2004&rft_id=info%3Adoi%2F10.1016%2Fj.shpsc.2004.09.003&rft.aulast=Cramer&rft.aufirst=J.+S.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li></ul></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFFisher1935" class="citation journal cs1">Fisher, R. A. (1935). <a rel="nofollow" class="external text" href="https://archive.today/20140430203018/http://ebooks.adelaide.edu.au/dspace/handle/2440/15223">"The Case of Zero Survivors in Probit Assays"</a>. <i>Annals of Applied Biology</i>. <b>22</b>: <span class="nowrap">164–</span>165. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1111%2Fj.1744-7348.1935.tb07713.x">10.1111/j.1744-7348.1935.tb07713.x</a>. Archived from <a rel="nofollow" class="external text" href="https://ebooks.adelaide.edu.au/dspace/handle/2440/15223">the original</a> on 2014-04-30.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Annals+of+Applied+Biology&rft.atitle=The+Case+of+Zero+Survivors+in+Probit+Assays&rft.volume=22&rft.pages=%3Cspan+class%3D%22nowrap%22%3E164-%3C%2Fspan%3E165&rft.date=1935&rft_id=info%3Adoi%2F10.1111%2Fj.1744-7348.1935.tb07713.x&rft.aulast=Fisher&rft.aufirst=R.+A.&rft_id=https%3A%2F%2Febooks.adelaide.edu.au%2Fdspace%2Fhandle%2F2440%2F15223&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGaddum1933" class="citation book cs1">Gaddum, John H. (1933). <i>Reports on Biological Standards: Methods of biological assay depending on a quantal response. III</i>. H.M. Stationery Office. <a href="/wiki/OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/808240121">808240121</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Reports+on+Biological+Standards%3A+Methods+of+biological+assay+depending+on+a+quantal+response.+III&rft.pub=H.M.+Stationery+Office&rft.date=1933&rft_id=info%3Aoclcnum%2F808240121&rft.aulast=Gaddum&rft.aufirst=John+H.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFTheil1969" class="citation journal cs1">Theil, Henri (1969). "A Multinomial Extension of the Linear Logit Model". <i>International Economic Review</i>. <b>10</b> (3): <span class="nowrap">251–</span>59. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F2525642">10.2307/2525642</a>. <a href="/wiki/JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a> <a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2525642">2525642</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=International+Economic+Review&rft.atitle=A+Multinomial+Extension+of+the+Linear+Logit+Model&rft.volume=10&rft.issue=3&rft.pages=%3Cspan+class%3D%22nowrap%22%3E251-%3C%2Fspan%3E59&rft.date=1969&rft_id=info%3Adoi%2F10.2307%2F2525642&rft_id=https%3A%2F%2Fwww.jstor.org%2Fstable%2F2525642%23id-name%3DJSTOR&rft.aulast=Theil&rft.aufirst=Henri&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFPearlReed1920" class="citation journal cs1">Pearl, Raymond; Reed, Lowell J. (June 1920). <a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1084522">"On the Rate of Growth of the Population of the United States since 1790 and Its Mathematical Representation"</a>. <i>Proceedings of the National Academy of Sciences</i>. <b>6</b> (6): <span class="nowrap">275–</span>288. <a href="/wiki/Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/1920PNAS....6..275P">1920PNAS....6..275P</a>. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1073%2Fpnas.6.6.275">10.1073/pnas.6.6.275</a></span>. <a href="/wiki/PMC_(identifier)" class="mw-redirect" title="PMC (identifier)">PMC</a> <span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1084522">1084522</a></span>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/16576496">16576496</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Proceedings+of+the+National+Academy+of+Sciences&rft.atitle=On+the+Rate+of+Growth+of+the+Population+of+the+United+States+since+1790+and+Its+Mathematical+Representation&rft.volume=6&rft.issue=6&rft.pages=%3Cspan+class%3D%22nowrap%22%3E275-%3C%2Fspan%3E288&rft.date=1920-06&rft_id=https%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fpmc%2Farticles%2FPMC1084522%23id-name%3DPMC&rft_id=info%3Apmid%2F16576496&rft_id=info%3Adoi%2F10.1073%2Fpnas.6.6.275&rft_id=info%3Abibcode%2F1920PNAS....6..275P&rft.aulast=Pearl&rft.aufirst=Raymond&rft.au=Reed%2C+Lowell+J.&rft_id=https%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fpmc%2Farticles%2FPMC1084522&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWilsonWorcester1943" class="citation journal cs1"><a href="/wiki/Edwin_Bidwell_Wilson" title="Edwin Bidwell Wilson">Wilson, E.B.</a>; <a href="/wiki/Jane_Worcester" title="Jane Worcester">Worcester, J.</a> (1943). <a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1078563">"The Determination of L.D.50 and Its Sampling Error in Bio-Assay"</a>. <i><a href="/wiki/Proceedings_of_the_National_Academy_of_Sciences_of_the_United_States_of_America" title="Proceedings of the National Academy of Sciences of the United States of America">Proceedings of the National Academy of Sciences of the United States of America</a></i>. <b>29</b> (2): <span class="nowrap">79–</span>85. <a href="/wiki/Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/1943PNAS...29...79W">1943PNAS...29...79W</a>. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1073%2Fpnas.29.2.79">10.1073/pnas.29.2.79</a></span>. <a href="/wiki/PMC_(identifier)" class="mw-redirect" title="PMC (identifier)">PMC</a> <span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1078563">1078563</a></span>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/16588606">16588606</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Proceedings+of+the+National+Academy+of+Sciences+of+the+United+States+of+America&rft.atitle=The+Determination+of+L.D.50+and+Its+Sampling+Error+in+Bio-Assay.&rft.volume=29&rft.issue=2&rft.pages=%3Cspan+class%3D%22nowrap%22%3E79-%3C%2Fspan%3E85&rft.date=1943&rft_id=https%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fpmc%2Farticles%2FPMC1078563%23id-name%3DPMC&rft_id=info%3Apmid%2F16588606&rft_id=info%3Adoi%2F10.1073%2Fpnas.29.2.79&rft_id=info%3Abibcode%2F1943PNAS...29...79W&rft.aulast=Wilson&rft.aufirst=E.B.&rft.au=Worcester%2C+J.&rft_id=https%3A%2F%2Fwww.ncbi.nlm.nih.gov%2Fpmc%2Farticles%2FPMC1078563&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li></ul> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAgresti2002" class="citation book cs1">Agresti, Alan. (2002). <i>Categorical Data Analysis</i>. New York: Wiley-Interscience. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-471-36093-3" title="Special:BookSources/978-0-471-36093-3"><bdi>978-0-471-36093-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Categorical+Data+Analysis&rft.pub=New+York%3A+Wiley-Interscience&rft.date=2002&rft.isbn=978-0-471-36093-3&rft.aulast=Agresti&rft.aufirst=Alan.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAmemiya1985" class="citation book cs1">Amemiya, Takeshi (1985). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=0bzGQE14CwEC&pg=PA267">"Qualitative Response Models"</a>. <i>Advanced Econometrics</i>. Oxford: Basil Blackwell. pp. <span class="nowrap">267–</span>359. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-631-13345-2" title="Special:BookSources/978-0-631-13345-2"><bdi>978-0-631-13345-2</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Qualitative+Response+Models&rft.btitle=Advanced+Econometrics&rft.place=Oxford&rft.pages=%3Cspan+class%3D%22nowrap%22%3E267-%3C%2Fspan%3E359&rft.pub=Basil+Blackwell&rft.date=1985&rft.isbn=978-0-631-13345-2&rft.aulast=Amemiya&rft.aufirst=Takeshi&rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3D0bzGQE14CwEC%26pg%3DPA267&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBalakrishnan1991" class="citation book cs1">Balakrishnan, N. (1991). <i>Handbook of the Logistic Distribution</i>. Marcel Dekker, Inc. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-8247-8587-1" title="Special:BookSources/978-0-8247-8587-1"><bdi>978-0-8247-8587-1</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Handbook+of+the+Logistic+Distribution&rft.pub=Marcel+Dekker%2C+Inc.&rft.date=1991&rft.isbn=978-0-8247-8587-1&rft.aulast=Balakrishnan&rft.aufirst=N.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGouriéroux2000" class="citation book cs1"><a href="/wiki/Christian_Gouri%C3%A9roux" title="Christian Gouriéroux">Gouriéroux, Christian</a> (2000). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=dE2prs_U0QMC&pg=PA6">"The Simple Dichotomy"</a>. <i>Econometrics of Qualitative Dependent Variables</i>. New York: Cambridge University Press. pp. <span class="nowrap">6–</span>37. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-521-58985-7" title="Special:BookSources/978-0-521-58985-7"><bdi>978-0-521-58985-7</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=The+Simple+Dichotomy&rft.btitle=Econometrics+of+Qualitative+Dependent+Variables&rft.place=New+York&rft.pages=%3Cspan+class%3D%22nowrap%22%3E6-%3C%2Fspan%3E37&rft.pub=Cambridge+University+Press&rft.date=2000&rft.isbn=978-0-521-58985-7&rft.aulast=Gouri%C3%A9roux&rft.aufirst=Christian&rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3DdE2prs_U0QMC%26pg%3DPA6&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGreene2003" class="citation book cs1">Greene, William H. (2003). <i>Econometric Analysis, fifth edition</i>. Prentice Hall. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-13-066189-0" title="Special:BookSources/978-0-13-066189-0"><bdi>978-0-13-066189-0</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Econometric+Analysis%2C+fifth+edition&rft.pub=Prentice+Hall&rft.date=2003&rft.isbn=978-0-13-066189-0&rft.aulast=Greene&rft.aufirst=William+H.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHilbe2009" class="citation book cs1"><a href="/wiki/Joseph_Hilbe" title="Joseph Hilbe">Hilbe, Joseph M.</a> (2009). <i>Logistic Regression Models</i>. Chapman & Hall/CRC Press. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-1-4200-7575-5" title="Special:BookSources/978-1-4200-7575-5"><bdi>978-1-4200-7575-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Logistic+Regression+Models&rft.pub=Chapman+%26+Hall%2FCRC+Press&rft.date=2009&rft.isbn=978-1-4200-7575-5&rft.aulast=Hilbe&rft.aufirst=Joseph+M.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHosmer2013" class="citation book cs1">Hosmer, David (2013). <i>Applied logistic regression</i>. Hoboken, New Jersey: Wiley. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-470-58247-3" title="Special:BookSources/978-0-470-58247-3"><bdi>978-0-470-58247-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Applied+logistic+regression&rft.place=Hoboken%2C+New+Jersey&rft.pub=Wiley&rft.date=2013&rft.isbn=978-0-470-58247-3&rft.aulast=Hosmer&rft.aufirst=David&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHowell2010" class="citation book cs1">Howell, David C. (2010). <i>Statistical Methods for Psychology, 7th ed</i>. Belmont, CA; Thomson Wadsworth. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-495-59786-5" title="Special:BookSources/978-0-495-59786-5"><bdi>978-0-495-59786-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Statistical+Methods+for+Psychology%2C+7th+ed&rft.pub=Belmont%2C+CA%3B+Thomson+Wadsworth&rft.date=2010&rft.isbn=978-0-495-59786-5&rft.aulast=Howell&rft.aufirst=David+C.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFPeduzziJ._ConcatoE._KemperT.R._Holford1996" class="citation journal cs1">Peduzzi, P.; J. Concato; E. Kemper; T.R. Holford; A.R. Feinstein (1996). <a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fs0895-4356%2896%2900236-3">"A simulation study of the number of events per variable in logistic regression analysis"</a>. <i><a href="/wiki/Journal_of_Clinical_Epidemiology" title="Journal of Clinical Epidemiology">Journal of Clinical Epidemiology</a></i>. <b>49</b> (12): <span class="nowrap">1373–</span>1379. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fs0895-4356%2896%2900236-3">10.1016/s0895-4356(96)00236-3</a></span>. <a href="/wiki/PMID_(identifier)" class="mw-redirect" title="PMID (identifier)">PMID</a> <a rel="nofollow" class="external text" href="https://pubmed.ncbi.nlm.nih.gov/8970487">8970487</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Journal+of+Clinical+Epidemiology&rft.atitle=A+simulation+study+of+the+number+of+events+per+variable+in+logistic+regression+analysis&rft.volume=49&rft.issue=12&rft.pages=%3Cspan+class%3D%22nowrap%22%3E1373-%3C%2Fspan%3E1379&rft.date=1996&rft_id=info%3Adoi%2F10.1016%2Fs0895-4356%2896%2900236-3&rft_id=info%3Apmid%2F8970487&rft.aulast=Peduzzi&rft.aufirst=P.&rft.au=J.+Concato&rft.au=E.+Kemper&rft.au=T.R.+Holford&rft.au=A.R.+Feinstein&rft_id=https%3A%2F%2Fdoi.org%2F10.1016%252Fs0895-4356%252896%252900236-3&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBerryLinoff1997" class="citation book cs1">Berry, Michael J.A.; Linoff, Gordon (1997). <i>Data Mining Techniques For Marketing, Sales and Customer Support</i>. Wiley.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Data+Mining+Techniques+For+Marketing%2C+Sales+and+Customer+Support&rft.pub=Wiley&rft.date=1997&rft.aulast=Berry&rft.aufirst=Michael+J.A.&rft.au=Linoff%2C+Gordon&rfr_id=info%3Asid%2Fen.wikipedia.org%3ALogistic+regression" class="Z3988"></span></li></ul> </div> <div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Logistic_regression&action=edit&section=56" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1235681985">.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}</style><style data-mw-deduplicate="TemplateStyles:r1237033735">@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}</style><div class="side-box side-box-right plainlinks sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}</style> <div class="side-box-flex"> <div class="side-box-image"><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Wikiversity_logo_2017.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Wikiversity_logo_2017.svg/40px-Wikiversity_logo_2017.svg.png" decoding="async" width="40" height="33" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Wikiversity_logo_2017.svg/60px-Wikiversity_logo_2017.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Wikiversity_logo_2017.svg/80px-Wikiversity_logo_2017.svg.png 2x" data-file-width="626" data-file-height="512" /></a></span></div> <div class="side-box-text plainlist">Wikiversity has learning resources about <i><b><a href="https://en.wikiversity.org/wiki/Special:Search/Logistic_regression" class="extiw" title="v:Special:Search/Logistic regression">Logistic regression</a></b></i></div></div> </div> <ul><li><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Commons-logo.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/12px-Commons-logo.svg.png" decoding="async" width="12" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/18px-Commons-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/24px-Commons-logo.svg.png 2x" data-file-width="1024" data-file-height="1376" /></a></span> Media related to <a href="https://commons.wikimedia.org/wiki/Category:Logistic_regression" class="extiw" title="commons:Category:Logistic regression">Logistic regression</a> at Wikimedia Commons</li> <li><a rel="nofollow" class="external text" href="https://www.youtube.com/watch?v=JvioZoK1f4o&t=64m48s"><span class="plainlinks">Econometrics Lecture (topic: Logit model)</span></a> on <a href="/wiki/YouTube_video_(identifier)" class="mw-redirect" title="YouTube video (identifier)">YouTube</a> by <a href="/wiki/Mark_Thoma" title="Mark Thoma">Mark Thoma</a></li> <li><a rel="nofollow" class="external text" href="http://www.omidrouhani.com/research/logisticregression/html/logisticregression.htm">Logistic Regression tutorial</a></li> <li><a rel="nofollow" class="external text" href="https://czep.net/stat/mlelr.html">mlelr</a>: software in <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> for teaching purposes</li></ul> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"></div><div role="navigation" class="navbox" aria-labelledby="Statistics636" style="padding:3px"><table class="nowraplinks hlist mw-collapsible uncollapsed navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239400231"><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Statistics" title="Template:Statistics"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Statistics" title="Template talk:Statistics"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Statistics" title="Special:EditPage/Template:Statistics"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Statistics636" style="font-size:114%;margin:0 4em"><a href="/wiki/Statistics" title="Statistics">Statistics</a></div></th></tr><tr><td class="navbox-abovebelow" colspan="2"><div> <ul><li><a href="/wiki/Outline_of_statistics" title="Outline of statistics">Outline</a></li> <li><a href="/wiki/List_of_statistics_articles" title="List of statistics articles">Index</a></li></ul> </div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Descriptive_statistics636" style="font-size:114%;margin:0 4em"><a href="/wiki/Descriptive_statistics" title="Descriptive statistics">Descriptive statistics</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Continuous_probability_distribution" class="mw-redirect" title="Continuous probability distribution">Continuous data</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Central_tendency" title="Central tendency">Center</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Mean" title="Mean">Mean</a> <ul><li><a href="/wiki/Arithmetic_mean" title="Arithmetic mean">Arithmetic</a></li> <li><a href="/wiki/Arithmetic%E2%80%93geometric_mean" title="Arithmetic–geometric mean">Arithmetic-Geometric</a></li> <li><a href="/wiki/Contraharmonic_mean" title="Contraharmonic mean">Contraharmonic</a></li> <li><a href="/wiki/Cubic_mean" title="Cubic mean">Cubic</a></li> <li><a href="/wiki/Generalized_mean" title="Generalized mean">Generalized/power</a></li> <li><a href="/wiki/Geometric_mean" title="Geometric mean">Geometric</a></li> <li><a href="/wiki/Harmonic_mean" title="Harmonic mean">Harmonic</a></li> <li><a href="/wiki/Heronian_mean" title="Heronian mean">Heronian</a></li> <li><a href="/wiki/Heinz_mean" title="Heinz mean">Heinz</a></li> <li><a href="/wiki/Lehmer_mean" title="Lehmer mean">Lehmer</a></li></ul></li> <li><a href="/wiki/Median" title="Median">Median</a></li> <li><a href="/wiki/Mode_(statistics)" title="Mode (statistics)">Mode</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Statistical_dispersion" title="Statistical dispersion">Dispersion</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Average_absolute_deviation" title="Average absolute deviation">Average absolute deviation</a></li> <li><a href="/wiki/Coefficient_of_variation" title="Coefficient of variation">Coefficient of variation</a></li> <li><a href="/wiki/Interquartile_range" title="Interquartile range">Interquartile range</a></li> <li><a href="/wiki/Percentile" title="Percentile">Percentile</a></li> <li><a href="/wiki/Range_(statistics)" title="Range (statistics)">Range</a></li> <li><a href="/wiki/Standard_deviation" title="Standard deviation">Standard deviation</a></li> <li><a href="/wiki/Variance#Sample_variance" title="Variance">Variance</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Shape_of_the_distribution" class="mw-redirect" title="Shape of the distribution">Shape</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Central_limit_theorem" title="Central limit theorem">Central limit theorem</a></li> <li><a href="/wiki/Moment_(mathematics)" title="Moment (mathematics)">Moments</a> <ul><li><a href="/wiki/Kurtosis" title="Kurtosis">Kurtosis</a></li> <li><a href="/wiki/L-moment" title="L-moment">L-moments</a></li> <li><a href="/wiki/Skewness" title="Skewness">Skewness</a></li></ul></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Count_data" title="Count data">Count data</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Index_of_dispersion" title="Index of dispersion">Index of dispersion</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em">Summary tables</th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Contingency_table" title="Contingency table">Contingency table</a></li> <li><a href="/wiki/Frequency_distribution" class="mw-redirect" title="Frequency distribution">Frequency distribution</a></li> <li><a href="/wiki/Grouped_data" title="Grouped data">Grouped data</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Correlation_and_dependence" class="mw-redirect" title="Correlation and dependence">Dependence</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Partial_correlation" title="Partial correlation">Partial correlation</a></li> <li><a href="/wiki/Pearson_correlation_coefficient" title="Pearson correlation coefficient">Pearson product-moment correlation</a></li> <li><a href="/wiki/Rank_correlation" title="Rank correlation">Rank correlation</a> <ul><li><a href="/wiki/Kendall_rank_correlation_coefficient" title="Kendall rank correlation coefficient">Kendall's τ</a></li> <li><a href="/wiki/Spearman%27s_rank_correlation_coefficient" title="Spearman's rank correlation coefficient">Spearman's ρ</a></li></ul></li> <li><a href="/wiki/Scatter_plot" title="Scatter plot">Scatter plot</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Statistical_graphics" title="Statistical graphics">Graphics</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Bar_chart" title="Bar chart">Bar chart</a></li> <li><a href="/wiki/Biplot" title="Biplot">Biplot</a></li> <li><a href="/wiki/Box_plot" title="Box plot">Box plot</a></li> <li><a href="/wiki/Control_chart" title="Control chart">Control chart</a></li> <li><a href="/wiki/Correlogram" title="Correlogram">Correlogram</a></li> <li><a href="/wiki/Fan_chart_(statistics)" title="Fan chart (statistics)">Fan chart</a></li> <li><a href="/wiki/Forest_plot" title="Forest plot">Forest plot</a></li> <li><a href="/wiki/Histogram" title="Histogram">Histogram</a></li> <li><a href="/wiki/Pie_chart" title="Pie chart">Pie chart</a></li> <li><a href="/wiki/Q%E2%80%93Q_plot" title="Q–Q plot">Q–Q plot</a></li> <li><a href="/wiki/Radar_chart" title="Radar chart">Radar chart</a></li> <li><a href="/wiki/Run_chart" title="Run chart">Run chart</a></li> <li><a href="/wiki/Scatter_plot" title="Scatter plot">Scatter plot</a></li> <li><a href="/wiki/Stem-and-leaf_display" title="Stem-and-leaf display">Stem-and-leaf display</a></li> <li><a href="/wiki/Violin_plot" title="Violin plot">Violin plot</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Data_collection636" style="font-size:114%;margin:0 4em"><a href="/wiki/Data_collection" title="Data collection">Data collection</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Design_of_experiments" title="Design of experiments">Study design</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Effect_size" title="Effect size">Effect size</a></li> <li><a href="/wiki/Missing_data" title="Missing data">Missing data</a></li> <li><a href="/wiki/Optimal_design" class="mw-redirect" title="Optimal design">Optimal design</a></li> <li><a href="/wiki/Statistical_population" title="Statistical population">Population</a></li> <li><a href="/wiki/Replication_(statistics)" title="Replication (statistics)">Replication</a></li> <li><a href="/wiki/Sample_size_determination" title="Sample size determination">Sample size determination</a></li> <li><a href="/wiki/Statistic" title="Statistic">Statistic</a></li> <li><a href="/wiki/Statistical_power" class="mw-redirect" title="Statistical power">Statistical power</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Survey_methodology" title="Survey methodology">Survey methodology</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Sampling_(statistics)" title="Sampling (statistics)">Sampling</a> <ul><li><a href="/wiki/Cluster_sampling" title="Cluster sampling">Cluster</a></li> <li><a href="/wiki/Stratified_sampling" title="Stratified sampling">Stratified</a></li></ul></li> <li><a href="/wiki/Opinion_poll" title="Opinion poll">Opinion poll</a></li> <li><a href="/wiki/Questionnaire" title="Questionnaire">Questionnaire</a></li> <li><a href="/wiki/Standard_error" title="Standard error">Standard error</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Experiment" title="Experiment">Controlled experiments</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Blocking_(statistics)" title="Blocking (statistics)">Blocking</a></li> <li><a href="/wiki/Factorial_experiment" title="Factorial experiment">Factorial experiment</a></li> <li><a href="/wiki/Interaction_(statistics)" title="Interaction (statistics)">Interaction</a></li> <li><a href="/wiki/Random_assignment" title="Random assignment">Random assignment</a></li> <li><a href="/wiki/Randomized_controlled_trial" title="Randomized controlled trial">Randomized controlled trial</a></li> <li><a href="/wiki/Randomized_experiment" title="Randomized experiment">Randomized experiment</a></li> <li><a href="/wiki/Scientific_control" title="Scientific control">Scientific control</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em">Adaptive designs</th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Adaptive_clinical_trial" class="mw-redirect" title="Adaptive clinical trial">Adaptive clinical trial</a></li> <li><a href="/wiki/Stochastic_approximation" title="Stochastic approximation">Stochastic approximation</a></li> <li><a href="/wiki/Up-and-Down_Designs" class="mw-redirect" title="Up-and-Down Designs">Up-and-down designs</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Observational_study" title="Observational study">Observational studies</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Cohort_study" title="Cohort study">Cohort study</a></li> <li><a href="/wiki/Cross-sectional_study" title="Cross-sectional study">Cross-sectional study</a></li> <li><a href="/wiki/Natural_experiment" title="Natural experiment">Natural experiment</a></li> <li><a href="/wiki/Quasi-experiment" title="Quasi-experiment">Quasi-experiment</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Statistical_inference636" style="font-size:114%;margin:0 4em"><a href="/wiki/Statistical_inference" title="Statistical inference">Statistical inference</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Statistical_theory" title="Statistical theory">Statistical theory</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Population_(statistics)" class="mw-redirect" title="Population (statistics)">Population</a></li> <li><a href="/wiki/Statistic" title="Statistic">Statistic</a></li> <li><a href="/wiki/Probability_distribution" title="Probability distribution">Probability distribution</a></li> <li><a href="/wiki/Sampling_distribution" title="Sampling distribution">Sampling distribution</a> <ul><li><a href="/wiki/Order_statistic" title="Order statistic">Order statistic</a></li></ul></li> <li><a href="/wiki/Empirical_distribution_function" title="Empirical distribution function">Empirical distribution</a> <ul><li><a href="/wiki/Density_estimation" title="Density estimation">Density estimation</a></li></ul></li> <li><a href="/wiki/Statistical_model" title="Statistical model">Statistical model</a> <ul><li><a href="/wiki/Model_specification" class="mw-redirect" title="Model specification">Model specification</a></li> <li><a href="/wiki/Lp_space" title="Lp space">L<sup><i>p</i></sup> space</a></li></ul></li> <li><a href="/wiki/Statistical_parameter" title="Statistical parameter">Parameter</a> <ul><li><a href="/wiki/Location_parameter" title="Location parameter">location</a></li> <li><a href="/wiki/Scale_parameter" title="Scale parameter">scale</a></li> <li><a href="/wiki/Shape_parameter" title="Shape parameter">shape</a></li></ul></li> <li><a href="/wiki/Parametric_statistics" title="Parametric statistics">Parametric family</a> <ul><li><a href="/wiki/Likelihood_function" title="Likelihood function">Likelihood</a> <a href="/wiki/Monotone_likelihood_ratio" title="Monotone likelihood ratio"><span style="font-size:85%;">(monotone)</span></a></li> <li><a href="/wiki/Location%E2%80%93scale_family" title="Location–scale family">Location–scale family</a></li> <li><a href="/wiki/Exponential_family" title="Exponential family">Exponential family</a></li></ul></li> <li><a href="/wiki/Completeness_(statistics)" title="Completeness (statistics)">Completeness</a></li> <li><a href="/wiki/Sufficient_statistic" title="Sufficient statistic">Sufficiency</a></li> <li><a href="/wiki/Plug-in_principle" class="mw-redirect" title="Plug-in principle">Statistical functional</a> <ul><li><a href="/wiki/Bootstrapping_(statistics)" title="Bootstrapping (statistics)">Bootstrap</a></li> <li><a href="/wiki/U-statistic" title="U-statistic">U</a></li> <li><a href="/wiki/V-statistic" title="V-statistic">V</a></li></ul></li> <li><a href="/wiki/Optimal_decision" title="Optimal decision">Optimal decision</a> <ul><li><a href="/wiki/Loss_function" title="Loss function">loss function</a></li></ul></li> <li><a href="/wiki/Efficiency_(statistics)" title="Efficiency (statistics)">Efficiency</a></li> <li><a href="/wiki/Statistical_distance" title="Statistical distance">Statistical distance</a> <ul><li><a href="/wiki/Divergence_(statistics)" title="Divergence (statistics)">divergence</a></li></ul></li> <li><a href="/wiki/Asymptotic_theory_(statistics)" title="Asymptotic theory (statistics)">Asymptotics</a></li> <li><a href="/wiki/Robust_statistics" title="Robust statistics">Robustness</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Frequentist_inference" title="Frequentist inference">Frequentist inference</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Point_estimation" title="Point estimation">Point estimation</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Estimating_equations" title="Estimating equations">Estimating equations</a> <ul><li><a href="/wiki/Maximum_likelihood" class="mw-redirect" title="Maximum likelihood">Maximum likelihood</a></li> <li><a href="/wiki/Method_of_moments_(statistics)" title="Method of moments (statistics)">Method of moments</a></li> <li><a href="/wiki/M-estimator" title="M-estimator">M-estimator</a></li> <li><a href="/wiki/Minimum_distance_estimation" class="mw-redirect" title="Minimum distance estimation">Minimum distance</a></li></ul></li> <li><a href="/wiki/Bias_of_an_estimator" title="Bias of an estimator">Unbiased estimators</a> <ul><li><a href="/wiki/Minimum-variance_unbiased_estimator" title="Minimum-variance unbiased estimator">Mean-unbiased minimum-variance</a> <ul><li><a href="/wiki/Rao%E2%80%93Blackwell_theorem" title="Rao–Blackwell theorem">Rao–Blackwellization</a></li> <li><a href="/wiki/Lehmann%E2%80%93Scheff%C3%A9_theorem" title="Lehmann–Scheffé theorem">Lehmann–Scheffé theorem</a></li></ul></li> <li><a href="/wiki/Median-unbiased_estimator" class="mw-redirect" title="Median-unbiased estimator">Median unbiased</a></li></ul></li> <li><a href="/wiki/Plug-in_principle" class="mw-redirect" title="Plug-in principle">Plug-in</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Interval_estimation" title="Interval estimation">Interval estimation</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Confidence_interval" title="Confidence interval">Confidence interval</a></li> <li><a href="/wiki/Pivotal_quantity" title="Pivotal quantity">Pivot</a></li> <li><a href="/wiki/Likelihood_interval" class="mw-redirect" title="Likelihood interval">Likelihood interval</a></li> <li><a href="/wiki/Prediction_interval" title="Prediction interval">Prediction interval</a></li> <li><a href="/wiki/Tolerance_interval" title="Tolerance interval">Tolerance interval</a></li> <li><a href="/wiki/Resampling_(statistics)" title="Resampling (statistics)">Resampling</a> <ul><li><a href="/wiki/Bootstrapping_(statistics)" title="Bootstrapping (statistics)">Bootstrap</a></li> <li><a href="/wiki/Jackknife_resampling" title="Jackknife resampling">Jackknife</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Statistical_hypothesis_testing" class="mw-redirect" title="Statistical hypothesis testing">Testing hypotheses</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/One-_and_two-tailed_tests" title="One- and two-tailed tests">1- & 2-tails</a></li> <li><a href="/wiki/Power_(statistics)" title="Power (statistics)">Power</a> <ul><li><a href="/wiki/Uniformly_most_powerful_test" title="Uniformly most powerful test">Uniformly most powerful test</a></li></ul></li> <li><a href="/wiki/Permutation_test" title="Permutation test">Permutation test</a> <ul><li><a href="/wiki/Randomization_test" class="mw-redirect" title="Randomization test">Randomization test</a></li></ul></li> <li><a href="/wiki/Multiple_comparisons" class="mw-redirect" title="Multiple comparisons">Multiple comparisons</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Parametric_statistics" title="Parametric statistics">Parametric tests</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Likelihood-ratio_test" title="Likelihood-ratio test">Likelihood-ratio</a></li> <li><a href="/wiki/Score_test" title="Score test">Score/Lagrange multiplier</a></li> <li><a href="/wiki/Wald_test" title="Wald test">Wald</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/List_of_statistical_tests" title="List of statistical tests">Specific tests</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><td colspan="2" class="navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Z-test" title="Z-test"><i>Z</i>-test <span style="font-size:85%;">(normal)</span></a></li> <li><a href="/wiki/Student%27s_t-test" title="Student's t-test">Student's <i>t</i>-test</a></li> <li><a href="/wiki/F-test" title="F-test"><i>F</i>-test</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Goodness_of_fit" title="Goodness of fit">Goodness of fit</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Chi-squared_test" title="Chi-squared test">Chi-squared</a></li> <li><a href="/wiki/G-test" title="G-test"><i>G</i>-test</a></li> <li><a href="/wiki/Kolmogorov%E2%80%93Smirnov_test" title="Kolmogorov–Smirnov test">Kolmogorov–Smirnov</a></li> <li><a href="/wiki/Anderson%E2%80%93Darling_test" title="Anderson–Darling test">Anderson–Darling</a></li> <li><a href="/wiki/Lilliefors_test" title="Lilliefors test">Lilliefors</a></li> <li><a href="/wiki/Jarque%E2%80%93Bera_test" title="Jarque–Bera test">Jarque–Bera</a></li> <li><a href="/wiki/Shapiro%E2%80%93Wilk_test" title="Shapiro–Wilk test">Normality <span style="font-size:85%;">(Shapiro–Wilk)</span></a></li> <li><a href="/wiki/Likelihood-ratio_test" title="Likelihood-ratio test">Likelihood-ratio test</a></li> <li><a href="/wiki/Model_selection" title="Model selection">Model selection</a> <ul><li><a href="/wiki/Cross-validation_(statistics)" title="Cross-validation (statistics)">Cross validation</a></li> <li><a href="/wiki/Akaike_information_criterion" title="Akaike information criterion">AIC</a></li> <li><a href="/wiki/Bayesian_information_criterion" title="Bayesian information criterion">BIC</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Rank_statistics" class="mw-redirect" title="Rank statistics">Rank statistics</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Sign_test" title="Sign test">Sign</a> <ul><li><a href="/wiki/Sample_median" class="mw-redirect" title="Sample median">Sample median</a></li></ul></li> <li><a href="/wiki/Wilcoxon_signed-rank_test" title="Wilcoxon signed-rank test">Signed rank <span style="font-size:85%;">(Wilcoxon)</span></a> <ul><li><a href="/wiki/Hodges%E2%80%93Lehmann_estimator" title="Hodges–Lehmann estimator">Hodges–Lehmann estimator</a></li></ul></li> <li><a href="/wiki/Mann%E2%80%93Whitney_U_test" title="Mann–Whitney U test">Rank sum <span style="font-size:85%;">(Mann–Whitney)</span></a></li> <li><a href="/wiki/Nonparametric_statistics" title="Nonparametric statistics">Nonparametric</a> <a href="/wiki/Analysis_of_variance" title="Analysis of variance">anova</a> <ul><li><a href="/wiki/Kruskal%E2%80%93Wallis_test" title="Kruskal–Wallis test">1-way <span style="font-size:85%;">(Kruskal–Wallis)</span></a></li> <li><a href="/wiki/Friedman_test" title="Friedman test">2-way <span style="font-size:85%;">(Friedman)</span></a></li> <li><a href="/wiki/Jonckheere%27s_trend_test" title="Jonckheere's trend test">Ordered alternative <span style="font-size:85%;">(Jonckheere–Terpstra)</span></a></li></ul></li> <li><a href="/wiki/Van_der_Waerden_test" title="Van der Waerden test">Van der Waerden test</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Bayesian_inference" title="Bayesian inference">Bayesian inference</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Bayesian_probability" title="Bayesian probability">Bayesian probability</a> <ul><li><a href="/wiki/Prior_probability" title="Prior probability">prior</a></li> <li><a href="/wiki/Posterior_probability" title="Posterior probability">posterior</a></li></ul></li> <li><a href="/wiki/Credible_interval" title="Credible interval">Credible interval</a></li> <li><a href="/wiki/Bayes_factor" title="Bayes factor">Bayes factor</a></li> <li><a href="/wiki/Bayes_estimator" title="Bayes estimator">Bayesian estimator</a> <ul><li><a href="/wiki/Maximum_a_posteriori_estimation" title="Maximum a posteriori estimation">Maximum posterior estimator</a></li></ul></li></ul> </div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible uncollapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="CorrelationRegression_analysis636" style="font-size:114%;margin:0 4em"><div class="hlist"><ul><li><a href="/wiki/Correlation_and_dependence" class="mw-redirect" title="Correlation and dependence">Correlation</a></li><li><a href="/wiki/Regression_analysis" title="Regression analysis">Regression analysis</a></li></ul></div></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Correlation_and_dependence" class="mw-redirect" title="Correlation and dependence">Correlation</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Pearson_product-moment_correlation_coefficient" class="mw-redirect" title="Pearson product-moment correlation coefficient">Pearson product-moment</a></li> <li><a href="/wiki/Partial_correlation" title="Partial correlation">Partial correlation</a></li> <li><a href="/wiki/Confounding" title="Confounding">Confounding variable</a></li> <li><a href="/wiki/Coefficient_of_determination" title="Coefficient of determination">Coefficient of determination</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Regression_analysis" title="Regression analysis">Regression analysis</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Errors_and_residuals" title="Errors and residuals">Errors and residuals</a></li> <li><a href="/wiki/Regression_validation" title="Regression validation">Regression validation</a></li> <li><a href="/wiki/Mixed_model" title="Mixed model">Mixed effects models</a></li> <li><a href="/wiki/Simultaneous_equations_model" title="Simultaneous equations model">Simultaneous equations models</a></li> <li><a href="/wiki/Multivariate_adaptive_regression_splines" class="mw-redirect" title="Multivariate adaptive regression splines">Multivariate adaptive regression splines (MARS)</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Linear_regression" title="Linear regression">Linear regression</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Simple_linear_regression" title="Simple linear regression">Simple linear regression</a></li> <li><a href="/wiki/Ordinary_least_squares" title="Ordinary least squares">Ordinary least squares</a></li> <li><a href="/wiki/General_linear_model" title="General linear model">General linear model</a></li> <li><a href="/wiki/Bayesian_linear_regression" title="Bayesian linear regression">Bayesian regression</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em">Non-standard predictors</th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Nonlinear_regression" title="Nonlinear regression">Nonlinear regression</a></li> <li><a href="/wiki/Nonparametric_regression" title="Nonparametric regression">Nonparametric</a></li> <li><a href="/wiki/Semiparametric_regression" title="Semiparametric regression">Semiparametric</a></li> <li><a href="/wiki/Isotonic_regression" title="Isotonic regression">Isotonic</a></li> <li><a href="/wiki/Robust_regression" title="Robust regression">Robust</a></li> <li><a href="/wiki/Homoscedasticity_and_heteroscedasticity" title="Homoscedasticity and heteroscedasticity">Homoscedasticity and Heteroscedasticity</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Generalized_linear_model" title="Generalized linear model">Generalized linear model</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Exponential_family" title="Exponential family">Exponential families</a></li> <li><a class="mw-selflink selflink">Logistic <span style="font-size:85%;">(Bernoulli)</span></a> / <a href="/wiki/Binomial_regression" title="Binomial regression">Binomial</a> / <a href="/wiki/Poisson_regression" title="Poisson regression">Poisson regressions</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Partition_of_sums_of_squares" title="Partition of sums of squares">Partition of variance</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Analysis_of_variance" title="Analysis of variance">Analysis of variance (ANOVA, anova)</a></li> <li><a href="/wiki/Analysis_of_covariance" title="Analysis of covariance">Analysis of covariance</a></li> <li><a href="/wiki/Multivariate_analysis_of_variance" title="Multivariate analysis of variance">Multivariate ANOVA</a></li> <li><a href="/wiki/Degrees_of_freedom_(statistics)" title="Degrees of freedom (statistics)">Degrees of freedom</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Categorical_/_Multivariate_/_Time-series_/_Survival_analysis636" style="font-size:114%;margin:0 4em"><a href="/wiki/Categorical_variable" title="Categorical variable">Categorical</a> / <a href="/wiki/Multivariate_statistics" title="Multivariate statistics">Multivariate</a> / <a href="/wiki/Time_series" title="Time series">Time-series</a> / <a href="/wiki/Survival_analysis" title="Survival analysis">Survival analysis</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Categorical_variable" title="Categorical variable">Categorical</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Cohen%27s_kappa" title="Cohen's kappa">Cohen's kappa</a></li> <li><a href="/wiki/Contingency_table" title="Contingency table">Contingency table</a></li> <li><a href="/wiki/Graphical_model" title="Graphical model">Graphical model</a></li> <li><a href="/wiki/Poisson_regression" title="Poisson regression">Log-linear model</a></li> <li><a href="/wiki/McNemar%27s_test" title="McNemar's test">McNemar's test</a></li> <li><a href="/wiki/Cochran%E2%80%93Mantel%E2%80%93Haenszel_statistics" title="Cochran–Mantel–Haenszel statistics">Cochran–Mantel–Haenszel statistics</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Multivariate_statistics" title="Multivariate statistics">Multivariate</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/General_linear_model" title="General linear model">Regression</a></li> <li><a href="/wiki/Multivariate_analysis_of_variance" title="Multivariate analysis of variance">Manova</a></li> <li><a href="/wiki/Principal_component_analysis" title="Principal component analysis">Principal components</a></li> <li><a href="/wiki/Canonical_correlation" title="Canonical correlation">Canonical correlation</a></li> <li><a href="/wiki/Linear_discriminant_analysis" title="Linear discriminant analysis">Discriminant analysis</a></li> <li><a href="/wiki/Cluster_analysis" title="Cluster analysis">Cluster analysis</a></li> <li><a href="/wiki/Statistical_classification" title="Statistical classification">Classification</a></li> <li><a href="/wiki/Structural_equation_modeling" title="Structural equation modeling">Structural equation model</a> <ul><li><a href="/wiki/Factor_analysis" title="Factor analysis">Factor analysis</a></li></ul></li> <li><a href="/wiki/Multivariate_distribution" class="mw-redirect" title="Multivariate distribution">Multivariate distributions</a> <ul><li><a href="/wiki/Elliptical_distribution" title="Elliptical distribution">Elliptical distributions</a> <ul><li><a href="/wiki/Multivariate_normal_distribution" title="Multivariate normal distribution">Normal</a></li></ul></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Time_series" title="Time series">Time-series</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;">General</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Decomposition_of_time_series" title="Decomposition of time series">Decomposition</a></li> <li><a href="/wiki/Trend_estimation" class="mw-redirect" title="Trend estimation">Trend</a></li> <li><a href="/wiki/Stationary_process" title="Stationary process">Stationarity</a></li> <li><a href="/wiki/Seasonal_adjustment" title="Seasonal adjustment">Seasonal adjustment</a></li> <li><a href="/wiki/Exponential_smoothing" title="Exponential smoothing">Exponential smoothing</a></li> <li><a href="/wiki/Cointegration" title="Cointegration">Cointegration</a></li> <li><a href="/wiki/Structural_break" title="Structural break">Structural break</a></li> <li><a href="/wiki/Granger_causality" title="Granger causality">Granger causality</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;">Specific tests</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Dickey%E2%80%93Fuller_test" title="Dickey–Fuller test">Dickey–Fuller</a></li> <li><a href="/wiki/Johansen_test" title="Johansen test">Johansen</a></li> <li><a href="/wiki/Ljung%E2%80%93Box_test" title="Ljung–Box test">Q-statistic <span style="font-size:85%;">(Ljung–Box)</span></a></li> <li><a href="/wiki/Durbin%E2%80%93Watson_statistic" title="Durbin–Watson statistic">Durbin–Watson</a></li> <li><a href="/wiki/Breusch%E2%80%93Godfrey_test" title="Breusch–Godfrey test">Breusch–Godfrey</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Time_domain" title="Time domain">Time domain</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Autocorrelation" title="Autocorrelation">Autocorrelation (ACF)</a> <ul><li><a href="/wiki/Partial_autocorrelation_function" title="Partial autocorrelation function">partial (PACF)</a></li></ul></li> <li><a href="/wiki/Cross-correlation" title="Cross-correlation">Cross-correlation (XCF)</a></li> <li><a href="/wiki/Autoregressive%E2%80%93moving-average_model" class="mw-redirect" title="Autoregressive–moving-average model">ARMA model</a></li> <li><a href="/wiki/Box%E2%80%93Jenkins_method" title="Box–Jenkins method">ARIMA model <span style="font-size:85%;">(Box–Jenkins)</span></a></li> <li><a href="/wiki/Autoregressive_conditional_heteroskedasticity" title="Autoregressive conditional heteroskedasticity">Autoregressive conditional heteroskedasticity (ARCH)</a></li> <li><a href="/wiki/Vector_autoregression" title="Vector autoregression">Vector autoregression (VAR)</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Frequency_domain" title="Frequency domain">Frequency domain</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Spectral_density_estimation" title="Spectral density estimation">Spectral density estimation</a></li> <li><a href="/wiki/Fourier_analysis" title="Fourier analysis">Fourier analysis</a></li> <li><a href="/wiki/Least-squares_spectral_analysis" title="Least-squares spectral analysis">Least-squares spectral analysis</a></li> <li><a href="/wiki/Wavelet" title="Wavelet">Wavelet</a></li> <li><a href="/wiki/Whittle_likelihood" title="Whittle likelihood">Whittle likelihood</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Survival_analysis" title="Survival analysis">Survival</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Survival_function" title="Survival function">Survival function</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Kaplan%E2%80%93Meier_estimator" title="Kaplan–Meier estimator">Kaplan–Meier estimator (product limit)</a></li> <li><a href="/wiki/Proportional_hazards_model" title="Proportional hazards model">Proportional hazards models</a></li> <li><a href="/wiki/Accelerated_failure_time_model" title="Accelerated failure time model">Accelerated failure time (AFT) model</a></li> <li><a href="/wiki/First-hitting-time_model" title="First-hitting-time model">First hitting time</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;"><a href="/wiki/Failure_rate" title="Failure rate">Hazard function</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Nelson%E2%80%93Aalen_estimator" title="Nelson–Aalen estimator">Nelson–Aalen estimator</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;font-weight:normal;">Test</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Log-rank_test" class="mw-redirect" title="Log-rank test">Log-rank test</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Applications636" style="font-size:114%;margin:0 4em"><a href="/wiki/List_of_fields_of_application_of_statistics" title="List of fields of application of statistics">Applications</a></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Biostatistics" title="Biostatistics">Biostatistics</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Bioinformatics" title="Bioinformatics">Bioinformatics</a></li> <li><a href="/wiki/Clinical_trial" title="Clinical trial">Clinical trials</a> / <a href="/wiki/Clinical_study_design" title="Clinical study design">studies</a></li> <li><a href="/wiki/Epidemiology" title="Epidemiology">Epidemiology</a></li> <li><a href="/wiki/Medical_statistics" title="Medical statistics">Medical statistics</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Engineering_statistics" title="Engineering statistics">Engineering statistics</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Chemometrics" title="Chemometrics">Chemometrics</a></li> <li><a href="/wiki/Methods_engineering" title="Methods engineering">Methods engineering</a></li> <li><a href="/wiki/Probabilistic_design" title="Probabilistic design">Probabilistic design</a></li> <li><a href="/wiki/Statistical_process_control" title="Statistical process control">Process</a> / <a href="/wiki/Quality_control" title="Quality control">quality control</a></li> <li><a href="/wiki/Reliability_engineering" title="Reliability engineering">Reliability</a></li> <li><a href="/wiki/System_identification" title="System identification">System identification</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Social_statistics" title="Social statistics">Social statistics</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Actuarial_science" title="Actuarial science">Actuarial science</a></li> <li><a href="/wiki/Census" title="Census">Census</a></li> <li><a href="/wiki/Crime_statistics" title="Crime statistics">Crime statistics</a></li> <li><a href="/wiki/Demographic_statistics" title="Demographic statistics">Demography</a></li> <li><a href="/wiki/Econometrics" title="Econometrics">Econometrics</a></li> <li><a href="/wiki/Jurimetrics" title="Jurimetrics">Jurimetrics</a></li> <li><a href="/wiki/National_accounts" title="National accounts">National accounts</a></li> <li><a href="/wiki/Official_statistics" title="Official statistics">Official statistics</a></li> <li><a href="/wiki/Population_statistics" class="mw-redirect" title="Population statistics">Population statistics</a></li> <li><a href="/wiki/Psychometrics" title="Psychometrics">Psychometrics</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:12.5em"><a href="/wiki/Spatial_analysis" title="Spatial analysis">Spatial statistics</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Cartography" title="Cartography">Cartography</a></li> <li><a href="/wiki/Environmental_statistics" title="Environmental statistics">Environmental statistics</a></li> <li><a href="/wiki/Geographic_information_system" title="Geographic information system">Geographic information system</a></li> <li><a href="/wiki/Geostatistics" title="Geostatistics">Geostatistics</a></li> <li><a href="/wiki/Kriging" title="Kriging">Kriging</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div> <ul><li><span class="noviewer" typeof="mw:File"><span title="Category"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/16px-Symbol_category_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/23px-Symbol_category_class.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/31px-Symbol_category_class.svg.png 2x" data-file-width="180" data-file-height="185" /></span></span><b><a href="/wiki/Category:Statistics" title="Category:Statistics">Category</a></b></li> <li><b><span class="nowrap"><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Nuvola_apps_edu_mathematics_blue-p.svg" class="mw-file-description"><img alt="icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/28px-Nuvola_apps_edu_mathematics_blue-p.svg.png" decoding="async" width="28" height="28" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/42px-Nuvola_apps_edu_mathematics_blue-p.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/56px-Nuvola_apps_edu_mathematics_blue-p.svg.png 2x" data-file-width="128" data-file-height="128" /></a></span> </span><a href="/wiki/Portal:Mathematics" title="Portal:Mathematics">Mathematics portal</a></b></li> <li><span class="noviewer" typeof="mw:File"><span title="Commons page"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/12px-Commons-logo.svg.png" decoding="async" width="12" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/18px-Commons-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/24px-Commons-logo.svg.png 2x" data-file-width="1024" data-file-height="1376" /></span></span><b><a href="https://commons.wikimedia.org/wiki/Category:Statistics" class="extiw" title="commons:Category:Statistics">Commons</a></b></li> <li><span class="noviewer" typeof="mw:File"><span title="WikiProject"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/37/People_icon.svg/16px-People_icon.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/37/People_icon.svg/24px-People_icon.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/37/People_icon.svg/32px-People_icon.svg.png 2x" data-file-width="100" data-file-height="100" /></span></span> <b><a href="/wiki/Wikipedia:WikiProject_Statistics" title="Wikipedia:WikiProject Statistics">WikiProject</a></b></li></ul> </div></td></tr></tbody></table></div> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"></div><div role="navigation" class="navbox authority-control" aria-labelledby="Authority_control_databases_frameless&#124;text-top&#124;10px&#124;alt=Edit_this_at_Wikidata&#124;link=https&#58;//www.wikidata.org/wiki/Q1132755#identifiers&#124;class=noprint&#124;Edit_this_at_Wikidata855" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Authority_control_databases_frameless&#124;text-top&#124;10px&#124;alt=Edit_this_at_Wikidata&#124;link=https&#58;//www.wikidata.org/wiki/Q1132755#identifiers&#124;class=noprint&#124;Edit_this_at_Wikidata855" style="font-size:114%;margin:0 4em"><a href="/wiki/Help:Authority_control" title="Help:Authority control">Authority control databases</a> <span class="mw-valign-text-top noprint" typeof="mw:File/Frameless"><a href="https://www.wikidata.org/wiki/Q1132755#identifiers" title="Edit this at Wikidata"><img alt="Edit this at Wikidata" src="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/10px-OOjs_UI_icon_edit-ltr-progressive.svg.png" decoding="async" width="10" height="10" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/15px-OOjs_UI_icon_edit-ltr-progressive.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/20px-OOjs_UI_icon_edit-ltr-progressive.svg.png 2x" data-file-width="20" data-file-height="20" /></a></span></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">International</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="http://id.worldcat.org/fast/1002112/">FAST</a></span></li></ul></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">National</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://d-nb.info/gnd/4230396-5">Germany</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://id.loc.gov/authorities/sh85078131">United States</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://catalogue.bnf.fr/ark:/12148/cb13737339z">France</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://data.bnf.fr/ark:/12148/cb13737339z">BnF data</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://www.nli.org.il/en/authorities/987007536257205171">Israel</a></span></li></ul></div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐b766959bd‐b6l9t Cached time: 20250214040838 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 1.605 seconds Real time usage: 1.992 seconds Preprocessor visited node count: 10566/1000000 Post‐expand include size: 331673/2097152 bytes Template argument size: 7870/2097152 bytes Highest expansion depth: 19/100 Expensive parser function count: 15/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 266892/5000000 bytes Lua time usage: 0.774/10.000 seconds Lua memory usage: 10114170/52428800 bytes Number of Wikibase entities loaded: 1/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 1195.079 1 -total 32.92% 393.443 1 Template:Reflist 22.43% 268.080 34 Template:Cite_journal 8.57% 102.404 1 Template:Short_description 8.32% 99.400 24 Template:Cite_book 7.16% 85.589 1 Template:Regression_bar 7.07% 84.521 14 Template:Sfn 6.99% 83.508 1 Template:Sidebar 6.82% 81.487 2 Template:Pagetype 6.16% 73.590 1 Template:Statistics --> <!-- Saved in parser cache with key enwiki:pcache:226631:|#|:idhash:canonical and timestamp 20250214040838 and revision id 1274853991. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?useformat=desktop&type=1x1&usesul3=0" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Logistic_regression&oldid=1274853991">https://en.wikipedia.org/w/index.php?title=Logistic_regression&oldid=1274853991</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:Logistic_regression" title="Category:Logistic regression">Logistic regression</a></li><li><a href="/wiki/Category:Predictive_analytics" title="Category:Predictive analytics">Predictive analytics</a></li><li><a href="/wiki/Category:Regression_models" title="Category:Regression models">Regression models</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Wikipedia_articles_needing_page_number_citations_from_May_2012" title="Category:Wikipedia articles needing page number citations from May 2012">Wikipedia articles needing page number citations from May 2012</a></li><li><a href="/wiki/Category:Wikipedia_articles_needing_page_number_citations_from_October_2019" title="Category:Wikipedia articles needing page number citations from October 2019">Wikipedia articles needing page number citations from October 2019</a></li><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li><li><a href="/wiki/Category:Wikipedia_articles_needing_clarification_from_February_2023" title="Category:Wikipedia articles needing clarification from February 2023">Wikipedia articles needing clarification from February 2023</a></li><li><a href="/wiki/Category:Articles_that_may_contain_original_research_from_May_2022" title="Category:Articles that may contain original research from May 2022">Articles that may contain original research from May 2022</a></li><li><a href="/wiki/Category:All_articles_that_may_contain_original_research" title="Category:All articles that may contain original research">All articles that may contain original research</a></li><li><a href="/wiki/Category:Wikipedia_articles_needing_clarification_from_May_2017" title="Category:Wikipedia articles needing clarification from May 2017">Wikipedia articles needing clarification from May 2017</a></li><li><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_October_2019" title="Category:Articles with unsourced statements from October 2019">Articles with unsourced statements from October 2019</a></li><li><a href="/wiki/Category:All_articles_with_specifically_marked_weasel-worded_phrases" title="Category:All articles with specifically marked weasel-worded phrases">All articles with specifically marked weasel-worded phrases</a></li><li><a href="/wiki/Category:Articles_with_specifically_marked_weasel-worded_phrases_from_October_2019" title="Category:Articles with specifically marked weasel-worded phrases from October 2019">Articles with specifically marked weasel-worded phrases from October 2019</a></li><li><a href="/wiki/Category:Commons_category_link_from_Wikidata" title="Category:Commons category link from Wikidata">Commons category link from Wikidata</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 9 February 2025, at 16:46<span class="anonymous-show"> (UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Logistic_regression&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" lang="en" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><picture><source media="(min-width: 500px)" srcset="/w/resources/assets/poweredby_mediawiki.svg" width="88" height="31"><img src="/w/resources/assets/mediawiki_compact.svg" alt="Powered by MediaWiki" width="25" height="25" loading="lazy"></picture></a></li> </ul> </footer> </div> </div> </div> <div class="vector-header-container vector-sticky-header-container"> <div id="vector-sticky-header" class="vector-sticky-header"> <div class="vector-sticky-header-start"> <div class="vector-sticky-header-icon-start vector-button-flush-left vector-button-flush-right" aria-hidden="true"> <button class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-sticky-header-search-toggle" tabindex="-1" data-event-name="ui.vector-sticky-search-form.icon"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </button> </div> <div role="search" class="vector-search-box-vue vector-search-box-show-thumbnail vector-search-box"> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail"> <form action="/w/index.php" id="vector-sticky-search-form" class="cdx-search-input cdx-search-input--has-end-button"> <div class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia"> <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <div class="vector-sticky-header-context-bar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-sticky-header-toc" class="vector-dropdown mw-portlet mw-portlet-sticky-header-toc vector-sticky-header-toc vector-button-flush-left" > <input type="checkbox" id="vector-sticky-header-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-sticky-header-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-sticky-header-toc-label" for="vector-sticky-header-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-sticky-header-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div class="vector-sticky-header-context-bar-primary" aria-hidden="true" ><span class="mw-page-title-main">Logistic regression</span></div> </div> </div> <div class="vector-sticky-header-end" aria-hidden="true"> <div class="vector-sticky-header-icons"> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-talk-sticky-header" tabindex="-1" data-event-name="talk-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbles mw-ui-icon-wikimedia-speechBubbles"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-subject-sticky-header" tabindex="-1" data-event-name="subject-sticky-header"><span class="vector-icon mw-ui-icon-article mw-ui-icon-wikimedia-article"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-history-sticky-header" tabindex="-1" data-event-name="history-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-history mw-ui-icon-wikimedia-wikimedia-history"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only mw-watchlink" id="ca-watchstar-sticky-header" tabindex="-1" data-event-name="watch-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-star mw-ui-icon-wikimedia-wikimedia-star"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-edit-sticky-header" tabindex="-1" data-event-name="wikitext-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-wikiText mw-ui-icon-wikimedia-wikimedia-wikiText"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-ve-edit-sticky-header" tabindex="-1" data-event-name="ve-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-edit mw-ui-icon-wikimedia-wikimedia-edit"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-viewsource-sticky-header" tabindex="-1" data-event-name="ve-edit-protected-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-editLock mw-ui-icon-wikimedia-wikimedia-editLock"></span> <span></span> </a> </div> <div class="vector-sticky-header-buttons"> <button class="cdx-button cdx-button--weight-quiet mw-interlanguage-selector" id="p-lang-btn-sticky-header" tabindex="-1" data-event-name="ui.dropdown-p-lang-btn-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-language mw-ui-icon-wikimedia-wikimedia-language"></span> <span>25 languages</span> </button> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive" id="ca-addsection-sticky-header" tabindex="-1" data-event-name="addsection-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbleAdd-progressive mw-ui-icon-wikimedia-speechBubbleAdd-progressive"></span> <span>Add topic</span> </a> </div> <div class="vector-sticky-header-icon-end"> <div class="vector-user-links"> </div> </div> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-b766959bd-mqng6","wgBackendResponseTime":131,"wgPageParseReport":{"limitreport":{"cputime":"1.605","walltime":"1.992","ppvisitednodes":{"value":10566,"limit":1000000},"postexpandincludesize":{"value":331673,"limit":2097152},"templateargumentsize":{"value":7870,"limit":2097152},"expansiondepth":{"value":19,"limit":100},"expensivefunctioncount":{"value":15,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":266892,"limit":5000000},"entityaccesscount":{"value":1,"limit":400},"timingprofile":["100.00% 1195.079 1 -total"," 32.92% 393.443 1 Template:Reflist"," 22.43% 268.080 34 Template:Cite_journal"," 8.57% 102.404 1 Template:Short_description"," 8.32% 99.400 24 Template:Cite_book"," 7.16% 85.589 1 Template:Regression_bar"," 7.07% 84.521 14 Template:Sfn"," 6.99% 83.508 1 Template:Sidebar"," 6.82% 81.487 2 Template:Pagetype"," 6.16% 73.590 1 Template:Statistics"]},"scribunto":{"limitreport-timeusage":{"value":"0.774","limit":"10.000"},"limitreport-memusage":{"value":10114170,"limit":52428800},"limitreport-logs":"anchor_id_list = table#1 {\n [\"CITEREFAgresti2002\"] = 1,\n [\"CITEREFAllison\"] = 1,\n [\"CITEREFAmemiya1985\"] = 1,\n [\"CITEREFBalakrishnan1991\"] = 1,\n [\"CITEREFBerkson1944\"] = 1,\n [\"CITEREFBerkson1951\"] = 1,\n [\"CITEREFBerry1997\"] = 1,\n [\"CITEREFBerryLinoff1997\"] = 1,\n [\"CITEREFBiondoRamosDeirosRagué2000\"] = 1,\n [\"CITEREFBliss1934\"] = 1,\n [\"CITEREFBoydTolsonCopes1987\"] = 1,\n [\"CITEREFCohenCohenWestAiken2002\"] = 1,\n [\"CITEREFCox1958\"] = 1,\n [\"CITEREFCox1966\"] = 1,\n [\"CITEREFCramer2002\"] = 1,\n [\"CITEREFCramer2004\"] = 1,\n [\"CITEREFDavid_A._Freedman2009\"] = 1,\n [\"CITEREFEveritt1998\"] = 1,\n [\"CITEREFFisher1935\"] = 1,\n [\"CITEREFGaddum1933\"] = 1,\n [\"CITEREFGareth_JamesDaniela_WittenTrevor_HastieRobert_Tibshirani2013\"] = 1,\n [\"CITEREFGourierouxMonfort1981\"] = 1,\n [\"CITEREFGouriéroux2000\"] = 1,\n [\"CITEREFGreene2003\"] = 2,\n [\"CITEREFHarrell2010\"] = 1,\n [\"CITEREFHarrell2015\"] = 1,\n [\"CITEREFHilbe2009\"] = 1,\n [\"CITEREFHosmer1997\"] = 1,\n [\"CITEREFHosmer2013\"] = 1,\n [\"CITEREFHosmerLemeshow2000\"] = 1,\n [\"CITEREFHowell2010\"] = 1,\n [\"CITEREFKologluElkerAltunSayek2001\"] = 1,\n [\"CITEREFLe_GallLemeshowSaulnier1993\"] = 1,\n [\"CITEREFLovreglioBorridell’OlioIbeas2014\"] = 1,\n [\"CITEREFM._StranoB.M._Colosimo2006\"] = 1,\n [\"CITEREFMalouf2002\"] = 1,\n [\"CITEREFMarshallCookChristouBernard1995\"] = 1,\n [\"CITEREFMcFadden1973\"] = 1,\n [\"CITEREFMenard2002\"] = 1,\n [\"CITEREFMesa-ArangoHasanUkkusuriMurray-Tuite2013\"] = 1,\n [\"CITEREFMount2011\"] = 1,\n [\"CITEREFMurphy2012\"] = 1,\n [\"CITEREFNeymanPearson1933\"] = 1,\n [\"CITEREFNg2000\"] = 1,\n [\"CITEREFPaleiDas2009\"] = 1,\n [\"CITEREFParkSimarZelenyuk2017\"] = 1,\n [\"CITEREFPearlReed1920\"] = 1,\n [\"CITEREFPeduzziConcato,_JKemper,_EHolford,_TR1996\"] = 1,\n [\"CITEREFPeduzziJ._ConcatoE._KemperT.R._Holford1996\"] = 1,\n [\"CITEREFPoharBlasTurk2004\"] = 1,\n [\"CITEREFRodríguez2007\"] = 1,\n [\"CITEREFTheil1969\"] = 1,\n [\"CITEREFTollesMeurer2016\"] = 1,\n [\"CITEREFTruettCornfieldKannel1967\"] = 1,\n [\"CITEREFVan_SmedenDe_GrootMoonsCollins2016\"] = 1,\n [\"CITEREFVerhulst1838\"] = 1,\n [\"CITEREFVerhulst1845\"] = 1,\n [\"CITEREFVittinghoffMcCulloch2007\"] = 1,\n [\"CITEREFWalkerDuncan1967\"] = 1,\n [\"CITEREFWibbenmeyerHandCalkinVenn2013\"] = 1,\n [\"CITEREFWilsonWorcester1943\"] = 1,\n [\"CITEREFvan_der_PloegAustinSteyerberg2014\"] = 1,\n [\"log-linear_model\"] = 1,\n}\ntemplate_list = table#1 {\n [\"Abbr\"] = 1,\n [\"Anchor\"] = 1,\n [\"Authority control\"] = 1,\n [\"Citation\"] = 1,\n [\"Citation needed\"] = 1,\n [\"Cite book\"] = 24,\n [\"Cite conference\"] = 1,\n [\"Cite journal\"] = 34,\n [\"Cite tech report\"] = 1,\n [\"Cite web\"] = 4,\n [\"Clarify\"] = 1,\n [\"Commons category-inline\"] = 1,\n [\"Explain\"] = 1,\n [\"Harvnb\"] = 2,\n [\"Harvtxt\"] = 12,\n [\"Main\"] = 2,\n [\"Main article\"] = 1,\n [\"Math\"] = 4,\n [\"Mvar\"] = 12,\n [\"Original research\"] = 1,\n [\"Page needed\"] = 4,\n [\"Portal\"] = 1,\n [\"Redirect-distinguish\"] = 1,\n [\"Refbegin\"] = 1,\n [\"Refend\"] = 1,\n [\"Reflist\"] = 1,\n [\"Regression bar\"] = 1,\n [\"Rp\"] = 1,\n [\"Section link\"] = 1,\n [\"Sfn\"] = 14,\n [\"Short description\"] = 1,\n [\"Slink\"] = 14,\n [\"Statistics\"] = 1,\n [\"Sub\"] = 5,\n [\"TOC limit\"] = 1,\n [\"Tmath\"] = 37,\n [\"Weasel inline\"] = 1,\n [\"Wikiversity\"] = 1,\n [\"YouTube\"] = 1,\n}\narticle_whitelist = table#1 {\n}\nciteref_patterns = table#1 {\n}\ntable#1 {\n}\ntable#1 {\n}\n"},"cachereport":{"origin":"mw-web.codfw.main-b766959bd-b6l9t","timestamp":"20250214040838","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Logistic regression","url":"https:\/\/en.wikipedia.org\/wiki\/Logistic_regression","sameAs":"http:\/\/www.wikidata.org\/entity\/Q1132755","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q1132755","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2003-05-13T22:07:00Z","dateModified":"2025-02-09T16:46:25Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/c\/cb\/Exam_pass_logistic_curve.svg","headline":"statistical model"}</script> </body> </html>