Finding the expectancy of a distribution function

701 Views Asked by At

I have the function below and I'm trying to calculate the expectancy of X. The answer is E(X) = $\frac{59}{40}$ but I don't know what I'm doing wrong because I cannot achieve it.

F(x) = \begin{cases} 0, & \text{if $x$ < 0} \\ \frac{1}{4}, & \text{if 0 $\le$ $x$ < 1} \\ \frac{2}{5}, & \text{if 1 $\le$ $x$ < 2} \\ \frac{2x-3}{2}, & \text{if 2 $\le$ $x$ < 2.5} \\ 1, & \text{if $x$ $\ge$ 2.5} \\ \end{cases}

I did like that

$$E(X) = \frac{1}{4}*1 + \frac{2}{5}*1 + \int_2^{2.5} \frac{2x-3}{2} dx$$

which gave me thw wrong answer. I'm sure if the problem is in the computation of the integral (I'm a little bit rusty in calculus) or of the problem is the concept of my calculations as a whole

2

There are 2 best solutions below

3
On BEST ANSWER

Its the Cumulative distribution function you have there not the probability density function. You have to convert the CDF first if you want to calculate the expected value of $X$. Or use

$$E(X) = \int_0^\infty (1-F_X (x)) \, dx = \frac{3}{4} + \frac{3}{5} + \frac{1}{8} = \frac{59}{40}$$

2
On

This is a mixed distribution to begin with. It has atoms at $0$, $1$ and $2$, meaning that the cumulative distribution function jumps at these points. To calculate the expected value of such a distribution, you would like to look at $$ E[X] = \sum_{x_i \mbox{ is a mass point}}^{}p_i x_i + \int_{x \mbox{ is not a mass point}} x f(x) dx $$ So here, the mass points are $x\in \{0,1,2\}$ such that $p(0)=1/4$, $p(1)=2/5$ and $p(2)=1/2-2/5=1/10$. When $x\in [2,2.5)$, $f(x)=F'(x)=1$. Therefore, your answer is $$ E[X] = 0\times 1/4+1\times 2/5+2\times 1/10+\int_2^{2.5}x \frac{2x-3}{2}dx = \frac{59}{40} $$