Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to linear regression living with the lab © 2011 David Hall and the LWTL faculty team The Living with the Lab label, the Louisiana Tech Logo,

Similar presentations


Presentation on theme: "Introduction to linear regression living with the lab © 2011 David Hall and the LWTL faculty team The Living with the Lab label, the Louisiana Tech Logo,"— Presentation transcript:

1 introduction to linear regression living with the lab © 2011 David Hall and the LWTL faculty team The Living with the Lab label, the Louisiana Tech Logo, and this copyright notice should not be removed when any part of this work is used by others. This work may not be used for commercial purposes. Inquiries should be addressed to dhall@latech.edu. This presentation on linear regression is based partially on class notes created by Dr. Mark Barker at Louisiana Tech University. linear regression provides a predictable way to quantify the relationship between two variables, even when significant uncertainty and measurement error exist environmental datamedical dataprocess parameters http://mrg.bz/sWnKWI http://mrg.bz/jR4UEXhttp://mrg.bz/sMmqHk

2 living with the lab 2 The content of this presentation is for informational purposes only and is intended only for students attending Louisiana Tech University. The author of this information does not make any claims as to the validity or accuracy of the information or methods presented. The procedures demonstrated here are potentially dangerous and could result in injury or damage. Louisiana Tech University and the State of Louisiana, their officers, employees, agents or volunteers, are not liable or responsible for any injuries, illness, damage or losses which may result from your using the materials or ideas, or from your performing the experiments or procedures depicted in this presentation. If you do not agree, thendo not view this content. DISCLAIMER

3 living with the lab collect some data to see how linear regression works 3

4 collect pulse after doing jumping jacks 1.measure pulse for 10 seconds (have a partner write down the number of beats) 4 living with the lab 0 10 20 30 40 50 60 70 80 90 total time (s) STOP collect heart rate five times jump 0 10 20 30 40 jumping time (s) jump 2.do jumping jacks for 10 seconds10 seconds of total exercise STOP 3.measure pulse for 10 seconds 4.do jumping jacks for 10 seconds20 seconds of total exercise 5.measure pulse for 10 seconds 6.do jumping jacks for 10 seconds30 seconds of total exercise 7.measure pulse for 10 seconds 8.do jumping jacks for 10 seconds40 seconds of total exercise 9.measure pulse for 10 seconds

5 living with the lab 5 logistics choose one or two people per table to do jumping jacks; this is voluntary... don’t do the jumping jacks if there is any reason why this activity could be harmful to you the people who are jumping should get away from tripping hazards and other people (clear a space around your table and keep yourself under control while exercising) your instructor will keep track of time and tell you when to jump and when to collect heart rate; a cell phone, watch or online stopwatch can be used we need about 7 to 10 sets of data from the entire class... not everybody will get to exercise  we’ll analyze and plot this data using Excel the heart rate collected will include some error o collect pulse as soon as you stop jumping o after 10 seconds, call out the number of pulses collected over 10 seconds to your partner(s) and start jumping again just be as accurate as possible www.onlinestopwatch.com

6 enter heart rate data into a Excel living with the lab 6 time (s) student 1 (bpm) student 2 (bpm) student 3 (bpm) student 4 (bpm) student 5 (bpm) student 6 (bpm) student 7 (bpm) student 8 (bpm) 0 10 20 30 40 please multiply the number of pulses collected over 10 seconds by 6 to get beats per minute (bpm) report bpm to your instructor build a spreadsheet on your computer along with the instructor

7 living with the lab 7 plot data for the entire class in Excel make a scatter plot using symbols only – no lines time is the independent variable and is plotted as the x-axis heart rate is the dependent variable and is plotted as the y-axis the title of the plot is always listed as “y versus x”... which is “heart rate versus exercise time” for this problem

8 living with the lab 8 make a hand plot for one data set your instructor will select one student’s data that is typical of the data for the entire class; we will analyze this data make a hand plot using your own paper as shown below (use proper format!!) draw a “best fit” line through the data; just use your judgment heart rate versus exercise time use data from class... not this data “best fit line”

9 living with the lab 9 find an equation to fit the data find the y-intercept by plugging in one of the data points: write the equation: example (use data from your class) find the slope:... where heart rate is in bpm and time is in seconds.

10 living with the lab 10 analysis of our equations compare your answer with others in the class if you chose the same two points to define your “best fit” line, then your equations should be the same choosing different points causes us to get different equations linear regression, which can be derived using calculus, gives us the same equation every time linear regression takes the guess work out of finding best fit lines http://earthobservatory.nasa.gov/IOTD/view.php?id=46145

11 living with the lab 11 understanding linear regression best fit line

12 living with the lab 12 finding m and b 0 0 820 100 400 900 1600 1720 2880 4800 100 451 10220 3000 Repeat the above procedure for the data set selected in your class. Compare the m and b that you get with your classmates. Doing this by hand is good practice for the exam.

13 living with the lab 13 repeat for all of the class data reformat your spreadsheet to have single x and y columns as shown (5 lines for each students heart rate data) find the sums and plug them into the equations for m and b to find the best fit line; try to do these calculations in Excel... it’s tricky due to fixed cell references and the placement of parentheses create a plot of all data in Excel plot the best fit line without any symbols over the data points see the next page for an example

14 living with the lab 14 details of solving previous problem in Excel 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 A B C D E F =C$28*B5+C$29 =(COUNT(B5:B24)*D26-B26*C26)/(COUNT(B5:B24)*E26-B26^2) don’t look at these tips unless you get stuck!! use these data point to plot the best-fit line


Download ppt "Introduction to linear regression living with the lab © 2011 David Hall and the LWTL faculty team The Living with the Lab label, the Louisiana Tech Logo,"

Similar presentations


Ads by Google