Optimising unrounding using maximum likelihood

39 Views Asked by At

I have a bunch of rounded random independent numbers. I want to replace them with unrounded numbers such that the unrounded numbers are 'most likely' to have been generated by some (continuous) distribution, eg, a lognormal distribution. What should be my objective function?

1

There are 1 best solutions below

1
On BEST ANSWER

Let's give an example to illustrate how you might do this:

Suppose you had the following data, which were actually generated by taking $100$ samples of $e^X$ where $X \sim N(2,0.01)$, and then rounding to the nearest integer

value   6  7  8  9 
freq    6 44 42  8

Then for a lognormal distribution with underlying parameters $\mu$ and $\sigma^2$ and cumulative distribution function $F_{\mu,\sigma^2}$, the likelihood of those parameters from these observations would be proportional to $$\left(F_{\mu,\sigma^2}(6.5)-F_{\mu,\sigma^2}(5.5)\right)^{6} \times \left(F_{\mu,\sigma^2}(7.5)-F_{\mu,\sigma^2}(6.5)\right)^{44} \times \\ \left(F_{\mu,\sigma^2}(8.5)-F_{\mu,\sigma^2}(7.5)\right)^{42}\times \left(F_{\mu,\sigma^2}(9.5)-F_{\mu,\sigma^2}(8.5)\right)^{8}$$

As far as I can tell, this likelihood is maximised with $\hat\mu \approx 2.01361$ and $\hat\sigma^2 \approx 0.00791$, not too far from the original parameters

The real difficulty comes when you then ask for "the unrounded numbers are 'most likely' to have been generated". You could look for the values corresponding to highest density in each interval using these maximum likelihood estimates, and the result would be $6$ values of $6.4999\ldots$, and $44$ values of $e^{\hat\mu-\hat\sigma^2} \approx 7.43129$, and $42$ values of $7.5$ and $8$ values of $8.5$. I think that may not be the kind of thing you were looking for