# are integration limit to find expected value from a pdf inclusive (or exclusive)?

This is my probability density function (pdf) $$pdf = e^{-\frac{r}{\lambda}} \frac{1}{\lambda}$$

I want to find the expected value (EV) from $$0, $$r$$ is the random variable.

My first attempt is $$EV_1 - EV_2$$ (see below calculation), but this does not work.

The solution from the paper is $$EV_3 + EV_4 = \lambda - \lambda e^{-\frac{r_0}{\lambda}}$$

my questions:

1. Are integration limits used to find expected value from a pdf inclusive (or exclusive)? it seems like the lower limit is inclusive but the upper limit is exclusive. Any reference that I can look about this?
2. What is the interpretation of $$EV_4$$?

Here are some values that I calculated. $$EV_1 = \int_0^\infty r \left(e^{-\frac{r}{\lambda}} \frac{1}{\lambda} \right) dr = \lambda$$

$$EV_2 = \int_{r_0}^\infty r \left(e^{-\frac{r}{\lambda}} \frac{1}{\lambda} \right) dr = r_0 e^{-\frac{r_0}{\lambda}} + \lambda e^{-\frac{r_0}{\lambda}}$$

$$EV_3 = \int_{0}^{r_0} r \left(e^{-\frac{r}{\lambda}} \frac{1}{\lambda} \right) dr = \lambda - r_0 e^{-\frac{r_0}{\lambda}} - \lambda e^{-\frac{r_0}{\lambda}}$$

$$EV_4 = \int_{r_0}^\infty r_0 \left(e^{-\frac{r}{\lambda}} \frac{1}{\lambda} \right) dr = r_0 e^{-\frac{r_0}{\lambda}}$$

This question is actually a physical formulation that I am reading. SO, if you need more explanation about the problem, let me know.

EDIT: These are the 3 references I used. They are discussing the same thing in the screenshots I attached.

• Your pdf doesn't integrate to 1 over 0 to $r_0$. You need to fix that first. – JimB Mar 16 at 18:17
• why should my pdf integrate to 1 over 0 to $r_0$? it does integrate to 1 over 0 to $\infty$. – Codelearner777 Mar 16 at 18:22
• "I want to find the expected value (EV) from 0<r≤r0, r is the random variable." – JimB Mar 16 at 18:37
• I do not want to find the EV of the whole possible r.v., but limited to $0<r\leq r_0$. Maybe the word mean or average is more proper? – Codelearner777 Mar 16 at 18:42
• You seem to be using very non-standard terminology. (Is this terminology from some electrical engineering statistics course?) An expected value requires a pdf to integrate to 1 (or sum to 1 if discrete). Otherwise you're just finding disjoint parts of an integral (that is an expected value). Finding the expected value of $r$ given that $0< r\leq_0$ is labeled $E(r|0<r\leq r_0)$. – JimB Mar 16 at 19:11

From the references you give, it is now clear that you want the mean of a censored distribution rather than a truncated distribution. Specifically, if you have a random variable $$r$$ with pdf $$\frac{\exp \left(-\frac{r}{\lambda }\right)}{\lambda }$$, then you want the mean of the censored variable $$s$$ which is $$s=r$$ if $$0 and $$s=r_0$$ if $$r>r_0$$.
$$E(s)=\int_0^{r_0} \frac{r \exp \left(-\frac{r}{\lambda }\right)}{\lambda } \, dr + \int_{r_0}^{\infty } \frac{r_0 \exp \left(-\frac{r}{\lambda }\right)}{\lambda } \, dr$$
$$=\left(\lambda -e^{-\frac{r_0}{\lambda }} (\lambda +r_0)\right)+\left(r_0 e^{-\frac{r_0}{\lambda }}\right)=\lambda -\lambda e^{-\frac{r_0}{\lambda }}$$
• Me, too. I've never hear of TIL before (until now and googling it). I should have assumed a large age difference. (I'm retired.) And if you really need an interpretation of the two parts that might be the following: (1) the conditional mean $E(r|0<r\leq r_0)$ times the probability of $0<r\leq r_0$ and (2) $r_0$ times the probability that $r>r_0$. – JimB Mar 16 at 22:25