Chapter 12
Probability Meets Regression: Logistic Regression
IN THIS CHAPTER
Understanding logistic regression
Working with logistic regression
Picturing the results
In this chapter, I explore a type of regression that’s different from any regression analysis I discuss in Chapters 6 and 8 of Book 3. The regression you may have already heard about involves a continuous dependent variable whose value you predict from a continuous independent variable (or from a set of independent variables). You make that prediction on the basis of data on each independent variable.
In this new-and-different type of regression, the dependent variable is the probability of a “success” of a binary event — like, say, if a person decides to buy a product (success) or not (failure) after spending some time looking at an ad for the product. “Time spent looking at the ad” is the independent variable.
The goal is to estimate the probability of buying the product based on how much time the person looks at the ad. The dependent variable is continuous, and because it’s probability, it has a minimum value of 0 and a maximum value of 1. (See Chapter 11 of Book 3.)
This is called logistic regression.
As with ...
Get R All-in-One For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.