Using probability to calculate expectation of a piecewise cdf function I'm a little confused about a piecewise cumulative distribution function. How do I find expectation?
Here's what is given:
$$F(x)= 
\begin{cases} 0, &x\le 0\\
x^2, &0<x<1\\
c, &x>1
\end{cases}
$$
I've solved that $c = 1$. I used the integral formula for expectation:
$$E(X)=\int xf(x)\,dx$$
But do I factor in $c$ too? What would the upper bound be?

For the density function, take the derivative of the CDF.
$f(x) = 2x,$ for $0 < x< 1$ and $0,$ otherwise.
Then, according to the definition of the mean of a continuous random variable the main steps are:
$$E(X) = \int_0^1 xf(x)\,dx = \int_0^1 x(2x)\,dx = 2/3.$$
This is a beta distribution with shape parameters $\alpha=2,\beta=1.$ You should be able to find it in
a probability textbook, and there is a Wikipedia page
on beta distributions.
