correlation - university of california, berkeleyrice/stat2/chapt8-9.pdf · example: the correlation...

16
1 Correlation Measuring Relationships between Variables 2 Associations Between Variables How strongly is a child’s birthweight related to his mother’s weight? Father’s weight? Gestation? What are the relationships among nutritional contents of breakfast cereals: calories, fiber, fat, sugar, carbohydrates? How is a person’s weight related to his height? How strongly is income related to education? 3 56 58 60 62 64 66 68 56 58 60 62 64 66 68 Father’s Height Son’s Height Father Son 58 60 62 58 66 64 Constructing a Scatter Diagram

Upload: others

Post on 01-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

1

Correlation

Measuring Relationships between Variables

2

Associations Between Variables

• How strongly is a child’s birthweight related to his mother’s weight? Father’s weight? Gestation?

• What are the relationships among nutritional contents of breakfast cereals: calories, fiber, fat, sugar, carbohydrates?

• How is a person’s weight related to his height?

• How strongly is income related to education?

3

56 58 60 62 64 66 68

56

58

6062

64

66

68

Father’s Height

Son’

s H

eigh

tFather Son

58 6062 5866 64

Constructing a Scatter Diagram

Page 2: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

4

What Relationships Are Shown in These Scatter Diagrams?

Varia

ble

A

Variable B

5

Depicting Relationships with Scatter Diagrams: The Challenger Disaster

In January 1986, engineers opposed a decision to launch a space shuttle because they were worried that rubber O-rings would not seal at the cold temperature forecast for the launch day. NASA officials pressured them to reverse their recommendation. Challenger was launched the next day, it exploded, and seven astronauts died because two O-rings leaked.

6

The Presentations Engineers Faxed to NASA

Page 3: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

7

A More Convincing Presentation

8

An Even More Convincing Presentation

9

Those Women from Wisconsin

Wei

ght

Height5’ 10’’5’ 6’’5’ 2’’

90

110

130

Page 4: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

10

Height and GPA??

GPA

Height5’ 10’’5’ 6’’

5’ 2’’

2.0

3.0

11

Breakfast Cereals

What are the relationships among nutritional contents of breakfast cereals: calories, fiber, fat, sugar, carbohydrates?

12

Calories and Carbohydrates

Page 5: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

13

Sugar and Fat

14

Complex Carbohydrates and Fiber

15

Babies’ Birthweights

How strongly is a child’s birthweight related to his mother’s weight? Father’s weight?

Gestation?

Page 6: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

16

Birthweight and Dad’s Weight

?

17

Birthweight and Dad’s Weight

18

Birthweight and Mom’s Weight

?

Page 7: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

19

Birthweight and Mom’s Weight

20

Birthweight and Gestation Age

?

21

Birthweight and Gestation Age

Page 8: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

22

Time Sequence Plots: A Type of Scatter Diagram

Sports Records

23

The Correlation Coefficient: r

A Numerical Summary of the Strength of a Linear

Relationship between Two Variables

24

Positive

Correlation

0.0.40

.60 .80

.90 .95

Page 9: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

25

Negative

Correlation

-.30 -.50

-.70 -.90

-.95 -.99

26

r = .14

27

r = .16

Page 10: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

28

r = .40

29

Win Money and Fame!

Guess the Correlation

30

The Recipe for a Correlation Coefficient

1. Convert each variable to standard units

2. Calculate the average value of the products

Page 11: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

31

Weight Height ProductWeight Height

Standard UnitsPounds & Inches

# # # x # = #

# # # x # = #

# # # x # = #

# # # x # = #

# # # x # = #

correlation = average

Standard units

add

32

Implications: The Correlation Coefficient Is Not Affected by

• Interchanging the variables. (r only depends on products.)

• Adding a constant to the values of one variable. (Adding a constant does not change their values measured in standard units.)

33

• Multiplying the values of one variable by a constant. (When the values are multiplied by a constant, so are the Average and SD, and the standard units are unchanged.)

Standard Unit = Value - Average

SD

Page 12: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

34

Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces is the same as when they are measured in kilometers and tons.

35

How Does the Correlation Coefficient Get Its Sign?

Weight in standard units

Hei

ght i

n st

anda

rd u

nits

0

0- +

+

-

Greater than average height and greater than average weight

Less than average height and greater than average weight

Greater than average height and less than average weight

Less than average height and less than average weight

36

Caution: r measures linear relationship. These four sets of pairs all have r = .8

Page 13: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

37

But the scatter plots differ

non-linear association

outliers

38

Ecological (aggregate) correlation: GPA and income by ZIP code at Berkeley High School (r=.87)

39

Correlations of averages are usually bigger than correlations of individuals

Page 14: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

40

Correlations of averages are usually bigger than correlations of individuals

41

Correlation and Causation

There is strong correlation between

•The number of teachers in a school district and the number of failing students.

•The number of automobiles in California per year and the number of homicides.

•Kids’ feet lengths and reading ability

Correlation does not imply causation.

42

Summary

• Scatter diagrams show relationships between variables

• The correlation coefficient measures the strength of a linear relationship

• It measures clustering about a line• It ranges between -1 and 1• It is calculated as the average of products of

standard units

Page 15: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

43

•It measures association, not causation

•It can be misleading if there are outliers or nonlinear association

•“Ecological” correlation tend to overstate strengths of relationships for individuals

44

? 50 observations are taken on two variables and it is found that they have a correlation coefficient equal to .95. True or false and explain briefly: Thescatterplot is roughly similar to the one shown below.

45

?The table below shows data for a hypothetical study where the average daily temperature (Celsius) and cumulative rainfall (mm) were measured for nine one-month periods in a particular U.S. city.

month temp rainfall

1 14 152 17 163 16 174 19 185 18 196 21 207 20 218 24 229 22 23

Of the following three numbers, -.7, 0, and .9, which is closest to the correlation coefficient for average daily temperature and cumulative rainfall. Explain briefly —no calculations are necessary.

Page 16: Correlation - University of California, Berkeleyrice/Stat2/Chapt8-9.pdf · Example: The correlation between mother’s height measured in inches and baby’s weight measured in ounces

46

Suppose the thermometer used in the study consistently gave readings that were two degrees too high. Explain briefly, how the thermometer’s bias would affect the following numbers:

The average daily temperature

The standard deviation of the average daily temperature.

The correlation coefficient of the average daily temperature and the rainfall.