STA291 Statistical Methods Lecture 10. Measuring something over time… o Like a company’s stock...

12
STA291 Statistical Methods Lecture 10

Transcript of STA291 Statistical Methods Lecture 10. Measuring something over time… o Like a company’s stock...

STA291Statistical Methods

Lecture 10

Measuring something over time…oLike a company’s stock value:

oIt kind of just sits there, making your eyes glaze over.oAnd even though we’re measuring one variable (of interest), we need to look at two variables at a time …

Time Plot

Terrible, Misleading Time Plot

Analyzing RelationshipsBetween Two Quantitative Variables

o Is there an association between the two variables?

o Positive or negative?o What is it’s shape?o How strong is the association?

o NotationoResponse variable: YoExplanatory variable: X

5

Sample Measure of Linear Relationship

o Sample Correlation Coefficient:

o Alternatively:

o Population measures: Divide by N instead of n-1

6

yx

ii

ii

ii

ssn

yyxx

yyxx

yyxxr

122

1n

zzr yx

Properties of the Correlation I

o The value of r does not depend on the units (e.g., changing from inches to centimeters) that X and Y are measured in

o r is standardized (has no units itself)o r is always between –1 and 1o r measures the strength and direction

of the linear association between X and Y

o r>0 positive linear associationo r<0 negative linear association

7

Properties of the Correlation II

o r = 1 when all sample points fall exactly on a line with positive slope (perfect positive linear association)

o r = – 1 when all sample points fall exactly on a line with negative slope (perfect negative linear association)

o The larger the absolute value of r, the stronger is the degree of linear association

8

Properties of the Correlation III

o If r is close to 0, this does not necessarily mean that the variables are not associated

o o It only means that they are not linearly

associated

o The correlation treats X and Y symmetrically; that is, it does not matter which variable is explanatory (X) and which one is response (Y), the correlation remains the same

9

All Correlation r = 0.82

10

Scatter Diagram of Murder Rate (Y) andPoverty Rate (X) for the 50 States

11

r = 0.63

Looking back

oTime plots

oGeneral two-variable analysis

oSample correlation, r