Modelling the Demand Curve (Price Controls Pt. 1)

Phil N
9 min readJun 8, 2022

Imagine you run a firm that is going to produce and sell a single product, say a pharmaceutical drug. You aren’t sure what price to sell the drug. You start by pricing it such that you can at least cover costs. Now you fiddle with the price to see if you can make a profit. You find the demand for the drug is so great that increasing the price doesn’t really change the amount of customers willing to buy the drug. They are dependent on the drug, so they will pay much more than it costs to produce. As such you can increase the price of the drug without much reduction in the amount produced or sold.

Someone comes along and says “Wait a minute. You were able to raise the price without reducing the amount of drug produced, can’t you now lower the price without reducing the amount produced?” This seems intuitively reasonable, and this blog post (split into two parts) will be about the math for this intuition.

First we’ll define the firm’s demand curve: we want to find out how much of the drug we can sell depending on the price we set.

Let’s start by surveying 3 people and asking them what is the highest price they are willing to pay for our product:

  • Carol: $1.15.
  • Alice: $4.35.
  • Bob: $1.87.

So if we set the price to $5, then nobody will buy the drug. If we set it to $4 then only Alice will buy. If we set it between $1.15 and $1.87, then both Alice and Bob will buy. If we set it at $1.15 and lower, then all three will buy.

We can turn this into a graph by first sorting our data points ($4.35,$1.87,$1.15) then plotting the points in order, as done below:

This figure shows the number of customers we can get as a function of price. Technically the graph is inverted in order to match econ convention of putting price as the y-axis, but it should be clear that the point (2.0,$1.87) represents having two paying customers if you set the drug price at $1.87.

The set of points will always slope downwards (or be flat), since we’ve sorted the data from highest to lowest price.

Now lets survey some more people and then perform the same process to generate a plot:

In the figure above, Alice, Bob, and Carol are still represented, I’ve just added 7 more people to the plot. The sorted data points now looks like this:

[$7.60, $6.97, $4.35, $1.96, $1.87,$1.85, $1.62 , $1.15 , $1.13, $1.12].

So now if you were to set the price at $4.35, Alice would purchase the drug as well as two others who would be willing to pay even more.

Now let’s keep surveying more and more people.

As you add more and more people to the plot, it’ll become more and more smooth. If we were able to extend this process to infinity, then you’d have what looks like a completely continuous curve.

Instead of surveying infinite people, we can use some statistical methods (the details of which I will leave in footnote 1). In short, if you chose the correct statistical distribution, the method will be the theoretically correct description of the surveyed data.

Something to note is that the x-axis now spans from 0 to 1, representing the proportion of total customers paying for the drug. To convert these numbers into values you’d see experimentally, just pick a total sample size (N) and multiply the proportion by that size. For example, if you have a total sample size of N=10 , and you want to know how many people in that sample will buy the drug at a price of ~$2.50, just find the x-point which corresponds to 2.50 (~0.4) and then multiply by 10. Thus if you set the price to $2.50, then 4 out of 10 people will want to buy your drug.

Of course due to randomness there will be some variance between every sample of 10 people that you pick. But this smooth curve will effectively tell you what to expect should you sample many times.

Anyway, now we have a continuous plot and a complete function representing the demand curve. This will become important once we need to take derivatives in Part 2, but first let’s look at how a price ceiling would change the demand curve.

Now lets consider placing a price ceiling (price control) on the price of the drug. Let’s take our initial survey of 10 people from above. Initially it was:

[$7.60, $6.97, $4.35, $1.96, $1.87,$1.85, $1.62 , $1.15 , $1.13, $1.12]

If we put a limit on the price, say we cap the price at $2, what does the survey now look like? Simply take each value above $2 and set it to $2. Recall these values represent the maximum price a person is willing to pay for a drug, so if they are willing to pay $5 without the price ceiling set, they are also willing to pay $2 once the price ceiling is set. The new survey looks like this:

[$2.00, $2.00, $2.00, $1.96, $1.87,$1.85, $1.62 , $1.15 , $1.13, $1.12]

Here’s a plot of what that looks like:

And next is a figure comparing the survey values with the price ceiling and the initial survey without it:

We can also apply the price ceiling to the continuous demand curve:

And we can compare the curves with and without the price control:

Just like with the sample of 10, the demand curves are only different at a price above the ceiling ($2). Below $2 the curves are exactly the same.

