2 variable stats
DESCRIPTION
2 Variable Stats. If you eat more junk food will you gain weight?. Does the amount of time spent on homework improve your grade?. Does the amount of rainfall affect the amount of wheat yielded each year?. By using a scatter plot we can view a visual pattern in the graph - PowerPoint PPT PresentationTRANSCRIPT
2 Variable 2 Variable StatsStats
Does the amount
of time spent on
homework
improve your
grade?
If you eat more junk food will you gain weight?
Does the amount of rainfall
affect the amount of wheat
yielded each year?
By using a scatter plot we can view a By using a scatter plot we can view a visual pattern in the graphvisual pattern in the graph
This pattern can reveal the nature of This pattern can reveal the nature of the relationship between the two the relationship between the two variablesvariables
Time ( months )
Weig
ht
(kg)
Weight Change after Exercise
VariablesVariables
When Graphing this information you When Graphing this information you must determine which variable goes must determine which variable goes on which axison which axis
One Variable is the dependent (or One Variable is the dependent (or response) variableresponse) variable
The other is the independent (or The other is the independent (or explanatory) variableexplanatory) variable
Which Variable goes Where?Which Variable goes Where?
x
y
Independent
Dependent
Independent or Dependent Independent or Dependent Variable?Variable?
For each relationship, sketch the axis For each relationship, sketch the axis and label the independent and and label the independent and dependent variablesdependent variables
a)a) The number of hours a student studies per course The number of hours a student studies per course and his or her average mark in the courseand his or her average mark in the course
b)b) The time of day and the number of cups of coffee The time of day and the number of cups of coffee soldsold
c)c) The amount of snowfall and the number of collisions The amount of snowfall and the number of collisions on major highwayson major highways
CorrelationCorrelation Variables have a LINEAR Variables have a LINEAR
CORRELATION if changes in CORRELATION if changes in one variable tend to be one variable tend to be proportional to the changes proportional to the changes in another variablein another variable
If your Y increases at a If your Y increases at a constant rate as X increases constant rate as X increases then you have a then you have a Perfect Perfect Positive (or direct) linear Positive (or direct) linear correlationcorrelation
If the Y decreases at a constant rate If the Y decreases at a constant rate as X increases then you have a as X increases then you have a Perfect Negative (or inverse) Perfect Negative (or inverse) linear correlationlinear correlation
Strength of CorrelationStrength of Correlation
The stronger the correlation the The stronger the correlation the more closely the data points cluster more closely the data points cluster around the line of best fit.around the line of best fit.
• State the strength *strong, weak, State the strength *strong, weak, moderate, moderately strong etc….*moderate, moderately strong etc….*
• State direction *positive or negative*State direction *positive or negative*• State type of correlation *Linear, Non-State type of correlation *Linear, Non-
linear, exponential etc…*linear, exponential etc…*
Turn to page 160 in your textbookTurn to page 160 in your textbook
Example 1Example 1 Classifying Linear Classifying Linear RelationshipsRelationships
Correlation CoefficientCorrelation Coefficient Karl Pearson Karl Pearson
(1857-1936) (1857-1936) developed a developed a formula to formula to determine a value determine a value that would tell us that would tell us the strength of a the strength of a correlation.correlation.
Note he also Note he also developed the developed the standard deviationstandard deviation
Correlation CovarianceCorrelation Covariance
First need to define what we call the First need to define what we call the covariance of two variables in a covariance of two variables in a sample.sample.
1( )( )
1XYs x x y yn
Correlation CoefficientCorrelation Coefficient
Denoted with an rDenoted with an r Is the covariance divided by the Is the covariance divided by the
product of the standard deviations product of the standard deviations for X and Yfor X and Y
XY
X Y
srs s
Gives a quantitative measure of the Gives a quantitative measure of the strength of a relationshipstrength of a relationship
Basically shows how close the data Basically shows how close the data points cluster around the line of best points cluster around the line of best fit.fit.
Also called the Also called the Pearson product-Pearson product-moment coefficient of correlation moment coefficient of correlation (PPMC) (PPMC) or or Pearson’s rPearson’s r
Strength of CorrelationStrength of Correlation
The closer the correlation coefficient The closer the correlation coefficient (r ) is to 1 or -1 the stronger the (r ) is to 1 or -1 the stronger the correlationcorrelation
r = -1
r =+1
No relation has a correlation that is No relation has a correlation that is close to zero and the dots are close to zero and the dots are scattered everywherescattered everywhere
r = 0
The following diagram illustrates how The following diagram illustrates how the correlation coefficient the correlation coefficient corresponds to the strength of a corresponds to the strength of a linear correlationlinear correlation
-1 -0.67 -0.33 0 0.33 0.67 1
Positive Linear CorrelationNegative Linear Correlation
Weak ModerateStrongPerfect
WeakModerate StrongPerfect
SO LONG!!!!!!!!SO LONG!!!!!!!!
There is a quicker way to calculate r, There is a quicker way to calculate r, without having to find the standard without having to find the standard deviations……but it looks more deviations……but it looks more difficultdifficult
2 2 2 2
( )( )
[ ( ) ][ ( ) ]
n xy x yr
n x x n y y
ExampleExample
A Farmer wants to A Farmer wants to determine whether determine whether there is a relationship there is a relationship between the mean between the mean temperature during temperature during the growing season the growing season and the size of his and the size of his wheat crop. He wheat crop. He assembles the assembles the following data for the following data for the last six cropslast six crops
Mean Temp (Mean Temp (°C)°C) Yield Yield (tonnes/hectare)(tonnes/hectare)
44 1.61.6
88 2.42.4
1010 2.02.0
99 2.62.6
1111 2.12.1
66 2.22.2
a) Does the Scatter plot of this a) Does the Scatter plot of this data indicate any linear data indicate any linear correlation between the two correlation between the two variablesvariables
0 2 4 6 8 10 12 14
0
0.5
1
1.5
2
2.5
Mean Temperature (ºC)
Yie
ld (
T/h
a)
Yield of Growing Season
b) Compute the Correlation Coefficientb) Compute the Correlation Coefficient
TempTemp YieldYield XX22 YY22 xyxy
44 1.61.6
88 2.42.4
1010 2.02.0
99 2.62.6
1111 2.12.1
66 2.22.2
x y 2x 2y xy
2 2 2 2
( )( )
[ ( ) ][ ( ) ]
n xy x yr
n x x n y y
c) What can the farmer conclude about the c) What can the farmer conclude about the relationship between the mean temperatures relationship between the mean temperatures during the growing season and the wheat yields on during the growing season and the wheat yields on his farmhis farm
HomeworkHomework
Pg 168 #1-6Pg 168 #1-6