Math 321, Lab 3: Basic Linear Regression
Spring 2009, L. Peterson
You may work in groups on this assignment, but each student should use
a separate computer and hand in a separate set of papers. The sheets
that you hand in must contain your name only. If you have trouble,
talk to a friend, talk to the lab attendant, or come to see me. You
may wish to bring your textbook with you to the lab, since the
instructions will refer to Figure 3.11 on page 121 of your
textbook. If you are not thoroughly familiar with the MINITAB
program, you should also bring the previous handout "Math 321
Computer Lab Guidelines." If you forget your book, you should still
be able to do this lab, however. Detailed instructions follow.
- Start MINITAB. Instructions for doing this are available in my
"Math 321 Computer Lab Guidelines" handout. This handout is
available in my office (as long as the supply lasts) as well as on my
Web site (http://www.und.nodak.edu/instruct/lapeters).
- We begin by typing in some data. In the "Worksheet 1"
window, in the shaded box just below the box labeled "C1," type the
word "xvalue" (in lowercase letters, without the quotation marks), and
press enter. In the shaded box just below the box labeled "C2," type
the word "yvalue" (in lowercase letters, without the quotation marks),
and press enter.
-
The data for this exercise will be a set of 20 ordered pairs
(xvalue, yvalue). The data are as follows:
| (5,10) | (9,11) | (10,17) | (13,13)
| (14,20)
|
| (18,17) | (18,21) | (18,26) | (20,20)
| (24,25)
|
| (25,19) | (28,24) | (28,30) | (30,28)
| (30,35)
|
| (32,30) | (34,35) | (35,29) | (36,34)
| (36,33)
|
Enter the values for "xvalue" into the boxes in column C1, starting
with Row 1 and ending with Row 20. It may be helpful to set
"Num Lock" and use the keypad on the extreme right-hand side of the
keyboard. Next, enter the values for "yvalue" into the boxes in
column C2, starting with Row 1 and ending with Row 20. In
each case, make sure that you enter the values in the proper order.
Each value for "xvalue" should be in the same row as the corresponding
value for "yvalue." Warning: If you shut off MINITAB, you may lose
the data that you just typed in.
- Click on Stat->Regression->Regression. (To do this, follow the
menus in the obvious way.) In the box for "Response", type the word
"yvalue" in lowercase, without the quotation marks. In the box for
"Predictors", type in the word "xvalue", again without the quotation
marks. Then click on "OK." The Session window should now contain
information similar to (but not exactly the same as) the
information in Figure 3.11 on page 121 of our textbook. You
may have to scroll through the Session window to see all of the output
from the command. Note: The textbook defines the terms "response
variable" and "predictor variable" at the top of page 115.
- Now please get a blank piece of paper and a pen or pencil. I am
going to have you write some things down, and I will ask you to hand
in the things that you write down.
-
Write down the equation for the least squares line for this data.
It should be near the top of the output in the Session window.
-
If we assume that the least squares equation (the equation that
you just wrote down) is of the form "yvalue = a + b xvalue," write
down the values of a and b. But when you do this, use
as many digits of accuracy as you can. This should be easy, since
these numbers will appear just a little farther on down in your
MINITAB output from the least squares equation. Hint: It may be
helpful to look at Figure 3.11 on page 121 of your
textbook.
-
In your MINITAB output, find the values for SSResid
and SSTo, and write them down. Hint: See Figure 3.11 again. If
you forgot your textbook, find a column with the heading "SS" (as in
"sum of squares"). Also find rows with the headings "Residual Error"
and "Total". You can find SSResid and SSTo by looking at the points
at which these rows intersect the "SS" column.
-
In your MINITAB output, find the value 100r2,
and write it down. Hint: See Figure 3.11. If you do not have
your textbook, look for the value of "R-Sq".
-
What is the proportion of the variation in the observed
y-values that can be attributed to the linear relationship
between x and
y (xvalue and yvalue) in the sample data? Hint: See the box
on page 120.
- I will soon ask you to print the contents of the Session window.
But first, I have some words of warning. If you executed the
regression command several times, then you may have all sorts of
output in the session window that you do not need. To save paper, it
is important that you delete this output. To do this, move the mouse
to the beginning of the output that you want to delete. Then hold
down the left mouse button, move the mouse pointer to the bottom of
the data that you wish to delete, and then release the left mouse
button. The text that you want to delete should now be white with
black background. To delete this text, simply hit the "Backspace"
key.
- If you adjusted the font size in the Session window, then set it
back to what it originally was. To do this, click on Tools->Options,
and then click on the "+" sign by "Session Window". Set the I/O font
size to 9.
-
Now print the contents of the Session window. To do this, click on
File->Print Session Window->OK. The computer will prompt
you for a name for your print job. Supply a name, click on "Print,"
go over to the Math Lab attendant, and explain that you would like to
pick up your print output. The attendant will deduct a few cents from
your U-Card account.
-
If you are satisfied with your print output, then shut MINITAB
down. Do this by clicking on File->Exit->No.
-
Write your name on your MINITAB output and on your handwritten
answers, and hand them in by the announced due date. Please staple
your papers together if possible. You may work in groups, but the
sheets that you hand must contain your name only.
Return Links
-
Lawrence J. Peterson home page
-
Department of Mathematics home page
-
University of North Dakota home page
Notes on Web Page
-
Contact Person: Larry Peterson
E-mail: lawrence.peterson@und.nodak.edu
Phone: (701) 777-4609
Date of most recent update: 11 March 2009
University of North Dakota home page