An R Introduction to Statistics

Logistic Regression

fractal-12h We use the logistic regression equation to predict the probability of a dependent variable taking the dichotomy values 0 or 1. Suppose x1, x2, ..., xp are the independent variables, α and βk (k = 1, 2, ..., p) are the parameters, and E(y) is the expected value of the dependent variable y, then the logistic regression equation is:

                 ∑
E (y) = 1∕(1 +e- (α+  kβkxk))

For example, in the built-in data set mtcars, the data column am represents the transmission type of the automobile model (0 = automatic, 1 = manual). With the logistic regression equation, we can model the probability of a manual transmission in a vehicle based on its engine horsepower and weight data.

P (M anual Transmission) = 1∕(1+ e−(α+β1∗Horsepower+β2∗Weight))