Copyright ©2011 Nelson Education Limited
Describing Bivariate Data
CHAPTER 3CHAPTER 3CHAPTER 3CHAPTER 3
Copyright ©2011 Nelson Education Limited
Bivariate DataBivariate Data• When two variables are measured on a single
experimental unit, the resulting data are called bivariate data.bivariate data.
• You can describe each variable individually, and you can also explore the relationshiprelationship between the two variables.
• Bivariate data can be described with– GraphsGraphs– Numerical MeasuresNumerical Measures
Copyright ©2011 Nelson Education Limited
Graphs for Qualitative VariablesGraphs for Qualitative Variables• When at least one of the variables is qualitative, you
can use comparative pie charts or bar charts.comparative pie charts or bar charts.
Variable #1 =
Variable #2 =
Do you think that men and women are treated equally in the workplace?
Do you think that men and women are treated equally in the workplace?
Opinion
Gender
WomenMen
Copyright ©2011 Nelson Education Limited
Comparative Bar ChartsComparative Bar Charts
• Stacked Bar ChartStacked Bar Chart
Percent
OpinionGender
No OpinionDisagreeAgreeWomenMenWomenMenWomenMen
70
60
50
40
30
20
10
0
Percent
OpinionGender
No OpinionDisagreeAgreeWomenMenWomenMenWomenMen
70
60
50
40
30
20
10
0
• Side-by-Side Bar ChartSide-by-Side Bar ChartDescribe the relationship between opinion and gender:
More women than men feel that they are not treated equally in the workplace.
More women than men feel that they are not treated equally in the workplace.
Percent
Opinion No OpinionDisagreeAgree
120
100
80
60
40
20
0
GenderMenWomen
Percent
Opinion No OpinionDisagreeAgree
120
100
80
60
40
20
0
GenderMenWomen
Copyright ©2011 Nelson Education Limited
Two Quantitative VariablesTwo Quantitative Variables
When both of the variables are quantitative, call one variable x and the other y. A single measurement is a pair of numbers (x, y) that can be plotted using a two-dimensional graph called a scatterplot.scatterplot.
y
x
(2, 5)
x = 2
y = 5
Copyright ©2011 Nelson Education Limited
• What pattern pattern or form form do you see? • Straight line upward or downward • Curve or no pattern at all
• How strongstrong is the pattern?• Strong, moderate, or weak
• Are there any unusual observationsunusual observations?• Clusters or outliers
Describing the ScatterplotDescribing the Scatterplot
Copyright ©2011 Nelson Education Limited
Positive linear - strong Negative linear -weak
Curvilinear No relationship
ExamplesExamples
Copyright ©2011 Nelson Education Limited
Numerical Measures for Numerical Measures for Two Quantitative VariablesTwo Quantitative Variables
• Assume that the two variables x and y exhibit a linear pattern linear pattern or formform.
• There are two numerical measures to describe– The strength strength and direction direction of the relationship
between x and y.
– The form form of the relationship.
Copyright ©2011 Nelson Education Limited
The Correlation CoefficientThe Correlation Coefficient• The strength and direction of the relationship between
x and y are measured using the correlation correlation coefficient, coefficient, rr..
where
sx = standard deviation of the x’s
sy = standard deviation of the y’s
sx = standard deviation of the x’s
sy = standard deviation of the y’s
yx
xy
ss
sr
yx
xy
ss
sr
1
))((
nn
yxyx
s
iiii
xy 1
))((
nn
yxyx
s
iiii
xy
Copyright ©2011 Nelson Education Limited
ExampleExample
Residence 1 2 3 4 5
x (sq meters) 126.3 134.5 137.5 144.0 148.6y ($000) 178.5 188.6 168.8 229.8 205.2
•The scatterplot indicates a positive linear relationship.
•The scatterplot indicates a positive linear relationship.
• Living area x and selling price y of 5 homes.
Copyright ©2011 Nelson Education Limited
ExampleExample x y xy
126.3 178.5 22544.55134.7 188.6 25404.42137.5 168.8 23210.00144.0 229.8 33091.20148.6 205.2 30492.72691.1 970.9 134742.89
038.24 18.194
604.8 22.138
Calculate
y
x
sy
sx
yx
xy
ss
sr
0.659)038.24(604.8
27.136
1
))((
nn
yxyx
s
iiii
xy
27.1364
5)9.970)(1.691(
134742.89
Copyright ©2011 Nelson Education Limited
Interpreting Interpreting rr
All points fall exactly on a straight line.
Strong relationship; either positive or negative
Weak relationship; random scatter of points
•-1 r 1
•r 0
•r 1 or –1
•r = 1 or –1
Sign of r indicates direction of the linear relationship.
APPLETAPPLETMY
Copyright ©2011 Nelson Education Limited
The Regression LineThe Regression Line• Sometimes x and y are related in a particular way—the
value of y dependsdepends on the value of x.
– y = response variable (dependent)– x = explanatory variable (independent)
• The form of the linear relationship between x and y can be described by fitting a line as best we can through the points. This is the regression line, regression line,
yy = = aa + + bxbx..
– a = y-intercept of the line– b = slope of the line
APPLETAPPLETMY
Copyright ©2011 Nelson Education Limited
The Regression LineThe Regression Line• To find the slope and y-intercept of the
best fitting line, use:
b rsy
sx
a y bx
b rsy
sx
a y bx
• The least squares
• regression line is y = a + bx
Copyright ©2011 Nelson Education Limited
x
y
s
srb
xby a
ExampleExample
84.1604.8
038.24)659(.
194.18 1.84(138.22)
-60.23
xy 84.114.60 :Line Regression
x y xy126.3 178.5 22544.55134.7 188.6 25404.42137.5 168.8 23210.00144.0 229.8 33091.20148.6 205.2 30492.72691.1 970.9 134742.89
659.
038.24 18.194
604.8 22.138
Calculate
r
sy
sx
y
x
Copyright ©2011 Nelson Education Limited
Predict:
ExampleExample• Predict the selling price for another residence
with 140 square meter of living area.
)140(84.114.60 197.471 or $197,471xy 84.114.60
Copyright ©2011 Nelson Education Limited
Key ConceptsKey ConceptsI. Bivariate DataI. Bivariate Data
1. Both qualitative and quantitative variables
2. Describing each variable separately3. Describing the relationship between the variables
II. Describing Two Qualitative VariablesII. Describing Two Qualitative Variables1. Side-by-Side pie charts2. Comparative line charts3. Comparative bar chartsSide-by-SideStacked
4. Relative frequencies to describe the relationship between the two variables
Copyright ©2011 Nelson Education Limited
Key ConceptsKey ConceptsIII. Describing Two Quantitative VariablesIII. Describing Two Quantitative Variables
1. Scatterplots
Linear or nonlinear pattern
Strength of relationship
Unusual observations; clusters and outliers2. Covariance and correlation coefficient (resistant to outliers?)
3. The best fitting line
Calculating the slope and y-intercept
Graphing the line
Using the line for prediction