Project case study

Yulu Demand Analysis

Statistical case study testing which factors (day type, season, weather, temperature) significantly drive electric cycle rental demand.

Problem

Yulu, an electric cycle rental company, saw a dip in revenue and wanted to understand which factors significantly drive rental demand. The study tests three questions: does demand differ between working and non-working days, across seasons, and across weather conditions? It also checks whether season and weather are related.

Approach

Analysed 10,886 hourly records from January 2011 to December 2012 (no nulls or duplicates). Converted data types, binned temperature, humidity and windspeed into categories, and dropped atemp because it is 0.98 correlated with temp. Ran univariate and bivariate EDA, a correlation heatmap and outlier checks (outliers kept, since they are real high-demand hours). Tested hypotheses at a 5% significance level: a two-sample t-test for working vs non-working days, one-way ANOVA for weather and for season, and a chi-square test for season vs weather.

  • Registered users are the core: about 81% of rentals (roughly 156 of 192 per hour on average).
  • Working vs non-working days show no significant difference in total demand (t-test p = 0.226), but the mix flips: registered (commuter) rentals are higher on working days and casual (leisure) rentals are higher on non-working days, so the two cancel out.
  • Weather has a significant effect (ANOVA p ≈ 5e-43): clear weather has the highest demand and light rain or snow drops it sharply.
  • Season has a significant effect on demand (ANOVA p ≈ 6e-149).
  • Demand rises with temperature: median hourly rentals go from 47 (cold) to 111 (mild), 181 (warm) and 303 (hot).
  • Casual riders are more weather-sensitive than registered riders (correlation with temperature 0.47 vs 0.32).
  • Season and weather are related (chi-square p ≈ 3e-8), but the association is weak.

Tools

PythonPandasSciPyHypothesis TestingEDA

Key Insights

  • Registered users are the core: about 81% of rentals (roughly 156 of 192 per hour on average).
  • Working vs non-working days show no significant difference in total demand (t-test p = 0.226), but the mix flips: registered (commuter) rentals are higher on working days and casual (leisure) rentals are higher on non-working days, so the two cancel out.
  • Weather has a significant effect (ANOVA p ≈ 5e-43): clear weather has the highest demand and light rain or snow drops it sharply.
  • Season has a significant effect on demand (ANOVA p ≈ 6e-149).
  • Demand rises with temperature: median hourly rentals go from 47 (cold) to 111 (mild), 181 (warm) and 303 (hot).
  • Casual riders are more weather-sensitive than registered riders (correlation with temperature 0.47 vs 0.32).
  • Season and weather are related (chi-square p ≈ 3e-8), but the association is weak.

Recommendations

  • Segment by day type: focus on commuter routes and offices on workdays, and on parks and leisure spots on non-working days.
  • Plan the fleet by season: run the full fleet in the warmer months, and use the low-demand months for heavier maintenance.
  • Adjust daily by weather: maximize available bikes on clear days and schedule maintenance on rainy days.
  • Expect casual demand to be more volatile and registered demand to be steadier.

Data limitations

  • ANOVA assumptions (normality, equal variances) were not fully met and the large sample size was relied on. A non-parametric check such as Kruskal-Wallis is a natural follow-up.
  • Hour-of-day patterns and 2011 vs 2012 growth were not analysed, so season comparisons may be partly affected by year-over-year growth.
  • The dataset has no revenue or price data, so the revenue dip itself is not tested. The analysis covers rental demand only.

Links