Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to...
Transcript of Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to...
Scatterplots
Example: A study is done to see how the number of beers that a student drinks predicts his/her blood
alcohol content (BAC). Results of 16 students:
How many variables do we have?
Variables and Individuals
ā¢ Any characteristics are called variables.
Beers, Blood Alcohol Content. There are two variables.
ā¢ Individuals are the objects described by a set of data.
16 individuals
Example: A study is done to see how the number of beers that a student drinks predicts his/her blood
alcohol content (BAC). Results of 16 students:
Are two variables related to each other?
Example: A study is done to see how the number of beers that a student drinks predicts his/her blood
alcohol content (BAC). Results of 16 students:
Are two variables related to each other?
Means
Does the number of consumption of beers
Increase, decrease or doesnāt affect the blood alcohol content?
Example: A study is done to see how the number of beers that a student drinks predicts his/her blood
alcohol content (BAC). Results of 16 students:
Are two variables related to each other?
Yes, although it is not exactly related to each other in a predictable manner, they are related to each other.
Roughly,
Increase of beers
Increase of BAC
Scatterplot, Explanatory Variable, Response Variable
A scatterplot( graph of dots ) is a graph that shows the relationship between two numerical variables, measured on the individuals. Number of dots=
number of individuals.
Scatterplot, Explanatory Variable, Response Variable
ā¢ Explanatory variable (x-axis) explains, or causes, the change in another variable.
ā¢ Response variable (y-axis) measures the outcome, or response to the change
Learning Objective
Relate the scatterplot graph with a straight line so that we can predict the results which donāt appear as dots in the scatterplot graph.
The straight line will be called a regression line.
About straight line
š¦ = šš„ + š
Straight Line š = šš + š
š(the number in front of š„) or š: coefficient
š„ ( Unknown number ): variable
š ( the number which is not associated with š„ ): š-intercept
Example(Numerical Approach)
(Positive slope)
1. Let š¦ = 2š„ + 1 and š„ = 0. What is the corresponding š¦ ā value?
2. Let š¦ = 2š„ + 1 and š„ = 2. What is the corresponding š¦ ā value?
3. Plot the graph of the equation.
(Negative slope)
1. Let š¦ = ā3š„ + 5 and š„ = 1. What is the corresponding š¦ āvalue?
2. Let š¦ = ā3š„ + 5 and š„ = 3. What is the corresponding š¦ āvalue?
3. Plot the graph of the equation.
Slope of a Straight Line š¦ = šš„ + š
Positive slope š > 0
š is a positive number.
Rise to the right
Negative slope š < 0
š is a negative number.
Falls to the right
š āintercept š¦ = šš„ + š
š¦ = 3š„ + 2 š¦ = ā2š„ + 1
Going back to Scatterplotā¦
Terminology (Positive Associationā positive slope)
Suppose that the given scatterplot looks roughly like a straight line.
Two variables are positively associated if an increase of explanatory variable tends to accompany an increase in the response variable.
Terminology (Negative Associationā Negative slope )
Suppose that the given scatterplot looks roughly like a straight line.
Two variables are negatively associated if an increase of explanatory variable tends to accompany a decrease in the response variable.
Positive Association Negative Association
Regression Line to predict the value of š¦ for a given value of š„
A regression line is a straight line that describes how a response variable š¦ changes as an explanatory variable š„ changes.
Regression Line to predict the value of š¦ for a given value of š„
A regression line can be written as follows:
š„: explanatory variable
š¦ : response variable
y mx b
Correlation r
Measures the direction and strength of the straight-line relationship between two numerical variables.
Correlation r A correlation r is always a number between ā1 and 1.
Correlation r
It has the same sign as the slope of a regression line.
r > 0 for positive association (increase in one variable causes an increase in the other).
Correlation r
It has the same sign as the slope of a regression line.
r < 0 for negative association (increase in one variable causes a decrease in the other)
Correlation r
Perfect correlation r = 1 or r = ā1 occurs only when all points lie exactly on a straight line.
Correlation r
Correlation r = 0 indicates no straight-line relationship.
The correlation moves away from 1 or ā1 (toward zero)
as the straight-line relationship gets weaker.
Least-Squares Regression Line
A line that makes the sum of the squares of the vertical distances of the data points from the line as small as possible.
Example of Least Squares Regression Line
https://www.youtube.com/watch?v=xojW6OEDfC4&feature=related
Least squares regression line
(0-4:56)
Equation of the Least-Squares Regression Line
(Skip at the lecture)
From the data for an explanatory variable x and a response variable y for n individuals, we have calculated the means , , and standard deviations sx , sy , as well as their correlation r.
The least-squares regression line is the line:
Predicted
With slope ā¦
And y-intercept ā¦
y mx b
y
x
sm r
s
b y mx
A Few Cautions When Using Correlation and Regression
Both the correlation r and least-squares regression line can be strongly influenced by a few outlying points.
Always make a scatterplot before doing
any calculations.
Above: Regression line before we remove the outlier on the right top.
Below: Regression line after we remove the outlier which was on the right top.
A Few Cautions When Using Correlation and Regression
Often the relationship between two variables is strongly influenced by other variables.
Before conclusions are drawn based on
correlation and regression, other possible
effects of other variables should be
considered.
A Few Cautions When Using Correlation and Regression
A strong association between two variables is not enough to draw conclusions about cause and effect.
Sometimes an observed association really does reflect cause and effect (such as drinking beer causes increased BAC).
Sometimes a strong association is explained by other variables that influence both x and y.
Remember, association does not imply causation.