Finding expected value of Bernoulli random variables

397 Views Asked by At

Consider a sequence of $n$ Bernoulli trials with $P(\text{success})=p$. Let $X_i$ and $X_j$ be indicator variables of the number of "success" in $i$th and $j$th runs with $i<j$. In other words $X_i=1$ if the $ith$ trial is success and $0$ otherwise.. Given the total number of success was $m$. I am asked to compute the correlation coefficient for $X_i$ and $X_j$.

To compute the co-variance I will need to find $E(X_i)$ and $E(X_j)$ first. By definition $E(X_i)=p$ =$E(X_j)$. But how should I find E($X^2_i$)?

2

There are 2 best solutions below

0
On BEST ANSWER

Once you have observed $m$ successes in $n$ trials, $p$ is irrelevant. Let $X \sim \operatorname{Binomial}(n,p)$ be the total number of successes in $n$ trials. The idea is to think of all possible sequences from $[0,1]^n$ such that exactly $m$ of the entries are $1$, and we have for any $i < j$, $$\operatorname{E}[X_i X_j \mid X = m] = \Pr[X_i = X_j = 1 \mid X = m] = \frac{\binom{2}{2} \binom{n-2}{m-2}}{\binom{n}{m}} = \frac{m(m-1)}{n(n-1)}.$$ Similarly, $$\operatorname{E}[X_i \mid X = m] = \Pr[X_i = 1 \mid X = m] = \frac{\binom{1}{1} \binom{n-1}{m-1}}{\binom{n}{m}} = \frac{m}{n}.$$ It follows that $$\operatorname{Cov}[X_i, X_j \mid X = m] = \frac{m(m-1)}{n(n-1)} - \frac{m^2}{n^2}$$ and the correlation is $$(\rho_{ij} \mid X = m) = \frac{1}{1-n}.$$ Note this result is independent of $m$, and note the relationship of the conditional expectations to the hypergeometric distribution.

3
On

Let the pdf of $X$ be $f_{X}(x)$. Then, $E[g(x)] = \sum_{x}g(x)f_{X}(x)$. Thus,

$E(X_{i}^{2}) = \sum_{x=0}^{1}x^{2} * \Pr(X_{i} = x) = 0^{2}*(1-p) + 1^{2}*p = p$