Regreesion and Correlation Presentation Revised
Regreesion and Correlation Presentation Revised
Linear Regression
Introduction
Correlation and Linear Regression are powerful
tools in data analysis.
They help us understand relationships between
variables and make predictions.
Correlation Coefficient
X: Hours
4 5 6 7 8
Studied
Y: Test 50 60 65 70 85
Scores
Interpretation:
The correlation coefficient r=0.31 indicates a weak positive
relationship between hours studied and test scores.
It simply means if numbers of study hours increases the test
score automatically increases
Testing the Significance of r; Step-by-Step
Again consider the previous Scenario .We want to test whether the hours studied (X)
and test scores (Y) have a significant correlation. The correlation coefficient r=0.31 has
already been calculated.
• Step 1: State the null and the alternate hypothesis
• H0: = 0 The correlation in the study hours and test score is zero
• H1: ≠ 0 The correlation in the study hours and test score is different from zero
• Step 2: Select the level of significance
Let’s use α=0.05 (commonly chosen significance level).
• Step 3: Select the test statistic;
we use t formula
• Step 4: Formulate the Decision Rule
For a two-tailed test with α=0.05 and degree of freedom (df ) =n−2 =3*Where n=5
The critical values from the t-distribution are t=±2.160.
Decision Rule: Reject null hypothesis (H0) if t<−2.160 or t >2.160
Step 5:Make the Decision
Example:
• Let’s consider a simple dataset where we have sales (in units) as the
dependent variable and advertising expenditure (in thousands) as the
independent variable.
Advertising Expenditure (X) Sales (Y)
1 3
2 4
3 5
4 6
5 7
This means that for every unit increase in advertising expenditure, the sales are
expected to increase by 1 unit, starting from 2 units when there is no advertising
expenditure.
Regression Equation slope test
• Let's conduct a hypothesis test to determine if the slope of the regression line is
significantly different from zero (which would indicate a relationship between
advertising expenditure and sales).
• Step 1: State the Hypotheses:
Null Hypothesis (H₀): The slope is less than or equal to zero, meaning there is no
relationship between advertising expenditure and sales.
Alternate Hypothesis (H₁): The slope is greater than zero, meaning there is a positive
relationship between advertising expenditure and sales.