# Determining the distribution function

1. Apr 7, 2006

### shan

I've gotten a weird answer after doing the problem but I'm stuck as to where I messed up.

The density function is this:
$$f_{X} (x) = \frac{1}{6}x$$ for $$0<x\leq2$$
$$= \frac{1}{3}(2x-3)$$ for 2<x<3
and 0 otherwise

And the question is to find the distribution function.

So integrating for the first part from 0 to x:
$$\int \frac{1}{6}u du = \frac {1}{6} \frac{x^2}{2} = \frac{x^2}{16}$$
for 0<x<=2

I have a big problem with the second, part. This is what I did (integrating from 2 to x):
$$\int \frac{1}{3} (2u-3) du = \frac{1}{3} [u^2-3u] = \frac{1}{3} (x^2-3x - (2^2-6)) = \frac{x^2}{3} - x + \frac{2}{3}$$
for 2<x<3

I know my answer for the second part is wrong as when x=2, the distribution function = 0 and when x=3, the distribution function = 2/3. But the distribution shouldn't be broken up like that at x=2 and supposedly at x=3, it should = 1. So did I forget to do something to the end points or did I not integrate properly?

Last edited: Apr 7, 2006
2. Apr 7, 2006

### Hurkyl

Staff Emeritus
The distribution function is given by:

$$F_X(x) := \int_{-\infty}^x f_X(x) \, dx$$

So when you computed $\int_2^x f_X(x) \, dx$, you computed the wrong thing, and there's no reason you should have gotten the right answer.

P.S. 6*2 is not 16.

3. Apr 7, 2006

### shan

whoops sorry, typo that first part is
$$\int_0^x \frac{1}{6}u du = \frac {1}{6} \frac{x^2}{2} = \frac{x^2}{12}$$

which shows I don't really understand what I'm doing but now that you mentioned it...

is the second part then given by $$\int_0^2 \frac{1}{6}u du + \int_2^x \frac{1}{3} (2u-3) du$$? ie I forgot to add the first part of f(x)?

4. Apr 7, 2006

### Hurkyl

Staff Emeritus
Right. Of course, there should also be a $\int_{-\infty}^0 f_X(u) \, du$ component as well. (But you know it's zero, so I suppose that's why you left it out)

5. Apr 7, 2006

### shan

Thank you very much for your help :)