I am trying to understand how to calculate the expected value of a hypergeometric variable using indicator random variables. The derivation that I read in the book (Introduction to Probability Theory, Hoel Port Stone) is as follows:
Assume the population size to be $r$, of which $r_1$ are of type 1 and $r-r_1$ are of type 2. A sample of size $n$ is drawn without replacement from this population.
Let $X_1, X_2, … X_n$ be indicator random variables where $X_i = 1$ if and only if the ith element in the sample is of type 1. Then,
$E[X_i] = P(X_i = 1) = \frac{r_1}{r}$
I don't understand how the expectation of $X_i$ is the same $\forall i$. Since sampling is done without replacement in hypergeometric distribution, the probability of ith element in the sample being type 1 shouldn't be the same $\forall i$.
Can someone explain why this is true?
Edit: We can write,
$P(X_i=1) = \sum_{x_1}\sum_{x_2}…\sum_{x_{i-1}} P(X_1=x_1, X_2=x_2, … , X_{i-1} = x_{i-1}, X_i=1)$
where $x_i$'s take values $0$ or $1$.
Can we compute this sum to show $P(X_i=1) = \frac{r_1}{r}?$
Best Answer
Since types don't have any preference for positions, the probability that type $1$ is at any position will be the same as its being at the start,
i.e. $\Bbb P(X_i) = \Bbb P(X_1) = \frac {r_1}{r}$
Now the expectation of an indicator random variable is just the probability of the event it indicates, thus $\Bbb E[X_i ] = \frac{r_i}{r},$
and by linearity of expectation, which applies even when the variables are not independent, we can get the final expectation as $\Bbb E[X] = \Sigma \Bbb E[X_i]$