# Expectation of multiple variables

I'm not really sure what's going on in the bit underneath; Question: What does this mean? Should you buy lightbulbs?

• No, it's all lecture notes. The lecturer has filled in the answer to the question but I do not understand what he has written in blue as the answer to the "Question." Jun 5, 2014 at 20:15
• That's why when I was a boy you could test light bulbs before buying them. Jun 9, 2014 at 17:34

Should I buy light bulbs? No. I’d rather buy ice cream. So I’d say the question makes no sense. What should have been asked is: should I buy bulbs of type A or of type B. Both are 100 watts and the same lumens (brightness) but they differ in unit cost and in lifetime distribution. We will assume exponential lifetimes, but a different mean value. So we want to come up with a good decision rule to choose type (brand) of bulb. (There are an infinite number of decision rules.) The fact that $1$/Lifetime has infinite expectation is interesting but is not the main issue.

Let’s look at the problem informally and later show the mathematics.

Suppose I observe a sample of 3 bulb lifetimes $u,w,z$ hours for the same bulb type at a cost $c$ each. We need to come up with a way to compare different types of bulbs. There are two obvious ways to measure cost per hour. We could compute $3c/(u+w+z)$ which is the cost of 3 bulbs divided by their total lifetime. Makes sense. This is $c/\bar{x}$ where $\bar{x}$ is the average. Another possible method: we compute the cost per hour for each bulb and then take the average: $$\frac13\left [ \frac{c}{u}+\frac{c}{w}+\frac{c}{z} \right]$$ The Harmonic Mean is defined as $\left[\frac13 (1/u+1/w+1/z )\right]^{-1}$ so $$\frac13\left[ \frac{c}{u}+\frac{c}{w}+\frac{c}{z } \right]=c/{HM}$$

Should we use $c/\bar{x}$ or $c/HM$ ? They both have the correct units of cost per hour so we cannot use that to decide between them. For exponential lifetimes $c/\bar{x}$ has a finite expectation if we have at least 2 lifetimes. (That fact surprised me.) However, $c/HM$ has an infinite expectation. That’s not good. It is well-known that $HM\le \bar{x}$ with equality if $u=w=z$ . Suppose $u,w,z = 4,10,1000.$ Then $\bar{x}=338$ and $HM=1000/117=8.6$ This is quite a difference. The reason is that $\bar{x}$ treats each lifetime equally in the average while $HM$ treats each cost ratio equally: $$c/HM=\frac13\frac{c}4+\frac13\frac{c}{10}+\frac13\frac{c}{1000}.$$ The time interval of length 1000 was by far the most important interval of the 3 in determining the overall cost performance (since it was the longest) but it contributed only $c/{1000}$ to the total. In fact, in this method the shortest lifetime of 4 was the greatest determinant of overall cost per hour. It’s exactly the reverse of what makes sense. Let’s try to “correct” this approach by using a weighted $HM$. Let’s weight the cost ratios in proportion to their importance – proportional to the length of the lifetime. So we replace (1/3,1/3,1/3) with $p_1=4/1014, p_2=10/1014,p_3=1000/1014$. Then our new ratio is
$$\frac{c}4p_1+\frac{c}{10}p_2+\frac{c}{1000}p_3 .$$ This simplifies to $c/\bar{x}$. So it looks like minimizing $c/\bar{x}$ is the only sensible decision rule we can come up with. Now we will see how this can be justified.

But first we need to clarify another issue: There is a tacit assumption that you will replace the bulb after it burns out and keep replacing bulbs with the same type. Otherwise, I choose the cheaper bulb even if it lasts only a second before burning out. I will save money if it is only a one-shot decision. (I am assuming you get no value from the light from the remaining bulb. If you do, then tell me what the value is.) To avoid this crazy conclusion, we must think long-term: We install a new bulb at time $0$. We immediately replace with a new bulb and repeat indefinitely. The cost of the bulb is paid when it is installed.

Assumptions: Bulbs cost $c$ each and they last $Y$ which is exponential with mean $\beta$. Lifetimes are independent. Since the lifetimes of the bulbs are exponential, the occurrence of bulb burnouts forms a Poisson process. Let $N(t)$ be the number of bulbs installed in the time interval $[0,t]$. Notice we have made a subtle change from the intuitive approach. We now select a given $t$ and look at the (random) number of bulbs used. Previously we looked at the first 3 lifetimes (which ended at a random time.) Now $cN(t)/t$ is the cost per hour over $[0,t]$. From the expectation of the Poisson distribution, we get $$E[N(t)]=1+t/\beta$$
where the extra 1 is for the initial bulb at $0.$ Then we have
$$E[cN(t)/t]=c(1/t+1/\beta)$$
where $t$ is our decision horizon. In the long-run, as $t\to \infty$ , we will try to minimize
$$c/\beta$$ That is, the cost of one bulb per its hours of expected life. This is consistent with our hunch of using $c/\bar{x}$ for a finite decision horizon. If the lifetime distribution is not exponential the conclusion is still valid but then we need Renewal Theory.

$E(1/T)$ is the calculation shown. We can’t find the explicit antiderivative, but we can show that the asymptote at $0$ causes the integral to be infinite. Since $1/T$ is the cost of a bulb per hour of use, this seems to mean that a lightbulb has an infinite expected cost per hour of use, which would make buying them not a good idea.

But if I buy three bulbs, their average lifetime is $(T_1+T_2+T_3)/3$, so that the (average cost) per hour of use is $3/(T_1+T_2+T_3)$. This has finite expectation: again, we can’t find the antiderivative, but this is because $1/\|x\|$ is integrable in $\mathbb{R}^3$.

On the other hand, the average (cost per hour of use) is $(1/T_1+1/T_2+1/T_3)/3$, which has infinite expectation: it’s simply an average of three infinite values.

I’m not sure what “Scale matters!!” means. I think the lecturer is trying to say why it actually does make sense to buy lightbulbs: if you buy a bunch of them (large scale purchase), then you get a finite expectation, but not if you buy just 1 (or 2). My answer for why it makes sense to buy lightbulbs would be that if a company’s quality control can guarantee that a lightbulb lasts at least $\epsilon$ time, then $f_T(t)=0$ on $[0,\epsilon]$, we don’t have the asymptote, and the expectation is finite (and we only need a slight adjustment to the rest of $f_T(t)$).

If I buy $n$ bulbs, then the cost per hour will be $Y_n = \frac n{T_1 + \cdots + T_n}.$ As I buy more bulbs, the cost per hour gets closer to $\lim_{n\to\infty} Y_n = \lim_{n\to\infty}\frac n{T_1 + \cdots + T_n} = \frac1{\displaystyle{ \lim_{n\to\infty}\left(\frac{T_1 + \cdots + T_n}{n}\right)}. }$ According to the law of large numbers, this limit is $\displaystyle{\frac1{E[T]}}$. So we see, then, that $E[Y]$ is not what matters to us. It is $E[T]$ that we care about. The bigger it is, the smaller our cost per hour will be in the long run.