Solution (source code)

= Solution

Independence and the Poisson <probabilities> give the log-likelihood
$$
\boxed{\ell(\beta)=\sum_{i=1}^n\left(Y_i\beta x_i-e^{\beta x_i}-\log(Y_i!)\right).}
$$
Its score and curvature are
$$
\ell'(\beta)=\sum_i x_i(Y_i-e^{\beta x_i}),\qquad \ell''(\beta)=-\sum_i x_i^2e^{\beta x_i}.
$$
If some $x_i\ne0$, this is <strictly concave>. A finite maximum is therefore the unique zero of the score when such a zero exists. Newton iteration gives
$$
\boxed{\beta_{m+1}=\beta_m+\frac{\sum_i x_i(Y_i-e^{\beta_mx_i})}{\sum_i x_i^2e^{\beta_mx_i}}.}
$$
Start from a finite value, compute the score and curvature, and iterate until both the score and step are small. A line search that shortens a step until the <likelihood> increases improves robustness. <Strict concavity> identifies any converged <stationary point> as the <global maximum>. A finite root need not exist, for example when all observations are zero and all $x_i>0$, in which case the <likelihood> supremum is at $\beta\to-\infty$. If all $x_i=0$, the parameter is unidentifiable.