Estimate Information Entropy from Moments I hope I'm using the right terminology below.
I have access to the moments statistics of a large sample.
That is, I have  $\sum(x)$, $\sum(x^2)$, ..., $\sum(x^k)$.
I also have access to max and min, and I can probably access some other information (e.g., the log-moments).
I want to estimate the Information entropy that is usually computed as
$h[f] = \operatorname{E}[-\ln (f(x))] = -\int_\mathbb X f(x) \ln (f(x))\, dx$
Is this possible? What could be the pseudocode for that operation?
Edit:
One thing that I overlooked is the difference between the continuous case and the discrete case.
In the discrete case the Entropy is computed
$H(X) = \sum_{i=1}^n {\mathrm{P}(x_i)\,\mathrm{I}(x_i)} = -\sum_{i=1}^n {\mathrm{P}(x_i) \log_b \mathrm{P}(x_i)}$
Example: Assuming my variable is accounting for the number of people with height $y$. This is a discrete case, where I can have for example $x=153cm$ and $f(x)=24$, and $f(x)=0$ for $x=0cm$.
This case should be different.
 A: *

*If the distribution is of compact support, the moments, equivalent to the Fourier series expansion, uniquely determines the distribution. The uniqueness is even more directly shown by the Stone-Weierstrass theorem. As a matter of fact the Stone-Weierstrass theorem provides just the arbitrarily close approximation of the distribution. Without loss of generality, suppose the target distribution $p(x)$ is nonzero only on $[0,1]$. Let the approximating $n$'th order polynomial be
$$P_n(x)=\sum_{i=0}^n c_ix^i.$$
Substituting this polynomial into the given $n+1$ moment integrals, with the help of the Beta functions, gives an $(n+1)\times (n+1)$ linear system of equation. Solving it gives $P_n$.


One can also use the Bernstein polynomial approximation
$$B_n[p](x) = \sum_{i = 0}^n p\left( \frac{i}{n} \right) b_{i,n}(x)$$
and solve directly for the target function value at $p(\frac in), \,\forall i\in\{0,1,\cdots,n\}$. 
Then the entropy is uniquely determined. 


*If the distribution is discrete, the moment equation is just the power sum. The distribution is also uniquely determined. Newton's identity gives the elementary symmetric polynomials of $\{x_i\}$ which in turn gives a polynomial. Solving the $n$'th order polynomial gives the distribution. 

