Quadratic equation to determine selling price to maximize profit

rocketFrog

New member
Joined
Aug 15, 2022
Messages
15
Hi everyone,

I'm working on a project using quadratic equations, where we're supposed to determine the right selling price of a product to maximize profit at the right quantity to sell. My team is working on a standing desk company (I'm doing the math part), and I've spent quite a lot of time analyzing the market, gathering data etc, having gathered the data, I took two data points and got a linear demand equation using them to make things easier.

Here's the work I have so far:
Our linear equation modeled using real world data:

q = -8.8p + 6320
q - quantity
p - price

P = pq - cq
P - profit
c - production cost

c = $190 + $7000/q (Here the $7000 cost includes tools, marketing and storage price and it is supposed to be distributed over q, the qty of the desks to be sold. The $190 cost is a wooden board, desk legs and wood treatment, so this is per desk)

If I replace q with the demand equation in the Profit equation:

P = p(-8.8p + 6320) - (190 + 7000/(-8.8p+ 6320))(-8.8p + 6320) <-- the 2 demand equations cancel out
P = p(-8.8p + 6320) - (190 + 7000)
P = -8.8p^2 + 6320p - 7190

Now, IIRC the answer should be in the graph of this function but it actually makes no sense. Am I doing something wrong?

Any help is greatly appreciated!
 
P = p(-8.8p + 6320) - (190 + 7000/(-8.8p+ 6320))(-8.8p + 6320) <-- the 2 demand equations cancel out
P = p(-8.8p + 6320) - (190 + 7000)
P = -8.8p^2 + 6320p - 7190
You didn't distribute correctly going to the second line. Formatting it more clearly,

[math]P = p(-8.8p + 6320) - \left(190 + \frac{7000}{-8.8p+ 6320}\right)(-8.8p + 6320)[/math]
Do you see that the 190 also needed to be multiplied?

Now, IIRC the answer should be in the graph of this function but it actually makes no sense. Am I doing something wrong?
Once you get the equation fixed, please be more specific as to what feature of the graph doesn't make sense.
 
Wow, I really didn't see that.

Right, so the equation now is [math]P = -8.8p^2 + 7992p - 1207800[/math]The parabola's vertex is now at (454, 606747), meaning at the price of $454 we would have a profit of $606747. Using the linear demand equation and the price:
[math]q = -8.8 \times 454 + 6320 \\ q = 6320 - 3995 \\ q = 2325 \; desks[/math]
Now I should try to use a non-linear demand equation i.e. real-world data to get a more accurate estimation.

Thank you for the help Dr. Peterson
 
Wow, I really didn't see that.

Right, so the equation now is [math]P = -8.8p^2 + 7992p - 1207800[/math]The parabola's vertex is now at (454, 606747), meaning at the price of $454 we would have a profit of $606747. Using the linear demand equation and the price:
[math]q = -8.8 \times 454 + 6320 \\ q = 6320 - 3995 \\ q = 2325 \; desks[/math]
Now I should try to use a non-linear demand equation i.e. real-world data to get a more accurate estimation.

Thank you for the help Dr. Peterson
Looks good. And I was going to make a comment on the unrealism of the linear demand, in case you are going for realism, but I guess that's not needed.

For readers unfamiliar with that text-speak:

IIRC = "if I remember correctly"
I thought I remembered that correctly -- and I did! (I don't know much text-speak.)
 
I thought I was closing this thread but it seems like I need more help, how can I find a non-linear demand equation and make a more accurate estimation?

I tried looking for it online and couldn't find anything but instructions on how to do it with a linear demand equation.

Any help is greatly appreciated!
 
I thought I was closing this thread but it seems like I need more help, how can I find a non-linear demand equation and make a more accurate estimation?

I tried looking for it online and couldn't find anything but instructions on how to do it with a linear demand equation.

Any help is greatly appreciated!

Estimate the demand equation by using regression analysis to fit a line through the data points, instead of "take two data points and got a linear demand equation using them to make things easier."

Split your data into test and training data sets. Perform regression on the training dataset, and validate the model with your test.
 
Last edited:
Estimate the demand equation by using regression analysis to fit a line through the data points, instead of "take two data points and got a linear demand equation using them to make things easier."

Split your data into test and training data sets. Perform regression on the training dataset, and validate the model with your test.
Oh, linear regression? Thank you! I've done regression in Python, haven't really ever done it purely mathematically, but I guess there's enough info online.
 
Last edited:
Oh, linear regression? That's a great idea, I've done regression with Python, haven't really ever done it purely mathematically, but I guess there's enough info online.
There are non-linear regression models such as polynomial, exponential, logarithmic, and sine and cosine functions. Without looking at your data, I can't speak to the specifics. Try out different models to see which one gives you the "best" fit.

Python optimizes the coefficients by seeking the least squares, so it's purely mathematical, you just don't see the math running in the background.
 
Here's the data I have collected from Amazon, if that helps:

$144 desk - 5310 sales
$250 desk - 1380 sales
$300 desk - 630 sales
$350 desk - 780 sales
$400 desk - 420 sales
$470 desk - 1770 sales
$500 desk - 210 sales

Though I'm first going to try linear regression, to see if I'm happy with it. The data I collected definitely has outliers.

Once again, thanks for the input!
 
Last edited:
Here's the data I have collected from Amazon, if that helps:

$144 desk - 5310 sales
$250 desk - 1380 sales
$300 desk - 630 sales
$350 desk - 780 sales
$400 desk - 420 sales
$470 desk - 1770 sales
$500 desk - 210 sales

Though I'm first going to try linear regression, to see if I'm happy with it. The data I collected definitely has outliers.

Once again, thanks for the input!
Ideally, you want to have more than 30 observations to balance out bias and variance.

Keep in mind that there are many other factors that affect the sales of a product e.g. brand, advertising/marketing, features, etc... Determining sales based solely on price doesn't quite paint the full picture. I'm not sure about your background but it's a lot more involved than just drawing a regression line, but it's a start.
 
Top