Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If we have a function $f(s)$ with this form:

$$ f(s) = \sum_{i=0}^{\infty} p_i s^i $$

We also know that:

$$ f(1) = 1 $$


$$ p_i \ge 0 \quad \text {for all $ i \ge 0$} $$

Assume we can calculate $f(s)$ for any $s$, is it possible that with all the info we know, we would be able to get $p_n$ for any n?

(Actually $p_i$ is the probability that $[Z=i]$ where Z is a random variable.)

share|cite|improve this question
This is not a polynomial (unless all but finitely many $p_n$'s vanish); the degree of the polynomial has to be finite. – Srivatsan Oct 1 '11 at 23:22
Coefficients of a power series, you mean. If you can evaluate $f$ for any complex $s$, then sure... – J. M. Oct 1 '11 at 23:26
Your series will necessarily be the Taylor series of $f(s)$ about $s = 0$. Then ${\displaystyle p_i = {f^{(i)}(0) \over i!}}$ for all $i$, where $f^{(i)}(0)$ denotes the $i$th derivative of $f(s)$ at $s = 0$. – Zarrax Oct 1 '11 at 23:30
In any event... – J. M. Oct 1 '11 at 23:34
Could you answer my question? Can you, or can you not, evaluate $f(s)$ for complex $s$, or are you restricted to evaluating for real $s$? – J. M. Oct 1 '11 at 23:53
up vote 0 down vote accepted

This is the discrete version of the moment problem or the infinite version of a Vandermonde matrix. One approach is that $p_0=f(0),\quad p_1=\left.\dfrac{\mathrm df(s)}{\mathrm ds}\right|_{s=0}$ and the higher $p$'s are higher derivatives at $0$. Of course, this is rather unstable numerically.

share|cite|improve this answer
The thing is, according to my understanding of the problem. What I can get is only $f(s)$, not $f'(s)$. In fact, I'm trying to construct a random variable with the same distribution as $Z$, but without knowing $p_0, p_1, p_2, \ldots $, it seems impossible . That's why I'm trying to get all $p_i$'s. – ablmf Oct 1 '11 at 23:42
You can take a numeric derivative. Take $s$ smaller and smaller and check $\frac{f(s}-f(0)}{s}$. That is where the instability comes from-you are subtracting two nearly equal quantities. – Ross Millikan Oct 2 '11 at 0:03
@ablmf: you can do Richardson extrapolation in conjunction with Ross's "take $s$ smaller and smaller" strategem. It doesn't completely cure the numerical instability, but you might manage to squeeze out a few more digits of accuracy as long as you don't shrink $s$ too much. – J. M. Oct 2 '11 at 0:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.