The question arises from the following real-life situation: I buy a newspaper at 3 dollars and sell it at 6 dollars. I know the demand for news paper is a binomial random variable with $n=12$ and $p=0.7$, I want to maximise my expected profit.


The answer is obviously 8 because it is nearest to the expected demand for newspaper. But my question is about how this can be derived more vigorously. My attempt is as follows but I am stuck at the last step:

Let $p$ be the newspaper I purchased, and X be the demand for newspaper, then the profit is a discrete random variable with the following functional forms:

$$Y= \begin{cases} 6X-3p & X<p \\ 3p & X \geq p \end{cases} $$

The answer is obtained when the expectation of Y is obtained in terms of p. Then it is a function to be maximised. But the problem now is: how can the expectation of such a random variable that depends on another random variable be obtained? I would very appreciate a proof of why a method works.

  • $\begingroup$ If you mean random variables $X$ and $Y$, answer is $Y$ is derived from $X$. $E(Y) = E(f(X))$ $\endgroup$
    – user158565
    Commented Dec 16, 2018 at 16:30
  • $\begingroup$ but then Y also changes when X becomes greater than or equal to p, how should this be considered? $\endgroup$
    – hephaes
    Commented Dec 16, 2018 at 17:02

1 Answer 1


Let $N$ be the the newspaper purchased. It is fixed and $0\le N \le 12$. Let $p_i$ probability of the demand for news paper being $i$, $0\le i \le 12$. It can be got by following the binomial distribution with parameters 12 and 0.7. Then

$$E(Y|N)=-3Np_0+(6-3N)p_1 + ... +[6(N-1)-3N]p_{N-1}+ 3N(p_N + ...+ p_{12})$$,


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.