Hessian of negative log-likelihood of logistic regression is positive definite?

3.2k Views Asked by At

I'm trying to show that the Hessian of the negative of the log likelihood with two parameters is positive definite, but I'm not sure how to go about it once I compute the Hessian.

The function is: $-log L(\alpha) =-\sum\limits_{i=1}^N ((1-y_i)(-\alpha_0 - \alpha_1x_i) - log(1 + e^{-\alpha_0 - \alpha_1x_i}))$

and I believe that the Hessian is:

\begin{bmatrix} \frac{e^{-\alpha_{0}-\alpha{1}x_i}}{(e^{-\alpha_{0}-\alpha{1}x_i}+1)^2}&\frac{e^{-\alpha_{0}-\alpha{1}x_i}x_i}{(e^{-\alpha_{0}-\alpha{1}x_i}+1)^2}\\\frac{e^{-\alpha_{0}-\alpha{1}x_i}x_i}{(e^{-\alpha_{0}-\alpha{1}x_i}+1)^2}&\frac{e^{-\alpha_{0}-\alpha{1}x_i}x_i^2}{(1+e^{-\alpha_{0}-\alpha{1}x_i})^2}\end{bmatrix}

How can I show that this matrix is positive definite for all $\alpha$ in order to prove convexity?

1

There are 1 best solutions below

2
On BEST ANSWER

The Hessian simplifies to: $$\frac{e^{-\alpha_{0}-\alpha{1}x_i}}{(1+e^{-\alpha_{0}-\alpha{1}x_i})^2}\begin{bmatrix} 1 & x_i\\x_i & x_i^2\end{bmatrix}.$$ The factor is positive and does not affect positive (semi)definiteness. The matrix has trace $1+x_i^2$ and determinant $0$. Therefore, the eigenvalues are $0$ and $1+x_i^2$. This matrix is therefore positive semidefinite.