$\mathbb{E}[X \mid X \leq n], X \sim$ Geom($p$)

46 Views Asked by At

Let $X$ denote a geometric distribution with success probability $p$, I want to compute the conditional expectation : $$ \mathbb{E}[X \mid X \leq n]. $$ So intuitively we have a coin toss where we count the number of tosses until we throw heads, but we know that we are going to throw head at least once in at most $n$ tosses.

1

There are 1 best solutions below

1
On BEST ANSWER

There are two parametrization of Geometric: one that counts the trials and another one that counts the failures before the first success

Let's assume we are interested in the one counting the trials (the solution is not very different in the other case)

The conditional distribution is the following:

$$\mathbb{P}[X=x|X\leq n]=\frac{1}{1-q^n}p\cdot q^{x-1}$$

Where $p$ is the probability of success and $q=1-p$ is the probability of failure.

Thus

$$\mathbb{E}[X=x|X\leq n]=\frac{p}{1-q^n}\sum_{x=1}^{n}x q^{x-1}$$

can you conclude? It is not difficult


hint:

$$x q^{x-1}=\frac{d}{dq}q^x$$

after some calculations (using derivatives and geometric series) it results to me

$$\mathbb{P}[X=x|X\leq n]=\frac{1}{p}-\frac{n q^n}{(1-q^n)}$$