Skip to main content
HomeProbability & StatisticsIntroduction to Regression with statsmodels in Python

Introduction to Regression with statsmodels in Python

4.4+
34 reviews
Intermediate

Predict housing prices and ad click-through rate by implementing, analyzing, and interpreting regression analysis with statsmodels in Python.

Start Course for Free
4 Hours14 Videos53 Exercises
30,211 LearnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies


Course Description

Use Python statsmodels For Linear and Logistic Regression

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 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.

Discover How to Make Predictions and Assess Model Fit

You’ll start this 4-hour course by learning what regression is and how linear and logistic regression differ, learning how to apply both. Next, you’ll learn how to use linear regression models to make predictions on data while also understanding model objects.

As you progress, you’ll learn how to assess the fit of your model, and how to know how well your linear regression model fits. Finally, you’ll dig deeper into logistic regression models to make predictions on real data.

Learn the Basics of Python Regression Analysis

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. You’ll understand how to use Python statsmodels for regression analysis and be able to apply the skills to real-life data sets.
  1. 1

    Simple Linear Regression Modeling

    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
    A tale of two variables
    50 xp
    Which one is the response variable?
    50 xp
    Visualizing two numeric variables
    100 xp
    Fitting a linear regression
    50 xp
    Estimate the intercept
    50 xp
    Estimate the slope
    50 xp
    Linear regression with ols()
    100 xp
    Categorical explanatory variables
    50 xp
    Visualizing numeric vs. categorical
    100 xp
    Calculating means by category
    100 xp
    Linear regression with a categorical explanatory variable
    100 xp
  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

In the following tracks

Associate Data Scientist in PythonStatistics Fundamentals with Python

Collaborators

Collaborator's avatar
Amy Peterson
Collaborator's avatar
Maggie Matsui
Collaborator's avatar
Richie Cotton
Maarten Van den Broeck HeadshotMaarten Van den Broeck

Senior Content Developer at DataCamp

Maarten is an aquatic ecologist and teacher by training and a data scientist by profession. He is also a certified Power BI and Tableau data analyst. After his career as a PhD researcher at KU Leuven, he wished that he had discovered DataCamp sooner. He loves to combine education and data science to develop DataCamp courses. In his spare time, he runs a symphonic orchestra.
See More

Don’t just take our word for it

*4.4
from 34 reviews
68%
18%
6%
6%
3%
Sort by
  • Andreas P.
    about 1 month

    A great course with a clear speaker and some good examples. One issue: in part 2, it became a tad more complicated, it would be better if there was more time or more examples to explain prediction model elements more clearly. I particularly enjoyed part 4, with the measures of the confusion matrix.

  • Muhammad A.
    8 months

    Good course

  • Mauro B.
    9 months

    Great content that gave me the foundations to learn more advanced content.

  • Victor C.
    10 months

    Models, preprocessing, transformations, visualizations, and performance. It's perfect.

  • YU-PEI L.
    11 months

    Wonderful course

"A great course with a clear speaker and some good examples. One issue: in part 2, it became a tad more complicated, it would be better if there was more time or more examples to explain prediction model elements more clearly. I particularly enjoyed part 4, with the measures of the confusion matrix."

Andreas P.

"Good course"

Muhammad A.

"Great content that gave me the foundations to learn more advanced content."

Mauro B.

FAQs

Join over 13 million learners and start Introduction to Regression with statsmodels in Python today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.