4
$\begingroup$

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 0\\ x/4 & \text{for } 0 \le x \lt 1\\ x^2/4 & \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 0\\ 1/4 & \text{for } 0 \le x \lt 1\\ x/2 & \text{for } 1 \le x \lt 2\\ 0 & \text{for } x \ge 2\\ \end{cases}$

Which I simplified as

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

Now I need to find the mean (expected value) and variance. I know that

$E(X)=\int xf(x)\,dx.$

Except I am not sure how I would calculate this as one value due to the function being in multiple parts. Any help is appreciated - Thank You!

$\endgroup$

1 Answer 1

2
$\begingroup$

You are on the right track, use the integral as follows:

$$\mathbb{E}(X) = \int x f(x) dx = \int_0^1 \frac{1}{4}x dx + \int_1^2 \frac{x^2}{2}dx = \frac{1}{8} + \frac{7}{6} = \frac{31}{24}.$$

Calculating the variance can be done using $Var(X) = \mathbb{E}(X^2)-\mathbb{E}(X)^2$.

$$\mathbb{E}(X^2) = \int x^2 f(x) dx = \frac{47}{24}$$ So the variance is equal to: $$Var(X) = \frac{47}{24} - \left(\frac{31}{24}\right)^2 \approx 0.29. $$

$\endgroup$
1
  • $\begingroup$ Just used what you had previously posted to figure it out - was about to type my solution to make sure I had it when I saw your edit and I've got it. Thanks for the help! $\endgroup$
    – Raaa
    Nov 12, 2017 at 12:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .