What is linear regression and where is it used ?

1.46K views

Wasn’t sure whether to use the flair for maths,economics or others(for statistics)

In: Mathematics

2 Answers

Anonymous 0 Comments

Basicly it is one of the easiest way to describe mathematic connections between values, using a linear expression (in contrast to exponential,…).
Example: you go in every store and buy a bunch of bananas you could look for an connection between price and amount. 1 banana=1dollar, 5 banans=6 dollar, 10 bananas=8 dollars. And the linear regression is the rounded price per banana e.g. over all stores you visited. Linear expressions could in this example very easyly be presentet as a table.

Anonymous 0 Comments

Linear regression is a way of modeling some true relationship between random variables using limited observed data, assuming that the true relationship has a linear form. To break that down:

* We have some outcome Y and some input X

* We want to know what Y does if X changes

* We do not know exactly how that happens, but we assume that if X changes by some amount, Y changes proportionally

* This looks like a straight line on the graph of Y versus X

So if we have a bunch of observations — say, people who answered a survey — and we have two variables X and Y — say income and happiness — we want to know if someone’s income is related to their happiness. Everyone reports income and happiness in slightly different amounts (and let’s say this is in dollars and a 1-100 happiness scale). We propose that the relationship

**Y** = a + b**X** + e

is what that looks like, where a is some baseline happiness and e is just the random difference between each observation and what we estimate the relationship to be.

We then choose an estimator to solve for — Ordinary Least Squares is very common — and solve an optimization problem — which is to say we find where the estimates (a, b) produce a line that is simultaneously as close as possible to all pairs of (x,y) in our observed data. This gives us the estimated values of a, b, lets us further calculate e, and can be manipulated to yield other useful things like measures of error in our new line.

Using the values and the error information, we can make statements like Y changes b*X amount for a change in X” and “We can be confident that this statement is not false <%> of the times that we would make it given additional data”.

Linear regression can take various estimators depending on the available data, and there is much more to figuring out whether our model is good or not. It also extends into situations where we have more than just X, Y — for example if we had X1, X2, X3,…Xn we could solve for our estimators for each of the corresponding b1, b2, etc.

Regression is an integral part of basic statistical analysis of data, as it helps us gain insight into how different variables are related — or if they are unrelated, or if we don’t have enough information to tell. It’s important to note that regression can only tell us about causality (“If X changes, it caused Y to change”) under very specific circumstances — and there is still plenty of ambiguity in statistics and social sciences especially about what those exact circumstances are.