Download presentation
Presentation is loading. Please wait.
1
Data Handling & Analysis ZO4030 Linear Regression Andrew Jackson a.jackson@tcd.ie
2
Linear type data How are two measures related?
3
Testing this relationship How confident are we in this relationship? – Simple correlation test cor.test() Parametric Non-parametric What is the mathematical form of this relationship? – Linear regression Allows us to test different mathematical equations Allows us to predict values we have not observed
4
The equation of a line Mathematicians use – Y = mX + c Statisticians use – y = b 1 x + b 0 To calculate the coefficients use – b 1 = (y 2 -y 1 )/(x 2 -x 1 ) – b 0 = y-b 1 x
5
Different slopes Y = b 1 X + b 0 b 1 > 0 b 1 = 0 b 1 < 0
6
Different intercepts Y = b 1 X + b 0 Parallel lines
7
Sample data
8
Regression model assumptions Inherently assume a straight line relationship The residuals, or errors are assumed to be normally distributed – Need to test this – And make sure they are evenly spread above and below the line along its length
9
Computer Session One room for 16 from 2pm-4pm (EE PC 2) One room for 16 from 2pm-2.50pm (EE PC 1) Add body mass data to the brain size dataset – Link sent via email We are going to investigate how brain size is related to body mass.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.