4J Linear Regression

INPUTTING DATA: Define x and y values for points.

1)  STAT

2)  EDIT

3)  TYPE INDEPENDENT VALUES (x - values INTO L1. Reset 4-digit years to zero and how far they are from zero

4)  TYPE DEPENDENT VALUES (y-values) INTO L2

MAKE A SCATTER PLOT:

1)  [2ND] – STAT PLOT [Y=]

2)  [ENTER]

3)  TURN STAT PLOT ON (ENTER)

4)  TYPE: HIGHLIGHT FIRST GRAPH (STAT PLOT)

5)  X-LIST: L1 Y-LIST: L2

6)  [ZOOM ] 9

SEE THE ENTIRE SCATTER PLOT:

1)  [WINDOW]

2) XMIN: make smaller than smallest x value

3) XMAX: make bigger than largest x value)

4) YMIN: make smaller than smallest y value)

5) YMAX: make bigger than largest y value)

6) [ZOOM] 9

FINDING CORRELATION COEFFICIENT (r ):

1)  [2ND] [ZERO: CATALOG]

2)  [ALPHA] [D: “x-1”] àScroll Down to “DiagnosticOn”

3)  [ENTER] [ENTER] Screen should say ‘Done’

FINDING THE LINE OF FIT: (Steps #4 - #7 not required)

1)  [STAT]

2)  CALC

3)  [4: LINREG(ax + b)]

·  a = slope (m) Equation will be y = ax + b and you need to fill in for a and b.

·  b = y-intercept

4)  Write down the equation and then go to y= and type in the equation or do the following:

5)  [VARS] Y-VARS FUNCTION Y1 [ENTER]

6)  GO TO [Y =]; You can now see the equation of the line

7)  [GRAPH]; You can see the stat plot and the line together

PREDICT THE VALUES

1)  Searching the Go to Y= and type in the equation into y1= . TABLE: [2ND ] à [GRAPH: TABLE]

Scroll Up and Down in X column. ALSO 2nd Window à Change ΔTbl to 0.1 and look at table for more exact values.

2)  Finding a specific y VALUE: if given the x (make sure the window is large enough)

2ND – TRACE [CALC] – [1:Value] – [ENTER] à Input x-value, [ENTER]

OR go to home screen and replace x in the equation. Ex: y = 2x + 3. x is 7. So y=2(7) + 3 à 17

3)  Finding a specific x VALUE if given the y

Go to y= . Put the equation in y1= Put the desired y amount into y2=

Find intersection by doing [2nd ] [Trace] [5] [Enter] [Enter] [Enter]

OR plug in the value for y into the y=ax + b and solve for x. Ex: y=2x + 1. y is 9. 9=2x + 1 à x is 4

LOOKING AT RESIDUALS

1)  Go to y= and type the equation into y1=

2)  Look at your table to find your predicted y’s by looking at the x’s

3)  Subtract each predicted y from the actual y and record those numbers.

4)  If you are looking for a percentage then divide the number of residuals that meet a condition and divide by total residuals

Example: In a survey, Ms. Wade found a strong relationship between the number of people in their household and the monthly amount spent on groceries by asking 6 people. She wants to find the a) average increase of groceries per person, and b) predict how much a family of 8 would spend

Number of People / 3 / 4 / 2 / 6 / 5 / 7
Monthly Amount Spent $ / 143 / 156 / 89 / 201 / 186 / 232

A) x’s à # of people y’s àMonthly Amount Spent

B) Input the data to look like this: C) Screen after ; STAT à 4 ENTER

a) Average increase of groceries person is ‘a’ $26.26

D) y= 26.26X + 49.68

E) According to the table when x=8, b) a family of 8 would spend $259.76

PRACTICE Use the calculator commands to find the equation for the line of best fit based on each set of data.

1.  What is the equation of the line that goes through the points (3, 8) (4, -12). Find it by linear regression and by using y=mx + b

