# Thread: Inverse Z-Transform vs inverse PGF?

1. ## Inverse Z-Transform vs inverse PGF?

The "official" formula for obtaining the inverse Z-Transform is
$$x[n] = \frac{1}{2\pi i}\oint_\Gamma z^{n-1} X(z) dz,$$
where $\Gamma$ is any counterclockwise closed path containing the origin and entirely in the ROC.

Compare this formula to the formula that allows to extract a probability mass function $x[n]$ from a probability generating function $X(z)$:
$$x[n] = \frac{X^{(n)}(0)}{n!}.$$

I'm confused: Assuming $x[n]$ is a probability mass function, why would someone ever want to evaluate a contour integral instead of doing basic differentiation?

2. ## Re: Inverse Z-Transform vs inverse PGF?

It looks like it's the difference between getting a general formula for $x[n]$ vs. having to explicitly compute each value.

How would compute $x[n]$ for very large values of $n$ using the differentiation formula. Take a billion derivatives?