Question

In: Statistics and Probability

6.) The ages and annual salaries of 10 electrical engineers in the city of Ogdenville are...

6.) The ages and annual salaries of 10 electrical engineers in the city of Ogdenville are listed below.

Age Annual Salary in $1,000's
24 64
26 67
31 76
32 79
39 84
40 83
44 87
48 91
51 96
55 102

A.) Compute the least-squares regression line for this data set, where Age will be your explanatory variable. Make sure to write down the code you entered into RStudio to help you construct your least-squares regression line. What does the slope represent in your least-squares regression line?

B.) Your friend, Lenny Leonard, is 43 years old electrical engineer and he just moved into the Ogdenville area. He wants to know what his salary would roughly be in Ogdenville. Use the least-square regression line you constructed in Part A.) to determine his salary. Make sure to round your answer to the nearest thousand dollars.

C.)Your other friend, Hans Moleman, is 76 years old and is still working as an electrical engineer and also just moved into the Ogdenville area. Hans would like to know what his salary would roughly be in Ogdenville. Would it be appropriate to use the least-squares regression line you constructed in Part A.) to compute his salary? If yes, then please find it and round your answer to the nearest thousand dollars. If not, please explain why  

Solutions

Expert Solution

Solution:

Given that, the ages and annual salaries of 10 electrical engineers in the city of Ogdenville and we have to compute the least square regression line for this data set.

We have fitting the regression line in R studio

# Defining the data

 > Age = c(24,26,31,32,39,40,44,48,51,55) > Salary = c(64,67,76,79,84,83,87,91,96,102) > df = data.frame(Age,Salary) > df  Age Salary 1 24 64 2 26 67 3 31 76 4 32 79 5 39 84 6 40 83 7 44 87 8 48 91 9 51 96 10 55 102 a) # Fitting the Least square regression line > mod = lm(Salary ~ Age, data = df) > summary(mod)  Call: lm(formula = Salary ~ Age, data = df) Residuals: Min 1Q Median 3Q Max -2.1988 -1.4567 -0.6372 1.2391 3.8939 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 39.47692 2.67797 14.74 4.41e-07 *** Age 1.11341 0.06649 16.75 1.64e-07 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 2.117 on 8 degrees of freedom Multiple R-squared: 0.9723,       Adjusted R-squared: 0.9688 F-statistic: 280.5 on 1 and 8 DF, p-value: 1.636e-07

From the regression output the least square regression line is given by:

Salary = 39.4769 + 1.1134*Age

Here, the slope is 1.1134, this means that if age is increases by 1 unit than on average salary is increases by 1.1134 unit.(in $1,000's ).

b) Given that, my friend, Lenny Leonard, is 43 years old electrical engineer and he just moved into the Ogdenville area. He wants to know what his salary would roughly be in Ogdenville.

So age = 43

> df1 = data.frame(Age = 43)

> predict(mod,newdata = df1)

 1 87.35365 

Hence, the salary of my friend would roughly be $87000 in Ogdenville.

C) Given that, my other friend, Hans Moleman, is 76 years old and is still working as an electrical engineer and also just moved into the Ogdenville area. Hans would like to know what his salary would roughly be in Ogdenville.

The regression line computed in part A is

Salary = 39.4769 + 1.1134*Age

Since, the R square value is 0.9723 which is close to 1, this means the given model is appropriate to compute his salary

 > df2 = data.frame(Age =76 ) > predict(mod,newdata = df2)  1 124.0963 

Hence, the salary of my other friend would roughly be $124000 in Ogdenville.


Related Solutions

1. Who are electrical engineers professionally or ethically responsible to?
  Ethics and professional responsibility: 1. Who are electrical engineers professionally or ethically responsible to? 2. What are some of the responsibilities that electrical engineers have to these groups? 3. What pressures exist to tempt an electrical engineer to neglect their professional and ethical responsibilities? 4. What problems might result from diligently fulfilling your professional and ethical responsibilities in your work? 5. What problems might result from neglecting your professional and ethical responsibilities in your work? 6. Is it important...
