Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let X be a random variable with density function fx(.) such that: fx(s) = ke$^{-s}$ for s > 2 and fx(s) = 0 for s $\le$ 2.

1.) Determine k

2.) Calculate P(0 $\le$ X $\le$ 5).

3.) Calculate E(X)

My attempt:

For 1, I got that $\int_2^\infty k e^{-s}\,ds=2.$ I integrated and got that k = $2e^2$.

For 2, I got that $\int_0^5 k e^{-s}\,ds.$ I integrated and got that $[(2/e^3) -2e^2]$.

For 3, I got that $\int_2^\infty k se^{-s}ds.$ I integrated and got 6.

Is this correct?

share|cite|improve this question
We have $k=e^2$. – André Nicolas Oct 2 '12 at 3:44
How did you get that? Did I do the limits of integration wrong? – Q.matin Oct 2 '12 at 3:46
$\int_2^\infty e^{-x}=e^{-2}$. By the way, answer to (2) is $1-e^{-3}$ I think. You need to integrate from $2$ to $5$. – André Nicolas Oct 2 '12 at 3:48
up vote 1 down vote accepted

$1.$ An antiderivative of $e^{-s}$ is $-e^{-s}$, so $$\int_2^\infty ke^{-s}\,ds=ke^{-2}.$$ We want our integral to be $1$, that is always the case for a density. So $k=e^2$.

$2.$ The density function is zero to the left of $2$. So we want $$\int_2^5 e^2 e^{-s}\,ds.$$

$3.$ We want $$\int_2^\infty (s)(e^2e^{-s})\,ds.$$ Now do integration by parts. Note again that the density function is $0$ to the left of $2$, hence the limits. Your answer, which is negative (impossible) seems to have been obtained by integrating from $0$.

Now do integration by parts. It looks as if you got this right, apart from having a $k$, and hence an answer, twice as lage as it should be.

Remark: There is an (in this case) sloghtly easier way to calculate the expectation, that you may not have been taught. If $X$ is non-negative, with *cumulative distribution function $F_X(s)$, then $$E(X)=\int_0^\infty(1-F_X(s))\,ds.$$ In our case, we would really be integrating from $2$ to infinity, since the cdf is $0$ to the left of $2$.

share|cite|improve this answer
Thanks again, Andre!! – Q.matin Oct 2 '12 at 4:16

By definition $$ f_X(x) = \cases{ k \exp(-x) & $x>2$ \\ 0 & $x \leqslant 0$}$$ The normalization constant is determined by requiring $1 = \int_\mathbb{R}f_X(x) \mathrm{d}x$: $$ 1 = \int_\mathbb{R}f_X(x) \mathrm{d}x = \int_2^\infty k \exp(-x) \mathrm{d}x \stackrel{x=2+y}{=} k \mathrm{e}^{-2} \underbrace{ \int_0^\infty \exp(-y) \mathrm{d}y}_{ = 1} $$ hence $k = \mathrm{e}^2$. Thus: $$ f_X(x) = \cases{ \exp(-(x-2)) & $x>2$ \\ 0 & $x \leqslant 0$} $$ that is $X= 2+Y$, where $Y$ is the exponential random variable with unit mean. Thus $$ \mathbb{P}\left(0\leqslant X\leqslant5\right) = \mathbb{P}\left(-2\leqslant Y\leqslant3\right) = \mathbb{P}\left(0\leqslant Y\leqslant3\right) = 1 - \underbrace{\mathbb{P}(Y>3)}_{\int_3^\infty \exp(-t) \mathrm{d}t = \exp(-3)} = 1 - \exp(-3) $$ The mean is also easy: $$ \mathbb{E}(X) = \mathbb{E}(2+Y) = 2 + \mathbb{E}(Y) = 2 + 1 =3 $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.