{'fraction_non_alphanumeric': 0.032424376686671766, 'fraction_numerical': 0.012365569742618923, 'mean_word_length': 4.313075112347528, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Waiting-Time Paradox in 1922

We present an English translation and discussion of an essay that a Japanese physicist, Torahiko Terada, wrote in 1922. In the essay, he described the waiting-time paradox, also called the bus paradox, which is a known mathematical phenomenon in queuing theory, stochastic processes, and modern temporal network analysis. He also observed and analyzed data on Tokyo City trams to verify the relevance of the waiting-time paradox to busy passengers in Tokyo at the time. This essay seems to be one of the earliest documentations of the waiting-time paradox in a sufficiently scientific manner.


Introduction
Torahiko Terada (1878Terada ( -1935) was a Japanese physicist and a professor at Tokyo Imperial University (which is now the University of Tokyo). After gaining his PhD in Tokyo, he studied in Berlin and Stockholm around 1910 as well as visiting other places before coming back to Japan. His work includes studies of X-ray diffraction [1][2][3], which he published almost at the same time as William Henry Bragg and his son William Lawrence Bragg, who received the Nobel Prize in 1915. Apart from research, Terada also wrote various essays in plain Japanese, often describing his own analysis of everyday phenomena from a physicist point of view. Some of them may be regarded as a precursor of complexity science. Short stories about him are available in English [4,5].
In one of his essays, Terada documented what is known today in queuing theory, temporal network analysis, and other research fields as the waiting-time paradox, based on his empirical observations of Tokyo City tramway operation back in 1922. This essay, albeit written in Japanese, is probably one of the first work on the waiting-time paradox in a quantitative and practical context. It later inspired mathematical work on a Poisson process model for the congestion of trams [6]. In the following text, first, we briefly introduce the waiting-time paradox in Section 2. Second, we provide an English translation of the entire essay in Section 3 1 (see Acknowledgments for information about the copyright). Third, we re-analyze his data in modern terms in Section 4. Finally, we conclude the article in Section 5.

Waiting-time paradox
The waiting-time paradox, also known as the inspection paradox and renewal-theory paradox, is a mathematical phenomenon known in the queuing theory and stochastic processes literature for a long time [9][10][11]. As its yet another alias, the bus paradox, suggests, we experience this paradox in everyday life when we are waiting at a bus stop for the next bus to arrive. Consider the time for which a passenger has to wait until the next bus comes since the passenger arrived at the bus stop, which is called the waiting time. Here, we assume an inattentive passenger who arrives at the bus stop without checking the timetable, so that the time of arrival is distributed uniformly at random. The naive guess would be that the average waiting time is equal to half of the average time interval between two buses expected from the timetable. However, the waiting-time paradox states that it is in fact longer unless the buses arrive at the stop completely regularly.
Let us call the arrival of a bus an event. The difference between the average waiting time until the next event and half of the average inter-event time is large if the inter-event time obeys a fat-tailed distribution. In various empirical data, from human activity to earthquakes, inter-event times often obey a fat-tailed distribution [12][13][14][15][16][17][18]. Therefore, in these cases, which do not necessarily include the case of bus services, the waiting time can be much longer than half of the average inter-event time. The waiting-time paradox elicits many interesting results on dynamics on temporal networks (i.e., time-varying networks), such as suppression of networkwide contagion when fat-tailed distributions of inter-event times are incorporated into epidemic process modeling [11,17,19].
Mathematically, the paradox is formulated as follows. Suppose that the inter-event time, τ , is independently drawn each time according to a probability density ψ(τ ). Such a stochastic process is called a renewal process. A Poisson process is a renewal process and defined by ψ(τ ) = λe −λτ (λ > 0), i.e., an exponential distribution. Suppose that a passenger arrives at a bus stop at time t 0 , which is uniformly distributed on the time axis. Figure 1 schematically represents the situation. As the figure implies, t 0 is located inside an interval segmented by consecutive events with a probability proportional to the length of the interval. Therefore, the for Terada 1922 Bus Figure 1: Illustration of the waiting-time paradox. A uniformly randomly drawn time tends to fall within a long interval. time t 0 tends to fall in a long interval rather than in a short one. This causes the waiting-time paradox.
The distribution of waiting times to the next event, ψ w (t), where t is the waiting time, is derived as follows. The probability density with which time t 0 belongs to an interval of length τ is given by Under the condition that t 0 belongs to an interval of length τ , the probability density for the waiting time is given by By combining Eqs. (1) and (2), one obtains Using Eq. (3), one obtains the mean waiting time as follows: Let us look at some examples. First, when all inter-event times are equal to τ 0 , one obtains τ 2 = τ 2 = τ 2 0 . Equation (4) implies that the mean waiting time in this case is given by Second, consider a Poisson process having ψ(τ ) = λe −λτ , where λ = 1/ τ . One obtains such that the waiting-time distribution is the same as the inter-event time distribution, reflecting the memoryless property of Poisson processes. In this case, because τ 2 = 2/λ 2 , the mean waiting time is equal to τ 2 / (2 τ ) = 1/λ = τ , i.e., twice the naive guess (i.e., τ /2). Note that the waiting-time paradox is in action for Poisson processes and renewal processes that have a small (but non-zero) variance in the inter-event times.
Our third example shows a more drastic and possibly more counter-intuitive effect of the waiting-time paradox. Consider a common form of power-law distribution of inter-event times given by With α > 2, the mean inter-event time, τ = (α − 2) −1 , is finite. The distribution of waiting times is given by Therefore, the tail of ψ w (t) is fatter than that of ψ(τ ), which suggests that the waiting times would be longer than the inter-event times on average. In fact, the mean waiting time is calculated as τ 2 / (2 τ ) = (α − 3) −1 , assuming α > 3, which is larger than the mean interevent time, τ = (α − 2) −1 . When α ≤ 3, the mean waiting time diverges because τ 2 does, whereas the mean inter-event time remains finite if α > 2. It should be noted that various empirical data such as human activity and earthquakes show power-law-like distributions of inter-event times [12][13][14][15][16][17][18]. Such an oscillation is the most evident when the level of congestion is intermediate, rather than when it is extremely high. If you stay at a station in such an intermediately congested hour, you will almost always find the following periodic pattern.

On congestion of trams
At first, you would see 10 to 20 people at the station. Most of them are looking at the direction from which trams come with a nervous look on their faces. The crowd size monotonically increases during this period. After five to seven minutes, a service finally arrives at the station. The people would then rush into the tram car, as if they cannot spare any time for passengers who are getting off, as if this is the last service and no tram would come after that. However, it is most likely that the next service or yet another one will arrive only within tens of seconds, or at most within two minutes.
In the first congested tram, even the doorstep of the car is occupied by passengers.
In contrast, in the second one, which arrives at the station almost when the first one departs, it is often the case that only one or two passengers are standing and holding on to straps (meaning all other passengers have seats). In a lucky case, there are even some empty seats. In the third service, it is not uncommon that the car is almost empty after passengers have got off at the station.
After a couple of such empty services, no service would arrive for five to ten minutes.
The number of passengers waiting at the station increases at a constant statistical rate during this period. The next service would arrive after the station has accumulated 20 to 30 people with already full of passengers. It discharges a couple of passengers and has to load 20 or 30 new passengers. A few waiting passengers who are unlucky enough to miss that service wait for another 30 seconds to end up catching the next service, in which they get to sit on a spacious seat with their legs stretched and enjoy a breeze coming in through opened windows if it is a hot day. When they arrive at their destination, they see that the service just ahead of theirs is still full. The passengers in the first service have to push people off like swimming in a muddy field to finally exit the tram, while those on the next service may get off at the same station almost at the same time.
I always avoid the "peak" of this periodic dynamics of congestion and seek a "valley".
Then, I can secure a proper seat without any rush, feel calm, and do my reading 6 . The time I have to waste while waiting for the valley of an oscillation, starting from its peak, is tens of seconds in a lucky case and will not exceed a minute or two anyways. While waiting, I would check items displayed in shops nearby, or research people's faces or morphology of clouds in the blue sky. I do waste a short amount of time due to this 7 , but if it allows me to rest my body for tens of minutes on the tram and read ten pages of something which I would not otherwise read, I am pretty sure that my way is more beneficial. Furthermore, it is important for me to evade physical and mental fatigue that would overwhelm me after leaving a congested tram.
Anyways, I am hardly in a situation where arriving one or two minutes earlier to the destination is crucial. And I doubt how many of those people who are in hurry, unlike me, can be sure that they do not waste one or two minutes after leaving the tram.
All this is probably trivial. It is something that everybody should be fully aware of.
Nevertheless, it seems that a great majority of passengers of Tokyo City trams think that they must catch the congested service that arrives right after a long interval of services. I do not understand this behavior, but this may be related to some strength of Japanese people's nature. For example, this may be correlated with the strength of Japanese in battlefields. Or, this may be a particular expression of something vague called modern thoughts. I should refrain myself from making easy critiques of this.
What I want to consider here is not whether the majority's behavior is good or bad.
Rather, I want to consider the scientific or mathematical problems of the rhythmic dynamics of congestion on trams, which inevitably stem from the behavioral tendency of passengers.
Consider the following case for simplicity. Suppose that the services leave the terminal with a regular period, run at a constant speed, and are designed to stop at each station for a fixed amount of time. If this rule is strictly respected, the interval between the times that consecutive services pass an arbitrary fixed location on the route should be perfectly constant, which is denoted by T . However, in fact, because of unavoidable randomness arising from complex origins, each observed interval between services would be shifted to T + ∆T . The deviation, ∆T , may be large, small, positive, or negative and should distribute according to a Gaussian or similar distribution. In plain terms, some services arrive early and others arrive late, and different inter-service times would alternate in a complex manner. It should be noted that the average inter-service time is still equal to T . In other words, the sum of ∆T over different inter-service times is equal to 0. The sequential order of different ∆T 's (e.g., which value of ∆T comes first) is also governed by a law of randomness. This law is not an easy one, but in the end we observe that, on average, one in every three or four services is notably too early or too late. Of course, it delays the arrival of service s 2 at the next station. This results in an increase in the number of additional passengers that it has to load at the next station, nb. Then, this service is further delayed and becomes even more congested.
In a simplified case, the number of passengers to be loaded increases as a power of the number of stations at which the tram has stopped 10 . In reality, the number of passengers is limited by the capacity of the tram car, so it does not diverge. Anyways, the conclusion that congested services will get even more congested should be correct.
How about service s 3 that arrives just after this cursed service s 2 ? Suppose that s 3 arrives at the first station on time. Because s 2 has been delayed by time b, service s 3 has to load nb less passengers than expected. Even if s 3 arrives late with delay c, it still has to load nb less passengers as compared to the case in which s 2 is not delayed 11 .
If s 3 arrives earlier than the schedule by time c, then it can depart with n(b + c) less passengers than the mean. What happens then? Obviously, the interval between s 2 and s 3 gradually decreases, and both the congestion of s 2 and the emptiness of s 3 will escalate 12 .
The tram cars that are initially evenly spaced on a long rail will have uneven interservice times as the operation goes on. As a result, services that are delayed or advanced than the schedule would appear with a period of three or four services. Then, roughly speaking, what I described above happens, i.e., an extremely congested service would arrive every three or four services, and then the two or three services that follow will be gradually less congested. Then, after a long interval, the same thing will be repeated.

All this is a theoretical conclusion based on abstraction and deduction. It is needless
to say that we should incorporate numerous other factors to further approach the reality.    (a) (b) Figure 2 indicates the following. Although the number of services passing this location every five minutes is highly variable, the number averaged over the time is similar between southbound and northbound services; it is approximately one service per 2.5 minutes. However, the individual inter-service time varies from more than 11 minutes 3 seconds for the initial interval before the first southbound service in the observation to just 12 seconds. In addition, a long inter-service time tends to be followed by a congested service and vice versa. Statistics of inter-service times is summarized in Table 1  46.5 to 23.5 is approximately equal to 2 to 1. If we incorporate the inter-service times larger than five minutes, then the ratio will be even more biased.
What does this mean? Suppose that a passenger arrives at a station at a time drawn uniformly at random. Then, the probability that the passenger comes across an inter-service time of a specific length is equal to the product of the length of the interservice time and the frequency of inter-service times with this length, divided by the sum of such products over all possible lengths of inter-service times. In our example, the passenger encounters an inter-service time shorter than two minutes once in three times, while the chance of encountering an inter-service time longer than two minutes and shorter than five minutes is twice in three times. In practice, we have to take into account the inter-service times longer than five minutes, so the latter probability would be arguably approximated by 3/4. (We need some more detailed considerations to discuss the probability of the waiting time at a station, but I do not further it here.) This is just one example, but I have found similar tendencies in other observations that I made as well.
Anyways, passengers who always catch the first service to arrive without any consideration rarely come across a vacant service and are highly likely to get onto a congested one. Such experiences would be impressed on their memory. Many occasions of traveling on congested services may probably be imprinted more strongly onto people's memory than rare occasions of traveling on vacant ones. If this is the case, the above proportional discrepancy 18 will undergo a psychological transformation so that people may remember it in a somewhat self-amplified manner. Therefore, many people may forget the existence of vacant services and perceive that all services are congested. This last issue on people's memory may be shaky. However, we have reached a solid conclu-sion, i.e., those who catch the first service to arrive are much more likely to encounter congested services than vacant ones. If more people get onto a congested service in this way, it will be even further delayed, eliciting further congestion.
This mechanism leads to odd conclusions. First, a great majority of passengers in Tokyo City trams get on a congested service by choice, although they are unconscious of it. Second, by doing so, those passengers are making efforts to enhance the congestion of these congested services. These conclusions may appear to be paradoxical. However, this is an inevitable, rational consequence of the theory laid above. If this sounds odd, it is not because my argument is odd, but because the fact itself is odd.
If we want to avoid this situation, where the degree of congestion is heterogeneously distributed among trams, and want to secure a more balanced distribution, what we should do is obvious in theory. It is indeed necessary for the conductors or supervisors to disallow tram cars to be overloaded. An easier solution, however, is that the passengers themselves should hold back the desire to grab the first service to arrive to some extent, and seek a next vacant service even if they have to sacrifice 30 seconds to 2 minutes of their valuable time 19 . I think that the loss of 30 seconds to 2 minutes would be reimbursed even before they reach the destination.
However, whether or not one likes congested services is a personal matter. If many passengers have a particular interest in and enjoy competing with other passengers to get onto congested trams, it cannot be helped. A criterion with which one can discuss whether this taste is right or wrong is beyond mathematics or science.
In old days, giving way to others and sharing happiness with other people were counted as virtues. I do not know if this is the case now. However, putting aside this ethical question, even from an opportunistic or selfish point of view, at least for trams, it seems to be convenient and efficient behavior to give up congested services to other people, spend another minute, and then catch a vacant service, both for ourselves and others. It should be so at least for those who do not have a particular penchant to congestion.
The following is an aside -I feel that we often encounter similar situations on our way in life. It seems that there are two types of people, i.e., those who try hard to get on the first service to arrive and those who decide to wait a bit for the next service. 13 This route was replaced by a subway line in 1973. 14 This table is not very comprehensible and contains error. It reads as follows. The inter-service time, denoted by τ , is larger than or equal to four minutes four times. Because τ ≥ 4 implies τ ≥ 3, there are 9 − 4 = 5 inter-service times with 3 ≤ τ < 4. Likewise, there are 23 − 11 = 12 inter-service times with 1 < τ ≤ 2. Because no inter-event time is exactly equal to two minutes, one does not have to worry about the overlap between the counts for τ ≥ 2 and τ ≤ 2. Therefore, there is 15 + 23 = 38 inter-service times in total, according to Terada's count. However, the table contains the following error. If we do not include the times from the beginning of the observation window (i.e., 7:55 pm) to the first southbound or northbound service in the sample of inter-service times, there are only 36 inter-service times in total. The row τ ≤ 2 should have frequency 21, not 23. Even if we include these two durations and/or the times from the last service to the end of the observation window (i.e., 8:40 pm) as inter-service times such that the sample size becomes either 38 or 40, the distribution does not coincide with Table 1. 15 This is where he points out the waiting-time paradox. 16 It is not clear how Terada came up with this value. If we exclude the times before the first southbound and northbound services and the times after the last southbound and northbound services from the set of inter-service times, the value should be replaced by 46 = 4.5 × 3 + 3.5 × 5 + 2.5 × 6.
17 This value also seems incorrect. The correct value should be 20.5 = 1.5 × 10 + 0.5 × 11. 18 It is not very clear what exactly Terada means by "proportional discrepancy." However, gathering from the context, it should be essentially the same thing as the waiting-time paradox. 19 Many commuters in Tokyo now still prefer 2 minutes to vacant trains. A century has not been long enough to change people's habit. whereby congested services would get more congested partly due to human behavior, and periodic dynamics of the level of congestion. Here we focus on the first result to further it. For the second effect, see [6] for a mathematical analysis.
We recalculated all the inter-service times based on the data that Terada provided in Fig. 2.
The survival probability of inter-service times (i.e., the probability that the inter-service time is larger than a specified value), denoted by τ , is shown in Fig. 3. Here we did not use the Kaplan-Meier estimator, which is a more accurate means to estimate the survival probability of inter-event times [21]. Furthermore, to take into consideration the large time interval before the first southbound service (see Fig. 2), we counted the times from the beginning of the observation time window, i.e., 7:55 pm, to the first southbound and northbound services as two inter-service times. This is our arbitrary decision. Although the sample size in Fig. 3 Table 2: Mean inter-service time τ , CV of inter-service times, and mean waiting time t .
suggests a moderate level of dispersion in τ in both southbound and northbound services.
The inset shows that the tail of the distribution of τ is roughly exponential, corresponding to Poisson processes. The coefficient of variation (CV), defined by the standard deviation divided by the mean, of τ is shown in Table 2. The table supports that the distribution of τ is roughly exponential; exponential distributions have a CV value of 1. The mean inter-service time and the mean waiting time calculated by Eq. (4) are also compared in Table 2. We find that the mean waiting time is roughly equal to the main inter-service time, τ , rather than τ /2.
This result is quantitatively consistent with the effect of the waiting-time paradox for Poisson processes explained in section 2.
The correlation between the level of congestion and the inter-service time is shown in Fig. 4.
We encoded the level of congestion according to Terada  : Correlation between the level of congestion of each service and the inter-service time preceding the service. The solid line represents a linear regression performed on the data for all services, y = 0.0042τ + 2.1, where y denotes the congestion level. We translated the five discrete levels of congestion explained in the caption of Fig. 2 into y ∈ {1, 2, 3, 4, 5}. If we exclude the first observations of southbound and northbound trams, then the data is fitted by regression y = 0.0047τ + 1.9.

Conclusions
We hope that readers enjoyed an old story about the waiting-time paradox from Japan. Terada made observations of his and others' daily lives, formed a question based on them, constructed a theory using logic and mathematics, collected empirical data, and analyzed them to verify the theory. What he did was an exemplar scientific act. Perhaps to his surprise, the relevance of his observation and theorization has survived changes in the transportation systems and human behavior for a century. Congestion of trains in Tokyo now? See Fig. 5. As Terada stated, Pushmen (see Fig. 5) are a modern invention to mitigate the waiting-time paradox as much as possible and to keep regular inter-service times. Passengers of Terada's type are still a minority in Tokyo.