Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Analysis and Statistical Software I ( ) Quarter: Autumn 02/03

Similar presentations


Presentation on theme: "Data Analysis and Statistical Software I ( ) Quarter: Autumn 02/03"— Presentation transcript:

1 Data Analysis and Statistical Software I (323-21-403) Quarter: Autumn 02/03
Daniela Stan, PhD Course homepage: Office hours: (No appointment needed) M, 3:00pm - 3:45pm at LOOP, CST 471 W, 3:00pm - 3:45pm at LOOP, CST 471 9/18/2018 Daniela Stan - CSC323

2 Outline Chapter 2: Looking at Data – Relationships between
two or more variables Scatterplots Correlation 9/18/2018 Daniela Stan - CSC323

3 Association Between Variables
Two variables measured on the same individuals are associated if some values of one variable tend to occur more often with some values of the second variable than with other values of that variable. A response variable measures an outcome of a study. An explanatory variable explains or causes changes in the response variable. Explanatory variable ~ independent variable Response variable ~ dependent variable 9/18/2018 Daniela Stan - CSC323

4 Association Between Variables (cont.)
Example 1: A study is conducted to determine if one can predict the yield of a crop based on the amount of yearly rainfall. The response variable in this study is: A. Yield of crop B. Amount of yearly rainfall C. The experimenter D. Either bushels or inches of water Example 2: A researcher is interested in determining if one could predict the score on a statistics exam from the amount of time spent studying for the exam. In this study, the explanatory variable is: A. The researcher B. The amount of time spent studying for the exam C. The score on the exam D. The fact that this is a statistics exam 9/18/2018 Daniela Stan - CSC323

5 Scatterplots A scatterplot displays the relationship between two quantitative variables. The values of one variable appear on the horizontal axis and the values of the other variable appear on the vertical axis. Always plot the explanatory variable, if there is one, on the horizontal axis (the x axis) of a scatterplot. Each individual in the data appears as the point in the plot fixed by the values of both variables for that individual. 9/18/2018 Daniela Stan - CSC323

6 Scatterplots (cont.) Example: State mean SAT mathematics score plotted
against the percent of high school seniors in each state who took the SAT exam. Cluster 2: - Higher scores Linear negative relationship Cluster 1: - Low scores 9/18/2018 Daniela Stan - CSC323

7 Interpreting Scatterplots
The overall pattern of a scatterplot can be described by the: - form - direction - strength of the relationship. Form: - linear or non-linear (curved relationships or clusters) Direction: - positive or negative association Strength: how closely the points follow a clear form: - strong or weak 9/18/2018 Daniela Stan - CSC323

8 Adding categorical variables
To add a categorical variable to a scatterplot, use a different plot color or symbol for each category. Example: The states are grouped in four regions: Region Midwest Northeast South West Categorical Variable 9/18/2018 Daniela Stan - CSC323

9 Examples on Scatterplots
Problem 2.10 9/18/2018 Daniela Stan - CSC323

10 Correlation X Y x1 y1 x2 y2 … xn yn
The correlation r measures the direction and strength of the linear relationship between two quantitative variables. Suppose we have the following data: X Y x1 y1 x2 y2 xn yn Where sx, sy are the standard deviations for the two variables X and Y 9/18/2018 Daniela Stan - CSC323

11 Properties of the Correlation (cont.)
Correlation ignores distinction between explanatory and response variables Correlation requires that both variables be quantitative Correlation is not affected by changes in the unit of measurement of either variable Positive correlation indicates positive association between the variables and negative correlation indicates negative association 9/18/2018 Daniela Stan - CSC323

12 Properties of the Correlation
Correlation always satisfies the condition: -1 ≤ r ≤1 and indicates a strong association by how close it is to -1 or 1: Values of correlation r close to 1 indicates that the points lie close to a straight line with a positive slope. Values of correlation r close to -1 indicates that the points lie close to a straight line with a negative slope. Values of correlation r close to 0 indicates that there is no relationships between the points; correlation measures the strength of only linear relationships. 9/18/2018 Daniela Stan - CSC323

13 What correlation numbers correspond to the points
from the 6 scatterplots from the right? r = 0 r = 0.5 r = 0.9 r = -0.99 r = -0.7 r = -0.3 9/18/2018 Daniela Stan - CSC323

14 More on Correlation Problem 2.22/ page 132
Correlation is not resistant measure, so outliers can greatly change the value of r. 9/18/2018 Daniela Stan - CSC323

15 Homework and Programming Assignment #2
Reading Assignments Chapter 1 Chapter 2 (Sections 2.1 and 2.2) Homework and Programming Assignment #2 To be posted today 9/18/2018 Daniela Stan - CSC323


Download ppt "Data Analysis and Statistical Software I ( ) Quarter: Autumn 02/03"

Similar presentations


Ads by Google