3

The lifetime of a device is a continuous random variable having the continuous uniform distribution $\mathrm{Unif}(0,15)$. Suppose that under an age replacement strategy a planned replacement at age $T=12$ costs 300 dollars, while a failure replaced at time $X <T$ costs 350 dollars. Determine the long-run average cost per unit time

My attempt so far: For $\mathrm{Unif}(0,15)$ we have $f(x) = \frac{1}{15}$ for $0 \leq x \leq 15$ and so $P(X<12) = \int_{0}^{12} \frac{1}{15} \,dx = \frac{12}{15}$

and long-run average cost = $P(X<12)\cdot$(cost before T) + $(1-P(X<12))\cdot$(cost at T) = $\frac{4}{5}\cdot300 + \frac{1}{5}\cdot350 = 340$

Please let me know if I am doing this correctly, and feel free to correct me if I am wrong

whuber
  • 322,774
waterr
  • 41

2 Answers2

5

Intuitively, imagine examining your costs after replacing (say) $150$ of the devices. Around $30$ of them were replaced at a cost of $\$300$ each at the planned time of $12$ and the others were replaced at a cost of $\$350$ each at various random times between $0$ and $12,$ which must have averaged around $6.$ Overall, the total cost would be a little less than $150\times \$350$ and the total time those devices were running would have been around $30\times 12$ plus $(150-30)\times 6.$ That works out to a little under $50$ per unit time. Keep this in the back of your mind when reading the following rigorous solution.


Let the uniformly distributed time be $U.$ It is a random variable. Define $I$ to be the indicator that the planned replacement occurs: that is, $I=\mathcal{I}(U >= 12)$ equals $1$ when $U\ge 12$ and equals $0$ when $U\lt 12.$

  • $I = 1$ has a $(15-12)/15 = 3/15$ chance and $I = 0$ has a $12/15$ chance.

  • The cost of replacement can be expressed as $C = 350(1 - I) + 300 I.$

  • The time to replacement can be expressed as $T = 12I + U(1-I).$

Let's compute expectations.

  • $E[I] = \frac{12}{15}\times 0 + \frac{3}{15}\times 1 = \frac{3}{15}.$ This is the basic formula for expectation.

  • $E[C] = E[350(1 - I) + 300 I] = 350(1 - E[I]) + 300 E[I] = 350\times \frac{12}{15} + 300 \times \frac{3}{15}$ by linearity of expectation.

  • $E[T] = E[12I + U(1-I)] = 12E[I] + E[U(1-I)].$ The second expectation can be obtained as the integral $$E[U(1-I)] = \int_0^{15} u(1 - \mathcal{I}(u \ge 12))\,\frac{\mathrm d u}{15} = \frac{1}{15}\int_0^{12} u\,\mathrm du = \frac{1}{15}\frac{u^2}{2}\bigg|_0^12 = \frac{12}{15}\times 6.$$

The long run cost per unit time, $E[C]/E[T],$ is now readily calculated as

$$\frac{E[C]}{E[T]} = \frac{350\times \frac{12}{15} + 300 \times \frac{3}{15}}{12\times \frac{3}{15} + \frac{12}{15}\times 6} = 47\frac{2}{9}.$$

You should recognize your calculation in the numerator -- but that was only part of the correct answer.


This little R simulation of a million device replacements is informative for its simplicity and direct implementation of the problem:

u <- runif(1e6, 0, 15)
c. <- ifelse(u < 12, 350, 300)
t. <- ifelse(u < 12, u, 12)
mean(c.) / mean(t.)

When I ran it the difference between the output and the foregoing answer of $47\frac{2}{9}\approx 47.22$ was small enough to be attributed to the chance variation in the random results:

[1] 47.27247

This exposes an implicit assumption on my part. You might have plausibly interpreted "long run average cost per unit time" to be the expectation of the cost per unit time, $E[C/T].$ Here's the simulated value:

mean(c./t.)
[1] 312.3297

Clearly the answer is different -- but don't trust a mere simulation. In this interpretation the answer is infinite. We can underestimate this average by setting $C$ to the constant $\$300,$ giving an underestimate of $E[\$300/T],$ which is already infinite. See https://stats.stackexchange.com/a/299765/919 for an explanation.

whuber
  • 322,774
3

I notice 3 things and can't pinpoint the specific reason you got it wrong:

  • I can't help but notice "planned replacement" at $T=12$ is not an inequality. If $T$ is continuously distributed, this probability is exactly 0. Do you actually mean $T \ge 12$?

  • Additionally, you ask for the long run average cost per unit time. Supposing 340 was the correct expected cost over the 15 year period, would you not therefore have to divide this quantity by 15 to get the amount?

  • Following up to point 2, your approach assumes that for a 15 year period you would only need 1 replacement. There is of course a non-zero probability you could need 2, 3, 4, or... replacements. You could for instance replace your unit at year 5, and then replace it again at year 10, etc. The text "Probability Models" by Sheldon Ross provides some clever expressions for solving recursive expectations such as this.

AdamO
  • 62,637
  • 2
    With respect to #1: A planned replacement occurs at a certain time $T$ regardless of how much longer the item would have lasted, so it will happen whenever the lifetime itself is $\geq T$. It seems to me the OP has this part right. – jbowman Mar 19 '24 at 20:15
  • @jbowman then why is the lifetime uniformly distributed at 0 to 15 years? – AdamO Mar 19 '24 at 20:19
  • 2
    That's how long it would last, if you let it last until failure, so "lifetime = time to failure." Since the replacement is planned for $T=12$, no item will be in use longer than $12$ periods, so clearly "lifetime" can't refer to "time in use", which has an 80% chance of being uniformly distributed over $(0,12)$ and a 20% chance of equalling $12$. – jbowman Mar 19 '24 at 20:49
  • @jbowman I would argue that "per unit time" as the question states is poorly defined. I have a well defined idea of "age replacement strategy" such as having an operable refrigerator which costs about $1000 USD and lasts 10-20 years, so the average annual cost of owning a refrigerator is approx $66/year. – AdamO Mar 19 '24 at 22:15
  • 1
    This looks like a classic renewal theory problem. The average time between renewals is $0.86 + 0.212 = 7.2$ units of time. The average cost per renewal is $0.8350 + 0.2300 = 340$, and the average cost per unit of time is $340/7.2 = 47.22...$. – jbowman Mar 19 '24 at 22:26