In the stats book I am studying, while explaining bias and mean, the author goes like this:
"... Suppose a sample $$S=(X_1, X_2,...,X_n)$$ has been collected. ... Sample mean $\bar{X}$ estimates $\mu$ unbiasedly because its expectation is $$E(\bar{X})=E(\frac{X_1+...+X_n}{n})=\frac{EX_1+...+EX_n}{n}=\frac{n\mu}{n}=\mu $$."
What confuses me is this: The author treats each data item in the sample as if it is representing a different random variable $X_i$. How come? Why?