# Expected value question.

This is a question from my lecture notes.

""" Persons arrive at a copy machine according to a Poisson process with rate λ=1 per minute. The number of copies made is uniformly distributed between 1 and 10. Each copy requires 3 seconds. Find the average waiting time in the queue and the average system waiting time. """

I know how to do the problem, but I am having trouble understanding why the following calculation of an expectation is correct. $$E[X^2] = \sum_{i = 1}^{10}(3i)^2 * \space Pr(X = 3i)$$

I don't understand why there is a $(3i)^2$ and why it's $Pr(X =3i)$ term in this expected value. I would set this up:

$$3E[X^2] = \sum_{i = 1}^{10}(i)^2 * \space Pr(X = i)$$ Can anyone please provide some intuition? I've looked online and through my textbooks and I can't find anything that helps me with this intuition. I know it has something to do with the 3 seconds in the problem statement, but I can't figure out how to make sense of this and therefore generalize this problem.

I am guessing that you are trying to compute variance of $X$.

The problem is we did not define $X$.

In your lecture note, $X$ seems defined to be waiting time. Waiting time comes in multiple of 3 in this setting.

We have $Var[X]=E[X^2]-E[X]^2$

On the other hand, it seems that you are trying to wokr with the number of copies.To avoid confusion, let's define it to be $Y$ instead. In particular, we have the relationship $$X=3Y$$ and if we square them and take expectation, we have

$$E[X^2]=3^2E[Y^2].$$

Again, we can compute $Var[Y]=E[Y^2]-E[Y]^2$

A point to consider is suppose you really prefer to work with $Y$ (the number of copies), can you compute $Var[X]$?

$$Var[X]=E[(3Y)^2]-E[3Y]^2=9(E[Y^2]-E[Y]^2)=3^2Var[Y]$$

• Hey, yeah I think you are right. What was confusing me is that there are two RVs here: the waiting time and the number of copies. So tell me if my thinking is correct or not now: The X is a RV for the waiting time. Because the waiting time is dependent on the number of copies that someone makes, we can say X = 3Y, since every copy takes 3 seconds to make. Then, E[X^2] = E[(3Y)^2] = 9E[Y^2] = 9* Sum(from i = 1 to 10) i^2 * Pr(Y = 3i). Sorry for the formatting, I don't know how to apply latex in the comments since it doesn't show me a preview of what I'm typing. – Joe Apr 30 '16 at 8:11
• You are almost there. $Y$ takes integer values from 1 to 10. $9E[Y^2] = 9* \sum_{i=1}^{10} i^2 Pr(Y = i)$. Yup, formatting is tough since there is no preview. practive makes perfect. – Siong Thye Goh Apr 30 '16 at 9:20
• Got it. Thanks again for your help! – Joe Apr 30 '16 at 9:25