Chapter 3
Describing categorical data
Number of votes polled when asked “Who will score most runs?”
(Imaginary data)
Chris Gayle 45276 0.097732 9.77
Ajinkya Rahane 39825 0.085966 8.60
Virat Kohli 32419 0.069979 7.00
A B de villiers 29666 0.064037 6.40
Suresh Raina 48977 0.105721 10.57
Brendon McCullum 41678 0.089966 9.00
Shikar Dhawan 26423 0.057036 5.70
Rohit Sharma 30912 0.066726 6.67
J P Duminy 19627 0.042367 4.24
Glenn Maxwell 27555 0.05948 5.95
Ben Stokes 28432 0.061373 6.14
Ambati Rayudu 17666 0.038134 3.81
Angelo Mathews 15487 0.03343 3.34
Gautam Gambhir 22723 0.04905 4.91
Manish Pandey 14900 0.032163 3.22
Virender Sehwag 21700 0.046841 4.68
Total = 463266
Frequency table – represents the distribution of a categorical variable as a table
Can become hard to compare as the table gets large
Virender Sehwag
Manish Pandey
Gautam Gambhir
Angelo Mathews
Ambati Rayudu
Ben Stokes
Glenn Maxwell
J P Duminy
Rohit Sharma Series1
Shikar Dhawan
Brendon McCullum
Suresh Raina
A B de villiers
Virat Kohli
Ajinkya Rahane
Chris Gayle
0 10000 20000 30000 40000 50000 60000
10000
20000
30000
40000
50000
60000
0
Manish Pandey
Angelo Mathews
Ambati Rayudu
J P Duminy
Virender Sehwag
Gautam Gambhir
Shikar Dhawan
Glenn Maxwell
Ben Stokes
A B de villiers
Rohit Sharma
Virat Kohli
Ajinkya Rahane
Brendon McCullum
Chris Gayle
Suresh Raina
Series1
Chris Gayle
Virender Sehwag
Shikar Dhawan
Ajinkya Rahane
Ambati Rayudu
Ben Stokes
Rohit Sharma
Manish Pandey
0
10000 20000 30000 40000 50000 60000
Series1
Number of
Year students
admitted
Number of students admitted
Year 1 38
120
Year 2 40
100
Year 3 39 80
Year 4 54 60
Year 5 56 40
Number of students
admitted
Year 6 62 20
Year 7 58 0
Year 8 69
Year 1
Year 2
Year 3
Year 4
Year 5
Year 6
Year 7
Year 8
Year 9
Year 10
Year 11
Year 12
Year 13
Year 9 63
Year 10 68
Year 11 51
Year 12 99 Is this a frequency table?
Year 13 63
Bar charts used to show frequency of categorical variable
Pie Chart
Manish Pandey
Angelo Mathews
Ambati Rayudu
J P Duminy
Virender Sehwag
Gautam Gambhir
Shikar Dhawan
Glenn Maxwell
Ben Stokes
A B de villiers
Shows distribution of a categorical variable as wedges of a circle
Useful for proportions particularly when some are close to ½, ¼ etc
Easier to compare bars than areas
Number of faculty (area wise in DoMS)
Operations 6
Finance 5
Operations
Human Finance
Resources 4 Human Resources
Marketing 3 Marketing
Systems 2 Systems
Integrative 3 Integrative
IPR 1 IPR
IPR
Integrative
Systems Which is better?
Marketing
Series1
Human Resources
Bar or Pie?
Finance
Operations
0 1 2 3 4 5 6 7
Exercise
(Interpret a bar chart and a pie chart?)
Ask 20 students their mother tongue. Interpret a bar chart and a pie chart?
The pay package given to 50 MBA students are available. Interpret a bar chart
and a pie chart?
The colour of the shirt worn by 50 students is available.
The specializations taken by 40 second year MBA students
The number of students who start their own companies in the last 10 years
60000
The area principle
50000
40000
30000
20000
10000
Series1
0
Suresh Raina
Angelo Mathews
Manish Pandey
Rohit Sharma
Glenn Maxwell
Brendon McCullum
Ben Stokes
Gautam Gambhir
J P Duminy
Virat Kohli
Ambati Rayudu
Ajinkya Rahane
Shikar Dhawan
A B de villiers
Chris Gayle
Virender Sehwag
Chris Gayle
Ajinkya Rahane
Area occupied by a part of Rohit Sharma
the graph should Ben Stokes
correspond to the amount Shikar Dhawan
Series1
of data it represents Virender Sehwag
Ambati Rayudu
Manish Pandey
0 10000 20000 30000 40000 50000 60000
6543 6700
6087
6600
6500
6619 6400
6643
6300
6200 Series1
6489 6100
6653 6000
5900
6222 5800
1 2 3 4 5 6 7 8
6114
8000
Demand data 7000
6000
5000
4000
Series1
3000
2000
1000
0
1 2 3 4 5 6 7 8
MBA faculty Operations
Finance
Operations 6 Human Resources
Finance 5 Marketing
Human Systems
Integrative
Resources 4
IPR
Marketing 3
Systems 2
Integrative 3
IPR 1 Operations
Finance
Human Resources
Marketing
Systems
Operations Integrative
Finance IPR
Human Resources
Marketing
Systems
Integrative
IPR
Colour of cars parked
Black 55
Blue 22 Black
Blue
White 30 White
Gray 31 Gray
Red
Red 20 Others
Others 42
Black Black
Blue Blue
White White
Gray Gray
Red Red
Others
Summaries of categorical data
MODE
Manish Pandey
Angelo Mathews
Ambati Rayudu
• Most common category J P Duminy
• Category with the highest Virender Sehwag
Gautam Gambhir
frequency Shikar Dhawan
• Longest bar in a bar chart Glenn Maxwell
Ben Stokes
• Largest slice of area in a pie chart A B de villiers
• First category shown in a Pareto
chart
Chris Gayle
Ajinkya Rahane
• Sometimes bi modal or multi Rohit Sharma
Ben Stokes
modal Shikar Dhawan
Series1
Virender Sehwag
Ambati Rayudu
Manish Pandey
Which player represents the mode? 0 10000 20000 30000 40000 50000 60000
Is it bimodal?
MEDIAN of an ordinal variable
• Data has to be put in order
• Category of the middle observation when ordered
• Odd number Vs even number
Grades of 10 students in Operations Management
A, C, B, A, A, C, B, D, A, C
4.5
A 4
4
3.5 Mode is A
B 2
3
2.5 Median is B
2 Series1
C 3 1.5
1
D 1 0.5
0
A B C D
Relate mode and median to the following?
Ask 20 students their mother tongue.
The pay package given to 50 MBA students are available.
The colour of the shirt worn by 50 students is available.
The specializations taken by 40 second year MBA students
The number of students who start their own companies in the last 10 years