## 3 Case Study Selection  
The study was conducted in the city of Madrid, which is one of the most populated cities in the European Union and has a variety of transport modes, both public and private. For a detailed description of the case study, the reader is referred to reports such as Ayuntamiento de Madrid (2021) [20] and Consorcio Regional de Transportes de Madrid (2019) [21].  
There has also been a major conflict between ride-hailing companies and conventional taxi services in recent years. Taxi drivers complained that ride-hailing companies did not pay taxes in Spain, did not follow labor laws, and benefited from the freedom to change their fares whenever they wanted. As a result, taxi sector protests and strikes have become common in Spain in recent years, particularly in the city of Madrid [13].  
In Spain, Uber and Cabify are the two largest ride-hailing companies [6; 22]. Nevertheless, this paper only focuses on Uber services due to the lack of data available from its main competitor Cabify.  
To better understand the cost of the ride, it is essential to know how Uber fares are estimated. The service fee \(p\) (total fare for a ride) for Uber is split into two parts (see Equation (1)).  
\[p_{service\ fee}=p_{base\ cost}+p_{dynamic\ pricing} \tag{1}\]  
The first component (base cost) includes regular fees, such as one-off fees, and trip fees proportional to the trip's duration and distance. The second component (dynamic pricing) reflects the result of Uber's surge pricing algorithm depending on supply and demand (S&D) imbalances [8; 19].  
Uber provides three different services in Spain (UberX, Uber Black, and Uber Van). UberX provides rides in regular vehicles for up to four people, while Uber Black is the premium service and Uber Van is a service for groups of up to 6 people. This paper primarily focuses on UberX rides because it is the most popular Uber product [23; 24]. Table 1 describes the factors that influence UberX fares in Madrid during the period analyzed, based on multiple factors.  
Uber fares are determined by the company's policy, and the base cost considers three factors: (i) the one-off fee, which remains constant regardless of the length and duration of the ride; (ii) the cost per minute; (iii) the cost per kilometer. Dynamic pricing is applied depending on supply and demand through a real-time dynamic algorithm [4; 26]. In addition, the minimum fare is also included, which is a minimum fare to compensate drivers for short rides.  
It is worth mentioning that the real-time dynamic algorithm is not 'open sourced' from Uber (as well as other TNCs), and in most cases, information on fares is also not available. As a result, the underlying pricing mechanism is not known to transport professionals or policymakers. Given that fact, this research aims to better understand the behavior of  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Service Fee** & **Variable** & **UberX (EUR)** \\ \hline \multirow{3}{*}{Base cost} & One-off fee & 0.40 \\  & Cost per minute & 0.15 \\  & Cost per kilometer & 1.22 \\ \multirow{3}{*}{Dynamic pricing *} & \multirow{3}{*}{S\&D} \\  & & 3.50 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Factors that influence UberX fares in Madrid (Adapted from El Confidencial, 2019 [25]).  
ride-hailing fares, using applications of machine learning models that may be useful for transport policy purposes.