Expected value of uniform discrete distribution

expected valueprobabilityprobability distributions

I have this discrete uniform distribution:

enter image description here

(caso contrario = otherwise)

I need to calculate the expected value so I did:

$$\frac{(b-a)}{2} = \frac{4}{2} = 2 $$

My professor did (these probabilities are found in another exercise):

$$(1*\frac{1}{6})+(2*\frac{1}{3})+(3*.5) = 2.3333…$$

Which one is correct? Are both correct? The values are nearly the same.

Best Answer

Note that your distribution is not a uniform distribution (for which $f(x)$ is a constant independent of $x$), although it is a discrete distribution. Just like all other probability distributions, all probabilities should sum up to be 1 for your random variable too. In your case, this means, $f(1) + f(2) + f(3) = 1$ (since the probability is zero for all other values of x). This means, $$c + 2c + 3c = 1 \implies 6c = 1 \implies c = 1/6.$$

So now, the expected value is given by: $$E(X) = P(x=1).x + P(x=2).x + P(x=3).x$$ (Ignoring other values of x above since their probability is zero) $$E(X) = f(1) + 2*f(2) + 3*f(3) = 1/6 + 2 * 2/6 + 3* 3/6 = 14/6 = 2.333 \ldots$$

Related Question