# placing bets to maximize the difference between two random numbers

Suppose you are asked to bet on the difference between two independent randomly numbers $r_1$ and $r_2$, both uniformly distributed between 0 and 1. Your bet size is $w$ is between -1 and 1. Your winning each time will be $w_i \cdot (r_1 - r_2)$.

Of course the expectation of this bet is zero. But suppose now you know the value of $r_1$ before placing your bet, what is the optimal bet size that will maximize your sharp ratio: $\frac{E[w_(r_{1}-r_{2})]}{\sqrt{\text{Var}[w\cdot(r_1-r_2)]}}$ , assuming that you can change your bet size each time, and you repeat this process many times?

• do you know all $r_1$s before any bet or know $r_1$ right before your each bet and after your previous bets? – jf328 Oct 9 '15 at 13:56
• You know one $r_1$ right before you place each bet. – user133586 Oct 9 '15 at 15:04
• This question is singularly uninteresting: since all positive bets give identical values of that ratio and all negative bets give the negatives of those values, you are asking your readers merely to choose the larger of a number and its negative. – whuber Oct 9 '15 at 15:05
• @whuber, I think that will maximize the expectation, but not necessarily sharpe ratio – jf328 Oct 9 '15 at 15:13
• The question states that you know $r_1$. Therefore the bet is chosen based on an expectation of $r_2$ given that $r_1$ is known. Averaging over $r_1$ is not relevant to this optimization. – whuber Oct 9 '15 at 16:48

$\text{sign}(w) \sqrt{12} (r_1 - E(r_2))$
So, by way of "thinkin' about it", you just choose $w > 0$ if $r_1 > 0$ or $w < 0$ if $r_1 < 0$.
• I believe you meant to use $1/2$ (which is $E(r_2)$) rather than $0$ in your criterion. – whuber Oct 9 '15 at 22:45