---
title: Dwell-Travel Time Quantiles
url: https://www.emergentmind.com/topics/dwell-travel-time-quantiles
type: topic
---

# Dwell-Travel Time Quantiles

Dwell-travel time quantiles describe the conditional quantiles of random variables representing the time spent (dwell time) in a state or the total travel time along a specified path. Accurate and operational estimation of dwell or travel time quantiles is central in applications ranging from traffic management to stochastic compartmental modeling. A rigorous foundation for these quantiles involves the statistical properties of their empirical estimators, parametric representations via phase-type (PH) distributions or Markov models, and contemporary deep learning-based regressor architectures. This entry details formal definitions, computational methodologies, and modeling frameworks for dwell and travel time quantiles as established in the technical literature.

## 1. Formal Definitions and Empirical Quantile Properties

For a stochastic process $\{X_t: t \in E\}$, where $X_t$ denotes the dwell or travel time at index $t$ (with $E$ typically a time or spatial index set), the marginal cumulative distribution function (CDF) is
\[
F(t, x) = \Pr\{X_t \le x\}, \qquad x \in \mathbb{R}.
\]
The population $\alpha$-quantile at index $t$ is
\[
Q(t, \alpha) = F(t, \cdot)^{-1}(\alpha) = \inf\{x: F(t, x) \ge \alpha\},
\]
for $\alpha \in I \subset (0,1)$.

Given an i.i.d. sample $\{X_t^i\}_{i=1}^n$ at each $t$, the empirical CDF is $F_n(t, x) = n^{-1} \sum_{i=1}^n \{ X_t^i \le x\}$, and the empirical quantile is
\[
Q_n(t, \alpha) = F_n(t, \cdot)^{-1}(\alpha).
\]
Under suitable regularity conditions—including sample-path continuity, tightness, and density bounds near the target quantile—Kuelbs and Zinn established a uniform functional central limit theorem (CLT):
\[
\sqrt{n}\bigl(Q_n(t, \alpha) - Q(t, \alpha)\bigr) \;\Longrightarrow\; W(t, \alpha)\quad\text{in }\ell_\infty(E \times I),
\]
where $W$ is a mean-zero Gaussian process with explicit covariance:
\[
\Cov\bigl(W(t, \alpha),\, W(s, \beta)\bigr)
= \frac{\Pr\{X_t \le Q(t, \alpha),\, X_s \le Q(s, \beta)\} - \alpha\beta}
{f(t, Q(t, \alpha))f(s, Q(s, \beta))}.
\]
This provides the asymptotic distributional law for empirical dwell/travel-time quantile processes, crucial for inference and confidence bands [1111.4591].

## 2. Phase-Type Distributions and ODE Embeddings

Dwell and travel time random variables in many Markovian or compartmental models are naturally represented as phase-type (PH) distributions. For a continuous-time Markov chain with $k$ transient states and absorbing state $k+1$, let
- $\alpha$ ($1 \times k$ row vector) denote the initial probability on the transient states,
- $Q$ ($k \times k$ matrix) be the subgenerator matrix, with negative diagonals and nonnegative off-diagonals.

Then the time to absorption $T$ is $PH(\alpha, Q)$. The CDF and associated survival and density functions are as follows:
\[
S(t) = \alpha\, e^{Q t} \mathbf{1},\qquad
F(t) = 1 - S(t) = 1 - \alpha\, e^{Q t} \mathbf{1},\qquad
f(t) = \alpha\, e^{Q t}\bigl(-Q\mathbf{1}\bigr).
\]
The $m$-th raw moment is $m!\, \alpha\, (-Q)^{-m}\, \mathbf{1}$.

To bypass explicit computation of $e^{Q t}$, an equivalent embedding as a linear ODE is used:
\[
\frac{d x}{dt} = Q x(t), \qquad x(0) = \mathbf{1},\qquad
S(t) = \alpha x(t).
\]
This approach underpins the Generalized Linear Chain Trick (GLCT), which generalizes embedding dwell/travel time PH-distributions into ODE models beyond exponential/Erlang assumptions [2008.01318].

## 3. Computational Methods for Quantile Extraction

