I'm a New Yorker and take the subways every day. I have a growing interest in understanding the distribution of paths people take on the subways to work every day. I.e. if there are $n$ subway stations, I want a temporal distribution over the paths $\omega = (n_i, n_j, t)$ where $n_i$ and $n_j$ are nodes representing subway stations and $t$ is a continuous variable representing time.

I am given the expected arrival and departure times for each subway station as well as the number of people who enter and exit each station at discrete moments in time.

Ideal Theoretical Model

Let $N$ be the total population in the subways at any given moment in time and let $N_i$ be the number of individuals in station $i$, and $N_ij$ be the number of individuals on the subway line heading from station $i$ to station $j$. The total number of individuals in transit $$T = \sum{N_{ij}}$$ and the total number of individuals in standby is $$S = \sum{N_i}$$

Then $$N = T+S$$

I have 1.5 undergrad physics classes under my belt so I've been thinking about the system with the following analogy. Imagine the subway station to be a system of $n$ point masses(each point mass is a subway station) suspended in space, where $N_i$ represents the height of each point mass.

Each adjacent subway station exerts a downwards and upwards force on its neighbors. In particular $F_{ij}$ is the force exerted by $i$ on $j$ such that $$F_{ij} = g(N_{ij})$$ where $g$ is some unknown function.

In this light, the net force on station $i$ is defined as

$$F_{\text{net}, i} = \sum{ F_{ji} } - \sum{ F_{ij} }$$

In other words, at each moment in time, every station exerts a force on its neighbors. Actually, to be more precise, this force based model implies there are actually $n^2+n$ particles between stations and $n$ stations, therefore a total of $n^2 + 2n$ particles. The velocity of a particle is the rate at which its height decreases and the mass of a particle is a coefficient $m_{ij}$.

Having interpreted the subway station as a group of point particles with pairwise interactions under an unknown force mechanic, we can also define a potential energy configuration.

$U(N)$ defines the potential energy configuration of the system and $U_{ij}(N)$ defines the potential energy of a particle $ij$, such that

$$U(T(t)) + K(S(t)) = E(t)$$

$$K_{ij} = \frac{1}{2}m_{ij}v_{ij}^2$$

$$U_{ij} = -\int^{N_{ij}}_{0}{F_{ij}} = -N_{ij}m_{ij}$$

Fluctuations in $T$ and $S$ represent changes in the internal potential and kinetic energies of the system. Fluctuations in $N$ represents net work being done on the system, i.e.

$$W = \Delta E$$

Issues in the Model

I still haven't defined $g$, nor defined the potential and kinetic energy functions.

Statistical Modelling and my Question

At this point, I have a cute little physical interpretation of the subway system. But I am having trouble translating my dynamical model into one I can statistically fit to find a distribution over the ultimate paths taken by individuals over the course of a day.

  • In practice, I don't know what "modelling the subway dynamics" will actually mean?
  • Ought I to fit coefficients to $g$ , $U$, and $K$?
  • How to formulate a rigorous statistical question given this abstract physical model.


  • Alternative ways of finding the distribtion of trips, including links to literature that has already solved this problem.
  • $\begingroup$ Your question is pretty fancy and I'm not sure I understand it all, but are you ruling out repeated simulations? Are you wanting only closed-form answers? $\endgroup$
    – Wayne
    Feb 12, 2017 at 17:41
  • $\begingroup$ I am looking for a way to go from the model I have now to a maximum likelyhood model for the parameters of the model. $\endgroup$ Feb 12, 2017 at 18:07
  • 2
    $\begingroup$ Although physical laws have inspired theories of human behavior (see Reilly's Law of Retail Gravitation for instance), I find many of them suspect unless reasons can be advanced concerning why particular social phenomena ought to behave like a physical model. You might have better success thinking about how people might actually behave in their travels rather than assuming they can be described in the same way as physical particles. $\endgroup$
    – whuber
    Feb 12, 2017 at 18:13

1 Answer 1


Lucky for you I just coined the term statistical potential energy in another thread haha

Let's start with the definition of potential energy

...the energy possessed by a body by virtue of its position relative to others, stresses within itself, electric charge, and other factors.

So you need to compare stuff to one another and you need some type of coordinate system. For example, if you lift a brick 10 meters from the ground - you are comparing that height with the ground. Now, you assume that that brick is going to hit the ground but if you are doing statistics that's not such a sure thing - so you also need some kind of probability method.

So... I have come to the conclusion that relative risk fits the bill. Hint: google Relative Risk. I didn't try to understand all the details of your example but this is what I would do.

Let $RR(1)$ = P(person ends up in subway j=1 | starts at subway i=0) / P(person ends up in subway j=0 | starts at subway i=0)

Let $RR(2)$ = P(person ends up in subway j=2 | starts at subway i=0) / P(person ends up in subway j=0 | starts at subway i=0)

Let $RR(j)$ = P(person ends up in subway j=n | starts at subway i=0) / P(person ends up in subway j=n-1 | starts at subway i=0)

So on this example you are calculating the statistical potential energy for subways compared to subway i=0; In analogy, subway i=0 is the ground level - and subways j(s) are the heights you lift the brick.

Note that you can pick you own base subway - or calculate it for all subways.

Finally, once you calculate these ratios you can fit a function to your data such as linear, polynomial or whatever it may be with all the pairs {$j$, $RR(j)$}.

That function $RR(j)$ is your $U(x)$. I would model the transitions with a markov table than get the conditionals from the marginals perhaps or use bayes rule, or hell just assign a distribution.

I haven't thought of the kinetic energy yet but seems like you have time distributions - the changes in states are your positions; hence, $v=dx/dt$. When you figure it out let me know as well.

Hope this helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.