Stat 104 – Lecture 2 Single Variable Data

advertisement
Stat 104 – Lecture 2
Single Variable Data
• Categorical (Qualitative).
– Display – Circle graph, bar graph,
Pareto diagram.
• Numerical (Quantitative).
– Display – dot plot, stem and leaf,
histogram, box plot.
– Summary – center, spread, position.
1
Data
• Who?
–Carnivores.
• What?
–Family/species, Body mass,
Bite force, Diet.
2
Categorical (Qualitative)
Family
Number of
Species
28
33
Percentage
Herpestidae
Hyaenidae
Mustelidae
Procyonidae
Ursidae
13
4
38
10
8
8.6%
2.6%
25.2%
6.6%
5.3%
Viverridae
Total
17
151
11.3%
100%
Canidae
Felidae
18.5%
21.9%
3
1
Stat 104 – Lecture 2
Circle Graph (Pie Chart)
Species
Chart
Family
Family
Canidae
Hyaenidae
Ursidae
Felidae
Mustelidae
Viverridae
Herpestidae
Procyonidae
4
Bar Graph
Distributions
Family
Frequencies
40
20
Count
30
Ursidae
Viverridae
Mustelidae
Procyonidae
Hyaenidae
Felidae
Herpestidae
Count
28
33
13
4
38
10
8
17
151
Prob
0.18543
0.21854
0.08609
0.02649
0.25166
0.06623
0.05298
0.11258
1.00000
N Missing
0
8 Levels
5
Pareto Diagram
Pareto Plot
Freq: Species
Plots
200
125
75
100
50
Cum Percent
100
150
50
Ursidae
Hyaenidae
Herpestidae
Procyonidae
Canidae
Viverridae
Felidae
25
0
Mustelidae
Count
Canidae
10
Level
Canidae
Felidae
Herpestidae
Hyaenidae
Mustelidae
Procyonidae
Ursidae
Viverridae
Total
0
Family
6
2
Stat 104 – Lecture 2
Numerical (Quantitative)
Body Mass of Canidae
(rounded to nearest kg)
5, 10, 10, 9, 25, 11, 36,
9, 7, 23, 13, 1, 4, 22,
5, 5, 12, 6, 6, 6, 5,
4, 4, 5, 3, 3, 3, 8
7
Dot Plot of Body Mass
0
10
20
30
Body Mass (kg)
8
Stem-and-Leaf Display
Body Mass (kg) of Canidae
0 | 1,3,3,3,4,4,4,5,5,5,5,5,6,6,6,7,8,9,9
1 | 0,0,1,2,3
2 | 2,3,5
3|6
4|
9
3
Stat 104 – Lecture 2
Display of Numerical Data
• Histogram
–A picture of the distribution of the
data.
–Collects values into intervals.
–Intervals should be of equal width.
–Different choices for intervals can
yield different pictures.
10
Frequency
Histogram
Measurement
11
Constructing a Histogram
• Order data from smallest to
largest using a stem and leaf
display.
• Determine intervals.
– equal width
– more data
more intervals
12
4
Stat 104 – Lecture 2
Split Stem
Body Mass (kg) of Canidae
0 | 1,3,3,3,4,4,4
0*| 5,5,5,5,5,6,6,6,7,8,9,9
1 | 0,0,1,2,3
1*|
2 | 2,3
2*| 5
3 |
3*| 6
13
Interval
Freq
0 ≤ Body
Mass
<
5
7
5 ≤ Body
Mass
< 10
12
10 ≤ Body
Mass
< 15
5
15 ≤ Body
Mass
< 20
0
20 ≤ Body
Mass
< 25
2
25 ≤ Body
Mass
< 30
1
30 ≤ Body
Mass
< 35
0
35 ≤ Body
Mass
< 40
1
14
Histogram
Distributions
Body Mass (kg)
12
10
6
Count
8
4
2
0
5
10
15
20
25
30
35
40
15
5
Stat 104 – Lecture 2
Shape
• Symmetry (mirror image)
– Mounded, flat
• Skew (mounded on one side –
skewed to the other side)
– Toward higher values (right)
– Toward lower values (left)
• Other
– Multiple peaks, outliers
16
Symmetric & Mounded
Histogram of Octane Rating
10
9
8
Frequency
7
6
5
4
3
2
1
0
86
87
88
89
90
91
92
93
94
95
96
Octane
17
Skewed to Right
pH of Pork Loins
80
70
Frequency
60
50
40
30
20
10
0
5.0
5.5
6.0
6.5
7.0
pH
18
6
Stat 104 – Lecture 2
Skewed to Left
Flexibility Index of Young Adult Men
20
Frequency
15
10
5
0
1
2
3
4
5
6
7
8
9
10
Flexibility Index
19
Multiple Peaks
Size of Diamonds (carats)
Frequency
15
10
5
0
0.1
0.2
0.3
0.4
Size (carats)
20
Summarizing Numerical Data
• What is a “typical” value?
• Look for the center of the
distribution.
• What do we mean by
“center”?
21
7
Download