# Playing with models: quantitative exploration of life.

## Inspections, fines and the honor system

Posted in Economics, Transportation by Alexander Lobkovsky Meitiv on September 25, 2015

Alexanderplatz U-Bahn station in Berlin

This summer we visited Berlin and enjoyed its excellent public transportation system.  Unlike the controlled access system prevalent in the US, Berlin’s (and Prague’s for that matter) system is an honor system.  You can buy a ticket at any time and when you board a train or a bus you stamp the ticket with the date and time the trip started.  Compliance is enforced by periodic inspections and the fine for riding without a validated ticket (Schwarzfahren) is a modest €60.  During our 8 days in Berlin we saw inspectors once and did not get inspected ourselves.

Given the ticket price, is the combination of the fine size and inspection frequency sensible?  That is, could BVG (the transit authority) save money by changing the fine amount and/or number of inspectors it has to hire?

To answer this question we must know how people decide whether to buy a ticket or risk being fined.  Many factors come into play here.  A purely rational and amoral consumer would buy the ticket if the product of the inspection probability and fine amount is larger than the ticket price.  This way, not buying tickets costs more in the long run.  However, there is a strong national pride and the concept of Beitragen (contributing) which keeps Schwarzfahren low (just a few percent according to this article in German).  Being caught without a valid ticket may also result not just in a fine but also in a court summons which presumably has a higher deterrent power.

Let’s explore the effect of the frequency of inspections (and the associated cost) and the fine amount on the total amount of money collected. I will define the single ride ticket cost to be 1 and the fine amount to be $F$.  To keep the formalism simple, I will neglect the reality that the fine for repeat offenders is higher.  This fact reduces Schwarzfahren but makes calculations more complicated. In the long run, the amount of the fine for repeat offenses is the important quantity.

I will assume for simplicity that the population of transit rides consists of two distinct pools. The conscientious riders always buy the ticket (population size $N$). The rest of the riders (population size $M$) are rational fare evaders and buy tickets when the inspection probability per ride $p$ is greater than $1/F$. This assumption requires the ability to accurately measure the frequency of inspections either from personal observations or from those of friends and family. The last ingredient in the recipe for computing the revenue of the system is the cost of inspections $c p (N + M),$ where $c$ is a new parameter which can be thought of as the cost per inspection.

Within our simplistic model, given the fine amount $F$, if the inspection probability is $p < 1/F$, the evaders do not buy tickets and if $p > 1/F$ the potential evaders always buy tickets. Because the cost of inspections is linear with $p$, there are two local maxima of the revenue. Either $p = 0$ in which case the revenue is simply $N$ (i.e. there are no inspectors and the evaders ride free), or $p = 1/F$ in which case the evaders buy the tickets the total revenue is $(N + M)(1 - c/F)$. Therefore, if the cost parameter $c$ is greater than the product of the fine amount and the fraction of fare avoiders

$\displaystyle c > F \frac {M}{N + M},$

it does not make sense to inspect. Another way to look at this equation is that the fine amount has to be at least the cost per inspection divided by the fraction of evaders to justify inspections.

Of course the situation in real life is different. Most people are opportunistic evaders. Each person is characterized by a risk aversion parameter which balances the financial benefit of evasion with the emotional toll of being caught. Because of this fact, some level of inspection is always necessary. The level itself depends on the distribution of the risk aversion parameter in the population and the recovery rate of the fines as a function of the fine amount. But that’s for another post.

## Debunking the “Keep the AC on while away” myth

Posted in Economics by Alexander Lobkovsky Meitiv on September 22, 2015

We all heard the supposedly common wisdom of leaving the AC (or heat) on in the house when away on a trip. This “wisdom” is perpetuated by the HVAC professionals themselves. Well, it’s wrong, at least under the simplifying assumptions below. You will always save energy and money by turning the heat/AC off when you go on a trip, no matter how short.

To quantitatively compute the difference in the money/electricity for the two scenarios: 1) maintain house temperature, and 2) turn the heat/AC off while away we will need to know the cost of either removing or adding the amount of heat $Q$ from/to the house. I will assume that the cost is simply proportional to $Q$. This is probably a good assumption for combustion heating systems but may not be very accurate for heat pumps whose efficiency depends on the temperature difference between the inside and outside. Let me deal with this complication later.

Let me assume that the house has heat capacity $C$ so that the amount of heat $Q$ that enters or leaves the house to cause the temperature change $\Delta T$ is $Q = C \Delta T.$ Let me also assume that total heat conductance of the house’s walls is $K$. This heat conductance is the coefficient of proportionality between the outside-inside temperature difference and the total heat that flows into/out of the house per unit time: $dQ/dt = -K \Delta T.$

Therefore, under scenario 1 (keep heat/AC on), if the duration of the trip is $\tau$, the total heat that needs to be pumped into/out of the house is $Q_1 = K\tau |\Delta T|$, where $|\Delta T|$ is the mean difference between the indoor and outdoor temperatures.

When heat/AC is off, the house temperature will approach the mean outdoor temperature exponentially with the charateristic time scale $C/K$. Let’s assume that the heat/AC system is so powerful that the heat is removed/added quickly when you arrive from the trip so that the extra losses during the cooling/heating period are small compared to the total amount of heat to be removed/added. Then, the total amount of heat to be removed/added after the trip is $Q_2 = (1 - e^{-K\tau/C}) C |\Delta T|.$

Comparing the two amounts of heat we see that because $x > 1 - e^{-x}$,

$Q_1 > Q_2,$

