mean for cumulative distribution function

142 Views Asked by At

I'm trying to find the mean (expected value) and variance for the following distribution function:

$F(x)=\begin{cases} 0 & \text{for } x \lt 1\\ \frac{x^2-2x+2}{2} & \text{for } 1 \le x \lt 2\\ 1 & \text{for } x \ge 2\\ \end{cases}$

First I got the probability density function by differentiating

$f(x)=\begin{cases} 0 & \text{for } x \lt 1\\ {x-1} & \text{for } 1 \le x \lt 2\\ 0 & \text{for } x \ge 2\\ \end{cases}$

$\mathbb{E}(X) = \int x f(x) dx = \int_1^2 x(x-1) dx = \frac{5}{6} $

but i see in some book, that this is a mix distribution function because it has mass at X=1

$P(X=1)= F(1)-F(1^-)=\frac{1}{2}$

$f(x)=\begin{cases} 0.5 & \text{for } x = 1\\ {x-1} & \text{for } 1 \lt x \le 2\\ \end{cases}$

$\mathbb{E}(X) = \int x f(x) dx = 1.P(X=1) + \int_1^2 x(x-1) dx = \frac{4}{3} $

am i right and which one is right?

1

There are 1 best solutions below

2
On

The second one is the right one since $\int_1^2 x-1 \, dx=0.5$. If we add $F\left(1^+ \right)=0.5$ we get $1$. It fulfills one property of a valid pdf: $\int\limits_{-\infty}^{\infty} f(x) \, dx=1$