Expected value of a uniform distribution

9.8k Views Asked by At

Let $f(x) = 0.025x + 0.15$ for $2 < x < 6$.

The expected value formula is $1/2 \cdot (b-a)$. So is the expected value just $1/2 \cdot (6-2) = 4$ or do I have to integrate $f(x)$ first?

2

There are 2 best solutions below

2
On BEST ANSWER

Your distribution is not uniform in $[2,6]$, so the formula $\frac12(b+a)$ does not hold. Instead, calculate the expected value of $X$ by the general formula as follows $$E[X]=\int_{\mathbb R} xf(x)dx=\int_{2}^6x(0.025x+0.15)dx=4.1\overline{3}$$ The pdf of a uniform random variable on $[2,6]$ would be $$f(x)=\frac{1}{6-2}=\frac14$$ for $2\le x\le 6$ and $f(x)=0$ otherwise.

0
On

If $\xi$ is a r.v. and $p(\cdot)$ is its pdf, then $\mathbb{E}f(\xi) = \int f(x) p(x) dx$

If $f(x)$ is a density in your task then it's not a uniform distribution, by the way.