Can someone work this out for me, so I can use as an example to do the other ones.

Does it pay to study for an exam? The number of hours studied, x, is compared to the exam grade received, y.

x 4 4 6 1 1
y 75 90 95 60 80

(a) Find the equation for the line of best fit. (Give your answers correct to two decimal places.)
yhat = + x
I have done it three times and submitted with the answers coming up wrong....need example to go by

yhat = 64.68 + 4.79x

To find the equation for the line of best fit, you need to calculate the slope and y-intercept using the given data points.

Step 1: Calculate the means:
- Find the mean of x values: (4 + 4 + 6 + 1 + 1) / 5 = 16 / 5 = 3.2
- Find the mean of y values: (75 + 90 + 95 + 60 + 80) / 5 = 400 / 5 = 80

Step 2: Calculate the differences:
- Subtract the mean of x from each x value and create a new column: [4 - 3.2, 4 - 3.2, 6 - 3.2, 1 - 3.2, 1 - 3.2] = [0.8, 0.8, 2.8, -2.2, -2.2]
- Subtract the mean of y from each y value and create a new column: [75 - 80, 90 - 80, 95 - 80, 60 - 80, 80 - 80] = [-5, 10, 15, -20, 0]

Step 3: Calculate the products:
- Multiply the differences of x and y for each row and create a new column: [0.8 * -5, 0.8 * 10, 2.8 * 15, -2.2 * -20, -2.2 * 0] = [-4, 8, 42, 44, 0]

Step 4: Calculate the squared differences:
- Square each difference of x and create a new column: [0.8^2, 0.8^2, 2.8^2, -2.2^2, -2.2^2] = [0.64, 0.64, 7.84, 4.84, 4.84]

Step 5: Calculate the slope:
- Sum up the products column: -4 + 8 + 42 + 44 + 0 = 90
- Sum up the squared differences column: 0.64 + 0.64 + 7.84 + 4.84 + 4.84 = 18.8
- Divide the sum of the products by the sum of the squared differences: 90 / 18.8 = 4.79 (rounded to two decimal places)

Step 6: Calculate the y-intercept:
- Use the formula y = mx + b, where m is the slope (4.79) and (x, y) is any point on the line (using the mean of x and y):
80 = 4.79 * 3.2 + b
80 = 15.328 + b
b = 80 - 15.328 = 64.672 (rounded to two decimal places)

Therefore, the equation for the line of best fit is:
yhat = 64.672 + 4.79x