# What is the Fisher information matrix in the logit model? [duplicate]

Assume that $$Y_1,\dots, Y_n$$ follows a Binomial distribution with probability of $$p(d_i)$$. Assume that the pdf of $$Y_i$$: $$f(p_i,Y_i)=\binom{n_i}{y_i}p_i^{y_i}(1-p_i)^{n_i-y_i}$$

Assume that a model of $$p(d)$$ is $$p(d)=\log\frac{p(d)}{1-p(d)}=\alpha+\beta d.$$

Question: I am confused about what is the Fisher information matrix?

I know the definition: the Fisher information of $$\theta=(\alpha, \beta)$$ is $$I(\theta)=E\left[\left(\frac{\partial \log f(x;\theta)}{\partial \theta}\right)^2\right]$$

But I am not sure if I need to plug into all data sample $$Y_1,\dots, Y_n$$. I mean $$I(\theta)=E\left[\left(\frac{\partial \log \prod_{i=1}^n f(x_i;\theta)}{\partial \theta}\right)^2\right]$$

My work:

Let $$\theta=[\alpha, \beta]^\top$$ and $$z=[1,d]^\top$$.

The score function is $$S(\theta)=\sum_{i=1}^n\left[y_i-n_i \frac{e^{z_i^T\theta}}{1+e^{z_i^T\theta}}\right]z_i$$ and the Hessian matrix is $$H(\theta)=-\sum n_ip_i(1-p_i)z_iz_i^\top.$$