198k views
1 vote
The table below represents the closing prices of stock ABC for the last five days. Using your calculator, what is the equation of linear regression that fits these data? A. y=-0.272x + 22.319 B. y=-0.311x + 19.213 C. y=-0.297x+ 20.671 D. y= 289x + 21.459

The table below represents the closing prices of stock ABC for the last five days-example-1

1 Answer

5 votes

Given the table:

Day Value

1 20.71

2 19.69

3 19.61

4 19.64

5 19.26

Given that the table represents the closing prices of stock ABC, let's find the equation of the linear regression that fits the data.

Where:

n(number of data) = 5

Apply the slope intercept form of a linear equation:

y = mx + b

Where m is the slope and b is the y-intercept

Let's find the sum of the x-values (Days)

1 + 2 + 3 + 4 + 5 = 15

Also, sum up the y-values:

20.71 + 19.69 + 19.61 + 19.64 + 19.26 = 98.91

Sum of the products of the values of x and y.

We have:


\begin{gathered} \sum ^{}_{}xy=(1\ast20.71)+(2\ast19.69)+(3\ast19.61)+(4\ast19.64)+(5\ast19.26) \\ \\ \sum ^{}_{}xy=293.78 \end{gathered}

Sum up the values of the square of x


\begin{gathered} \sum ^{}_{}x^2=1^2+2^2+3^2+4^2+5^2 \\ \\ \sum ^{}_{}x^2=55 \end{gathered}

Sum up the values of the square of y:


\begin{gathered} \sum ^{}_{}y^2=20.71^2+19.69^2+19.61^2+19.64^2+19.26^2 \\ \\ \sum ^{}_{}y^2=1957.83 \end{gathered}

Let's find the slope, m:


\begin{gathered} m=\frac{n(\sum^{}_{}xy)-\sum^{}_{}x\sum^{}_{}y}{n(\sum^{}_{}x^2)-(\sum^{}_{}x)^2} \\ \\ m=(5(293.8)-(15)(98.91))/(5(55)-(15)^2) \\ \\ m=-0.297 \end{gathered}

To find the y-intercept (b), apply the formula:


b=\frac{(\sum ^{}_{}y)(\sum ^{}_{}x^2)-\sum ^{}_{}x\sum ^{}_{}xy}{n(\sum ^{}_{}x^2)-(\sum ^{}_{}x)^2}

Thus, we have:


\begin{gathered} b=((98.91)(55)-15\ast293.8)/(5(55)-(15)^2) \\ \\ \text{ b=}20.671 \end{gathered}

Substitute -0.297 for m and 20.671 for b in the slope-intercept form:

y = mx + b

Therefore, the equation of the linear regression for this data is:

y = -0.297x + 20.671

ANSWER:

C. y = -0.297x + 20.671

User Sherif Buzz
by
5.0k points