graphing data. the basics x axisabscissa y axis ordinate about ¾ of the length of the x axis start...
TRANSCRIPT
Graphing Data
The Basics
X axis Abscissa
Y ax
isO
rdin
ate
About ¾ ofthe lengthof the X axis
Start at 0
Graphs of Frequency Distributions
• The Frequency Polygon
• The Histogram
• The Bar Graph
• The Stem-and-Leaf Plot
The Frequency PolygonX f57 058 159 060 261 162 463 464 365 766 267 968 769 870 871 1172 1473 1374 1275 676 977 678 479 680 281 382 183 084 085 286 087 188 089 090 091 092 093 194 095 096 097 098 199 0100 1101 0
To convert a frequency distribution table into a frequency polygon:1. Put your X values on the X
axis (the abscissa).2. Find the highest frequency
and use it to determine the highest value for the Y axis.
3. For each X value go up and make a dot at the corresponding frequency.
4. Connect the dots.
The Frequency Polygon
57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99101
0
2
4
6
8
10
12
14
16
BPM
Freq
uenc
y
The Histogram
• Follow the same steps for creating a frequency polygon.
• Instead of connecting the dots, draw a bar extending from each dot down to the X axis.
• A histogram is not the same as a bar graph, there should be no gaps between the bars in a histogram (there should be no gaps in the data).
The Histogram
57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99101
0
2
4
6
8
10
12
14
16
BPM
Freq
uenc
y
Grouped Frequency Distributions
• We can group the previous data into a smaller number of categories and produce simpler graphs
• Use the midpoint of the category for your dot
X MP f
57-61 59 4
62-66 64 20
67-71 69 43
72-76 74 54
77-81 79 21
82-86 84 3
87-91 89 1
92-96 94 1
97-101 99 2
Grouped Frequency Polygon
59 64 69 74 79 84 89 94 990
10
20
30
40
50
60
BPM
Freq
uenc
y
Grouped Frequency Histogram
57-61 62-66 67-71 72-76 77-81 82-86 87-91 92-96 97-1010
10
20
30
40
50
60
BPM
Freq
uenc
y
Relative Frequency Polygon
BPM MP f %age
57-61 59 4 3%
62-66 64 20 13%
67-71 69 43 29%
72-76 74 54 36%
77-81 79 21 14%
82-86 84 3 2%
87-91 89 1 1%
92-96 94 1 1%
97-101 99 2 1%
• Use the following formula to find out what percentage of scores falls in each category:
• Use the percentage on your Y axis instead of the frequency.
Relative Frequency Polygon
59 64 69 74 79 84 89 94 990%
5%
10%
15%
20%
25%
30%
35%
40%
BPM
Rela
tive
Freq
uenc
y
Relative Frequency Histogram
57-61 62-66 67-71 72-76 77-81 82-86 87-91 92-96 97-1010%
5%
10%
15%
20%
25%
30%
35%
40%
BPM
Rela
tive
Freq
uenc
y
Notice:
59 64 69 74 79 84 89 94 990
10
20
30
40
50
60
BPM
Freq
uenc
y
59 64 69 74 79 84 89 94 990%
5%
10%
15%
20%
25%
30%
35%
40%
BPM
Rela
tive
Freq
uenc
y
57-61 62-66 67-71 72-76 77-81 82-86 87-91 92-96 97-101
0%
5%
10%
15%
20%
25%
30%
35%
40%
BPM
Rela
tive
Freq
uenc
y
57-61 62-66 67-71 72-76 77-81 82-86 87-91 92-96 97-101
0
10
20
30
40
50
60
BPM
Freq
uenc
y
So what’s the point?
• Graphs of relative frequency allow us to compare groups (samples) of unequal size.
• Much of statistical analysis involves comparing groups, so this is a useful transformation.
Activity #1
A researcher is interested in seeing if college graduates are less satisfied with a ditch-digging job than non-graduates. Because of the small number of college graduates digging ditches, the researcher could not get as many college graduate participants. Below are the scores on a job satisfaction survey for each group (possible values are 0 – 30, 30 being the most satisfied):
College: 11, 3, 5, 12, 18, 6, 4, 1, 2, 6, 2, 17, 12, 10, 8, 3, 9, 9
No College: 19, 3, 15, 11, 13, 12, 12, 9, 2, 6, 21, 15, 11, 8, 6, 25, 17, 1, 14, 15, 9, 7, 20, 4, 2, 19, 7, 12
Activity #1
College: 11, 3, 5, 12, 18, 6, 4, 1, 2, 6, 2, 17, 12, 10, 8, 3, 9, 9
No College: 19, 3, 15, 11, 13, 12, 12, 9, 2, 6, 21, 15, 11, 8, 6, 25, 17, 1, 14, 15, 9, 7, 20, 4, 2, 19, 7, 12
1. Create a frequency distribution table with about 10 categories (for each group)
2. Convert the frequency to relative frequency (percentage)
3. Construct a relative frequency polygon for each group on the same graph (see p. 43 for an example)
4. Put your name on your paper.
Cumulative Frequency PolygonBPM f Cum f
57 0 0
58 1 1
59 0 1
60 2 3
61 1 4
62 4 8
63 4 12
64 3 15
65 7 22
66 2 24
67 9 33
68 7 40
69 8 48
70 8 56
71 11 67
72 14 81
73 13 94
74 12 106
75 6 112
76 9 121
77 6 127
78 4 131
79 6 137
80 2 139
81 3 142
82 1 143
83 0 143
84 0 143
85 2 145
86 0 145
87 1 146
88 0 146
89 0 146
90 0 146
91 0 146
92 0 146
93 1 147
94 0 147
95 0 147
96 0 147
97 0 147
98 1 148
99 0 148
100 1 149
101 0 149
1. Create a column for cumulative frequency and make the Cum f value equal to the frequency plus the previous Cum f value (see ch. 3 for a review)
2. Plot the resulting values just as you did for a frequency distribution polygon
Cumulative Frequency Polygon
57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99101
0
20
40
60
80
100
120
140
BPM
Cum
Fre
quen
cy
Cumulative Percentage Polygon
1. Using cumulative frequency data, calculate the cumulative percentage data.
2. Make your Y axis go to 100%
3. Plot the data as normal.
BPM f Cum f Cum %age
57 0 0 0%
58 1 1 1%
59 0 1 1%
60 2 3 2%
61 1 4 3%
62 4 8 5%
63 4 12 8%
64 3 15 10%
65 7 22 15%
66 2 24 16%
67 9 33 22%
68 7 40 27%
69 8 48 32%
70 8 56 38%
71 11 67 45%
72 14 81 54%
73 13 94 63%
74 12 106 71%
75 6 112 75%
76 9 121 81%
77 6 127 85%
78 4 131 88%
79 6 137 92%
80 2 139 93%
81 3 142 95%
82 1 143 96%
83 0 143 96%
84 0 143 96%
85 2 145 97%
86 0 145 97%
87 1 146 98%
88 0 146 98%
89 0 146 98%
90 0 146 98%
91 0 146 98%
92 0 146 98%
93 1 147 99%
94 0 147 99%
95 0 147 99%
96 0 147 99%
97 0 147 99%
98 1 148 99%
99 0 148 99%
100 1 149 100%
101 0 149 100%
Cumulative Percentage Polygon
57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99101
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
BPM
Cum
Per
cent
age
The Normal Curve
Skewed Curves
Bar Graph
• Used when you have nominal data.
• Just like a frequency distribution diagram, it displays the frequency of occurrences in each category.
• But the category order is arbitrary.
Example
• The number of each of 5 different kinds of soda sold by a vendor at a football stadium.
Soda fCoke 498
Diet Coke 387Sprite 254
Root Beer 278Mr. Pibb 193
Bar Graph
Coke Diet Coke Sprite Root Beer Mr. Pibb0
100
200
300
400
500
600
Soda
Num
ber S
old
Line Graphs
• Line graphs are useful for plotting data across sessions (very common in behavior analysis).
• The mean or some other summary measure from each session is sometimes used instead of raw scores (X).
• The line between points implies continuity, so make sure that your data can be interpreted in this way.
Example
Rats are trained to perform a chain of behavior and then divided into two groups: drug and placebo. The average number of chains performed each minute is plotted across sessions.
Session Drug Placebo
1 14 12
2 17 15
3 16 14
4 19 16
5 21 16
6 22 17
7 23 16
8 25 18
9 24 17
10 24 19
Line Graph Example
1 2 3 4 5 6 7 8 9 100
5
10
15
20
25
30
DrugPlacebo
Session
Chai
ns p
er M
inut
e
Venn Diagrams
Not in your book, but make sure you understand the basics.
Example
Classes
Dorm
Sports
Freda’s Friends
Goal of Making Graphs
What not to do…
What not to do…
What not to do…
What not to do…
What not to do…
What not to do…
What’s wrong with this graph?
1 2 3 4 52.921
2.922
2.923
2.924
2.925
2.926
2.927
2.928
2.929
Gas Prices are Skyrocketing!
Activity #2
Work with a group and fix these 3 graphs:
Homework
• Prepare for Quiz 4
• Read Chapter 5
• Finish Chapter 4 Homework (check WebCT/website)