Regression Analysis > Linear Relationship

## What is a Linear Relationship?

A linear relationship means that you can represent the relationship between two sets of variables with a *line* (the word “linear” literally means “a line”). In other words, a linear line on a graph is where you can see a straight line with no curves.

## Linear Equations

If a set of data is linearly related, you can show that relationship using a linear equation. A linear equation has the form:

**y = mx + b**

Where:

“m” is the slope of the line,

“x” is any point (an input or x-value) on the line,

and “b” is where the line crosses the y-axis.

Y = mx + b is sometimes called the Slope Formula.

## Positive and Negative Linear Relationships

- If a straight line on a graph travels
**upwards**from left to right, it has a**positive**linear relationship. It shows a steady rate of increase. - If a straight line on a graph travels
**downwards**from left to right, it has a**negative**linear relationship. It shows a steady rate of decrease.

## Determining Linear Relationships from Data

If you have a set of data and you want to find out if the data has a perfectly linear relationship, you could make a scatter plot and draw a line through the dots. If all of the dots are on the line, you have a perfect relationship.

If you have a very large data set, you may not want to make a scatter plot of your data, as large numbers of dots can clutter up your graph. In this case, you may want to consider figuring out the correlation coefficient, which is a mathematical measure of how linearly related your variables are.

**Next**: Pearson’s Correlation Coefficient.

**Need help with a homework or test question?** Chegg offers 30 minutes of free tutoring, so you can try them out before committing to a subscription. Click here for more details.

If you prefer an **online interactive environment** to learn R and statistics, this *free R Tutorial by Datacamp* is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try *this Statistics with R track*.

*Facebook page*.