Listed below are the top 10 annual salaries (in millions of dollars) of TV personalities.
Listed below are the top 10 annual salaries (in millions of dollars) of TV personalities. Find the range, variance, and standard deviation for the sample data. Given that these are the top 10 salaries, do we know anything about the variation of salaries of TV personalities in general? 39     37     35     28     20     19     17     16     15.5    14.9The range of the sample data is $ million. (Type an integer or a decimal.)The variance of the sample data is (Round to...
Are nursing salaries in City A lower than those in City B? As reported by a...
Are nursing salaries in City A lower than those in City B? As reported by a newspaper, salary data show staff nurses in City A earn less than staff nurses in City B. Suppose that in a follow-up study of 40 staff nurses in City A and 50 staff nurses in City B you obtain the following results. Assume population variances are unknown and unequal. City A City B n1 = 40 n2 = 50 x1 = $56,300 x2 =...
Are nursing salaries in City A lower than those in City B? As reported by a...
Are nursing salaries in City A lower than those in City B? As reported by a newspaper, salary data show staff nurses in City A earn less than staff nurses in City B. Suppose that in a follow-up study of 40 staff nurses in City A and 50 staff nurses in City B you obtain the following results. City A City B n1 = 40 n2 = 50 x1 = $56,500 x2 = $59,500 s1 = $6,000 s2 = $7,000...
Are nursing salaries in City A lower than those in City B? As reported by a...
Are nursing salaries in City A lower than those in City B? As reported by a newspaper, salary data show staff nurses in City A earn less than staff nurses in City B. Suppose that in a follow-up study of 40 staff nurses in City A and 50 staff nurses in City B you obtain the following results. Assume population variances are unknown and unequal. City A City B n1 = 40 n2 = 50 x1 = $56,300 x2 =...
Listed below are the top 10 annual salaries​ (in millions of​dollars) of TV personalities. Find the​...
Listed below are the top 10 annual salaries​ (in millions of​dollars) of TV personalities. Find the​ range, variance, and standard deviation for the sample data. Given that these are the top 10​ salaries, do we know anything about the variation of salaries of TV personalities in​ general? 41  40  38  32  22  18  16  12  11.6 10.7 The range of the sample data is ​$ nothing million. ​ (Type an integer or a​ decimal.) T he variance of the sample...
Listed below are the top 10 annual salaries​ (in millions of​ dollars) of TV personalities. Find...
Listed below are the top 10 annual salaries​ (in millions of​ dollars) of TV personalities. Find the​ range, variance, and standard deviation for the sample data. Given that these are the top 10​ salaries, do we know anything about the variation of salaries of TV personalities in​ general? 38     37     36     29     19     15     13     9     8.9     7.4 The range of the sample data is ​$ __ million. ​(Type an integer or a​ decimal.) The variance of the sample data...
Listed below are the top 10 annual salaries​ (in millions of​ dollars) of TV personalities. Find...
Listed below are the top 10 annual salaries​ (in millions of​ dollars) of TV personalities. Find the​ range, variance, and standard deviation for the sample data. Given that these are the top 10​ salaries, do we know anything about the variation of salaries of TV personalities in​ general? 40     38     36     29     17     14     11     10     9.6     8.4
Listed below are the top 10 annual salaries​ (in millions of​ dollars) of TV personalities. Find...
Listed below are the top 10 annual salaries​ (in millions of​ dollars) of TV personalities. Find the​ range, variance, and standard deviation for the sample data. Given that these are the top 10​ salaries, do we know anything about the variation of salaries of TV personalities in​ general? 41 39 38 30 22 19 17 15 14.9 13.8 The range of the sample data is $ million. ​(Type an integer or a​ decimal.) The standard deviation of the sample data...
Listed below are the top 10 annual salaries​ (in millions of​ dollars) of TV personalities. Find...
Listed below are the top 10 annual salaries​ (in millions of​ dollars) of TV personalities. Find the​ range, variance, and standard deviation for the sample data. Given that these are the top 10​ salaries, do we know anything about the variation of salaries of TV personalities in​ general? 40     38     37     30     19     15     12     9     8.9     8.0 The range of the sample data is ​$------million.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT