0% found this document useful (0 votes)
28 views1 page

Question 1_ Simple Linear Regression_You are provided with a CSV file named `Advertising.csv`, containing four columns_ `TV`, `Radio`, `Newspaper`, and `Sales`. Your task is to perform a simple linear regressio (1)

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

Question 1_ Simple Linear Regression_You are provided with a CSV file named `Advertising.csv`, containing four columns_ `TV`, `Radio`, `Newspaper`, and `Sales`. Your task is to perform a simple linear regressio (1)

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

<p dir="auto">To perform a simple linear regression analysis to predict sales based

on advertising spending using the <code>TV</code> column as the independent


variable and <code>Sales</code> as the dependent variable, we can follow these
steps:</p>
<p dir="auto">a) Load the data from the CSV file and explore its contents:
We have provided a dataset with columns <code>TV</code>, <code>Radio</code>,
<code>Newspaper</code>, and <code>Sales</code>. For this analysis, we will focus on
the <code>TV</code> and <code>Sales</code> columns.</p>
<p dir="auto">b) Perform a simple linear regression analysis:
The simple linear regression model can be represented by the equation:
[ y = mx + b ]
where:</p>
<ul dir="auto">
<li>( y ) is the dependent variable (<code>Sales</code> in this case),</li>
<li>( x ) is the independent variable (<code>TV</code> in this case),</li>
<li>( m ) is the slope of the line (coefficient),</li>
<li>( b ) is the intercept.</li>
</ul>
<p dir="auto">c) Calculate and report the regression equation:
To find the regression equation, we need to fit a line to the data. This can be
done using statistical tools like Excel, Python, R, etc. Once the line is fitted,
the equation in the form ( y = mx + b ) can be obtained.</p>
<p dir="auto">d) Plot a scatter plot:
A scatter plot can be created with <code>TV</code> on the x-axis and
<code>Sales</code> on the y-axis. The data points can be plotted, and the
regression line can be overlaid on the plot.</p>
<p dir="auto">e) Calculate and report the R-squared value:
The R-squared (R2) value indicates the goodness of fit of the regression model. It
ranges from 0 to 1, where 1 indicates a perfect fit. The R-squared value can be
calculated based on the regression analysis results.</p>
<p dir="auto">f) Calculate and report the Mean Absolute Error (MAE):
The Mean Absolute Error (MAE) is a measure of the difference between two continuous
variables. It can be calculated as the average of the absolute errors between the
actual and predicted values.</p>
<p dir="auto">For the given dataset, once the regression analysis is performed, the
regression equation, scatter plot, R-squared value, and MAE can be reported to
understand the relationship between <code>TV</code> advertising spending and
<code>Sales</code>.</p>

You might also like