If you are running a pharmaceutical firm, your end goal is to maximize profit. In order to do so, you will need to first calculate your total revenue obtained by selling your drug at a given price. The total revenue can be calculated like so:

Where TR is total revenue, P is the price and Q(P) is quantity of customers who will buy the drug at the given price (the demand curve). If you were to use the demand curve plots above, you would pick a price and see what quantity of product sold that would correspond to, and multiply those two values together.

We can compute a graph of the total revenue:

NOTE: Since Total Revenue is the product of the customers and price, you will need to multiply the Total Revenue value on the y-axis by your total size of customers (N), just as you would to convert from a proportion of customers to number of customers.

Since the number of paying customers will increase as you decrease price and vice versa, those two values will trade off as you change one or the other. The result is that there is a sweet spot that maximizes Total Revenue at about 35% of customers.

We can also plot the Total Revenue as a function of price:

This shows us that the total revenue maximizing price is about $2.5.

Something important to note is that the total revenue has nothing to do with costs. If the drug costed nothing to produce and could be infinitely abundant, then it would still be better for you to set the price at $2.5 and only produce enough to sell to the top ~35% of possible customers in order to maximize revenue.

What happens when we set a $2 price ceiling on the drug?

The plot above shows the total revenue curve with a $2 price ceiling in red. Every person who would have otherwise paid more than $2 now pays $2 instead. So you have ($2)x(that # of people) which gives you a straight line up until people begin paying less than $2.

The point of max total revenue has also changed: the peak of the red curve is to the right of the peak of the blue curve. Now with the price ceiling, you will want to produce enough drug to sell to about 45% of people, rather than 35% of people.

For completeness lets now add in a possible cost curve:

The total revenue curves remain the same as above, but now I’ve added a cost curve in green. The curve was picked to have a straight upward sloping derivative, which would matches textbook examples of marginal cost curves and supply curves (see Part 2).

A firm will need to balance revenue and costs in order to achieve its goal; maximizing profits. Profits can be calculated as:

Where TR is total revenue as defined above and TC is total cost (green line). So the profit is the difference between the firm’s total revenue and total cost. To calculate the profit using the above graph, pick a point on the x-axis, then see which what y-value that corresponds to on the blue (or red) curve and the green curve, then subtract them.

Letting the computer perform the calculation:

The above graph shows the profit with and without the $2 price ceiling. Once again, we can see that the price ceiling changes the maximum of the curve.

We can also show the profit as a function of price:

Compare the highest peaks of the red and blue curves in both figures above, these are points of greatest profit. Without the price ceiling, you’ll want to only sell enough drug to satisfy 23% of people (at a price of $3.5) as this results in the maximal possible profit. When the price ceiling is in place, it’ll be most profitable to sell to about 40% of people (at a price of $2).

So a price control can both decrease the price of the product and increase the amount of the product made available at the same time, quite contrary to how it is generally talked about. The usual reasoning is based on a model that is even more simplistic than the one I present here (see footnote 2).

A simple way of explaining what’s happening is that a firm may choose to exploit only the people most dependent on their product. High price and low quantities will be most profitable. In such a case a price ceiling will mean the firm can’t exploit those few, so it must drop the price in order to attract other customers.

In part 2 , we will look at the problem through the usual economics lens: by doing a little calculus and looking at marginal revenue and marginal cost.

Footnotes:

  1. Before explaining how the demand curve is generated, I will start by explaining the supply curve (the demand curve has just one difference: the direction of sorting). As mentioned in my post on the minimum wage, you can generate the supply curve by using the quantile function (inverse cumulative distribution function) of the distribution representing your surveyed data. This is because the quantile function gives a specified value for which a given proportion of the probability mass will be less than that value. This is exactly the expected behaviour for a firm’s supply curve, assuming the distribution represents units of labor supply available to the firm. For the supply curve, values are sorted in ascending order. This is because a firm would obviously want to hire the cheapest labor first and most expensive labor last (each unit of labor is identical once purchased in this model). The demand curve for a product sorts in the opposite (descending) order, so all you need to do is flip the x-axis. So just apply (1-x) (where x is the proportion of total customers) and then plug that into your quantile function.
  2. Generally people assume the same model as presented here but with perfect competition. In colloquial usage perfect competition conjures ideas of free markets and deregulation, but it actually has a specific meaning. It occurs only if Alice,Bob, Carol and also every other person surveyed say they would pay the exact same value.

--

--