Determine the distribution function of this density function

1k Views Asked by At

Given is the density function

$f(x)=\left\{\begin{matrix} \frac{1}{\pi}\frac{1}{1+x^2}\text{ if }x\geq 0\\ \frac{1}{2}e^x \;\;\;\;\text{ else} \end{matrix}\right. \;\;\;\;$

Determine the (cumulative) distribution function from this density function.

I'm not quite sure how this is done correctly but I need to know it because I need this for another thing I wanted calculate :p

If I understood correctly, you determine the distribution function by taking the integral of the density function.

So we have that $$F(x) = \int_{-\infty}^{x}f(t) dt$$

Now we need to cover all cases:

$x < 0$: $$F(x) = \int_{-\infty}^{0}\frac{1}{2}e^t dt = \left[\frac{1}{2}e^t\right]_{-\infty}^{0}=\frac{1}{2}-(0)=\frac{1}{2}$$

$x \geq 0$: $$F(x)=\int_{0}^{\infty}\frac{1}{\pi} \cdot \frac{1}{1+t^2}dt = \left[\frac{1}{\pi} \cdot \arctan(t)\right]_{0}^{\infty}=\left(\frac{1}{\pi} \cdot \frac{\pi}{2}\right)- \left(\frac{1}{\pi} \cdot 0\right)=\frac{1}{2}$$


Is it really correct like that? Because if this is wrong my next calculation will be wrong too! :(

2

There are 2 best solutions below

0
On BEST ANSWER

As you write: $$F(x)=\int_{-\infty}^xf(t)dt.$$ So if $x < 0$ you have that $$F(x)=\int_{-\infty}^xf(t)dt=\int_{-\infty}^x\frac{1}{2}e^tdt=\frac12 e^x$$ If $x \ge 0$ you have that $$F(x)=\int_{-\infty}^xf(t)dt=\int_{-\infty}^0\frac{1}{2}e^tdt+\int_0^x\frac1\pi\frac{1}{1+t^2}dt=\frac12 + \frac{1}{\pi}\arctan(x).$$ So

$$F(x)=\begin{cases} \frac12e^x & \mbox{if }x < 0 \\ \frac12+\frac1\pi \arctan (x) & \mbox{if } x \ge0 \end{cases}$$

2
On

For $x<0:$$$F(x)=\int_{-\infty}^{x}f(u)du=\int_{-\infty}^{x}\dfrac{1}{2}e^udu=\dfrac{1}{2}e^x$$and for $x>0$$$F(x)=\int_{-\infty}^{x}f(u)du=\int_{-\infty}^{0}f(u)du+\int_{0}^{x}f(u)du=\dfrac{1}{2}+\int_{0}^{x}\dfrac{1}{\pi}\dfrac{1}{1+u^2}=\dfrac{1}{2}+\dfrac{1}{\pi}\tan^{-1}(x)$$