Fitting demand curves
For this exercise, you’ll need the following data set:
The data in milk.csv contains a random sample of daily sales figures for a small neighborhood grocery store of cartons of milk. (Think of something like Fresh Plus in West Campus or Hyde Park.) The “price” column gives the price at which the milk was sold that day; the “sales” column says how many units were sold that day.
Here’s the key question: Let’s say that the store’s wholesale cost of milk is $c$ dollars per carton. If you were the merchant and wanted to maximize profit, how much would you charge for a carton of milk, in light of the information on supply and demand conveyed by the data?
1) Say that the per-unit price charged is $P$, and the quantity of units sold is $Q$. Can you write an equation that expresses net profit $N$ in terms of both $Q$ and $P$ (and the per-unit cost, $c$)?
2) We only have control over the price, so we’re not done yet. We need a way to predict the quantity that we’ll sell at a given price.
i) Start by plotting the quantity sold as a function of price; does the relationship seem linear? If not, can we transform price and/or quantity to make the relationship approximately linear? (Remember the discussion of demand modeling from the course packet!)
ii) Using the data, come up with an equation that predicts the quantity sold from the price.
3) Can you combine steps 1 and 2 to derive an equation that predicts net profit $N$ from price $P$ and unit cost $c$ alone? (In other words, $Q$ should not appear in your equation.)
4) Finally, in light of 3, how can we find the price $P$ that maximizes profit for a given per-unit cost $c$? Find the (predicted) profit-maximizing price when $c=1$.