PRESENTATION OF TRAFFIC DATA USING BOX PLOT METHOD
1. A Report On –
EXPERIMENT - 1
(Presentation of Traffic Data Using Box Plot in Ms Excel)
Submitted by-
SHRIKRISHNA KESHARWANI
Roll no.-
22CEM3R23
Subject-
TRANSPORTATION ANALYTICS LABORATORY
Bachelor of Technology
In
TRANSPORTATION ENGINEERING
DEPARTMENT OF CIVIL ENGINEERING
NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL
SEPTEMBER, 2022
2. Transportation Analytics Laboratory
SHRIKRISHNA KESHARWANI (22CEM3R23) 2
Table of Contents
1. Objectives-..........................................................................................................................3
2. Software Used- ...................................................................................................................3
3. Theory- ...............................................................................................................................3
4. Procedure-...........................................................................................................................3
5. Analysis of Data-................................................................................................................4
6. Results-...............................................................................................................................8
7. Conclusion-.........................................................................................................................8
References..................................................................................................................................8
List of Tables-
Table 1 Analysis of data ............................................................................................................4
Table 2- Five-point summary and Calculation for Boxplot using Quartiles .............................6
Table 3- Five-point summary and Calculation to obtain Boxplot using Percentiles .................6
List of Figures-
Figure 1 Bar graph .....................................................................................................................5
Figure 2 Total count pie chart....................................................................................................5
Figure 3 Mean Pie chart.............................................................................................................5
Figure 4 Box plot with quartile..................................................................................................7
Figure 5 Box plot with percentiles.............................................................................................7
3. Transportation Analytics Laboratory
SHRIKRISHNA KESHARWANI (22CEM3R23) 3
1. Objectives-
Presentation of five number summary of speed data using box plot in MS Excel.
2. Software Used-
MS Excel (2016 version)
3. Theory-
The boxplot a simple alternative to the histogram that contains similar features as the
histogram, is easier to graph, and includes measures of location, spread, skewness, and a rule
for flagging outliers. The key components of the boxplot consist of Tukey’s five number
summary. These are Median, upper quartile, lower quartile, largest value, smallest value.
The box-and-whisker plot has a box at the center that contains approximately 50% of the
middle observations. The horizontal line inside the plot is the median, Q2, which provides a
nice summary measure for the data center. The upper and lower horizontal lines enclosing the
box are the values of Q3, and Q1, respectively. From these, one can obtain the interquartile
range, IQR = Q3 – Q1, which is a common robust measure of spread. Skewness can also be
observed by comparing Q3 – Q2 with Q2 – Q1. If Q2 – Q1 > Q3 – Q2 that means the curve will
be negatively skewed.
4. Procedure-
a) Count the number of data points in the array using count () function.
b) Find the minimum and maximum values in the array using functions min () and
max () respectively.
c) Find the three quartiles of the dataset using Quartile () function.
d) Now calculate Q1 – minimum, Q2 – Q1, Q3 – Q2, Maximum – Q3.
e) Repeat above calculations for all classes of the data.
f) Insert a stacked column chart using the values of Q1, Q2 – Q1, Q3 – Q2.
g) Double click on graph and change the fill of stacked to “no fill”.
h) Add error bars using more elements of the chart.
i) Add chart elements like chart title, axis titles and legends from chart elements
option.
j) Repeat same procedure when plotting box plot using percentile, just change the
function to Percentile () in step 3.
4. Transportation Analytics Laboratory
SHRIKRISHNA KESHARWANI (22CEM3R23) 4
5. Analysis of Data-
Line graph-
x y
10 5
20 15
30 22
40 32
50 42
60 53
70 65
80 81
90 91
100 99
Table 1 Analysis of data
Small Cars Big Cars 2w 3W LCV HCV TOTAL
count 234 136 231 171 139 218 1129
minimum 21 28 19 21 22 22 133
maximum 80 79 43 56 67 66 391
range 59 51 24 35 45 44 258
mean 48 53 33 35 43 43 255
median 47 53 33 35 45 43 256
standard deviation 11 10 6 7 9 8 51
variance 122 107 39 45 75 63 451
5
15
22
32
42
53
65
81
91
99
0
20
40
60
80
100
120
0 20 40 60 80 100 120
No.
of
vechiles
speed (kmph)
Speed graph
SPEED
5. Transportation Analytics Laboratory
SHRIKRISHNA KESHARWANI (22CEM3R23) 5
Bar graph-
Figure 1 Bar graph
Pie chart-
Figure 2 Total count pie chart
Figure 3 Mean Pie chart
0
50
100
150
200
250
count minimum maximum range mean median standard
deviation
variance
No.
of
vehicles-
Small Cars
Big Cars
2w
3W
LCV
HCV
Small Cars
21%
Big Cars
12%
2w
21%
3W
15%
LCV
12%
HCV
19%
Total count
Small Cars
Big Cars
2w
3W
LCV
HCV
Small Cars
19%
Big Cars
21%
2w
12%
3W
14%
LCV
17%
HCV
17%
mean
Small Cars
Big Cars
2w
3W
LCV
HCV
7. Transportation Analytics Laboratory
SHRIKRISHNA KESHARWANI (22CEM3R23) 7
Figure 4 Box plot with quartile
Figure 5 Box plot with percentiles
0
10
20
30
40
50
60
70
80
90
100
Small Cars Big Cars 2w 3W LCV HCV
SPEED
(kmph)
TYPE OF VECHILE-
Box Plot (Quartile)
minimum QT1- MINIMUM QT2-QT1 QT3-QT2 MAX-QT3 Mean
0
10
20
30
40
50
60
70
80
90
100
Small Cars Big Cars 2w 3W LCV HCV
Speed
(Kmph)
Type of vehicle
Box Plot (Percentile)
MINIMUM 15TH PERCENTILE-MINIMUM 50TH-15TH 85TH-50TH MAX-85TH Mean
8. Transportation Analytics Laboratory
SHRIKRISHNA KESHARWANI (22CEM3R23) 8
6. Results-
Count, minimum, maximum, range, mean, median, standard deviation, and variance
has been calculated for the given data. And bar graph and pie chart has been plotted
for the same.
Box plot is plotted for various types of vehicles as shown in the Figure 4 and
Figure 5 andDescriptive Statistics (five point summary) is tabulated in Table 2 and
Table 3.
7. Conclusion-
The Skewness of curve the speed data for different vehicles can be judged using the box plot
median bar and difference between the quartiles. If difference between first quartile and second
quartile is more than difference between third and second quartile, the data can be said t
having negative skewed (left skewness) and if difference between first quartile and second
quartile is less than difference between third and second quartile, the data can be said to having
positive skewed (right skewness). Same pattern can be said for the case of percentile too.
Percentiles gives larger box size and smaller error bars as compared to the percentiles. The
length of the error bars depends upon the range of the data, if the data has more outliers it will
give inter quartile range.
For designing the road section usually percentiles are used, i.e. we can say percentiles are
usually used for engineering purpose.
In the given dataset, Cars have high range that’s the reason they have high inter quartile ranges
as compared to the Auto and 2W.
References
Agrawal, B. L. (n.d.). Basic Statistics . New age Publications.