X / -3 / 2 / 7
Y / 11 / 16 / 17

2.  a) What is the equation of line that best fits the data.

b) What is the residual for when x=2?

X / 6 / 8 / 10 / 12
Y / 8 / 12 / 10 / 16

3.  a) What is the best fit equation? Use the table to the right.

b) Also, give the coefficient of correlation

4. In 1980 there were 16 million people. In 1990 there were 23 million.

a. Write two coordinates ( ) that you can use.

b. Find the line of best fit for years since 1980 using linear regression.

c. Find the equation of the line using y=mx + b and substituting in for y,x, and m.

d. Predict the population in 2000. (Hint: 2000 represents what x?)

5. The table shows an estimate for the number of bald eagle pairs in the United States for certain years since 1985.

Years since 1985 / 3 / 5 / 7 / 9 / 11 / 14
Bald Eagle Pairs / 2500 / 3000 / 3700 / 4500 / 5000 / 5800

a) Find the best-fit line.

b) What is the slope and interpret the slope.

c) What is the rate of change per 100 years?

d) Estimate the number of bald eagle pairs in 1998.

6. The table shows the world population growing at a rapid rate.

Year / Population (millions)
1650 / 500
1850 / 1000
1930 / 2000
1975 / 4000
1998 / 5900

a)  Write an equation in slope – intercept form that best represents this data.

b)  What is the slope and what does it represent?

c)  Use your equation to predict the world population in 2010.

d)  Use your equation to estimate when the population will be 7000 million

e)  Find all residuals.

f)  What is the coefficient of correlation?


7. The table shows the length and weight of several humpback whales.

Length (ft) / 40 / 42 / 45 / 46 / 50 / 52 / 55
Weight (tons) / 25 / 29 / 34 / 35 / 43 / 45 / 51

a)  Write the slope-intercept form of an equation for the line of fit.

b)  Predict the weight of a 48-foot humpback whale.

c) Most newborn humpback whales are about 12 feet in length. Use the equation to predict the weight of a newborn humpback whale. Do you think your prediction is accurate?

8. The table shows the average body temperature in Celsius of 9 insects at a given air temperature.

Air Temp / 25.7 / 30.4 / 28.7 / 31.2 / 31.5 / 26.2 / 30.1 / 31.5 / 18.2
Body Temp / 27.0 / 31.5 / 28.9 / 31.0 / 31.5 / 25.6 / 28.4 / 31.7 / 18.7

a)  Write the slope-intercept form of an equation for the line of fit for the temperature of air and body.

b)  Predict the body temperature of an insect if the air temperature is 40.20 F.
(Hint: What are the temperature measurements in the table given as? C =5/9(F- 32)

9. The table shows the amount of money the United States spent on space and other technologies in specific years.

Year / 1980 / 1985 / 1990 / 1995 / 1996 / 1997 / 1998 / 1999
Spending
(in billions) / 4.5 / 6.6 / 11.6 / 12.6 / 12.7 / 13.1 / 12.9 / 12.4

a)  Write the slope-intercept form of an equation for the line of fit where x represents the years since 1980 and y represents US spending.

b)  Predict the amount that will be spent on space and other technologies in 2005.

c)  In 2005, it is actually known now that $14.3 billion dollars was spent on space and other technologies. How does this compare to your prediction?

10. The table shows the average hourly earnings of US production workers for selected years.

Year / 1960 / 1965 / 1970 / 1975 / 1980 / 1985 / 1990 / 1995 / 1999
Earnings / $2.09 / $2.46 / $3.23 / $4.53 / $6.66 / $8.57 / $10.01 / $11.43 / $13.24

a)  Write the slope-intercept form of an equation for the line of fit where x represents the years since 1960 and y represents earning.

b)  Predict the average earnings in 1930, when then the Great Depression hit the United States. Interpret if this is a good prediction. Why?

c)  Predict the average earnings in 2010.