What is the Variance of $(1-X)/X$ and the Expectation of $(1-X)/X^{2}$? Knowing that
$X = \begin{cases} 
0.05 \ \ \text{with probability} \ \ 0.7\\
0.2\ \ \text{with probability} \ \ 0.3\end{cases}$
What would be the Variance of $\frac{1-X}{X}$ and the Expectation of $\frac{1-X}{X^2}$ ?
I have computed it and would like to know if my development is correct :
\begin{aligned}
Var\left[\frac{1-X}{X}\right] &= E\left[\left(\frac{1-X}{X}\right)^2\right] - \left(E\left[\frac{1-X}{X}\right]\right)^2 \\
&= \left(\frac{0.95}{0.05}\right)^2\cdot 0.7 + \left(\frac{0.8}{0.2}\right)^2\cdot 0.3 - \left(\frac{0.95}{0.05}\cdot 0.7 + \frac{0.8}{0.2}\cdot 0.3\right)^2 = 47.25
\end{aligned}
and
$$E\left[\left(\frac{1-X}{X^2}\right)\right] = \left(\frac{0.95}{0.05^2}\right)\cdot 0.7 + \left(\frac{0.8}{0.2^2}\right)\cdot 0.3 = 272 $$

Since
$$\operatorname{E}\left[\frac{1-X}{X}\right]=\sum_{i=1}^2 \frac{1-x_i}{x_i}p_i$$
$$=\frac{0.95}{0.05}\cdot 0.70+\frac{0.80}{0.20}\cdot 0.30=14.5$$
And
$$\operatorname{E}\left[\left(\frac{1-X}{X}\right)^2\right]=\sum_{i=1}^2 \left(\frac{1-x_i}{x_i}\right)^2 p_i$$
$$=\left(\frac{0.95}{0.05}\right)^2\cdot 0.70+\left(\frac{0.80}{0.20}\right)^2\cdot 0.30$$
$$=361\cdot 0.70+16\cdot 0.30=257.5$$
We have
$$\operatorname{Var}\left(\frac{1-X}{X}\right)=257.5-14.5^2=47.25$$
Also
$$\operatorname{E}\left[\frac{1-X}{X^2}\right]=\sum_{i=1}^2 \frac{1-x_i}{(x_i)^2}p_i$$
$$=\frac{0.95}{0.05^2}\cdot 0.70+\frac{0.80}{0.20^2}\cdot 0.30=272$$
So yes, as other users already mentioned, your methods and answers are indeed correct.
