0% found this document useful (0 votes)
94 views14 pages

Simple Linear Regression Examples

The document provides examples of simple linear regression from real life situations and their solutions. Simple linear regression explains the correlation between two variables: an independent and dependent variable. Examples given include the relationship between monthly e-commerce sales and online advertising costs using data from seven online stores. The regression equation and a scatter plot graph are presented to analyze the linear relationship between the two variables.

Uploaded by

ameera k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views14 pages

Simple Linear Regression Examples

The document provides examples of simple linear regression from real life situations and their solutions. Simple linear regression explains the correlation between two variables: an independent and dependent variable. Examples given include the relationship between monthly e-commerce sales and online advertising costs using data from seven online stores. The regression equation and a scatter plot graph are presented to analyze the linear relationship between the two variables.

Uploaded by

ameera k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

HOME DATA SCIENCE AI MARKETING MANAGEMENT

BUSINESS INTELLIGENCE

HOME DATA SCIENCE AI MARKETING MANAGEMENT

BUSINESS INTELLIGENCE

RELATED POSTS
Simple Linear Secondary

Regression Examples Data:

Advantages,
Many of simple linear regression examples Disadvantages,
(problems and solutions) from the real life Sources, Types
can be given to help you understand the Real-life
core meaning.
Applications of Deep
From a marketing or statistical research to
Learning AI
data analysis, linear regression model have
6 Types of
an important role in the business. Data in
Statistics
&…

Qualitative
vs
Study in Canada Quantitative
Canada Education Fair - Meet University & College Data: Definitions,
Officials.
Analysis, Examples
Canam | Study Abroad 
https://www.intellspot.com/linear-regression-examples/ 1/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

Considerations before
designing an API for
your …

MATCHED
CONTENT

As the simple linear regression equation


explains a correlation between 2 variables
(one independent and one dependent
variable), it is a basis for many analyses and
predictions. Apart from business and data-
driven marketing, LR is used in many other
areas such as analyzing data sets in statistics,
biology or machine learning projects and etc.

On this page:

Simple linear regression examples:


problems with solutions.
Infographic in PDF

In our previous post linear regression


models, we explained in details what is
simple and multiple linear regression. Here,


https://www.intellspot.com/linear-regression-examples/ 2/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

we concentrate on the examples of linear


regression from the real life.

SIMPLE LINEAR REGRESSION


EXAMPLES, PROBLEMS, AND
SOLUTIONS
Simple linear regression allows us to study
the correlation between only two variables:

One variable (X) is called independent


variable or predictor.
The other variable (Y), is known as
dependent variable or outcome.

and the simple linear regression equation is:

Y = Β0 + Β1X

Where:

X – the value of the independent variable,


Y – the value of the dependent variable.
Β0 – is a constant (shows the value of Y when
the value of X=0)
Β1 – the regression coefficient (shows how
much Y changes for each unit change in X)

Example 1:


https://www.intellspot.com/linear-regression-examples/ 3/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

You have to study the relationship between


the monthly e-commerce sales and the
online advertising costs. You have the survey
results for 7 online stores for the last year.

Your task is to find the equation of the


straight line that fits the data best.

The following table represents the survey


results from the 7 online stores.

Online Monthly E- Online Advertising


Store commerce Sales Dollars (1000 s)
(in 1000 s)

1 368 1.7

2 340 1.5

3 665 2.8

4 954 5

5 331 1.3

6 556 2.2

7 376 1.3

We can see that there is a positive


relationship between the monthly e-
commerce sales (Y) and online advertising
costs (X).


https://www.intellspot.com/linear-regression-examples/ 4/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

 The positive correlation means that the


values of the dependent variable (y)
increase when the values of the
independent variable (x) rise.

So, if we want to predict the monthly e-


commerce sales from the online advertising
costs, the higher the value of advertising
costs, the higher our prediction of sales.

We will use the above data to build our


Scatter diagram.

Now, let’ see how the Scatter


diagram looks like:
Diagram 1:

The Scatter plot shows how much one


variable affects another. In our example,
above Scatter plot shows how much online

https://www.intellspot.com/linear-regression-examples/ 5/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

advertising costs affect the monthly e-


commerce sales. It shows their correlation.

Let’s see the simple linear regression


