Does this summation $ \sum_{x=a}^b \frac{p(1-p)^x}{(1-p)^a-(1-p)^b} $ equal 1? I believe that I have found the PMF of a truncated geometric distribution, however I want to verify that this is a valid PMF by showing its sum is equal to 1. In the following PMF, the random variable x is bounded between a and b:
$ P(X = x) = \frac{p(1-p)^x}{(1-p)^a-(1-p)^b}$
Given a, b, and p are all constants (a and b are both positive integers, and 0 < p < 1), is it possible to show that the summation is equal to 1:
$\sum_{x=a}^b P(X=x) = 1$ ?
 A: The sum is a geometric series of the form $$\sum_{i=0}^{b-a} \alpha z^i=\alpha\frac{1-z^{b-a+1}}{1-z}$$ where:$$\begin{align} \alpha&=\frac{p(1-p)^a}{(1-p)^a-(1-p)^b}\\
z&=1-p
\end{align} $$
So the sum you get is $$\frac{p(1-p)^a}{(1-p)^a-(1-p)^b}\cdot\frac{1-(1-p)^{b-a+1}}{p}\\=\frac{(1-p)^a-(1-p)^{b+1}}{(1-p)^a-(1-p)^{b}}$$
That is not $1,$ but it becomes $1$ if you change the sum to $\sum_{x=a}^{b-1},$ or if you change the $b$ in the denominator of $P(X=x)$ to $b+1.$
A: Notice that the only variable of the sum is at the numerator. $x$ runs from $a$ to $b$, two values. The series can be compute by pen, and gives the result
$$\frac{(1-p)^a+p (1-p)^b-(1-p)^b}{(1-p)^a-(1-p)^b}$$
Which can be simplified into
$$p \left(\frac{1}{1-(1-p)^{b-a}}-1\right)+1$$
Which as you can see it's not 1.
A: We have
$$\sum_{x=a}^b \frac{p(1-p)^x}{(1-p)^a-(1-p)^b}\\=
\frac{p}{(1-p)^a-(1-p)^b} \sum_{x=a}^b(1-p)^x\\
=\frac{p(1-p)^a}{(1-p)^a-(1-p)^b} \sum_{x=0}^{b-a}(1-p)^x\\
=\frac{p(1-p)^a}{(1-p)^a-(1-p)^b}\frac{(1-p)^{b-a+1}-1}{((1-p)-1}\\
=\frac{(1-p)^{b-a+1}-1}{(1-p)^{b-a}-1}$$
So the answer is no. But
$$\sum_{x=a}^{b-1} \frac{p(1-p)^x}{(1-p)^a-(1-p)^{b}}=1$$
