Why did I get a wrong answer solving this question?

90 Views Asked by At

a phone company orders $b$ iPhones.
Let $Y\sim U[0,100]$ be the number of people interested to buy an iPhone from the company.
The company sells an iPhone for everyone that is interested to buy one.
For every iPhone the company sells, it gets $3\$$ profit, and for every iPhone the company orders and doesn't sell, the company loses $1\$$.
Find for which $b$ the expected value of the profit is maximum.

My Attempt:
Let $X$ be the amount of profit of the company.
So I can say $X=3Y - (b-Y)$. All the sold $Y$ iPhones getting $3\$$ profit each, minus the remaining iPhones the company has ordered. And so:
$E(X)=E(3Y-b+Y)=E(4Y)-E(b)=4*\frac{101}{2}-b$.
And here there's just $b=0$ as maximum, and the answer is $b=75.$

2

There are 2 best solutions below

8
On BEST ANSWER

$$\begin{aligned}\mathbb{E}X & =\mathbb{E}\left[X\mid Y>b\right]P\left(Y>b\right)+\mathbb{E}\left[X\mid Y\leq b\right]P\left(Y\leq b\right)\\ & =\mathbb{E}\left[3b\mid Y>b\right]P\left(Y>b\right)+\mathbb{E}\left[4Y-b\mid Y\leq b\right]P\left(Y\leq b\right)\\ & =3bP\left(Y>b\right)+\left(4\mathbb{E}\left[Y\mid Y\leq b\right]-b\right)P\left(Y\leq b\right)\\ & =3bP\left(Y>b\right)+\left(2b-b\right)P\left(Y\leq b\right)\\ & =3bP\left(Y>b\right)+bP\left(Y\leq b\right)\\ & =2bP\left(Y>b\right)+b\\ & =2b\left(1-\frac{b}{100}\right)+b\\ & =\frac{1}{100}\left(300b-2b^{2}\right) \end{aligned} $$

This expression takes a maximum value $112.5$ for $b=75$.


Edit:

As MathLover commented a mistake has been made above.

We do not have $P\left(Y>b\right)=1-\frac{b}{100}$ but $P\left(Y>b\right)=1-P(Y\leq b)=1-\frac{b+1}{101}$

This leads to outcome $\frac{1}{101}\left(301b-2b^{2}\right)$ and a maximum for $b=\frac{301}4=75.25$ at first hand.

Of course $b$ must be an integer and (again) we get $b=75$ as final answer.

0
On

My math is very similar to the answer of drhab.

Suppose that you buy $x$ iphones.

Then, $\frac{x}{100}$ of the time you will sell some but not all, and $\frac{100-x}{100}$ you will sell all.

Of the $\frac{x}{100}$ fraction of the time, the profit is linear with the amount sold, as the amount sold ranges from $0$ through $x$. Therefore, you can assume that you will sell exactly $\frac{x}{2}$ phones in this case. This means that your profit will be

$[3 \times \frac{x}{2}] - [1 \times \frac{x}{2}] = x.$

So, your overall profit here is represented by $\frac{x}{100} \times x$.


Of the $\frac{100 - x}{100}$ fraction of the time, your profit will be $3 \times x$.


So, your overall profit will be
$\frac{1}{100} \times [x^2 + 300x - 3x^2] = \frac{1}{100} \times [-2x^2 + 300x].$

So, you want to maximize $f(x) = 300x - 2x^2.$
$f'(x) = 300 - 4x$.
$f''(x) = -4$.

So, $f'(x) = 0 \iff x = 75,$ in which case $f''(x) < 0.$

This implies that $f(x)$ is maximized at $x = 75.$