Given a dwell/travel time variable with CDF $F(t)$, the $p$-th quantile $q_p$ is
\[
q_p = F^{-1}(p) = \inf\{ t: F(t) \ge p \}, \qquad 0 < p < 1.
\]
For PH models, $F(t)$ is available either via direct computation of the matrix exponential or by solving the corresponding ODE. Numerical inversion is accomplished as follows:
1. Define $H(t) = F(t) - p$.
2. Choose a bracket $[t_{\min}, t_{\max}]$ such that $F(t_{\max}) > p$.
3. Apply a scalar root-finder (bisection, secant, Brent's method) to solve $H(t)=0$; at each trial $t$, compute $F(t)$ either by matrix exponentiation or ODE integration.
4. Optionally, use Newton-Raphson updates:
\[
t_{n+1} = t_n - \frac{F(t_n) - p}{f(t_n)},
\]
using the closed-form derivative $f(t)$ [2008.01318, 2208.13704].

This methodology extends to any fitted PH-distribution (e.g., Coxian, hypo/hyper-exponential mixtures). For classical Erlang($k, r$) forms:
\[
F(t) = 1 - e^{-r t} \sum_{j=0}^{k-1} \frac{(r t)^j}{j!},
\]
and quantiles are obtained by scalar root-finding in $t$.

## 4. Markovian Velocity and Path-Based Travel Time Quantile Modeling

For travel times across transportation networks, especially under stochastic or schedule-dependent regimes, the Markovian Velocity Model (MVM) generalizes the PH approach. The MVM constructs a large CTMC, representing both recurrent (e.g., daily rush periods, scheduled roadworks) and nonrecurrent (e.g., accidents) velocity regimes along a path. Each path-specific travel time $T$ can be shown to be PH-distributed, where the generator $Q$ results from a Kronecker-sum assembly of link-specific subgenerators and velocity-dependent "rewards".

Formally, for initial CTMC state $s_0$, the CDF is
\[
F(t) = 1 - e_{s_0}^\top e^{Q t} e_0,
\]
where $e_{s_0}$ selects the starting state and $e_0$ projects onto non-absorbing states.

Quantiles are extracted as for standard PH models by root-finding. Full algorithmic workflow includes data preprocessing (incident/loop detector logs), fitting inter-incident/incident-duration PH distributions, block generator construction, speed assignment, and CDF/quantile computation by matrix exponentiation [2208.13704].

## 5. Deep Learning and Quantile Regression for Dwell/Travel Times

Recent approaches parametrize the conditional dwell/travel time quantile function directly using neural networks. The Quantile Graph Wavenet predicts the $\tau$-th conditional quantile $q_\tau(x)$, for feature vector $x$, by minimizing the pinball loss:
\[
\ell_{\tau}(y, f_\tau(x; \theta)) =
\begin{cases}
\tau (y - f_\tau(x; \theta)), & y \ge f_\tau(x; \theta), \\
(\tau-1)(y - f_\tau(x; \theta)), & y < f_\tau(x; \theta).
\end{cases}
\]
The network is conditioned on the target quantile $\tau$, embedded as an input channel.

Once trained, the set $\{ f_\tau(x): \tau \in (0,1) \}$ acts as a (possibly implicit) parametrization of the conditional distribution. Quantile inference requires only forward passes for each desired $\tau$. This allows for direct extraction of prediction intervals:
\[
[q_{0.05}(x), q_{0.95}(x)],
\]
without the need for sampling or explicit density estimation [2012.05207].

## 6. Path Prediction and Calibrated Uncertainty with DutyTTE

In frameworks such as DutyTTE for origin-destination travel time quantile estimation, path prediction is formalized as a finite-horizon Markov decision process (MDP) with a reinforcement learning policy:
\[
J(\theta) = \mathbb{E}_{a_{1:T} \sim \pi_\theta} [\sum_{t=1}^T \gamma^t r(a_{1:T})].
\]
Travel time quantile estimation along the decoded path employs a Mixture-of-Experts (MoE) model, aggregating segment-level uncertainty representation into an overall travel time prediction, $\hat y$, and one-sided uncertainty estimates $(\hat \sigma^l, \hat \sigma^u)$. The predictive interval is
\[
\mathcal{T}(q) = [\hat y - \hat \sigma^l,\, \hat y + \hat \sigma^u].
\]
Training is supervised via the Mean Interval Score (MiS) to promote both sharpness and empirical coverage. Post-training, statistical calibration using Hoeffding's upper-confidence bound ensures that the empirical miscoverage rate does not exceed the nominal level $1-\rho$ with high probability:
\[
\hat{R}^+(\lambda) = \hat{R}(\lambda) + \sqrt{\frac{\ln(1/\delta)}{2M}}.
\]
The smallest scaling $\hat \lambda$ guaranteeing $\hat R^+(\lambda') \le \rho$ for all $\lambda' \ge \lambda$ is selected, and the final output interval is $[ \hat y - \hat \lambda \hat \sigma^l,\, \hat y + \hat \lambda \hat \sigma^u ]$ [2408.12809].

## 7. Concluding Remarks and Model Comparison

Dwell and travel time quantile estimation spans a rigorous spectrum from classical empirical process theory (CLT and functional uniform convergence), parametric Markovian modeling (PH-distributions), to nonparametric and deep learning-based quantile regression. The table below summarizes key methodologies and their representative features:

| Approach               | Key Formula for $p$-th Quantile               | Reference        |
|------------------------|-----------------------------------------------|------------------|
| PH-distribution/ODE    | Solve $F(t) = 1 - \alpha e^{Q t} \mathbf{1} = p$    | [2008.01318]     |
| Markovian Velocity MVM | $Q_p = \inf\{ t : F(t) \ge p \}$, $F(t)$ via $e^{Q t}$ | [2208.13704]     |
| Empirical Process      | $Q_n(t, \alpha) = F_n(t,\cdot)^{-1}(\alpha)$         | [1111.4591]      |
| Quantile Graph Wavenet | $q_\tau(x) = f_\tau(x;\theta)$ (network output)      | [2012.05207]     |
| DutyTTE (MoE + UQ)     | $[\hat y - \hat \lambda \hat \sigma^l,\, \hat y + \hat \lambda \hat \sigma^u]$ | [2408.12809]     |

A plausible implication is that, depending on application scale, feature availability, and coverage guarantees required, different approaches may be preferential: ODE/PH-model-based quantiles for mechanistic models, empirical process theory for inference, and deep neural models for high-dimensional observation-based settings. All rigorous quantile workflows (including neural models) require careful calibration or statistical guarantees to ensure correct nominal coverage.

Source: https://www.emergentmind.com/topics/dwell-travel-time-quantiles