Capstone Assignment 3: Preliminary Results
Results:
Descriptive Statistics:
Table 1 shows the descriptive statistics for the quantitative predictors. The average unit price was 2.76 SGD/km (sd=1.131), with a minimum unit price of 1.22 SGD/km and a maximum of 29.76 SGD/km. The other predictors can be interpreted in the same way, according to the data in Table 1.
Table 1. Descriptive Statistics for Data  Analytical Variables
Bivariate Analyses:
The response variable is categorical in 2 levels. Therefore, all bivariate analyses will be plotted using bar charts. For the predictors that are also categorical in 2 levels, the following figure, Figure 1, shows the Association between Categorical Predictors and the response variable: the x-axis represents the predictor categories with â1â represents âyesâ, and â0â represents ânoâ, and y-axis represents the probability of the user to put a request at each category in the x-axis. Â
The chi-square tests have been conducted on the above five conditions after plotting the bar charts. It revealed that the customers were more likely to put a request to the Grab taxi service after the policy change than they were before (Ï2 = 5244.8, p-value < .0001). But the customers were less likely to put the request if there was a reduction in the discount compared with previous time (Ï2 = 1197.8, p-value < .0001), and during public holidays (Ï2 = 309.5, p-value = 2.82 x 10-69 < .0001). All the p-values showed that these predictors are significantly associated with the response variable. The last two variables, whether services recorded at weekends and during peak hours, even though showed significant associations with the response variable (weekend: Ï2 = 179.8, p-value < .0001; peak hours: Ï2 = 30.66, p-value < .0001), the association is not strong enough to make the probability at each category distinguishable. For the predictors that are quantitative, it is necessary to divide the predictors into subgroups and then establish the bar charts. The quantitative predictor, unit price, was taken as an example. From the descriptive statistics data, unit price is categorized into four subgroups: 0~2.245, 2.245~2.415, 2.415~2.732, and 2.732~30 (SGD/km). And the bar chart is plotted and showed in figure 2.
  Figure 2. Association Between Unit Price and Response Variable
It showed that the customers were more likely to put a request to book Grab service as the unit price increases. This conclusion is not consistent with the common sense, However, since it is only possible to find the association between two variables, not causality. There might be other variables which is confounding to these two variables, further discoveries would be discussed in multivariant model. Then, we run chi-square test again to do the statistical test. Since the categorical predictor has 4 levels, post-hoc test is required.
Table 2. p-values among  every comparison for unit price post-hoc test
By adopting the Bonferroni adjustment, the acceptable p-value with 6 comparisons is 0.008. And the results for each pair of the comparisons were smaller than 0.008, which showed the association between unit price and the response variable that was discovered is significant.
The same test was run to find the association between discount and response variable. And the results are shown below:
    Figure 3. Association Between Discount and Response Variable
Table 3. p-values among  every comparison for discount post-hoc test
From the post-hoc test results, it revealed that the association between category 0~0.3 and 0.3~0.6 is larger than the adjusted acceptable p-value 0.008. Hence the association between discount and response variable under these two categories is not significantly associated. It also explained why association between these two categories was not consistent with those between other categories. And the association is not significant either falls between 0.6~0.8 and 0.8~1.0. However, the general association between discount and response variable that was proved to be significant was that the customers were more like to put request when the discount is larger (means the value was smaller).
 Lasso Regression Analysis:
Table 4 and Figure 4 showed that 10 of 10 predictors were retained in the selected model by the lasso regression.
Table 4: Predictors and the Lasso Least Angle  Regression Coefficients
       Figure 4 Regression Coefficients Progression for Lasso Paths
During the estimation process, Previous chance of putting request after open the app was most strongly associated with whether one will put request this time. And they are positively associated. Followed by the linear distance from userâs current location to the destination, which is negatively associated. The strength of the associations can be seen in Table 4, the larger the absolute value of the coefficient means the stronger the association between individual predictor and response variable. The sign indicates the association is positive or negative. These 10 variables accounted for 21.08% of the variance (in Figure 5) in predicting whether the user would put a request to book taxi, which is my response variable.
                Figure 5 Mean squared error on each fold













