# Data-Driven Approach for Defining Demand Scenarios for Shared Autonomous Cargo Bike Fleets +
## 4 Demand Scenario Generation
### Temporal Disaggregation  
#### 4.4.1 Derivation of Temporal Patterns  
For deriving temporal patterns, i.e., systematic variations in daily, weekly, and yearly profiles, we aggregated the conventional bike sharing demand data using one-hour intervals. Since the resulting data were typical count data, i.e., observations containing only non-negative integer values [68], we then applied count models based on generalized linear models (GLMs) to retrieve the impact of certain time-related influencing variables on the observed hourly bookings (see [68; 69]). Generalized linear models (GLMs), introduced by [PERSON] and [PERSON] in 1972 [70], serve as a comprehensive framework for various statistical models including linear regression, logistic regression, and Poisson regression. In mathematical terms, a GLM can be represented as [71; 72] (note: In this representation, \(X\) denotes the matrix of explanatory variables. This differs slightly from the notation used by [PERSON] [71], who uses \(X^{-1}\) in her formulation):  
\[\text{E}(Y|X)=\mu=G^{-1}(X\beta) \tag{4}\]  
In this equation, \(\text{E}(Y|X)\) denotes the expected value of the dependent variable \(Y\) given the explanatory variable \(X\), \(\beta\) represents an unknown parameter vector, and \(G^{-1}\) is the inverse of the link function \(G\)[73]. Unlike traditional linear regression, which is limited to normally distributed error terms, GLMs offer a more versatile approach characterized by three main components [70; 72] (note: [PERSON]'s [71] conceptualization of GLMs primarily focuses on two components: the distribution of \(Y\) and the link function, assuming the distribution of \(Y\) to be a member of the exponential family):  
* A random component specifying the probability distribution for modeling the dependent variable \(Y\), including Bernoulli, Binomial, Poisson, Geometric, Negative Binomial, Exponential, Gamma, Normal, and Inverse Gaussian distributions (see also [71]);
* A systematic component that describes the predictors (independent or explanatory variables) through a linear predictor function \(\eta=X\beta\);
* A link function \(G\) which relates the linear predictor \(\eta\) to the mean \(\mu\) of the distribution of the response variable \(Y\). As stated by [PERSON] et al. [69], who give a comprehensive overview of regression models for count data and their application in R, the most simple distribution that can be used for modeling count data is the Poisson distribution. However, Poisson models are limited to the assumption that the variance in the model is identical to the mean [69]. Since our data appeared to be highly over-dispersed (i.e., the variance value is greater than the mean value), the application of a Poisson model was not feasible. According to [PERSON] [74], a suitable way to deal with over-dispersion is to use a Negative Binomial regression model. As it is a generalization of the Poisson model, the Negative Binomial model loosens the restrictive assumption that the variance is equal to the mean [74]. Given the observed over-dispersion in our data, the Negative Binomial regression model emerged as the most fitting approach. Consequently, for the practical application of this model, we employed the R package MASS [75] for analyzing the representative bike sharing dataset. To decide which influencing factors should serve as an input for our model, we examined the time-of-day variability in bike sharing rentals with respect to the different days of the week, as is illustrated in Figure 6.  
The figure shows that the shape of daily profiles is significantly different for weekdays and weekend days. Throughout weekdays, the daily pattern is rather similar, consisting of large morning and afternoon peaks as well as a slight peak during lunchtime. However, it  
Figure 6: Day-to-day variability in hourly bookings from conventional BSS in Hamburg, Germany. is noticeable that the afternoon peak on Friday is slightly below the other days. In contrast, the daily profile at weekends only shows a broad peak in the afternoon.