AP Statistics

advertisement
AP Statistics
Chapter3
Displaying Categorical Data
Categorical Data
• Categorical variables- indentify a
category for each case. ( usually think
about counts of cases that fall into each
category) or a variable that names
categories can by with numerals or words
Ways to display categorical data
•
•
•
•
Frequency Tables
Bar Charts
Pie Charts
Contingency Tables
Frequency Tables
• Frequency table-lists
categories in a
categorical variable
and gives the count
(or percentage of
observations for each
category)
• Ex.
Class
Count
First
325
Second
285
Third
706
Crew
885
Relative frequency table
• Example
Class
%
First
14.77
Second
12.95
Third
32.08
Crew
40.21
The Area Principle
• The area occupied by part of the graph
should correspond to the magnitude of the
value it represents.
Example of a misuse:
http://www.personal.psu.edu/users/d/m/dmr/
apstat/quakeroats.jpg
Bar Graphs
• Bar Graph-displays the distribution of
categorical variable, showing the counts
next to each other for easy comparison.
• Example:
• http://www.hermida.com/navision/bargraph
.gif
Pie Charts
• Pie Charts- show the whole group of
cases as a circle. They slice the circle into
pieces whose sizes are proportional to the
fraction of the whole in each category.
• Ex:
Contingency Tables
• Contingency TableShows how the
individuals are
distributed along each
variable, contingent
on the value of the
other variable.
• Ex:
Art
Deg
Scien
Deg
Boys
25
50
Girls
55
20
Marginal distribution
Independence
• Variables are independent If the
conditional distribution of one variable is
the same for each category of the other.
Example
Blue
Brown
Hazel/
Other
Total
6
20
6
32
Females 4
16
12
32
Total
36
18
64
Males
10
Contingency Table Tally
Tally
Conservative-Keep
Conservative-Abolish
Moderate-Keep
Moderate-Abolish
Liberal-Keep
Liberal-Abolish
Group Work
• Construct a contingency table of political
affiliation vs. opinion of the penny as a unit
of currency
• Discuss the marginal and conditional
distributions evident in the contingency
table
Homework
• Read Chapter 3
• Complete Wiki Assignment
Chapter 3 Extras
• After you construct
the contingency table.
You can construct a
bar graph.
12
10
8
Abolish
Keep
6
4
2
0
Cons
Mod
Lib
Example for Segmented Bar Graph
• For example, suppose a
survey was conducted
of a group of 20
individuals, who were
asked to identify their
hair and eye color. A
two-way table
presenting the results
might appear as
follows:
Bu Gr Br Bl
e
Bd 2 1 2 1
To
Re 1
1
2
0
4
Br 1
0
4
2
7
Bl
1
0
2
0
3
To 5
2
10 3
6
20
Segmented Bar Graphs
Bu Gre Br Bl
Bd .33 .17 .33 .17
Re .25 .25 .5
0
Br .14 0
.71 .29
Bl
.67 0
.33 0
What can go wrong
• Do not violate the area principle.
– Make sure that the percentages add to 100
– Do not display on a slant. (p33)
• Do not confuse similar sounding
percentages. (p34)
• Do not forget to look at the variables
separately too.
– Make sure each category has sufficient cases
What can go wrong
• Be sure to use enough individuals
• Do not overestimate your case.
– No two variables can be entirely independent.
Simpson’s Paradox
•
•
•
•
Do not use unfair or silly averages.
Unfair averaging over different groups.
Ex:
http://www.math.kent.edu/~darci/simpson/
bballexamples.html
Another Example
Day
Night
Overall
Moe
90 out of
100
90%
10 out of
20
50%
100 out of
120
83%
Jill
19 out of
20
95%
75 out of
100
75%
94 out of
120
78%
Class work
• Hand out
Investigative Task
• Look over this weekend
• Have questions for Monday
• Due Tuesday
Download