Math 321, Lab 2: Basic Linear Regression
Spring 2006, L. Peterson

You may work in groups on this assignment, but each paper that you hand in may contain the names of at most three students. You may talk to people in other groups, but do not copy the solutions of another group. If you have trouble, talk to a friend, talk to the lab attendant, or come to see me. You should probably 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." Detailed instructions follow.

  1. 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).

  2. 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 comma or 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 comma or the quotation marks), and press enter.

  3. 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.

  4. 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 shold 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.

  5. 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 hand in the things that you write down.

    1. 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.
    2. 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.
    3. 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.
    4. 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".
    5. In this exercise, do you think that there is a strong linear relationship between xvalue and yvalue? Why or why not? Write down your answer and your reasoning. Hint: See Figure 3.6 on page 109 of your textbook.

  6. 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 windown that you do not need. To speed up the printing, 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.

  7. If you adjusted the font size in the Session window, then set the 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 10.

  8. Now print the contents of the Session window. To do this, first turn on the printer and insert a piece of paper. Then click on File->Print Session Window->OK.

  9. After the printing successfully completes, inspect your results. If you are satisfied, then shut MINITAB down. Do this by clicking on File->Exit->No. Be sure to wait until the printing completes before you do this.

  10. Write your name or names on your MINITAB output and on your handwritten answers, and hand them in by the announced due date. It would be helpful if you could staple your papers together. You may work in groups, but the sheets that you hand in may contain the names of at most three students.

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: 18 March 2006
University of North Dakota home page