Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to...

34
Scatterplots

Transcript of Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to...

Page 1: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

Scatterplots

Page 2: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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?

Page 3: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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

Page 4: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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?

Page 5: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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?

Page 6: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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

Page 7: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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.

Page 8: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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

Page 9: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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.

Page 10: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

About straight line

š‘¦ = š‘Žš‘„ + š‘

Page 11: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

Straight Line š’š = š’‚š’™ + š’ƒ

š‘Ž(the number in front of š‘„) or š‘: coefficient

š‘„ ( Unknown number ): variable

š‘ ( the number which is not associated with š‘„ ): š’š-intercept

Page 12: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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.

Page 13: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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

Page 14: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

š’š āˆ’intercept š‘¦ = š‘Žš‘„ + š‘

š‘¦ = 3š‘„ + 2 š‘¦ = āˆ’2š‘„ + 1

Page 15: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

Going back to Scatterplotā€¦

Page 16: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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.

Page 17: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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.

Page 18: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

Positive Association Negative Association

Page 19: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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.

Page 20: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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

Page 21: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

Correlation r

Measures the direction and strength of the straight-line relationship between two numerical variables.

Page 22: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

Correlation r A correlation r is always a number between āˆ’1 and 1.

Page 23: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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).

Page 24: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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)

Page 25: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

Correlation r

Perfect correlation r = 1 or r = āˆ’1 occurs only when all points lie exactly on a straight line.

Page 26: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

Correlation r

Correlation r = 0 indicates no straight-line relationship.

Page 27: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

The correlation moves away from 1 or āˆ’1 (toward zero)

as the straight-line relationship gets weaker.

Page 28: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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.

Page 30: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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

Page 31: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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.

Page 32: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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.

Page 33: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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.

Page 34: Scatterplotsskwon.org/ScatterPlot.pdfA strong association between two variables is not enough to draw conclusions about cause and effect. Sometimes an observed association really does

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.