Skip to main content
HomeProbability & StatisticsIntroduction to Linear Modeling in Python

Introduction to Linear Modeling in Python

Explore the concepts and applications of linear models with python and build models to describe, predict, and extract insight from data patterns.

Start Course for Free
4 Hours16 Videos59 Exercises
22,291 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

One of the primary goals of any scientist is to find patterns in data and build models to describe, predict, and extract insight from those patterns. The most fundamental of these patterns is a linear relationship between two variables. This course provides an introduction to exploring, quantifying, and modeling linear relationships in data, by demonstrating techniques such as least-squares, linear regression, estimatation, and bootstrap resampling. Here you will apply the most powerful modeling tools in the python data science ecosystem, including scipy, statsmodels, and scikit-learn, to build and evaluate linear models. By exploring the concepts and applications of linear models with python, this course serves as both a practical introduction to modeling, and as a foundation for learning more advanced modeling techniques and tools in statistics and machine learning.
  1. 1

    Exploring Linear Trends

    Free

    We start the course with an initial exploration of linear relationships, including some motivating examples of how linear models are used, and demonstrations of data visualization methods from matplotlib. We then use descriptive statistics to quantify the shape of our data and use correlation to quantify the strength of linear relationships between two variables.

    Play Chapter Now
    Introduction to Modeling Data
    50 xp
    Reasons for Modeling: Interpolation
    100 xp
    Reasons for Modeling: Extrapolation
    100 xp
    Reasons for Modeling: Estimating Relationships
    100 xp
    Visualizing Linear Relationships
    50 xp
    Plotting the Data
    100 xp
    Plotting the Model on the Data
    100 xp
    Visually Estimating the Slope & Intercept
    100 xp
    Quantifying Linear Relationships
    50 xp
    Mean, Deviation, & Standard Deviation
    100 xp
    Covariance vs Correlation
    100 xp
    Correlation Strength
    100 xp
  2. 2

    Building Linear Models

    Here we look at the parts that go into building a linear model. Using the concept of a Taylor Series, we focus on the parameters slope and intercept, how they define the model, and how to interpret the them in several applied contexts. We apply a variety of python modules to find the model that best fits the data, by computing the optimal values of slope and intercept, using least-squares, numpy, statsmodels, and scikit-learn.

    Play Chapter Now
  3. 3

    Making Model Predictions

    Next we will apply models to real data and make predictions. We will explore some of the most common pit-falls and limitations of predictions, and we evaluate and compare models by quantifying and contrasting several measures of goodness-of-fit, including RMSE and R-squared.

    Play Chapter Now

Datasets

Femur length versus body heightDistance hiked versus hike durationGalaxy distances versus recession velocitiesSea surface height versus yearMass versus volume of solution

Collaborators

Collaborator's avatar
Nick Solomon
Collaborator's avatar
Adrián Soto
Jason Vestuto HeadshotJason Vestuto

Data Scientist, University of Texas at Austin

Jason Vestuto started life as a musician and later studied physics and taught himself to code to survive. Along the way, he has completed a couple of degrees in physics, and another in science education, and discovered that he learns best by trying to teach others. Presently, he works within the Space and Geophysics Lab of the University of Texas at Austin, as a python developer and data scientist focused on GPS satellite navigation and signal processing.
See More

What do other learners have to say?

Join over 13 million learners and start Introduction to Linear Modeling 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.