Cycling to Work or to Play?

The Canberra Bike Barometer

Raelene Monahan s3873725

25 October 2020

Introduction

Introduction Cont.

Problem Statement

Data

Data Pre-Processing

Data Pre-Processing cont.

Descriptive Statistics and Visualisation

boxplot(Number_Trips ~ Wday_Wknd,
        data = bike_Autumn2018, main = "Box Plot of Number of Bicycle Trips by Day Type", ylab = "Number of Trips", xlab = "Day Type")

Descriptive Statistics and Visualisation cont.

bike_Autumn2018 %>% group_by(Wday_Wknd) %>% summarise(
  Min = min(Number_Trips, na.rm = TRUE),
   Q1 = quantile(Number_Trips, probs = .25, na.rm = TRUE),
  Median = median(Number_Trips, na.rm = TRUE),
  Q3 = quantile(Number_Trips, probs = .75, na.rm = TRUE),
  Max = max(Number_Trips, na.rm = TRUE),
  Mean = mean(Number_Trips, na.rm = TRUE),
  SD = sd(Number_Trips, na.rm = TRUE),
  n = n()) -> table1
knitr::kable(table1)
Wday_Wknd Min Q1 Median Q3 Max Mean SD n
Weekday 948 1799.0 1966 2072 2331 1922.4098 258.7085 61
Weekend 316 559.5 694 813 1013 683.1613 178.6477 31

Hypothesis Testing - Normality

bike_Weekday$Number_Trips %>% qqPlot(dist="norm", main = "Test for normality (Weekday)", ylab = "Number of Trips")

## [1] 43 48

Hypothesis Testing - Normality

bike_Weekend$Number_Trips %>% qqPlot(dist="norm", main = "Test for normality (Weekend)", ylab = "Number of Trips")

## [1] 25 20

Hypothesis Testing - Homogeneity of Variance

leveneTest(Number_Trips ~ Wday_Wknd, data = bike_Autumn2018)

Hypothesis Testing - t-Test

t.test(
  Number_Trips ~ Wday_Wknd, 
  data = bike_Autumn2018,
  var.equal = TRUE,
  alternative = "two.sided"
)
## 
##  Two Sample t-test
## 
## data:  Number_Trips by Wday_Wknd
## t = 23.901, df = 90, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  1136.240 1342.257
## sample estimates:
## mean in group Weekday mean in group Weekend 
##             1922.4098              683.1613

Discussion

References

ACT Government 2020, ACT Bike Barometer - MacArthur Avenue, data file, ACT Government, Transport Canberra and City Services, Canberra, viewed 28 September 2020, https://www.data.act.gov.au/Transport/ACT-Bike-Barometer-MacArthur-Avenue/62sb-92ea.

Australian Bureau of Statistics 2017, More than two in three drive to work, Census reveals, media release 133/2017, ABS, Canberra, viewed 22 October 2020, https://www.abs.gov.au/ausstats/abs@.nsf/mediareleasesbyreleasedate/7DD5DC715B608612CA2581BF001F8404?OpenDocument.

Transport Canberra n.d., Bike barometer and active travel data – Data collection and usage, ACT Government, Canberra, viewed 16 October 2020, https://www.transport.act.gov.au/about-us/active-travel/active-travel-in-the-community/cycling-in-canberra/Bike-barometer-and-active-travel-data.