##
## Call:
## lm(formula = total ~ poly(temp, 3, raw = TRUE) + as.factor(weathersit) +
## as.factor(Promotion) + as.factor(mnth) + windspeed + as.factor(weekday) +
## as.factor(holiday), data = bikeshare)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3564.4 -343.4 44.8 434.6 2270.0
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.276e+03 4.593e+02 4.954 9.09e-07 ***
## poly(temp, 3, raw = TRUE)1 -3.118e+02 8.426e+01 -3.701 0.000232 ***
## poly(temp, 3, raw = TRUE)2 3.187e+01 4.565e+00 6.981 6.78e-12 ***
## poly(temp, 3, raw = TRUE)3 -6.638e-01 7.613e-02 -8.719 < 2e-16 ***
## as.factor(weathersit)2 -7.518e+02 6.011e+01 -12.507 < 2e-16 ***
## as.factor(weathersit)3 -2.523e+03 1.712e+02 -14.736 < 2e-16 ***
## as.factor(Promotion)1 2.034e+03 5.573e+01 36.504 < 2e-16 ***
## as.factor(mnth)2 1.047e+02 1.439e+02 0.728 0.466868
## as.factor(mnth)3 6.152e+02 1.559e+02 3.947 8.72e-05 ***
## as.factor(mnth)4 9.002e+02 1.723e+02 5.225 2.30e-07 ***
## as.factor(mnth)5 9.906e+02 1.959e+02 5.056 5.47e-07 ***
## as.factor(mnth)6 1.328e+03 2.178e+02 6.098 1.76e-09 ***
## as.factor(mnth)7 1.532e+03 2.425e+02 6.317 4.73e-10 ***
## as.factor(mnth)8 1.256e+03 2.248e+02 5.585 3.33e-08 ***
## as.factor(mnth)9 1.405e+03 2.027e+02 6.932 9.37e-12 ***
## as.factor(mnth)10 1.493e+03 1.746e+02 8.554 < 2e-16 ***
## as.factor(mnth)11 1.198e+03 1.582e+02 7.570 1.17e-13 ***
## as.factor(mnth)12 7.790e+02 1.486e+02 5.243 2.09e-07 ***
## windspeed -4.209e+01 5.583e+00 -7.540 1.45e-13 ***
## as.factor(weekday)1 1.721e+02 1.058e+02 1.626 0.104466
## as.factor(weekday)2 3.278e+02 1.033e+02 3.172 0.001581 **
## as.factor(weekday)3 3.930e+02 1.036e+02 3.792 0.000162 ***
## as.factor(weekday)4 4.613e+02 1.033e+02 4.468 9.21e-06 ***
## as.factor(weekday)5 5.096e+02 1.032e+02 4.939 9.82e-07 ***
## as.factor(weekday)6 4.854e+02 1.027e+02 4.726 2.76e-06 ***
## as.factor(holiday)1 -5.585e+02 1.735e+02 -3.218 0.001348 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 742.5 on 705 degrees of freedom
## Multiple R-squared: 0.8581, Adjusted R-squared: 0.8531
## F-statistic: 170.6 on 25 and 705 DF, p-value: < 2.2e-16
I did not find any concerning issues with multicollinearity or linearity in the regression, while there were some instances multicollinearity in the data (such as between temperature and season for example), I either did not include the variables that were collinear, or they were only minorly so and I decided the collinearity would not impact the results too significantly. Regarding linearity, all the relevant plots of the model displayed a largely linear trend.
## season Promotion mnth holiday
## season 1.000000000 -0.001844343 0.831440114 -0.010536659
## Promotion -0.001844343 1.000000000 -0.001792434 0.007954311
## mnth 0.831440114 -0.001792434 1.000000000 0.019190895
## holiday -0.010536659 0.007954311 0.019190895 1.000000000
## weekday -0.003079881 -0.005460765 0.009509313 -0.101960269
## workingday 0.012484963 -0.002012621 -0.005900951 -0.253022700
## weathersit 0.019211028 -0.048726541 0.043528098 -0.034626841
## temp 0.334314856 0.047603572 0.220205335 -0.028555535
## humidity 0.205444765 -0.110651045 0.222203691 -0.015937479
## windspeed -0.229046337 -0.011817060 -0.207501752 0.006291507
## casual 0.210399165 0.248545664 0.123005889 0.054274203
## registered 0.411623051 0.594248168 0.293487830 -0.108744863
## total 0.406100371 0.566709708 0.279977112 -0.068347716
## weekday workingday weathersit temp
## season -0.0030798813 0.012484963 0.01921103 0.3343148564
## Promotion -0.0054607652 -0.002012621 -0.04872654 0.0476035719
## mnth 0.0095093129 -0.005900951 0.04352810 0.2202053352
## holiday -0.1019602689 -0.253022700 -0.03462684 -0.0285555350
## weekday 1.0000000000 0.035789674 0.03108747 -0.0001699624
## workingday 0.0357896736 1.000000000 0.06120043 0.0526598102
## weathersit 0.0310874694 0.061200430 1.00000000 -0.1206022365
## temp -0.0001699624 0.052659810 -0.12060224 1.0000000000
## humidity -0.0522321004 0.024327046 0.59104460 0.1269629390
## windspeed 0.0142821241 -0.018796487 0.03951106 -0.1579441204
## casual 0.0599226375 -0.518044191 -0.24735300 0.5432846617
## registered 0.0573674440 0.303907117 -0.26038771 0.5400119662
## total 0.0674434124 0.061156063 -0.29739124 0.6274940090
## humidity windspeed casual registered total
## season 0.20544476 -0.229046337 0.21039916 0.41162305 0.40610037
## Promotion -0.11065104 -0.011817060 0.24854566 0.59424817 0.56670971
## mnth 0.22220369 -0.207501752 0.12300589 0.29348783 0.27997711
## holiday -0.01593748 0.006291507 0.05427420 -0.10874486 -0.06834772
## weekday -0.05223210 0.014282124 0.05992264 0.05736744 0.06744341
## workingday 0.02432705 -0.018796487 -0.51804419 0.30390712 0.06115606
## weathersit 0.59104460 0.039511059 -0.24735300 -0.26038771 -0.29739124
## temp 0.12696294 -0.157944120 0.54328466 0.54001197 0.62749401
## humidity 1.00000000 -0.248489099 -0.07700788 -0.09108860 -0.10065856
## windspeed -0.24848910 1.000000000 -0.16761335 -0.21744898 -0.23454500
## casual -0.07700788 -0.167613349 1.00000000 0.39528245 0.67280443
## registered -0.09108860 -0.217448981 0.39528245 1.00000000 0.94551692
## total -0.10065856 -0.234544997 0.67280443 0.94551692 1.00000000
Holding everything else constant, October (or the 10th month) has the highest total ridership. Even if it became unseasonably cold and rainy, it would not change the coefficient for month as the change would be accounted for by the temp and weathersit, and we didn’t update the model to reflect new data.
On promotional days, there are 2.034e+03 more riders on average than on non-promotional days. Based off of the crPlot of the model, it does appear like the promotions had a substantial effect on ridership.
The promotion had a more significant impact on registered riders than casuals based off of the t values of the Promotion variable for each (which reveals registered had a higher impact from promotion), and compared the increase in riders on a promotional day compared to average number of both casual and registered riders as a percentage increase.
## [1] "Registered"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 20 2497 3662 3656 4776 6946
## [1] "Casual"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 2.0 315.5 713.0 848.2 1096.0 3410.0
Casual: ((Promotion Intercept)/Avg # of Casual Riders)x100 = ((297)/848)*100 = 35%
Registered: ((Promotion Intercept)/Avg # of Registered Riders)x100 = ((1736)/3656)*100 = 47%
##
## Call:
## lm(formula = registered ~ poly(temp, 3, raw = TRUE) + as.factor(weathersit) +
## as.factor(Promotion) + as.factor(mnth) + windspeed + as.factor(weekday) +
## as.factor(holiday), data = bikeshare)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3376.7 -286.6 40.6 370.5 1529.7
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.094e+03 3.788e+02 2.889 0.003979 **
## poly(temp, 3, raw = TRUE)1 -1.703e+02 6.948e+01 -2.451 0.014475 *
## poly(temp, 3, raw = TRUE)2 1.980e+01 3.765e+00 5.258 1.93e-07 ***
## poly(temp, 3, raw = TRUE)3 -4.303e-01 6.278e-02 -6.854 1.57e-11 ***
## as.factor(weathersit)2 -5.531e+02 4.957e+01 -11.159 < 2e-16 ***
## as.factor(weathersit)3 -2.026e+03 1.412e+02 -14.348 < 2e-16 ***
## as.factor(Promotion)1 1.736e+03 4.596e+01 37.785 < 2e-16 ***
## as.factor(mnth)2 9.433e+01 1.186e+02 0.795 0.426829
## as.factor(mnth)3 2.938e+02 1.286e+02 2.286 0.022577 *
## as.factor(mnth)4 5.021e+02 1.421e+02 3.534 0.000436 ***
## as.factor(mnth)5 6.506e+02 1.616e+02 4.027 6.26e-05 ***
## as.factor(mnth)6 1.023e+03 1.796e+02 5.695 1.81e-08 ***
## as.factor(mnth)7 1.153e+03 2.000e+02 5.768 1.20e-08 ***
## as.factor(mnth)8 1.003e+03 1.854e+02 5.410 8.65e-08 ***
## as.factor(mnth)9 1.161e+03 1.672e+02 6.944 8.69e-12 ***
## as.factor(mnth)10 1.195e+03 1.439e+02 8.303 5.16e-16 ***
## as.factor(mnth)11 1.009e+03 1.305e+02 7.733 3.64e-14 ***
## as.factor(mnth)12 7.374e+02 1.225e+02 6.018 2.84e-09 ***
## windspeed -2.796e+01 4.604e+00 -6.074 2.04e-09 ***
## as.factor(weekday)1 9.292e+02 8.727e+01 10.648 < 2e-16 ***
## as.factor(weekday)2 1.120e+03 8.521e+01 13.145 < 2e-16 ***
## as.factor(weekday)3 1.187e+03 8.545e+01 13.896 < 2e-16 ***
## as.factor(weekday)4 1.229e+03 8.515e+01 14.430 < 2e-16 ***
## as.factor(weekday)5 1.097e+03 8.508e+01 12.895 < 2e-16 ***
## as.factor(weekday)6 3.180e+02 8.468e+01 3.755 0.000187 ***
## as.factor(holiday)1 -1.116e+03 1.431e+02 -7.798 2.26e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 612.3 on 705 degrees of freedom
## Multiple R-squared: 0.8513, Adjusted R-squared: 0.846
## F-statistic: 161.4 on 25 and 705 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = I(log(casual)) ~ poly(temp, 3, raw = TRUE) + as.factor(weathersit) +
## as.factor(Promotion) + as.factor(mnth) + windspeed + as.factor(weekday) +
## as.factor(holiday), data = bikeshare)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0524 -0.1527 0.0153 0.2030 1.3557
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.359e+00 2.424e-01 17.979 < 2e-16 ***
## poly(temp, 3, raw = TRUE)1 1.262e-01 4.448e-02 2.838 0.00467 **
## poly(temp, 3, raw = TRUE)2 2.012e-03 2.410e-03 0.835 0.40413
## poly(temp, 3, raw = TRUE)3 -1.112e-04 4.018e-05 -2.767 0.00580 **
## as.factor(weathersit)2 -3.372e-01 3.173e-02 -10.628 < 2e-16 ***
## as.factor(weathersit)3 -1.593e+00 9.037e-02 -17.623 < 2e-16 ***
## as.factor(Promotion)1 3.640e-01 2.942e-02 12.375 < 2e-16 ***
## as.factor(mnth)2 9.884e-02 7.594e-02 1.302 0.19349
## as.factor(mnth)3 7.500e-01 8.229e-02 9.114 < 2e-16 ***
## as.factor(mnth)4 8.104e-01 9.094e-02 8.912 < 2e-16 ***
## as.factor(mnth)5 7.512e-01 1.034e-01 7.264 9.96e-13 ***
## as.factor(mnth)6 7.488e-01 1.150e-01 6.514 1.39e-10 ***
## as.factor(mnth)7 8.467e-01 1.280e-01 6.615 7.33e-11 ***
## as.factor(mnth)8 7.653e-01 1.186e-01 6.450 2.08e-10 ***
## as.factor(mnth)9 6.518e-01 1.070e-01 6.091 1.85e-09 ***
## as.factor(mnth)10 6.785e-01 9.214e-02 7.364 4.99e-13 ***
## as.factor(mnth)11 5.992e-01 8.350e-02 7.176 1.83e-12 ***
## as.factor(mnth)12 3.533e-01 7.843e-02 4.504 7.79e-06 ***
## windspeed -2.125e-02 2.947e-03 -7.211 1.43e-12 ***
## as.factor(weekday)1 -8.320e-01 5.586e-02 -14.893 < 2e-16 ***
## as.factor(weekday)2 -8.896e-01 5.454e-02 -16.309 < 2e-16 ***
## as.factor(weekday)3 -9.273e-01 5.470e-02 -16.952 < 2e-16 ***
## as.factor(weekday)4 -8.586e-01 5.451e-02 -15.753 < 2e-16 ***
## as.factor(weekday)5 -5.944e-01 5.446e-02 -10.914 < 2e-16 ***
## as.factor(weekday)6 1.165e-01 5.421e-02 2.148 0.03202 *
## as.factor(holiday)1 6.793e-01 9.160e-02 7.416 3.47e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3919 on 705 degrees of freedom
## Multiple R-squared: 0.857, Adjusted R-squared: 0.8519
## F-statistic: 168.9 on 25 and 705 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = registered ~ poly(temp, 3, raw = TRUE) + as.factor(weathersit) +
## as.factor(Promotion) + as.factor(mnth) + windspeed + as.factor(weekday) +
## as.factor(holiday), data = bikeshare)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3376.7 -286.6 40.6 370.5 1529.7
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.094e+03 3.788e+02 2.889 0.003979 **
## poly(temp, 3, raw = TRUE)1 -1.703e+02 6.948e+01 -2.451 0.014475 *
## poly(temp, 3, raw = TRUE)2 1.980e+01 3.765e+00 5.258 1.93e-07 ***
## poly(temp, 3, raw = TRUE)3 -4.303e-01 6.278e-02 -6.854 1.57e-11 ***
## as.factor(weathersit)2 -5.531e+02 4.957e+01 -11.159 < 2e-16 ***
## as.factor(weathersit)3 -2.026e+03 1.412e+02 -14.348 < 2e-16 ***
## as.factor(Promotion)1 1.736e+03 4.596e+01 37.785 < 2e-16 ***
## as.factor(mnth)2 9.433e+01 1.186e+02 0.795 0.426829
## as.factor(mnth)3 2.938e+02 1.286e+02 2.286 0.022577 *
## as.factor(mnth)4 5.021e+02 1.421e+02 3.534 0.000436 ***
## as.factor(mnth)5 6.506e+02 1.616e+02 4.027 6.26e-05 ***
## as.factor(mnth)6 1.023e+03 1.796e+02 5.695 1.81e-08 ***
## as.factor(mnth)7 1.153e+03 2.000e+02 5.768 1.20e-08 ***
## as.factor(mnth)8 1.003e+03 1.854e+02 5.410 8.65e-08 ***
## as.factor(mnth)9 1.161e+03 1.672e+02 6.944 8.69e-12 ***
## as.factor(mnth)10 1.195e+03 1.439e+02 8.303 5.16e-16 ***
## as.factor(mnth)11 1.009e+03 1.305e+02 7.733 3.64e-14 ***
## as.factor(mnth)12 7.374e+02 1.225e+02 6.018 2.84e-09 ***
## windspeed -2.796e+01 4.604e+00 -6.074 2.04e-09 ***
## as.factor(weekday)1 9.292e+02 8.727e+01 10.648 < 2e-16 ***
## as.factor(weekday)2 1.120e+03 8.521e+01 13.145 < 2e-16 ***
## as.factor(weekday)3 1.187e+03 8.545e+01 13.896 < 2e-16 ***
## as.factor(weekday)4 1.229e+03 8.515e+01 14.430 < 2e-16 ***
## as.factor(weekday)5 1.097e+03 8.508e+01 12.895 < 2e-16 ***
## as.factor(weekday)6 3.180e+02 8.468e+01 3.755 0.000187 ***
## as.factor(holiday)1 -1.116e+03 1.431e+02 -7.798 2.26e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 612.3 on 705 degrees of freedom
## Multiple R-squared: 0.8513, Adjusted R-squared: 0.846
## F-statistic: 161.4 on 25 and 705 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = I(log(casual)) ~ poly(temp, 3, raw = TRUE) + as.factor(weathersit) +
## as.factor(Promotion) + as.factor(mnth) + windspeed + as.factor(weekday) +
## as.factor(holiday), data = bikeshare)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0524 -0.1527 0.0153 0.2030 1.3557
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.359e+00 2.424e-01 17.979 < 2e-16 ***
## poly(temp, 3, raw = TRUE)1 1.262e-01 4.448e-02 2.838 0.00467 **
## poly(temp, 3, raw = TRUE)2 2.012e-03 2.410e-03 0.835 0.40413
## poly(temp, 3, raw = TRUE)3 -1.112e-04 4.018e-05 -2.767 0.00580 **
## as.factor(weathersit)2 -3.372e-01 3.173e-02 -10.628 < 2e-16 ***
## as.factor(weathersit)3 -1.593e+00 9.037e-02 -17.623 < 2e-16 ***
## as.factor(Promotion)1 3.640e-01 2.942e-02 12.375 < 2e-16 ***
## as.factor(mnth)2 9.884e-02 7.594e-02 1.302 0.19349
## as.factor(mnth)3 7.500e-01 8.229e-02 9.114 < 2e-16 ***
## as.factor(mnth)4 8.104e-01 9.094e-02 8.912 < 2e-16 ***
## as.factor(mnth)5 7.512e-01 1.034e-01 7.264 9.96e-13 ***
## as.factor(mnth)6 7.488e-01 1.150e-01 6.514 1.39e-10 ***
## as.factor(mnth)7 8.467e-01 1.280e-01 6.615 7.33e-11 ***
## as.factor(mnth)8 7.653e-01 1.186e-01 6.450 2.08e-10 ***
## as.factor(mnth)9 6.518e-01 1.070e-01 6.091 1.85e-09 ***
## as.factor(mnth)10 6.785e-01 9.214e-02 7.364 4.99e-13 ***
## as.factor(mnth)11 5.992e-01 8.350e-02 7.176 1.83e-12 ***
## as.factor(mnth)12 3.533e-01 7.843e-02 4.504 7.79e-06 ***
## windspeed -2.125e-02 2.947e-03 -7.211 1.43e-12 ***
## as.factor(weekday)1 -8.320e-01 5.586e-02 -14.893 < 2e-16 ***
## as.factor(weekday)2 -8.896e-01 5.454e-02 -16.309 < 2e-16 ***
## as.factor(weekday)3 -9.273e-01 5.470e-02 -16.952 < 2e-16 ***
## as.factor(weekday)4 -8.586e-01 5.451e-02 -15.753 < 2e-16 ***
## as.factor(weekday)5 -5.944e-01 5.446e-02 -10.914 < 2e-16 ***
## as.factor(weekday)6 1.165e-01 5.421e-02 2.148 0.03202 *
## as.factor(holiday)1 6.793e-01 9.160e-02 7.416 3.47e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3919 on 705 degrees of freedom
## Multiple R-squared: 0.857, Adjusted R-squared: 0.8519
## F-statistic: 168.9 on 25 and 705 DF, p-value: < 2.2e-16
We would need to know the profit margins or minimum operating costs for a bike rental for both casual and member riders and the actual price of a rental, in order to determine if the promotional pricing is at a loss to the program or still nets a profit. We’d also need to know if the program caused an increase in ridership after the promotional period ended, or if increases were to be found only during the promotional period.