1/10
Topic 8
Correlation and regression analysis
Numerical measures to describe the relationship between variables
Correlation
Enables quantification of the degree of association between two variables
Does NOT imply causation
Coefficient of correlation
r
Ranges from -1 to 1
r = 0 indicates no relationship between the variables
r > 0 indicates a positive association
r = 1 this is perfect positive correlation
r < 0 negative association
r = -1 perfect negative correlation
Testing significance of correlation - hypothesis testing - steps
Set up hypotheses
H0:ρ=0
H1:ρ=0
Choose significance level - 5% is the usual
Select the test statistic
t=1−r2rn−2
Formulate decision rule - as it is two tailed we reject the null if∣t∣>∣tcrit∣
Make the decision: calculate the statistic, find the critical value and compare
One-tailed tests can also be done
Follows t-distribution, with n-2 degrees of freedom
Find critical value, then calculate t value - and if t > tcrit we reject null
Regression analysis
Attempts to describe the dependence of a variable of one or moth other explanatory variables
Use independent variables to estimate the dependent variable
Dependent variable
Variable being predicted or estimated
Independent variable
Predictor variable - provides the basis for estimation
Bivariate regression analysis
Have just two variables where a single independent variable estimates the dependent variable
Assume the relationship is linear and that both variables are interval/ratio scale
Regression equation: y = a + bx + e
y = dependent variable
x = independent variable
a = intercept term
b = slope of regression line
e = error term
Principle of least squares
We choose the line of best fit to be the line that minimises the errors i.e. the distance between the observations and the line
Different ways to express the regression line
Actual y = predicted y + errot
y = y^ + e
y^ = a +bx
How to find a and b in regression line equation
b=r(sxsy)
a=y−bx
need mean of two variables
and standard deviations of both
can use calculator for this
and then also use calculator to find r
or use equation
r=(n−1)sxsyΣ(xi−x)(yi−y)