In other words, the amount of heat that must be removed/added from/to the house is always greater when you keep the system on during the trip. Therefore, unless there are counter indications like the pets dying or pipes freezing, it is better to turn the heat/AC off when you travel or at least change the thermostat to a setting that is closer to the outdoor temperature.

## The optimal strategy for setting the price of event tickets

Posted in Economics by Alexander Lobkovsky Meitiv on September 10, 2015

I love tennis and always visit the ATP tournament in DC in August. This year I went with a friend who bought the ticket at the last moment online and discovered that it was deeply discounted (almost 50%). That fact coupled with the observation that the stadium as less than half full got me thinking: are the organizers employing the best ticket price strategy to maximize the receipts?

To determine the optimal ticket pricing strategy we need to know something about how people make buying decisions.  There are a number of different ways of describing this decision making process.  Here I will make several simplifying assumptions to make the problem analytically tractable.  These assumptions can be relaxed in practice albeit at a cost of having more complex equations.

In the simplest formulation, each person has an internal valuation $p$ of the ticket.  If the actual price $q$ is higher, this person does not buy the ticket. If the price is lower, this person buys the ticket at a rate (probability per unit time) proportional to the difference between the valuation and the price. The coefficient of proportionality is $1/\tau$, where $\tau$ is the characteristic time it takes to buy the ticket if the difference between the price and valuation is unity.  This $\tau$ can be called the customer response time.   I will make two simplifying assumptions: 1) $\tau$ does not change with time. This is not true in practice as people tend to make snappier buying decisions closer to the event; and 2) every person has the same $\tau$. Both assumptions can be relaxed by considering the response time that varies with time and is different for every individual.

The final ingredient in describing the population of people is the distribution of ticket valuations.  If the only information we have about this population is its size $L$ (total number of people potentially interested in the event) and the mean ticket valuation $p_0$, the number of people with valuations in a narrow interval between $p$ and $p+dp$ is $L/p_0 e^{-p/p_0} \, dp$, i.e. the distribution of valuations is exponential with a variance and mean equal to $p_0$.

Let me first consider the case of a fixed ticket price $q_0$. Also suppose that tickets go on sale some time $T$ before the event. The probability that a person with internal valuation $p > q_0$ buys the ticket during this time $T$ is

$\displaystyle{\mathcal{P}(p,T) = 1 - e^{-(p - q_0)T/\tau}}$.

Therefore, the expected number of tickets bought is

$\displaystyle N = \frac{L}{p_0} \int_{q_0}^\infty dp \, e^{-p/p_0} \, \mathcal{P}(p,T) = L\, e^{-q_0/p_0} \, \frac{p_0 T}{p_0 T + \tau}. \quad\quad\quad\quad (1)$

The gross receipts $N q_0$ (because everyone pays the same price $q_0$) are maximized when $q_0 = p_0$, i.e. when the price matches the mean valuation among the interested people. This is the best fixed price strategy when the expected number of tickets sold at price $q_0 = p_0$ is smaller than the capacity of the event. When the event capacity is smaller than the expected number of ticket that will sell at price $q_0 = p_0$, the price can be set higher to such a value that the expected number of sold tickets is equal to the event capacity.

The main conclusion is that when the ticket price is fixed and the event capacity is greater than $\displaystyle{\frac{L}{e}\frac{p_0 T}{p_0 T + \tau}}$, maximum gross receipts are achieved when the event is partially sold out.

The population of people potentially interested in the event is characterized by three parameters: 1) size $L$, 2) mean ticket valuation $p_0$, and 3) response time $\tau$. All of these parameters can be estimated by fitting the number of tickets sold as a function of time to the formula in Equation (1).

Having explained why partially sold out events could be the outcome of a rational pricing strategy we could call it a day and quit. However, pushing a little further turns out to yield something unexpected.

Let’s relax the assumption of a fixed ticket price. A declining ticket price which starts out quite high makes sense because people with a high ticket valuation will have likely bought a ticket early on and therefore more money can be made by expanding the pool of people who will buy a ticket at a lower price as the time of the event nears.

Let’s consider a linearly declining ticket price which starts high at $q_1$ when tickets first go on sale and ends up at $q_2 < q_1$ at the of the event. I will not include the formulas here as they are pretty messy. However, as shown in the figures below there is something interesting, namely a discontinuous transition.

To be clear, the results below are for the case when the event capacity is large enough so that the best strategy is not to sell out. It turns out that when the ticket sale duration $T$ is shorter than the characteristic customer response time $\tau$, fixed ticket price is the best strategy. However as $T$ becomes larger than $\tau$, the linearly declining price is better. To achieve the best result, the initial price has to be quite a bit larger and the final price quite a bit lower than the average ticket valuation. Therefore a careful measurement of $\tau$ is required to pick the best pricing strategy (fixed price vs. linearly declining price) because mid-flight switching between strategies is not feasible.

In real life, each person’s ticket valuation is not a constant and can depend on a lot of factors such as how soon the event is, promotions and the number of tickets already sold. A full model which takes all these factors into account would have to be constructed if precise quantitative predictions are to be made.

Gross receipts for two different pricing strategies as a function of the time $T$ before the event tickets go in sale. When $T$ becomes larger than the customer response time $\tau$, it is better to employ the declining price strategy. The mean ticket valuation for this graph is $p_0 = 2.$

When the ticket sale duration $T$ is larger than the customer response time $\tau,$ linearly declining price strategy is better than the fixed price strategy. The starting (high; red) and ending (low; green) prices are shown as a function of the sale duration.