Displaying Distributions with
Graphs
October 22, 2012
Exploratory Data Analysis
Qualitative Variables
Quantitative Variables
1.0 Exploratory Data Analysis
Here we analyze the data on its’ own terms. noextraneous assumptions
The idea is to organize and summarize so as to uncoverany underlying features of the data.
Our focus is on the distribution of the variables.
DefinitionThe distribution of a variable tells us what values ittakes and how often it takes these values.
2.0 Qualitative Variable
Pie Charts: shows how often the different values occur bywedges of a circle.
Bar Graphs: shows how often the different values occurby bars.
2.1 Mystery Question
12%
25% 3
9%
410%
521%6
14%
719%
86%
98%
106%
Pie Chart
0
2
4
6
8
10
12
14
16
18
20
1 2 3 4 5 6 7 8 9 10 11
Series1
How nervous are you about taking STAT 220? (1=very nervous; 10=not at all)
2.2 Sex Bias at U.C. Berkeley?
A or B
7%
C, D, E, F93%
What Majors do Women Pick?
A or B52%
C, D, E, F48%
What Majors do Men Pick?
3.0 Quantitative Variables
Stem and Leaf Plots.
Histograms.
3.1 Mystery Question
35 40 60 32 55 38 32 45 37 40 35 37 40 35 74 47 27 31 48 32 30 28 30 45 44 28 27 30 38 37 34 40 30 33 45 31 38 34 35 35 25 50 45 36 60 40 45 39 33 33 38 35 30 35 37 45 50 36 10 26 42 52 30 35 16 55 45 37 29 35 40 48 45 40 13
1234567
1 0 6 32 8 8 7 7 5 6 9 3 5 2 8 2 7 5 7 5 1 2 0 0 0 8 7 4 0 3 1 8 4 5 5 6 9 3 3 8 5 0 5 7 6 0 5 7 54 0 5 0 0 7 8 5 4 4 0 5 5 0 5 5 2 5 0 8 5 05 5 0 0 5 6 0 0 7 4
(a) (b)
1 | 036 2 | 5677889 3 | 0000001122233344555555555667777788889 4 | 00000002455555555788 5 | 00255 6 | 00 7 | 4
(c)stem
leaves
Stem andLeafPlot
How old is Prof. Grove?
3.1 Mystery Question
35 40 60 32 55 38 32 45 37 40 35 37 40 35 74 47 27 31 48 32 30 28 30 45 44 28 27 30 38 37 34 40 30 33 45 31 38 34 35 35 25 50 45 36 60 40 45 39 33 33 38 35 30 35 37 45 50 36 10 26 42 52 30 35 16 55 45 37 29 35 40 48 45 40 13
Age (years)10 20 30 40 50 60 70 80
(a)
(b)
How old is Prof. Grove?
3.2 Basic Shapes of a Histogram
3.3 What to Look For in a
Distribution
Detect outliers, if any.
Look at the shape.I Is it symmetric? skewed?
Where is it centered? Where is the mid-point?
How spread out is it?
4.0 Example
Mystery Question: What was your Math S.A.T. score?
1 2
5
7
10
16
11
7
n=59
Shape?
Center?
Spread?
4.1 Example
Mystery Question: How many years in WA state?
Shape?
Center?
Spread?