Hypothesis testing to identify what factors significantly impact demand for Yulu's shared electric cycles in India — season, weather, working day, or temperature?
Yulu, India's leading micro-mobility provider, has seen a dip in revenues. The company needs to understand which external factors significantly drive demand for shared electric cycles — so it can plan fleet deployment, pricing, and maintenance around those factors.
The key questions: Does demand change across seasons? Does weather affect rides? Does holiday vs working day matter? Are season and weather correlated?
| Hypothesis | Test Used | Result | Business Impact |
|---|---|---|---|
| Holiday vs Non-Holiday demand | 2-Sample T-Test | p=0.57 — Fail to reject H₀ | Holiday status doesn't matter |
| Working Day vs Non-Working Day | 2-Sample T-Test | p=0.23 — Fail to reject H₀ | Weekday/weekend doesn't matter |
| Season vs Demand | One-Way ANOVA | p≈0 — Reject H₀ ✓ | Season significantly affects rides |
| Weather vs Demand | One-Way ANOVA | p≈0 — Reject H₀ ✓ | Weather significantly affects rides |
| Weather dependent on Season? | Chi-Square Test | p≈0 — Reject H₀ ✓ | Weather & season are correlated |
from scipy import stats # T-Test: Holiday vs Non-Holiday holiday = df[df['holiday']==1]['count'] nonholiday = df[df['holiday']==0]['count'] t, p = stats.ttest_ind(holiday, nonholiday) # p = 0.5737 → no significant difference # ANOVA: Season vs Demand groups = [df[df['season']==s]['count'] for s in [1,2,3,4]] F, p = stats.f_oneway(*groups) # F=236.9, p≈0 → season significantly affects demand ✓ # Chi-Square: Weather dependent on Season? ct = pd.crosstab(df['season'], df['weather']) chi2, p, _, _ = stats.chi2_contingency(ct) # p≈0 → weather IS dependent on season ✓