Solving for k in a probability density function

127 Views Asked by At

I'm having trouble getting the correct answer for the following problem. I need to solve for k such that k makes the following a valid pdf.

f(x) = \begin{cases} k{e}^{-x/\gamma} &\text{ for }x\le 2\\ 2k{e}^{-x/\gamma} &\text{ for }x\gt 2\\ \end{cases}

I don't so much need the answer as I know what the answer is (it has been supplied) but I can't get the methodology down and reach the solution myself. As I understand it, the process should be that I integrate both with the appropriate bounds and the result should equal 1 allowing me to solve for k but I must be doing something wrong as my answer resembles the correct answer but has a bunch of extraneous stuff in it. Sorry for not supplying more info but it took me forever to just write out the question as I'm not familiar with the formatting.

1

There are 1 best solutions below

0
On

What is $\gamma$? Well, recall that for a $f(x)$ to be a probability density of random variable $X$, we must have $\int_{\mathbb{R}} f(x) = 1 $. In our case, this equates to solve

$$ k \int\limits_{- \infty}^2 e^{-x/ \gamma} + 2k \int\limits_2^{\infty} e^{-x/\gamma} = 1$$