I know that this has been solved before, but I am specifically asking about how to solve the expectation:
The second derivative of the log-likelihood function is:
$$\frac{d^2\ell\theta}{d\theta^2} = -\frac{x}{\theta^2} - \frac{n - x}{(1 - \theta)^2}$$
And I want to take the negative expectation of that to get $I(\theta)$:
$$I(\theta) = -E\left[-\frac{x}{\theta^2} - \frac{n - x}{(1 - \theta)^2}\right] = \frac{n}{\theta(1-\theta)}$$
But how exactly do I solve for the expectation? What properties of expectation do I need to use? What does it mean to take the expectation with respect to x? Here is my attempt:
$$I(\theta) = \frac{E[x]}{\theta^2} + \frac{n - E[x]}{(1 - \theta)^2}$$