Correlation and regression with Minitab Word Document

advertisement
14.5.5
Correlation and Regression with Minitab
During this tutorial you will learn how to use Minitab to investigate the association
between two continuous variables and how to describe it graphically
In this practical session you will analyse the some bivariate data.
1 To enter the data:
File / Open Worksheet / Merlin1 (saved in the ANOVA worksheet, 14.5.1)
In order to see what this file contains: Open the Information window; Window / Info. This
window gives details of the data stored in the file merlin4.mtw which you are going to
analyse.
We shall give each of the cases a salary, in £’000, and then see if it is associated with their
age.
In the first empty column: name the variable Salary, in £’000, and type the following in
one column: (Work down these columns one after the other)
38.1
18.7
42.3
25.9
53.6
37.6
38.9
42.8
60.1
60.7
75.2
10.9
23.2
19.6
15.5
20.7
40.2
28.5
22.9
47.5
15.8
35.9
25.3
63.2
19.8
31.3
59.3
33.8
24.5
32.0
19.7
8.5
15.9
39.3
14.5
10.2
15.6
28.5
37.3
32.9
23.9
8.6
31.7
14.1
20.3
19.8
28.2
25.3
17.3
33.5
13.7
6.4
35.3
12.5
37.8
32.9
9.8
15.2
8.7
38.4
The variables of interest in this practical session are the continuous variables SALARY
and AGE. We shall investigate the relationship between the Salaries earned by the
employees of Merlin and their ages.
2 Save revised worksheet as Merlin5.mtw
3 Produce a Scatterplot to see if there appears to be a relationship?
Graph / Scatterplot / Simple Select SALARY for Y and AGE for X
 Examine the plot. Does it suggest a linear relationship?
............
4 Calculate the correlation coefficient.
Stat / Basic Statistics / Correlation Select SALARY and AGE as the variables.

What is the value of the correlation coefficient? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

What is the probability of it being zero?

Is this significant at 5%?
................................
..............................
1
If the p value is less than 0.05 the correlation coefficient is significant at the 5% level of
significance.
5 Find the regression equation:
Stat / Regression / Regression Select SALARY for Response, AGE for Predictors.

Write down the regression equation
..............................
The last output was for the default setting. Minitab can calculate and store the fitted
values and the standardised residuals for each observation.
Edit / Edit Last Dialog The last dialogue box reopens.
Under Storage select Residuals, Standardised residuals and Fits.
OK and check that three new columns have been added to your worksheet.
6 Save this altered version of your file at this stage under a new name Merlin6
File / Save Worksheet as Merlin6
7 Investigate the Fitted values:
Graph / Scatterplot Select FITS1 as the Y-variable and AGE as the X-variable.
This produces a straight line as all the fitted values lie on the regression line.
To fit this line to a scatterplot requires a graphics plot:
Graph / Scatterplot / With regression SALARY against AGE as before.
8 To print this graph which will not appear in your Session file:
File / Print Graph
9 To predict a Y-value for a given X-value, a 40 year old:
Stat / Regression / Regression
Select SALARY and AGE as before and then select Options.
Type 40 in the Prediction intervals for new observations.
2
The output gives the predicted value for y when x is 40 with a confidence interval and
prediction interval for this predicted y-value.

What is the predicted salary of a 40 year old employee?
............
10 To produce the regression line with its confidence interval and prediction interval:
Stat / Regression / Fitted Line Plot / Options: Display Confidence and Prediction bands.
Select SALARY and AGE as before. Print this window as before.
11 Print your session and/or graphs if required.
3
Download