2. Basic Statistics: Review
What are Statistics?
The art of abstracting Real World via
sampling and deriving general
“estimates” that describes the Real
World at a certain degree of
confidence.
ElDessouki
CONEN 442 Transportation Engineering S2021
104
Real World
sample
Sample Date
&
Data Reduction
Descriptive
Measures for
Real World
(@ deg. Of
confidence)
Math.
Model
Decision
Making
&
Design
3. Basic Statistics: Review
When do we need Statistics?
When we can not measure all the data values for the
population.
Before starting: What do we need to address?
Sample Size (how many measurements are
sufficient?)
What Confidence should I have in the results?
What statistical model distribution (math model) that
better describes the observed data?
Did a traffic engineering solution affected the status
of the Real World significantly?(before & after
analysis)
ElDessouki
CONEN 442 Transportation Engineering S2021
105
5. Basic Statistics:
Common Statistical Estimators
Mean:
ElDessouki
CONEN 442 Transportation Engineering S2021
107
ns
Observatio
of
number
N
i
n
observatio
x
mean
sample
x
where
N
x
x
i
N
i
i
)
(
:
1
Median:
- Is the middle value of
all the sample data (
i.e. 50% of the data are
above this value)
Mode:
Is the value that occurs
most frequently
Measures of Central Tendency:
6. Basic Statistics:
Common Statistical Estimators
Variance:
ElDessouki
CONEN 442 Transportation Engineering S2021
108
ns
Observatio
of
number
N
i
n
observatio
x
mean
sample
x
Variance
sample
S
where
N
x
x
S
i
N
i
i
)
(
:
)
1
(
)
(
2
1
2
2
Standard Deviation:
Measures of Dispersion:
Variance
sample
S
Deviation
dard
S
S
where
N
x
x
S
S
N
i
i
2
1
2
2
tan
:
)
1
(
)
(
7. Basic Statistics:
Common Statistical Estimators
Coefficient of Variation:
The ratio between the
standard deviation and the
mean.
ElDessouki
CONEN 442 Transportation Engineering S2021
109
mean
sample
x
deviation
Standard
STD
Variation
of
t
Coefficien
C
where
x
STD
C
var
var
:
Skewness:
Describes the asymmetry in
the data sample.
Measures of Dispersion:
STD
mode)
mean
Skewness
(
8. Basic Statistics:
Common Statistical Estimators
ElDessouki
CONEN 442 Transportation Engineering S2021
110
MS Excel Functions:
Mean = average(range array)
Mode = mode(range array)
Median = median(range array)
Variance = var(range array)
Standard Deviation = stdev( range array)
Skewness = skew( range array)
9. Basic Statistics: Useful MS Excel “Tricks” 1
ElDessouki
CONEN 442 Transportation Engineering S2021
111
For Plotting Frequency Diagram:
For a sample of speed observations do the following:
Delete the lowest value and the highest value from the sample because those are called
“outliers”
Define the range of the data using the functions: =min(data range) & = max(data range)
Divide that range into equal intervals
Estimate the frequency of values grater than the lower limit of each interval , use the following
functions: = freq(data range, “> value”)
Subtract the values from the previous interval, then you get the frequency for that interval.
The sum of all values should be the number of observations (N)
Define the mid of the interval as (x) and the freq. of interval as (y)
PLOT using column chart type
10. Basic Statistics: Useful MS Excel “Tricks” 2
ElDessouki
CONEN 442 Transportation Engineering S2021
112
Plotting Cumulative Frequency% Diagram:
For the same sample do the following:
Define a percentile sequence (y) starting from 0% to 100% in 5% increments.
For each percentile value (y) in the sequence determine the corresponding
observation value (x):
= Percentile(data range, percentile value (y))
Plot using XY- line chart type
11. Basic Statistics:
Standard Error, True Mean & Sample Size
ElDessouki
CONEN 442 Transportation Engineering S2021
113
Standard Error:
The standard error (E) in the sample mean ( X ) is function in the
sample size and the standard deviation of the population ( the
sample SD can be used instead):
size
sample
the
is
-
N
instead
used
be
can
sample
the
for
SD
The
population
the
for
deviation
standard
the
is
-
where
N
E
12. Basic Statistics:
Standard Error, True Mean & Sample Size
ElDessouki
CONEN 442 Transportation Engineering S2021
114
True Mean: m
The standard error (E) for the sample mean ( X ) is assumed to follow a
normal distribution around the true mean ( m ).
Hence:
mean
sample
the
is
-
X
sample
the
of
error
standard
the
is
-
E
where
99.5%)
Confidence
of
Degre
(at
E
X
95%)
Confidence
of
Degree
(at
E
X
67%)
Confidence
of
Degree
(at
E
X
00
.
3
96
.
1
00
.
1
m
m
m
13. Basic Statistics:
Standard Error, True Mean & Sample Size
ElDessouki
CONEN 442 Transportation Engineering S2021
115
Sample Size:
For a given allowable error ( err ) and a specific degree of
confidence , the sample size ( N ) can be determined as following:
mean
true
the
in
error
allwable
maximum
-
err
sample
the
of
deviation
standard
the
is
-
SD
where
99.5%)
Confidence
of
Degre
(at
err
SD
N
95%)
Confidence
of
Degre
(at
err
SD
N
67%)
Confidence
of
Degre
(at
err
SD
N
2
2
2
)
00
.
3
(
)
96
.
1
(
15. Speed Studies: Spot Speed Studies
Spot Speed Studies:
Is defined as the average speed of vehicles passing a point on a
highway. This is also known as the time mean speed.
Usually conducted in free flow condition and not during congestion,
where the flow rate is:
750-1000 veh/hr/ln for freeway
<500 veh/hr/ln for other types
Speed Definition of Interest:
- Average or time mean speed
- Standard Deviation
- 85th % speed
- Median speed
ElDessouki
CONEN 442 Transportation Engineering S2021
117
16. Speed Studies: Spot Speed Studies
Uses of Spot Speed Data:
To determine speed limit for applications
To assess speed limit enforcement
Specific Applications:
For Level of Service (LOS) Assessment
For Signal timing: Estimation of Yellow/All Red times.
To determine appropriate sight distance
For safety and accidents analysis
ElDessouki
CONEN 442 Transportation Engineering S2021
118
17. Speed Studies: Measurement
Techniques
Manual Method: The Simple Stopwatch Method :
By using stopwatch and defining two reference points
with known distance (d) between the two points.
Then, Speed = d / t (m/s)
Advantages: Simple
Disadvantages:
High error due to stopwatch
depressing time variations.
Class Example
ElDessouki
CONEN 442 Transportation Engineering S2021
119
40 m
18. Speed Studies: Spot Speed Studies
Doppler Radar (Speed Gun):
It uses Doppler’s effect for speed measurements.
How Does it work?
The radar transmits a pack of waves with initial frequency fini and initial
wavelength lini ,
Due to the motion of the target vehicle, the wavelength of the reflected waves
lref will be longer or shorter than the initial wavelength lini
ElDessouki
CONEN 442 Transportation Engineering S2021
120
direction
s
target'
the
on
depnding
V
f
target
ini
ini
ref
*
1
l
l
lini
lref
Transmitted wave
Reflected wave
Target
Radar
19. Speed Studies: Spot Speed Studies
Doppler Radar (Speed Gun):
Advantages:
High Accuracy, but the readings must be corrected for aiming
angle.
Disadvantages:
Difficult to conceal, drivers associate Radar
with police which may cause them to
slow their speeds down and yielding
inaccurate results.
ElDessouki
CONEN 442 Transportation Engineering S2021
121
21. Spot Speed Studies:
Data Reduction & Analysis
The speed data is analyzed and reported as following:
A- Graphical: Frequency Histogram & Accumulative %
ElDessouki
CONEN 442 Transportation Engineering S2021
123
0
5
10
15
20
25
30
35
50-60 60-70 70-80 80-90 90-100 100-110 110-120 120-130 130-140 140-150 150-160
Frequencey
Speed (km/hr)
MODE = 105 km/hr
The shown speed data
has
a Bimodal Distribution
22. Spot Speed Studies:
Data Reduction & Analysis
The speed data is analyzed and reported as following:
A- Graphical: Accumulative %
ElDessouki
CONEN 442 Transportation Engineering S2021
124
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
20 40 60 80 100 120 140 160 180
Accumulative
%
Speed (km/hr)
Median
85
%
85th% Speed
15
%
15th% Speed
23. Spot Speed Studies:
Data Reduction & Analysis
The speed data is analyzed and reported as following:
B- Quantitative:
1- Mode
2- Median
3- Mean
4- Standard Deviation (SD)
5-85th% & 15th% Speeds
6- Pace(15 km/hr band)
ElDessouki
CONEN 442 Transportation Engineering S2021
125
24. Spot Speed Studies:
Data Reduction & Analysis
The speed data is analyzed and reported as following:
C- Precision and Confidence Intervals:
Note: Most spot speed data tend to be normally distributed (however, this might
not applicable in the shown example histogram), then:
Standard Error:
True Mean:
ElDessouki
CONEN 442 Transportation Engineering S2021
126
size
sample
the
is
-
N
sample
the
for
deviation
standard
the
is
-
SD
where
N
SD
E
mean
sample
the
is
-
X
sample
the
of
error
standard
the
is
-
E
where
95%)
Confidence
of
Degree
(at
E
X 96
.
1
m
25. Spot Speed Studies:
Data Reduction & Analysis
The speed data is analyzed and reported as following:
D- Sample Size for Prescribed Precision with Confidence Intervals:
If the Prescribed precision was set to be +/- e, the needed
sample should not be less than the following number of
observations N @ a degree of confidence 95%:
ElDessouki
CONEN 442 Transportation Engineering S2021
127
mean
true
the
in
error
the
i.e.
precision
needed
the
-
e
sample
the
of
deviation
standard
the
is
-
SD
where
e
SD
N
2
)
96
.
1
(
26. Speed Studies: Before and After Analysis
Before and After Analysis:
Usually carried out to evaluate the effectiveness of applying a specific
measure on the prevailing speed in an area or a segment.
The before and after is basically a comparison testing between two samples
, with the objective of finding that the difference between the two samples is
significant or not.
Hypothesis Testing
Any hypothesis test, has 4 possible outcomes:
1- Test Result: True, and Reality: True
2- Test Result: False, and Reality: False
3- Test Result: False, and Reality: True Error Type II
4- Test Result: True, and Reality: False Error Type I
Error Type I - must be avoided at all expenses
ElDessouki
CONEN 442 Transportation Engineering S2021
128
True/True
False/Fals
e
False/Tru
e
True/Fals
e
27. Speed Studies: Before and After Analysis
The Statistical Testing (Z-test):
First, calculate the Pooled Standard Deviation for before & after
samples:
Second: Calculate Zd the Standard Normal distribution approximation for
the Observed difference between the before & after samples:
ElDessouki
CONEN 442 Transportation Engineering S2021
129
resp.
after
&
before
size
Sample
N
N
resp.
after
&
before
Deviation
Standard
S
S
Deviation
Standard
Pooled
S
where
N
S
N
S
S
2
1
2
1
&
&
2
2
2
1
2
1
)
difference
mean
population
ed
hypothesiz
d
Deviation
Standard
pooled
S
resp.
after
&
before
speed
Mean
X
X
after
&
before
between
Diffirence
Normalized
Z
S
d
X
X
Z
o
2
1
d
o
d
&
2
1
28. Speed Studies: Before and After Analysis
The Statistical Testing (Z-test) cont.:
Third, we use the normal distribution curve to find the probability
that a value equal to or less than Zd , assuming that both
samples are normally distributed , then:
A) If Prob.( Z<= Zd ) > 0.95 , that means the observed reduction in
speed is statistically significant.
B) If Prob.( Z<= Zd ) < 0.95 , that means the observed reduction in
speed is statistically insignificant.
For case A, that implies also that there is a 5% chance that
the observed difference in mean speed will be exceeded.
ElDessouki
CONEN 442 Transportation Engineering S2021
130
29. Speed Studies: Before and After Analysis
Example:
The following is the before and after summary for speed
enforcement project that was deployed with a target of
reducing average speed to 60 mph.
Before After
Mean Speed: 65.3 63 (mph)
SD: 5 6 (mph)
N: 50 60 observation
Solution
P(Z<2.19) = 0.9857 = 98.57 % >95%
Then: The observed reduction in speed was statistically significant
ElDessouki
CONEN 442 Transportation Engineering S2021
131
mph
N
S
N
S
S 05
.
1
60
6
50
5 2
2
2
2
2
1
2
1
) 19
.
2
05
.
1
0
63
3
.
65
d
Z
30. Speed Studies: Before and After Analysis
Example (cont.):
Now, the question did we reach the target?
That means the true mean is between: (61.48 - 64.52) mph
The Answer is NO, the reduction is not sufficient, and we did not
achieve the 60 mph target
ElDessouki
CONEN 442 Transportation Engineering S2021
132
mph
63.0
E
X 52
.
1
0
.
63
60
6
*
96
.
1
96
.
1
m
32. Traffic Volume Studies:
Volume studies:
Traffic counts are the most basic of traffic studies
and are the primary measure of demand; virtually
all aspects of traffic engineering require volume as
an input, including highway planning and design,
decisions on traffic control and operations, detailed
signal timing, and others.
ElDessouki
CONEN 442 Transportation Engineering S2021
134
33. Traffic Volume Studies:
Automated and Manual counting techniques are used to produce
estimates of the following:
1. Volume: is the number of vehicles (or persons) passing a point during
a specified time period, which is usually one hour, but need not be it
can be a day, month, year…etc.
2. Rate of flow: is the rate at which vehicles (or persons) pass a point
during a specified time period less than one hour, expressed as
an equivalent hourly rate.
3. Demand is the number of vehicles (or persons) that desire to travel
past a point during a specified period (also usually one hour).
Demand is frequently higher than actual volumes where congestion
exists. Some trips divert to alternative routes, while other trips are
simply not made.
4. Capacity is the maximum rate at which vehicles can traverse a
point or short segment during a specified time period. It is a
characteristic of the roadway.
ElDessouki
CONEN 442 Transportation Engineering S2021
135
35. Traffic Volume Studies:
Example: When demand exceeds capacity. What happens?
ElDessouki
CONEN 442 Transportation Engineering S2021
137
36. Traffic Volume Studies: Manual Counting 1
Manual counting is typically used at intersections, however, it can
be used for highways for 1-2 hours, for LOS assessment.
Tally Sheets:
Recording data onto tally sheets is the simplest means of
conducting manual counts. The data can be recorded with a
tick mark on a pre-prepared field form. A watch or stopwatch is
necessary to measure the desired count interval. A blank traffic
volume count intersection tally sheet is provided in Appendix B.
ElDessouki
CONEN 442 Transportation Engineering S2021
138
40. Traffic Volume Studies: Automated Counting 1
Portable Counters:
Portable counters serve the same purpose as manual counts
but with automatic counting equipment.
The period of data collection using this method is usually
longer than when using manual counts.
The portable counter method is mainly used for 24-hour
counts. Pneumatic road tubes are used to conduct this
method of automatic counts
ElDessouki
CONEN 442 Transportation Engineering S2021
142
42. Traffic Volume Studies: Automated Counting 2
Permanent Counters:
Permanent counters are used when long-term counts are to be
conducted. The counts could be
performed every day for a year or more. The data collected
may be used to monitor and evaluate
traffic volumes and trends over a long period of time.
Permanent counters are not a cost-effective
option in most situations. Few jurisdictions have access to this
equipment
ElDessouki
CONEN 442 Transportation Engineering S2021
144
45. Traffic Volume Studies: Automated Counting 3
Video Imaging:
Observers can record count data by videotaping traffic.
Traffic volumes can be counted by viewing videotapes
recorded with a camera at a collection site.
A digital clock in the video image can prove useful in noting
time intervals.
Videotaping is not a cost-effective option in most situations.
ElDessouki
CONEN 442 Transportation Engineering S2021
147