logistic regression
Given a binary respose variable with probability of success , the logistic regression is a non-linearregression model with the following model equation:
where is the product of the transpose
of the column matrix of explanatory variables and the unknown column matrix of regression coefficients.Rewriting this so that the right hand side is , we arrive at a newequation
The left hand side of this new equation is known as the logit function, defined on the open unit interval withrange the entire real line :
Note that the logit of is the same as the natural log of the odds of success (over failures) with the probability ofsuccess = .Since is a binary response variable, so it has a binomial distribution with parameter (probability of success), the logistic regression model equation can be rewritten as
(1) |
Logistic regression is a particular type of generalized linear model. In addition, the associated logit function isthe most appropriate and natural choice for a link function. By natural we mean that is equalto the natural parameter appearing in the distribution function for the GLM (generalized linear model). To seethis, first note that the distribution function for a binomial random variable
is
where is the number of trials and is the event that there are success in these trials. , theparameter, is the probability of success. Let there be iid binomial random variables eachcorresponding to trials with probability of success. Then the joint probability distribution of these random variables is simply the product of the individual binomial distributions. Equating this to the distribution forthe GLM, which belongs to the exponential family of distributions, we have:
Taking the natural log on both sides, we have the equality of log-likelihood function in two different forms:
Rearranging the left hand side and comparing term , we have
so that .
Next, setting the natural link function logit of the expected value of , which is , to the linear portion ofthe GLM, we have
giving us the model formula for the logistic regression.
Remarks.
- •
Comparing model equation for the logistic regression to that of the normal or Gaussian linear regression model, wesee that the difference is in the choice of link function. In normal liner model, the regression equation looks like
(2) The link function in this case is the identity function
. The model equation is consistent
because the linear terms onthe right hand side allow on the left hand side to vary over the reals. However, for a binaryresponse variable, Equation (2) would not be appropriate as the left hand side is restricted to only within the unitinterval, whereas the right hand side has the possibility of going outside of . Therefore, Equation (1) is moreappropriate when we are dealing with a binary response data variable.
- •
The logit function is not the only choice of link function for the logistic regression. Other, “non-natural”link functions are available. Two such examples are the probit function
, or the inverse
cumulative normal distributionfunction and the complimentary-log-log function . Both of these functions map the openunit interval to .