Suppose I have 2 functions, a given function f(x) and a target function g(x). Let $M_{f}^{n}$ denote the nth central moment of function f(x). In the discrete case for N samples of f(x):
$M_{f}^{n}=\tfrac{1}{N}\sum_{i=1}^{N}(f(x) - \mu)^{n}$
And $\mu$ is the mean.
In the continuous case:
$M_{f}^{n}=E[(f - E(f))^{n}]$
I would like to transform f(x) into $f_{g}^{n}(x)$ such that:
$M_{f_{g}^{n}}^{1}=M_{g}^{1}$
$M_{f_{g}^{n}}^{2}=M_{g}^{2}$
[...]
$M_{f_{g}^{n}}^{n}=M_{g}^{n}$
Upto a specified n. For n=2 case, there is a direct transformation:
$f_{g}^{2}(x) = f_1\cdot\frac{M_{g}^{2}}{M_{f_1}^{2}} + M_{g}^{2}$
Where:
$f_1(x) = f(x)-M_{f}^{1}$
I can't think of something for n=3,4. It could be the case that such a transformation might not be possible. In which case, is it possible to propose a numerical method that can find a solution upto a specified epsilon?
The only thing we know about g(x) are its n central moments.
I'm looking for a computationally efficient transformation, yet a fairly general solution.
Ideally, an affine or polynomial transformation is preferred, but not required. The target is computational efficiency.
The "transformation" for n=2 is O(1), assuming that the computation of the nth moment is O(1), and subtracting the 1st moment is O(1).