Nepedia
Back to Discover
Fluent Reader
🔢

Linear regression

math Maturity 11-13 Next article →

Imagine you want to see how one thing changes when another thing changes.

Linear regression
Linear regression

You might wonder how the height of a ball changes as it flies through the air. Linear regression is a mathematical way to find this link. It uses data to estimate the relationship between two types of variables. One is called the response variable, which is the thing you want to predict. The other is the explanatory variable, which helps you make that prediction.

Linear least squares example2
Linear least squares example2

This tool helps us understand how much one thing influences another.

To make this work, we look for a pattern in the data points. We assume there is a true relationship hidden under some random noise. This noise is called the error term, or sometimes just noise. It represents all the tiny, random things that affect the result but are not part of our main pattern.

Linear least squares example2
Linear least squares example2

When we use only one predictor, we call it simple linear regression. If we use many predictors at once, it is called multiple linear regression. The goal is to find the best mathematical function to map these points. This function helps us turn messy data into a clear signal.

In the past, linear regression was the first type of regression to be studied very carefully.

Galton's correlation diagram 1875
Galton's correlation diagram 1875

Scientists used it a lot in practical work. This is because these models are easier to fit than other kinds. It is also easier to figure out the math properties of the results. These models are linear in their unknown parameters. This means the parameters themselves are not raised to a high power. This makes the math much simpler for researchers to solve.

There are many ways to find the best fit for the data. One common way is called the least squares approach. This method tries to make the total error as small as possible.

Sometimes, data has large outliers, which are points that do not fit the pattern. In those cases, other methods like ridge regression or lasso might be used. These methods help manage the errors differently. Some models even focus on the median instead of the average. Choosing the right way to fit the model depends on the data you have.

We use these tools to solve real-world problems every day.

Anscombe's quartet 3
Anscombe's quartet 3

One main goal is to reduce error when we try to forecast the future. If we have a good model, we can predict new values we have not seen yet. Another goal is to explain why things change. We can see if a specific predictor is actually helpful or just redundant. We can even see if a predictor has no relationship with the response at all. This helps us understand the true strength of the links in our world.

453 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (5)
File:Linear least squares example2.svg
Linear least squares example2.svg
File:Anscombe's quartet 3.svg
Anscombe's quartet 3.svg
File:Linear regression.svg
Linear regression.svg
File:Galton's correlation diagram 1875.jpg
Galton's correlation diagram 1875.jpg
File:Thiel-Sen estimator.svg
Thiel-Sen estimator.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.