How to get $P(X > x)$ where $K$ is a geometric random variable with parameter $p$?

A geometric random variable describes the probability of having $n$ failures before the first success. There are therefore two ways of looking at this:

  1. $P(X>x)$ means that I have $x$ failures in a row; this occurs with probability $(1-p)^x$. I don't care what happens after I've had $x$ failures, because I already know that $X>x$.
  2. $P(X>x)= \sum_{n=x}^{\infty} (1-p)^n p $, i.e. that I have $x$ failures and a success, or $x+1$ failures and then a success, or... To calculate this, you just sum the geometric series with first term $(1-p)^x p$ and ratio $1-p$, so we have $$ P(X>x) = \frac{(1-p)^x p}{1-(1-p)} = (1-p)^x, $$ as before.

By definition of a geometric random variable: $P(X = k) = (1-p)^k p$ (if $p$ is the success probability, it means that you failed k times before succeeding) and thus:

$P(X > x) = p \sum_{k=x+1}^{\infty} (1-p)^k = p (1-p)^x \sum_{k=0}^{\infty} (1-p)^k = \frac{p (1-p)^x}{1-(1-p)} = (1-p)^x$


Consider an example of finding the probability that a die is thrown $8$ times before a $6$ is obtained:

Let the discrete random variable $X=$ The number of throws required to obtain a $6$.

Then $P(X=6)=\frac16$ so $$X \sim \mathrm{Geo}\left(\frac16\right)$$

If a $6$ is obtained on the 8th throw then there are $7$ failures followed by a success.

With $k=8$: $P(X=k)=\color{blue}{q^{k-1}\times p}=P(X=8)= q^7 \times p= \left(\frac58\right)^7 \times \frac16$ where

$p=$ Probability of success (getting a six)

$q=$ Probability of failure (not getting a six)

So $p+q=\frac16 +\frac56=1$

Therefore $q=1-p$. So in your formula $(1−p)^kp$ is the same as $\color{blue}{q^{k-1}\times p}$ ($k-1$ failures followed by a success)