title: Expected marginal seat revenue
text: # Expected marginal seat revenue
  
  EMSR stands for Expected Marginal Seat Revenue and is a very popular heuristic in Revenue Management. There are two versions: EMSRa and EMSRb, both of which were introduced by Peter Belobaba. Both methods are for n-class, static, single-resource problems. Because the models are static some assumptions apply: classes are indexed in such a way that the fare for the highest class, $r_{1}$, is higher than the fare for the next highest class, $r_{2}$, so $r_{1}$ > $r_{2}$ > ... > $r_{n}$; demand arrives in a strict low to high order in stages that are indexed with j as well; demand for class j is distributed with cdf $F_{j}(x)$. For simplicity it is also assumed that demand, capacity and the distributions are continuous, although it is not very difficult to drop this assumption.
  
  ## EMSRa
  
  EMSRa is the first version that Belobaba came up with. The idea behind the heuristic is to add the protection limits that are calculated by applying Littlewood's rule to successive classes. Suppose that we are in stage j+1 and we want to calculate how much capacity we need to protect for stages j, j-1,..., 1. Then we are actually calculating protection limit $y$$_j.$ To do so we consider every class in j, j-1,..., 1 and compare that class, indexed with k, with j+1 in isolation. For every combination of k and j+1 we compute the protection level for that class with Littlewood's rule:
  
      $P(D_{k}>y_{k}^{j+1})={\frac {r_{j+1}}{r_{k}}}$
  
  The idea of EMSRa then is to add all these protection limits to get the protection limit for $y_{j}$.
  
      $y_{j}=\sum _{k=1}^{j}y_{k}^{j+1}$
  
  However, there is a problem with this method because it does not take the statistical averaging effect into account. Suppose, for example, that classes 1 to j have the same fare r, then EMSRa will calculate the protection limit for $y_{j+1}$ with
  
      $P(D_{k}>y_{k}^{j+1})={\frac {r_{j+1}}{r}}$
  
  However, because the fare for all these classes is the same they should be aggregated. EMSRa will calculate protection limits that are too conservative. In other words, it will reserve too many seats for the higher fares, thereby rejecting too many low fare bookings. Although having equal fares is not realistic this will also happen if the difference between fares is small. Therefore EMSRb was invented.
  
  ## EMSRb
  
  One of the most widely used RM heuristics is EMSRb. It is simple and produces under certain conditions close to optimal results. Belobaba reports studies in which both EMSRa and EMSRb were compared. He shows that EMSRb is consistently within 0.5 percent of the optimal solution, while EMSRa under certain conditions can deviate more than 1.5 percent from the optimal solution. However, with mixed order of arrival and frequent re-optimization both methods perform well. There is also study by Polt that shows mixed results.
  
  EMSRb is also based on an approximation that compares two classes, but it does take the statistical averaging effect into account. Instead of aggregating protection levels, as EMSRa does, it aggregates demand. Suppose we are again in stage $j+1$ and we want to calculate the protection limit $y$$_j.$ Then first all future demand for classes j, j-1,…, 1 is aggregated:
  
      $S_{j}=\sum _{k=1}^{j}D_{k}$
  
  and the weighted revenues are calculated:
  
      ${\overline {r}}_{j}={\frac {\sum _{k=1}^{j}r_{k}\cdot {\bar {D_{k}}}}{\sum _{k=1}^{j}{\bar {D_{k}}}}}$
  
  Then, again with Littlewood’s rule, the protection limit for classes j and higher is calculated such that:
  
      $P(S_{j}>y_{j})={\frac {r_{j+1}}{{\overline {r}}_{j}}}$
  
  Rearranging gives:
  
  $y_{j}^{\star }=F_{j}^{-1}(1-{\frac {r_{j+1}}{{\overline {r}}_{j}}})$
  
  $y_{j}^{\star }$ is the optimal protection limit, $F_{j}(x)$ is a continuous distribution used to model the demand. Usually demand is considered to be independent and distributed normally with a mean and a variance . Using that the protection limits can be calculated as:
  
      $y_{j}=\mu _{j}+z_{\alpha }\cdot \sigma _{j}$
  
  with the mean and variance of the demand to come as $\mu _{j}=\sum _{k=1}^{j}\mu _{k}$ and $\sigma _{j}^{2}=\sum _{k=1}^{j}\sigma _{k}^{2}$ respectively. $z_{\alpha }$ is calculated with the inverse of the normal distribution $z_{\alpha }=\phi ^{-1}(1-{\frac {r_{j+1}}{{\overline {r}}_{j}}})$. This is done for each j, giving the protection limit for every class.
  
  