Monday 27 December 2010

Hotelling model: finding a Subgame-Perfect Nash Equilibrium

I find it only appropriate to kickstart this blog with a demo of how to handle the fundamentals of a model which nearly drove me to an assisted suicide over the course of my PhD.

The Basics

In the classic Hotelling setting, two shops-owners simultaneously choose locations x1 and x2 in a Main Street, modeled as an interval from 0 to 1. They then proceed to simultaneously set their prices p1 and p2, at which point the customers (uniformly distributed along the street) buy one unit of a good each from the shop they find cheaper. The latter comparison is based on the total cost of making a purchase, comprising not only the actual price, but also the (quadratic) cost of getting to the store from one's own location. Hence, we may write this as the following Function of the consumer's own location c, a firm's location xi and the price pi it sets:



Consequently, the consumer at buys from firm 1 if:

so that the total mass of consumers buying from firm 1 equals:


The function Boole yields 1 if the input condition is true (the consumer buys from firm 1) and 0 otherwise, so it remains to Integrate it with respect to the consumer location c over the entire Main Street. Assuming no production costs for simplicity, we may define the game's payoff function as:

Finding the Equilibrium

Suppose now the locations have already been fixed and that x1 is the one further to the left (x1 < x2). Let's identify the prices p1* and p2* which are best responses to one another, i.e. form a Nash Equilibrium. For p1to be a best-response to p2*, we need:

and we can Reduce this to a set of conditions on x1x2p1*, and p2for a complete best-response mapping of player 1 (note the use of the x1 < x2 assumption via the logical && operator), storing it under the name BR1 :

In a similar way, we obtain the set of conditions ensuring that p2is a best-response of firm 2 to p1*.



where the order of variables  is reversed, since the payoff function was defined to give the profit of the firm whose location and price are specified first in the input. It is now easy to characterize the set of Nash Equilibria as an intersection of BR1 and BR2 , and to Simplify the result using the x1 < x2 assumption.

Mathematica gives the result as two linear equations, which means there is a unique equilibrium. We may therefore obtain the exact equilibrium prices for a given locations-pair, by Solving the above equalities for p1* and p2*

Technically, this generates a list of replacement rules, which may be applied (substituted) to any expressions using the /. operator. For instance, the following function returns the second-stage equilibrium profit of firm 1 when it is located left of firm 2:

Note the use of the @@ operator to define the function - very useful when the function's body must be evaluated before being attached to the function name. Based on the so obtained reduced game payoff, we may find the subgame-perfect Nash Equilibrium locations x1* and x2*. For x1to be the best possible location left of x2*, we need:

i.e. when locating left of the counterpart, it is best to move as far away as possible. Naturally, the same applies when locating to the right of the rival, in which case it is optimal to locate at 1. Consequently, the only possible equilibrium is where the shops are located at the opposite ends of the market.