1 1 Executive Report

The following report exhibits whether there is difference in the number of vehicles between the cars and trucks; besides, it exposes whethere there is a signifucant difference in number of vehicled between Ramp and mainline gantry types. Since the data was taken in 2019 and 2020 thus the report evaluated the difference in the number of vehicles between 2019 and 2020. The results exhibits significant difference in the number of vehicle in all the three sections; vehicle class, gantry type and year

2 2 Full Report

2.1 2.1 Initial Data Analysis

The data was retreived from the NSW Toll Road data. It contains the logs of the number of cars that pass through the Cross City Tunnel in 15 minute intervals for the whole month of March. It contains 14 variables and 35712 observations. However, the key variables include date, vehicle class, gantry type and total volume

traffic= read.csv("traffic.csv")
str(traffic)
## 'data.frame':    35712 obs. of  14 variables:
##  $ AssetID           : chr  "CCT" "CCT" "CCT" "CCT" ...
##  $ FinancialQtrID    : int  201903 201903 201903 201903 201903 201903 201903 201903 201903 201903 ...
##  $ Date              : chr  "2019-03-01" "2019-03-01" "2019-03-01" "2019-03-01" ...
##  $ IntervalStart     : chr  "00:00" "00:00" "00:00" "00:00" ...
##  $ IntervalEnd       : chr  "00:14" "00:14" "00:14" "00:14" ...
##  $ Version           : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ VehicleClass      : chr  "Car" "Truck" "Car" "Truck" ...
##  $ TollPointID       : chr  "East" "East" "SJY" "SJY" ...
##  $ GantryDirection   : chr  "E" "E" "N" "N" ...
##  $ GantryLocation    : chr  "Mainline Eastbound" "Mainline Eastbound" "Sir John Young" "Sir John Young" ...
##  $ GantryGPSLatitude : num  -33.8 -33.8 -33.8 -33.8 -33.8 -33.8 -33.8 -33.8 -33.8 -33.8 ...
##  $ GantryGPSLongitude: num  151 151 151 151 151 ...
##  $ GantryType        : chr  "Mainline Gantry" "Mainline Gantry" "Ramp Gantry" "Ramp Gantry" ...
##  $ TotalVolume       : int  23 2 10 0 18 2 21 1 6 0 ...
traffic$Date=as.Date(traffic$Date)
traffic$FinancialQtrID=as.factor(traffic$FinancialQtrID)
summary(traffic)
##    AssetID          FinancialQtrID      Date            IntervalStart     
##  Length:35712       201903:17856   Min.   :2019-03-01   Length:35712      
##  Class :character   202003:17856   1st Qu.:2019-03-16   Class :character  
##  Mode  :character                  Median :2019-09-15   Mode  :character  
##                                    Mean   :2019-09-15                     
##                                    3rd Qu.:2020-03-16                     
##                                    Max.   :2020-03-31                     
##  IntervalEnd           Version  VehicleClass       TollPointID       
##  Length:35712       Min.   :1   Length:35712       Length:35712      
##  Class :character   1st Qu.:1   Class :character   Class :character  
##  Mode  :character   Median :1   Mode  :character   Mode  :character  
##                     Mean   :1                                        
##                     3rd Qu.:1                                        
##                     Max.   :1                                        
##  GantryDirection    GantryLocation     GantryGPSLatitude GantryGPSLongitude
##  Length:35712       Length:35712       Min.   :-33.8     Min.   :151.2     
##  Class :character   Class :character   1st Qu.:-33.8     1st Qu.:151.2     
##  Mode  :character   Mode  :character   Median :-33.8     Median :151.2     
##                                        Mean   :-33.8     Mean   :151.2     
##                                        3rd Qu.:-33.8     3rd Qu.:151.2     
##                                        Max.   :-33.8     Max.   :151.2     
##   GantryType         TotalVolume    
##  Length:35712       Min.   :  0.00  
##  Class :character   1st Qu.:  1.00  
##  Mode  :character   Median :  8.00  
##                     Mean   : 66.13  
##                     3rd Qu.:111.00  
##                     Max.   :467.00
attach(traffic)

2.2 2.2 Research Question 1: Is there difference in the number of vehicles between car and truck vehicle types?

boxplot(TotalVolume~VehicleClass, main=" Total number of vehicles Across vehicle types", col = 3)

t.test(TotalVolume~VehicleClass)
## 
##  Welch Two Sample t-test
## 
## data:  TotalVolume by VehicleClass
## t = 155.97, df = 17915, p-value < 2.2e-16
## alternative hypothesis: true difference in means between group Car and group Truck is not equal to 0
## 95 percent confidence interval:
##  124.4753 127.6437
## sample estimates:
##   mean in group Car mean in group Truck 
##          129.159330            3.099798

The results above exhibits a significant mean difference in the number of vehicles between the cars and trucks, with cars recording signifucantly high number of vehicles compared to the trucks

2.3 2.3 Research Question 2: Is there difference in the number of vehicles between Ramp and mainline gantry types?

boxplot(TotalVolume~GantryType, main=" Total number of vehicles Across Gantry Types", col = 5)

t.test(TotalVolume~GantryType)
## 
##  Welch Two Sample t-test
## 
## data:  TotalVolume by GantryType
## t = 45.863, df = 35477, p-value < 2.2e-16
## alternative hypothesis: true difference in means between group Mainline Gantry and group Ramp Gantry is not equal to 0
## 95 percent confidence interval:
##  39.82322 43.37898
## sample estimates:
## mean in group Mainline Gantry     mean in group Ramp Gantry 
##                       79.9966                       38.3955

The results above exhibits a significant mean difference in the number of vehicles between the mainline and ramp gantry types, with mainline recording signifucantly high number of vehicles compared to the ramp

2.4 2.4 Research Question 2: Is there difference in the number of vehicles between 2019 and 2020?

boxplot(TotalVolume~FinancialQtrID, main=" Total number of vehicles Across Years in March(03)", col = 7)

t.test(TotalVolume~FinancialQtrID)
## 
##  Welch Two Sample t-test
## 
## data:  TotalVolume by FinancialQtrID
## t = 12.783, df = 35010, p-value < 2.2e-16
## alternative hypothesis: true difference in means between group 201903 and group 202003 is not equal to 0
## 95 percent confidence interval:
##  11.31594 15.41468
## sample estimates:
## mean in group 201903 mean in group 202003 
##             72.81222             59.44691

The results above exhibits a significant mean difference in the number of vehicles between 2019 and 2020 years, with 2019 recording signifucantly high number of vehicles compared to 2020