In: Math
A personnel specialist with a large accounting firm is interested in determining the effect of seniority on hourly wages for secretaries. She selects at random 10 secretaries and compares their years with the company (X) and hourly wages (Y).
x | y |
0 | 12 |
2 | 13 |
3 | 14 |
6 | 16 |
5 | 15 |
3 | 14 |
4 | 13 |
1 | 12 |
1 | 15 |
2 | 15 |
Use excel to calculate the fitting of linear regression equation of line
the excel path is as follows ;
Menu ------>Excel-----> Enter the data in the excel of the variable x and y -------> data ----------->data analysis------>regression -----> ok-------> Input Y Range ( select the data from the excel of the variable Y ) ------->input X Range ( select the data of the variable X from the excel )--------> click on the labels ------>Output Range ( select a blank box in the excel )----------> ok.
The excel gives the following output as follows :
HERE the intercept = = 12.664
and the slope is = = 0.4579
hence the fitted regression line for the data is ,
y = + * ( x )
hence the regression line fit for the data is ,
y = 12.664 + 0.4579 * ( x )
b ) here Hourly Wages are the dependent variable
and year with the company ( x ) is the independent variable .
so we want to predict the hourly wages , so use the when x = 4
so use the fitted regression line ,
y = 12.664 + 0.4579 * ( x )
y = 12.664 + 0.4579 * ( 4 )
y = 12.664 + 1.831772sy = 14.4953 = 15
so hourly wage of a secretary that has been with the company for four years is 15 .
c ) coefficient of determination is denoted by r2 , so here in this example ,
coefficient of determination = r2 = 0.3983 .
Interpretation : r2 = 0.3983 this mean that 39.81% of the variation in depedent variable (Hourly Wages ) has been explain by the indepedent variable ( years with the company ).