0

Let $X_1, X_2, \dots$ independent and identically distributed random variables $\sim Bernoulli(p)$. $\ T = \inf (n : X_{n-1}+X_{n}=1)$, calculate 1) P(T=n) ; 2) E(T).

But I don't know how to resolve it because I don't know how to interpret T

Can anyone help me? thank you very much!

Ale88ssia
  • 183
  • $T$ tells you after how many drawings you got $01$ or $10$. –  Jun 18 '15 at 08:35
  • 1
    T is the first time you get two successive Bernouille either F, T or T, F ; say it is the first time you get the other output – ClementWalter Jun 18 '15 at 08:35
  • $T$ gives the first moment $n$ such that $X_{n-1} =1 ; \text{and} ; X_n =0$ or $X_{n-1} =0 ; \text{and} ; X_n =1$. Essentially, $T$ gives the moment of the first occurrence of two consecutive opposed results. – Alex M. Jun 18 '15 at 10:06
  • $$T=\inf{n\geqslant1\mid X_n\ne X_0}$$ – Did Jun 19 '15 at 07:47

4 Answers4

1

After my comment, I realize $T$ is just sort of a geometric random variable counting the number of failure, but "success" and "failure" is defined after the first try. Hence you can use the results for a Geometric random variable:

$P[T = t] = (1-p)^t p$

$E[T] = \dfrac{1}{p} - 1$

And finish the calculation by conditionning with $X_1$:

$P[T = t \mid X_1 = TRUE] = P[\text{t fails with probability of success } 1-p] = p^t (1-p)$

and so on

  • To avoid confusion I would not use notation $T$ to describe the geometric distribution. On the other hand: in my view is this is the nicest approach of this problem (+1). – drhab Jun 18 '15 at 09:25
1

The distribution of $T$ follows

$$\begin{align}2&\to pq+qp\\ 3&\to ppq+qqp\\ 4&\to pppq+qqqp\\ &\cdots\\ n&\to p^{n-1}q+q^{n-1}p. \end{align}$$

The expectation is

$$E(T)=\sum_{n=2}^\infty n\left(p^{n-1}q+q^{n-1}p\right).$$

You can simplify using Formula for calculating $\sum_{n=0}^{m}nr^n$.

1

$T$ is the first $n$ that $X_n$ is different from $x_{n-1}$. Since it is Bernoulli, $X_n+X_{n-1}=1$ is equivalent to $X_n\neq X_{n-1}$. For example, in the sequence $11111010101$, $T=6$.

$P(T=n)=pq^{n-1}+qp^n$, where $q=1-p$.

let $n_1=E(T-1|X_1=1), n_2=E(T-1|X_1=0)$. So we have:

$n_1=1+pn_1$, so $n_1=\frac{1}{1-p}=\frac{1}{q}$, and similarly we get $n_2=\frac{1}{p}$

So $E(T)=1+P(X_1=1)E(T-1|X_1=1)+P(X_1=0)E(T-1|X_1=0)=1+\frac{p}{q}+\frac{q}{p}=\frac{p^2-p+1}{p(1-p)}$.

Indominus
  • 1,166
  • @drhab, you are right, thanks! Edited, $\mathbb{E}T=3$ when $p=\frac{1}{2}$. $n_1\space$ and $\space n_2$ are "How long do I need to wait after the first draw", hence "T-1" instead of "T". – Indominus Jun 18 '15 at 09:29
0

Let $U,V$ be random variables: $U\approx\text{Geometric}\left(p\right)$ and $V\approx\text{Geometric}\left(q\right)$ where $q:=1-p$.

Here geometric stands for the number of experiments needed to arrive at the first succes.

Let $U,V,X_{1}$ be independent.

Then $T$ has the same distribution as: $$1+(1-X_1)U+X_1V$$

See the answer of @clemlaflemme if you wonder why.

This enables you to find $P(T=n)$ and secondly: $$\mathbb{E}T=1+\left(1-\mathbb{E}X_{1}\right)\mathbb{E}U+\mathbb{E}X_{1}\mathbb{E}V=1+q\times\frac{1}{p}+p\times\frac{1}{q}$$

drhab
  • 151,093