# Boltzmann distribution - estimator

I have a discrete random variable $$X$$, with possible values $$\{E_k\}$$ , following a Boltzmann distribution, with probability mass function given by:

$$p_k = p(X=E_k) = e^{-\beta E_k}/Z$$

where $$Z = \Sigma_k \ e^{-\beta E_k}$$ is a normalization factor, and $$\beta > 0$$.

I have $$N$$ independent samples $$x_i \sim X$$. What is the best estimator of $$\beta$$?

I would like to know what would be the maximum-likelihood estimator, or the minimum variance unbiased estimator, of the parameter of the Boltzmann distribution behind the samples $$x_i$$.

A) Intuitively I think of:

1. approximate the probability mass with $$\hat p_k =$$ (counts of $$x_i = E_k)/N$$
2. fit a logarithmic regression $$\log \hat p_k(x_i) = -\hat \beta x_i + \hat \alpha$$
3. use $$\hat \beta$$ as an estimator of $$\beta$$.

B) Using maximum-likelihood I get:

1. likelihood function: $$L(\beta, {\bf x}) = \Pi_{i=1}^N \ e^{-\beta x_i}/Z$$
2. log-likelihood: $$l(\beta, {\bf x}) = - N\log Z - \Sigma_{i=1}^N \ \beta x_i$$
3. maximum-likelihood: $$\frac{\partial l}{\partial \beta} = N \ \Sigma_{k} \ E_k \frac{e^{-\beta E_k}}{Z} - \Sigma_{i=1}^N \ x_i = 0 \ \Leftrightarrow \ \bar X (\beta) = \frac{1}{N}\Sigma_{i=1}^N \ x_i$$

I guess this means I should choose $$\beta$$ such that the expected value of $$X$$ matches the sample average.

How can I compare estimators A and B? What is the estimators' expected value and variance? Is a better estimator known?