Introduction to Regression with statsmodels in Python

Predict housing prices and ad click-through rate by implementing, analyzing, and interpreting regression analysis in Python.
Start Course for Free
4 Hours14 Videos53 Exercises2,281 Learners
4150 XP

Create Your Free Account

GoogleLinkedInFacebook
or
By continuing you accept the Terms of Use and Privacy Policy. You also accept that you are aware that your data will be stored outside of the EU and that you are above the age of 16.

Loved by learners at thousands of companies


Course Description

Linear regression and logistic regression are two of the most widely used statistical models. They act like master keys, unlocking the secrets hidden in your data. In this course, you’ll gain the skills you need to fit simple linear and logistic regressions. Through hands-on exercises, you’ll explore the relationships between variables in real-world datasets, including motor insurance claims, Taiwan house prices, fish sizes, and more. By the end of this course, you’ll know how to make predictions from your data, quantify model performance, and diagnose problems with model fit.

  1. 1

    Simple Linear Regression

    Free
    You’ll learn the basics of this popular statistical model, what regression is, and how linear and logistic regressions differ. You’ll then learn how to fit simple linear regression models with numeric and categorical explanatory variables, and how to describe the relationship between the response and explanatory variables using model coefficients.
    Play Chapter Now
  2. 2

    Predictions and model objects

    In this chapter, you’ll discover how to use linear regression models to make predictions on Taiwanese house prices and Facebook advert clicks. You’ll also grow your regression skills as you get hands-on with model objects, understand the concept of "regression to the mean", and learn how to transform variables in a dataset.
    Play Chapter Now
  3. 3

    Assessing model fit

    In this chapter, you’ll learn how to ask questions of your model to assess fit. You’ll learn how to quantify how well a linear regression model fits, diagnose model problems using visualizations, and understand each observation's leverage and influence to create the model.
    Play Chapter Now
  4. 4

    Simple logistic regression

    Learn to fit logistic regression models. Using real-world data, you’ll predict the likelihood of a customer closing their bank account as probabilities of success and odds ratios, and quantify model performance using confusion matrices.
    Play Chapter Now
Datasets
Customer churn dataTaiwan real estate dataAd conversion dataS&P 500 dataFish measurement data
Collaborators
Richie CottonMaggie MatsuiAmy Peterson
Maarten Van den Broeck Headshot

Maarten Van den Broeck

Content Developer at DataCamp
Maarten is an aquatic ecologist and teacher by training and a data scientist by profession. After his career as a Ph.D. researcher at KU Leuven, he wished that he had discovered DataCamp sooner. He loves to combine education and data science to develop DataCamp courses.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA