# Homework Help: Probability Mass Function with a Ceiling Function

1. Dec 19, 2012

### Aaron10

1. The problem statement, all variables and given/known data

Let X be an exponential random variable with rate parameter λ>0. Let [x] denote the smallest integer greater than or equal to x (called the ceiling function). For example, [0.12]=1 and [2]=2. Let Y=[X].
a) Find the pmf of Y=[X]
b) Does Y have the memoryless property? Justify.
c) Evaluate E(Y).

2. Relevant equations
The pdf of exponential variable X is λe^-λx

3. The attempt at a solution
I found the pmf using Pr{Y=y} = ∫(λe^-λx)dx from y-1 to y. This gave me a pmf of
f(y) = e^(-λy)(e-1) for 1≤y<∞. I got E(Y) by using ∫y*f(y)dy from 1 to ∞, resulting in
E(Y) = ((-e^-λ)/λ)(e-1)(1/λ - 1). I am not sure how to show if Y is memoryless though, particularly because I am not really sure what the memoryless property is...
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Dec 19, 2012

### Aaron10

I looked at this again, and think if I set it up so that if Pr(Y>a+b|Y>a) = Pr(Y>b), then Y is memoryless. I would then have Pr(Y>a+b)/Pr(Y>a) = Pr(Y>b). I solved this using
(∫λe^(-λx)dx from (a+b) to ∞)/(∫λe^(-λx)dx from (a) to ∞). This equals e^(-λb) which is equal to Pr(Y>b). Thus, Y is memoryless. I am still not totally clear on the concept of memorylessness, though, so I may have set it up incorrectly...if someone could explain what it means to be memoryless, that would be great. From the formula, it seems like it involves one trial not being based on previous, but how would that translate to a ceiling function?

3. Dec 19, 2012

### haruspex

Yes, that's the correct definition of memorylessness for a discrete random variable that's non-negative. The term refers to the property that the probability of 'n more' is unrelated to how many you have already. http://en.wikipedia.org/wiki/Memorylessness

4. Dec 19, 2012

### pasmith

$Y$ is a discrete random variable (it only takes positive integer values) so it doesn't have a density function. Instead
$$P(Y = n) = \int_{n-1}^n \lambda e^{-\lambda x}\,\mathrm{d}x = e^{-\lambda n}(e^\lambda - 1)$$
and
$$E(Y) = \sum_{n=1}^{\infty} nP(Y = n) = \sum_{n=1}^{\infty} ne^{-\lambda n}(e^\lambda - 1) = -(e^\lambda - 1)\frac{\mathrm{d}}{\mathrm{d}\lambda} \sum_{n=1}^{\infty} e^{-\lambda n} = -(e^\lambda - 1)\frac{\mathrm{d}}{\mathrm{d}\lambda} \frac{1}{e^\lambda - 1} = \frac{e^\lambda}{e^\lambda - 1}$$

5. Dec 19, 2012

### Aria1

Wow, thank you, I made an integration error when finding the pmf, and you caught that. As for finding E(Y), I am a little confused about how you got from step 3 to 4 and onward...I'm not sure I've seen this method of solving a sum before. Can you explain it in a little more detail, please? It was bothering me that I was using an integral for Y when it seems to be discrete, so any input is wonderful. Thanks!

6. Dec 19, 2012

### Aria1

By the way, I was referring to step 4 as the first step where d/dλ appears. Thanks again for your help!

7. Dec 19, 2012

### pasmith

This is a standard trick for summing series of the form
$$\sum_n na^{-n} = \sum_n ne^{-n\ln a}$$
where for an infinite series to converge one must have $a > 1$ so that $\lambda = \ln a > 0$.

In these circumstances summation and differentiation with respect to $\lambda$ can be interchanged, so
$$\sum_{n} ne^{-n\lambda} = \sum_{n} - \frac{\mathrm{d}}{\mathrm{d}\lambda} e^{-n\lambda} = - \frac{\mathrm{d}}{\mathrm{d}\lambda} \sum_{n} e^{-n\lambda}$$
where the series on the right is a geometric series, which is easily summed.

8. Dec 19, 2012

### Aria1

That makes sense to me for the most part...I'm a little confused about where the negative went in the last step, actually. You have -(e^λ - 1)d/dλ *(1/(e^λ - 1)), but in the next step, the negative seems to disappear and I'm not sure why...am I missing something, or is that a typo? Also, I'm still just not sure about why the SUM(y) becomes -d/dλ...sorry, to keep pushing for more explanation, is there some site you know of I can maybe read about it instead of bothering you? Thanks, most of it is clearer now :)

9. Dec 19, 2012

### pasmith

By the chain rule,
$$\frac{\mathrm{d}}{\mathrm{d}\lambda} \frac{1}{e^\lambda - 1} = \frac{-1}{(e^\lambda - 1)^2}\frac{\mathrm{d}}{\mathrm{d}\lambda}e^\lambda = \frac{-e^\lambda}{(e^\lambda - 1)^2}$$
Hence
$$-(e^\lambda - 1) \frac{\mathrm{d}}{\mathrm{d}\lambda} \frac{1}{e^\lambda - 1} = \frac{e^\lambda}{e^\lambda - 1}$$

$$\sum_{n=1}^{\infty} nP(Y = n) = \sum_{n=1}^{\infty} ne^{-n\lambda}(e^\lambda - 1) = (e^\lambda - 1)\sum_{n=1}^{\infty} ne^{-n\lambda}$$
since $e^\lambda - 1$ does not depend on $n$.

There is no easy way to calculate
$$\sum_{n=1}^{\infty} ne^{-n\lambda}$$
directly, but using the standard trick
$$\sum_{n=1}^{\infty} ne^{-n\lambda} = -\sum_{n=1}^{\infty} \frac{\mathrm{d}}{\mathrm{d}\lambda} e^{-n\lambda} = - \frac{\mathrm{d}}{\mathrm{d}\lambda} \sum_{n=1}^{\infty}e^{-n\lambda}$$
The sum on the right is a geometric series, for which there is a formula. Thus
$$\sum_{n=1}^{\infty} ne^{-n\lambda} = -\frac{\mathrm{d}}{\mathrm{d}\lambda} \frac{1}{e^\lambda - 1} = \frac{e^{\lambda}}{(e^\lambda - 1)^2}$$

10. Dec 19, 2012

### Ray Vickson

As you have already been told, it is a 100% standard method for doing some type of sums. For example, suppose you want
$$S = \sum_{n=0}^N n x^n.$$ By recognizing that $n x^{n-1} = d x^n /dx,$ we see that $n x^n = x \, dx^n /dx,$ so
$$S = x \frac{d}{dx} \sum_{n=0}^N x^n = x \frac{d}{dx} \frac{x^{N+1}-1}{x-1}.$$
Similarly, you can get
$$\sum_{n=0}^N n^2 x^n = x \frac{d}{dx} \left( x \frac{d}{dx} \sum_{n=0}^N x^n \right),$$
etc.