Jobs arrive to a computer. When the computer is free, the waiting time $W$ until the next incoming job has an exponential distribution with mean $1$ millisecond. The time $C$ it takes to complete a job has a uniform distribution with mean $0.5$ millisecond. Consider a time when the computer is free, and let $T$ be the time until the next job is completed. Find the pdf of $T.$
I'm having serious trouble solving problems where a lot of text is involved in its formulation. This problem appeared in the book on the chapter for convolution. What I could take from the problem is that $W\sim \text{exp}(1)$ and $C\sim \text{unif}(0,1).$ From this we can deduce that
$$f_W(w)=e^{-w}, \quad f_C(c)=1.$$
How do I relate $T$ to $W$ and $C$? Shouldn't it be like $T=W+C?$ Then I'd need to find $f_{T+C}(x),$ so setting $w=x-u$ and $c=u$ we get
$$f_T(x)=f_{W+C}(x)=\int_{-\infty}^{\infty}f_W(x-u)f_C(u) \ du=\int_{-\infty}^{\infty}e^{-(x-u)} \ du.$$
Now we need to find the bounds. Note that $x-u\geq 0$ for $0 \le x \le 1$ so
$$\int_0^xe^{-(x-u)} \ du = 1-e^{-x}, \quad x\in[0,1].$$
This answer is partially correct. There is also the answer $f_T(x)=e^{-x}(e-1),\ x\ge 1.$
Questions:
- I honestly just guessed most of the stuff above, I did things directly by applying the formulas without really having any deeper intuition of what it is that I am doing. Can anyone break down, step by step how problems like this should be solved?
- I think this question is a result of question 1. But how do they come upp with the other answer that I did not get? I think that If I completely understood the problem and did it properly I would have lead myself to the second case $x\ge 1$ as well.
To some extent, I dont believe there are any tricks. In my opinion, it is just a matter of thinking through the possibilities properly.
To start with, think about the actual application scenario. Pretend you are standing there observing the computer. You turn on a stop watch. You will turn it off when a job is completed. What has to happen? A job has to come to the computer, and then it needs to be processed. Which is exactly the sum of arrival time and the completion time.
Now regarding the PDF of $T$. Before we get there, visualize the support of the joint distribution of $W$ and $C$. If $W$ is the horizontal axis and $C$ is the vertical axis, the joint support is the "infinite" rectangle $0 \leq W < \infty, \, 0 \leq C \leq 1$. Then to find the CDF of $T$, you need, for a fixed $t$, $P(T \leq t)$. Since $T = W + C$, this is $P(W + C \leq t) = \int P(C \leq t-w \, | \, W=w) \, f_W(w) \, dw$. Forgetting about the technicalities there, you are looking at the line $c=t-w$ (a line with a negative slope) cutting across the said-support. How it cuts the support varies depending on $0 \leq t \leq 1$ and $t > 1$.