# Expectation of a function of a distribution?

The question I'm looking at involves evaluating:

$$E[\frac{(n-1)}{(n-1+X_n)}]$$ for n >= 2

Xn is a random variable with a negative binomial distribution, equivalent to Binomial(p, -n).

How would I go about evaluating this expectation? I've never dealt with taking the expectation of a function which used the parameter of the number of trials and don't know where to start.

I know that the solution is 1-p, but I do not know how to get there.

• Just do it the standard way; compute$\sum_{i=1}^{\infty}\frac{n-1}{n-1+k}p_k$, where $p_k$ is the probability of $X_n=k$. Nov 5, 2017 at 2:05

• @LawrenceWang Isn't the PMF exactly defined as $P(X_n=k), k=1,2,\ldots$? The expectation, by the way, is the weighted average of the PMF. Nov 5, 2017 at 2:32