equation.

Y = Β0 + Β1X

Y= 125.8 + 171.5*X

Note: You can find easily the values for Β0 and


Β1 with the help of paid or free statistical
software, online linear regression calculators
or Excel. All you need are the values for
the independent (x) and dependent (y)
variables (as those in the above table).

Now, we have to see our regression line:

Graph of the Regression Line:

Diagram 2

Linear regression aims to find the best-fitting


straight line through the points. The best-

https://www.intellspot.com/linear-regression-examples/ 6/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

fitting line is known as the regression line.

If data points are closer when plotted to


making a straight line, it means the
correlation between the two variables is
higher. In our example, the relationship is
strong.

The orange diagonal line in diagram 2 is the


regression line and shows the predicted
score on e-commerce sales for each
possible value of the online advertising costs.

Interpretation of the results:

The slope of 171.5 shows that each increase


of one unit in X, we predict the average of Y
to increase by an estimated 171.5 units.

The formula estimates that for each increase


of 1 dollar in online advertising costs, the
expected monthly e-commerce sales are
predicted to increase by $171.5.

This was a simple linear regression example


for a positive relationship in business. Let’s
see an example of the negative relationship.

Example 2:


https://www.intellspot.com/linear-regression-examples/ 7/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

You have to examine the relationship


between the age and price for used cars sold
in the last year by a car dealership company.

Here is the table of the data:

Car Age (in years) Price (in dollars)

4 6300

4 5800

5 5700

5 4500

7 4500

7 4200

8 4100

9 3100

10 2100

11 2500

12 2200

Now, we see that we have a negative


relationship between the car price (Y) and
car age(X) – as car age increases, price
decreases.

When we use the simple linear regression


equation, we have the following results:

https://www.intellspot.com/linear-regression-examples/ 8/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

Y = Β0 + Β1X

Y = 7836 – 502.4*X

Let’s use the data from the table and create


our Scatter plot and linear regression line:

Diagram 3:

The above 3 diagrams are made with Meta


Chart.

Result Interpretation:

With an estimated slope of – 502.4, we can


conclude that the average car price


https://www.intellspot.com/linear-regression-examples/ 9/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

decreases $502.2 for each year a car


increases in age.

The above simple linear regression examples


and problems aim to help you understand
better the whole idea behind simple linear
regression equation.

Problem-solving using linear regression has


so many applications in business, digital
customer experience, social, biological, and
many many other areas.

If you need more examples in the field of


statistics and data analysis or more data
visualization types, our posts “descriptive
statistics examples” and “binomial
distribution examples” might be useful to
you.

https://www.intellspot.com/linear-regression-examples/ 10/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

Download the following infographic in PDF with


the simple linear regression examples:


https://www.intellspot.com/linear-regression-examples/ 11/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

About The Author


Silvia Valcheva
Silvia Valcheva is a digital
marketer with over a decade of
experience creating content for
the tech industry. She has a strong passion
for writing about emerging software and
technologies such as big data, AI (Artificial
Intelligence), IoT (Internet of Things), process
automation, etc.

3 Comments
pepe
Hi. I really enjoy your article,
seems to me that it can help to
many students in order to improve
their skills.
Thanks,
Reply

Silvia Valcheva
I hope so!
Thanks!
Reply

shivam
solved perfectly, great article
Reply


https://www.intellspot.com/linear-regression-examples/ 12/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

Leave a Reply

Comment Text*

Name*

Email*

Website

Post Comment

This site uses Akismet to reduce spam. Learn


how your comment data is processed.

ABOUT INTELLSPOT MENU ADDITIONAL

Intellspot.com is one hub for Home Privacy Policy


everyone involved in the data Data Science Contacts
space – from data scientists to
AI
marketers and business managers.
Here you will find in-depth articles, Marketing
real-world examples, and top Management
software tools to help you use Business Intelligence
data potential.


https://www.intellspot.com/linear-regression-examples/ 13/14
05/09/2023, 15:59 Simple Linear Regression Examples: Real Life Problems & Solutions

The form collects name and email so


that we can add you to our newsletter
list for project updates.

Blog For Data-Driven Business Copyright © 2023.


https://www.intellspot.com/linear-regression-examples/ 14/14

You might also like