Download presentation
Presentation is loading. Please wait.
Published byMelvyn Tucker Modified over 6 years ago
1
Data Analysis Module: Correlation and Regression
R Programming Data Analysis Module: Correlation and Regression
2
Data Analysis Module Basic Descriptive Statistics and Confidence Intervals Basic Visualizations Histograms Pie Charts Bar Charts Scatterplots Ttests/Bivariate testing One Sample Paired Independent Two Sample ANOVA Chi Square and Odds Regression Basics
3
Data Analysis Module: Correlation and Regression
Dependent Variable Independent (predictor) Variable Statistical Test Comments Quantitative Categorical T-TEST (one, two or paired sample) Determines if categorical variable (factor) affects dependent variable; typically used for experimental or planned change studies Correlation/Regression Analysis Test establishes a regression model; used to explain, predict or control dependent variable Chi-Square Tests if variables are statistically independent (i.e. are they related or not?)
4
Data Analysis Module: Correlation and Regression
Correlation coefficients assess strength of linear relationship between two quantitative variables. The correlation measure ranges from -1 to +1. A negative correlation means that X and Y are inversely related. A positive correlation means that X and Y are directly related. zero correlation means that X and Y are not linearly related. A correlation of +1 indicates X and Y are directly related and that all the points fall on the same straight line. A correlation of -1 indicates X and Y are inversely related and that all the points fall on the same straight line Plot Scatter Diagram of Each Predictor variable and Dependent Variable Look of Departures from Linearity Look for extreme data points (Outliers) Examine Partial Correlation Can’t determine causality, but isolate confounding variables
5
Data Analysis Module: Correlation and Regression
For example, lets take two variables and evaluate their correlation…open the stats98 dataset in Excel… What would you expect the correlation of the Verbal SAT scores and the Math SAT scores to be? Why? What would you expect the correlation of the Math SAT scores and the percent taking the test to be? Why?
6
Data Analysis Module: Correlation and Regression
What would you expect the correlation of the Verbal SAT scores and the Math SAT scores to be? Why?
7
Data Analysis Module: Correlation and Regression
What would you expect the correlation of the Math SAT scores and the Percent of HS students that took the test? Why?
8
Data Analysis Module: Correlation and Regression
9
Data Analysis Module: Correlation and Regression
From the previous slide, the “regression line” has been imposed onto the relationship between Price and Age of car. The equation of this line takes the general form of y=mx+b, where: Y is the dependent variable (Price) M is the slope of the line X is the independent variable (Age) B is the Y-intercept. When we discussion regression models, we transform this equation to be: Y = bo + b1x1 + …bnxn Where bo is the y-intercept and b1 is the slope of the line. The “slope” is also the effect of a one unit change of x on y.
10
Data Analysis Module: Correlation and Regression
From the previous slide, the model equation is presented in the form of the equation of a line: y=-924x From this, we would say: For every 1 year of a car’s age, there is a $924 decrease in theprice of the car. Every car “starts” at $12,320. If a car is 2 years old, the expected price is $10,472. That R2 value of is interpreted as “89.37% of the change in price of the cars can be explained by this linear model, where age is the only predictor”.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.