# Uniform Distribution: Expectation $E(\bar{X})$

Uniform Distribution: Expectation $$E(\bar{X})$$

Assuming that the samples are independently and identically distributed (iid):

First i was asked to find $$E(X_k)$$

$$E(X_k)= \int_{0}^{θ} dn P_θ(n) n = θ/2$$

And apparently you're supposed to get

And using this $$E(\bar{X})= n/n E(x_1) = θ/2$$

Why is this?

Knowing that $$\overline{X}=\sum_{i=1}^{n} \frac{X_i}{n}$$, when we take the expected value of $$\overline {X}$$ we get the following:
$$E[\sum_{i=1}^{n} \frac{X_i}{n}]=\frac{1}{n}E[\sum_{i=1}^{n} X_i]=\frac{n}{n}E[X_1]$$