<s>[INST] Probability -- Proving Cantelli’s inequality by setting up a $E[φ(X)]$ and using Markov's inequality I'm working on proving cantellis inequality. We're told to use this setup:
$P(X >= a) ≤ E[φ(X)]/ φ(α)$ where $var[X] = σ^2$ and $E[X] = 0$ and $φ(x) = (x+c)^2$
An intermediate step was proving that $P(X ≥ α ) ≤ (σ^2+c^2)/(α +c)^2$ which I did successfully.
The next part was finding a value of c that minimizes the right hand side of the equation, and therefore gets the best bound. We're to find the c that gets this bound:
$P(X ≥ α ) ≤ (σ^2)/(α^2 +σ^2)$
The answer is supposed to be $c = σ^2/α$ but I'm getting, by partial differentiation on c and setting that RHS to 0, $c =  ασ^2/(α- σ^2) $
$d/dc ((σ^2 + c^2)/(α + c)^2) = (2c(α+c)^2 - 2(α + c)(σ^2+c^2))/(α + c)^4 = 0$
$2c(α+c)^2 - 2(α + c)(σ^2+c^2) = 0$
$2c(α+2αc+c^2) - 2(ασ^2 + αc^2+ cσ^2+c^3 = 0 $
$2αc+2αc^2+2c^3 - 2ασ^2 - 2αc^2-2cσ^2-2c^3 = 0$
$2αc - 2ασ^2 -2cσ^2 = 0$
$αc - ασ^2 -cσ^2 = 0$
$c(α- σ^2) =  ασ^2 $
$c =  ασ^2/(α- σ^2) $
What did I do wrong?
 [/INST] Given that $$\mathbb P(X\geqslant\alpha)\leqslant\frac{\sigma^2+c^2}{(\alpha+c)^2},$$
we consider the map $f:[0,\infty)\to\mathbb R$ defined by $f(c) = \frac{\sigma^2+c^2}{(\alpha+c)^2}$. Now, $f(0) = \left(\frac\sigma\alpha\right)^2$, and $\lim_{c\to\infty}f(c)=+\infty$. It is clear that $f$ is differentiable on $(0,\infty)$, as a rational function whose denominator is always positive, and so differentiating we find that
$$
f'(c) = \frac{2 \left(\alpha  c-\sigma ^2\right)}{(\alpha +c)^3}.
$$
It follows that $f$ is decreasing on $\left(0, \frac{\sigma^2}\alpha\right)$ and increasing on $\left(\frac{\sigma^2}\alpha,\infty\right)$, and thus attains a global minimum at $c^* = \frac{\sigma^2}\alpha$. We conclude that
$$
\mathbb P(X\geqslant\alpha)\leqslant\inf_{c\geqslant 0} \frac{\sigma^2+c^2}{(\alpha+c)^2} = \frac{\sigma ^2}{\alpha ^2+\sigma ^2}.
$$
(Note that
</s>