Anyone know how this was determined. Let X, Y, and Z be a random sample from a uniform distribution over the range [0,1]. The expected value of the distribution is $$(0+1)/2 = 1/2$$
I thought the formula for f(x) of an uniform distribution was $$\frac{1}{b-a}$$
Yes, for a continuous uniform random variable $X$ with support on an interval $[a,b]$, where $a < b$, the probability density function of $X$ is given by $$f_X(x) = \begin{cases} \frac{1}{b-a}, & a \le X \le b, \\ 0, & \text{otherwise}. \end{cases}$$ However, this only tells us the density. To get the expected value, you must calculate $$\operatorname{E}[X] = \int_{x = -\infty}^\infty x f_X(x) \, dx = \int_{x=a}^b x \cdot \frac{1}{b-a} \, dx = \left[\frac{x^2}{2(b-a)}\right]_{x=a}^b = \frac{b^2 - a^2}{2(b-a)} = \frac{a+b}{2}.$$ And this is how one gets, for $a = 0$, $b = 1$, $$\operatorname{E}[X] = \frac{0 + 1}{2} = \frac{1}{2}.$$