Professional Documents
Culture Documents
au/learning/resources/ace/
respect-intellectual-property/copyright-and-uwa-unit-content
stat1400-ems@uwa.edu.au
Contributors to lecture material: Adrian Baddeley, Adriano Polpo, John Bamberg, Ed Cripps, Julie Marsh, Kevin Murray,
Gordon Royle, and Berwin Turlach.
He observed n = 24 nebulae.
The recessional velocity of each nebula was estimated by its
redshift (in kilometers per second).
The distance to each nebula was estimated by its apparent
luminosity (in megaparsecs = 3.09 ⇥ 1019 meters)
He produced a scatterplot and thereby estimated a correlation
between distance and recessional velocity.
Is the universe expanding?
This provides supporting evidence for the theory that the universe
was created in a Big Bang.
Scatterplots
Given two quantitative variables on the same experimental units:
Direction
Strength
How tightly the variables move together.
Types of association
Positive Negative Absent
20
10
●
● ● ●
15
●
● ●
Stronger Association
Stronger Association
Stronger Association
●
●●
●
● ●● ●
● ●● ●
●
●● ●● ● ●●●●
−5
● ●● ● ●● ● ●
● ●● ● ●
5
● ●● ●● ●
●●
●● ●●● ●
● ● ●●●
10 ● ●
●● ● ● ● ●● ●
● ●● ● ●●● ●
● ●● ● ● ●● ●●● ●●●
●
● ●● ● ●●
● ●●● ●
●
● ●●● ●● ●● ● ●
● ● ● ● ●● ●● ●●
● ● ●
● ●
−10
● ●●
●
● ● ● ● ●
● ● ●
0
●● ● ●
●
● ●
5
−15
−5
0
1 2 3 4 5 6 7 1 2 3 4 5 6 7 −2 −1 0 1 2
x x x1
20
● ● ●
●
● ●
● ●
●
0
10
● ● ●
● ● ●
●
15
● ● ●
● ● ●● ●
●
Weaker Association
Weaker Association
Weaker Association
● ● ● ● ●
● ●
● ● ● ●● ● ●
● ● ● ●
● ●
−5
● ● ●
● ●
5
● ● ●
● ●● ● ● ●●
10
● ●
● ● ● ●
● ●●
● ● ● ●
●
● ● ●
● ● ● ●●
●
● ● ● ●
● ● ● ●
●● ● ● ●
● ●● ●
−10
● ● ● ● ●
● ● ●● ● ●
0
●●
●
●
● ● ● ●
● ●
● ●●
● ● ● ●
5
● ●
● ● ●
● ● ●● ●●
●
●
−15
●
●
−5
● ●
● ● ●
0
1 2 3 4 5 6 7 1 2 3 4 5 6 7 −2 −1 0 1 2
x x x1
Quantify the assocation
Sleep Grumpiness
8 5
8.5 5
8 6
7.2 6.5
7.5 5
9 3
6.5 7
7 7
8.5 4
6 8
Correlation coefficient
x y sx sy
7.62 5.65 0.954 1.528
x y x x̄ y ȳ (x x̄)(y ȳ)
(hours sleep) (grumpiness)
8 5 0.38 -0.65 -0.247
8.5 5 0.88 -0.65 -0.572
8 6 0.38 0.35 0.133
7.2 6.5 -0.42 0.85 -0.357
7.5 5 -0.12 -0.65 0.078
9 3 1.38 -2.65 -3.657
6.5 7 -1.12 1.35 -1.512
7 7 -0.62 1.35 -0.837
8.5 4 0.88 -1.65 -1.452
6 8 -1.62 2.35 -3.807
We get r = 0.932
A strong correlation
In other words, the more sleep you get, the less grumpy you feel
the next day.
20
r=−0.90
10
●
● ● ●
15
●
● ●
Stronger Association
Stronger Association
Stronger Association
●
r=0.89 ● ●●
●●
●
● r=−0.13
● ●● ●
●
●● ●● ● ●●●●
−5
● ●● ● ●● ● ●
● ●● ● ●
5
● ●● ●● ●
●●
●● ●●● ●
● ● ●●●
10
●● ● ●
●● ●●● ● ● ● ●● ●
● ● ●
● ●● ● ● ●● ●●● ●●●
●
● ●● ● ●●
● ●●● ●
●
● ●●● ●● ●● ● ● ●
● ● ●
●
● ● ●● ●●
●
●
● ●
−10
● ●●
●
● ● ● ● ●
● ● ●
0
●● ● ●
●
● ●
5
−15
−5
0
1 2 3 4 5 6 7 1 2 3 4 5 6 7 −2 −1 0 1 2
x x x1
20
● ● ●
●
r=0.44 ●
●
●
●
●
0
10
● ● ●
● ● ●
●
15
● ● ●
● ● ●●
●
r=−0.08 ●
Weaker Association
Weaker Association
Weaker Association
● ● ● ● ●
● ●
● ● ● ●● ● ●
● ● ● ●
● ●
−5
● ● ●
● ●
5
● ● ●
● ●● ● ● ●●
10
● ●
● ● ● ●
● ●●
● ● ● ●
●
● ● ●
● ● ● ●●
●
● ● ● ●
● ● ● ●
●● ● ● ●
● ●● ●
−10
● ● ● ● ●
● ● ●● ● ●
0
●●
●
●
● ● ● ●
● ●
● ●●
● ● ● ●
5
● ●
● ● ●
● ● ●● ●●
●
●
−15
●
●
r=−0.44 ●
−5 ●
● ● ●
0
1 2 3 4 5 6 7 1 2 3 4 5 6 7 −2 −1 0 1 2
x x x1
Cautionary notes about r