Can anyone explain how the writer rewrite the objective function in (7) to be written as (8)?
1 Answer
$\begingroup$
$\endgroup$
Just consider the two cases:
- If $z_i=0$, the LHS and RHS are both $0$.
- If $z_i=1$, the LHS and RHS are both $p_i$.
Explicit calculations for the RHS: \begin{align} \theta_i \left(1 - \left(\frac{\theta_i-p_i}{\theta_i}\right)^0 \right) &= \theta_i \left(1 - 1\right) = 0 \\ \theta_i \left(1 - \left(\frac{\theta_i-p_i}{\theta_i}\right)^1 \right) &= \theta_i \left(1 - 1 + \frac{p_i}{\theta_i}\right) = \theta_i \cdot \frac{p_i}{\theta_i} = p_i \end{align}