Calculate the variance of Continuous Random Variables and the Distribution of a geometrical shape

49 Views Asked by At

I would like to compute the variance of a continuous random variables distribution that has the following form:

enter image description here

When "a" becomes as small as zero, the parallelogram will become a rectangle, in this case, the variance should be zero, then high variance when "a" is large, and then variance go back to zero when "a" is very very large

However, when I integrate the CDF function I don't get zero variance at all. Below is my CDF (f(x)):

x --> 0 < x < a (red segment)

1/(b-a) --> a < x < a+b (blue segment)

x-b --> b < x < a+b (green segment)

I used the following variance equation, but I didn't get zeros variance when X was zero

enter image description here

What did I do wrong here? I appreciate your advice and suggestions