# Functions of random variables.

Two emergency response units patrol uniformly and independently a 10-mile stretch of road. An emergency incident occurs on the roadway and its position is uniformly distributed, independent of the positions of the response units. The incident requires both response units to be dispatched to the scene. Call the two units unit a and unit b. Assume that response speed is fixed at 10 mph and that U-turns are permitted.

a. Determine the mean travel time for unit a to reach the scene.

b. Determine the mean time until the first unit (either a or b) reaches the scene.

c. Determine the probability density function for the time until the second unit reaches the scene.

-
This is the Problem 3.3 of the book "Urban Operational Research". In the book, there is an example done for 1 response unit. I have problem in visualizing the sample space of the Random Variables in this question having 2 response units. – tear_drops Oct 16 '12 at 13:56
Ok, I have determined solutions for b. and c. (you should be able to look op part a.; it's identical to your example). I will try to put up a solution later today - since you don't get what's going on, I'll try to include some diagrams to illustrate. – Lord_Farin Oct 16 '12 at 14:10
Thank you very much. – tear_drops Oct 16 '12 at 14:32

A first useful observation is that since the patrol units can travel the entire stretch in one hour, we regard the length of the road as $1$, as well as the speed of the patrol units. This will simplify reasoning. It will also allow us to obfuscate the difference between distance and time, since the conversion factor is $1$ (i.e., a patrol unit takes $\frac 12$ time to travel $\frac 12$ distance in the current units).

In this simplification, question b. translates to: determine the mean distance from the closest unit to the scene.

Let the red dot denote the accident, and the blue dots be the patrol units. All three dots are uniformly distributed over $[0,1]$. In the image the orange shaded area (width $\frac 25$) indicates where the patrol units should not be to let pass at least $\frac 15$ of time (i.e., 12 minutes) before the first unit arrives. We can use this intuitive representation to describe the cumulative distribution function for question b. The diagram will prove useful for c. as well, but let us first do b.

Denote $T$ and $X$ for the random variables "Time until first unit arrives" and "Position of accident", respectively.

Suppose the accident is at position $x$ ($0 \le x \le 1$); then the area where the patrol units (denote it $A_x(t)$ may be so that at least time $t$ passes before one arrives at $x$ is given by (correcting for the borders):

$$A_x(t) = \begin{cases} 2t & \text{if x \ge t and 1-x \ge t} \\ x + t & \text{if t \ge x and x \le \frac 12} \\ 1 - x + t & \text{if t \ge 1 - x and x \ge \frac 12} \end{cases}$$

where for simplicity I have neglected that $A_x(t)$ should be constrained to be at most $1$.

Because of the uniform distribution of the position of both patrol units, the probability that both units are not within time (= distance) $t$ of $x$ equals $(1-A_x(t))^2$. From this observation, we find that the cumulative distribution function for an accident at $x$ is:

$$C_x(t) = \max\{1, 1-(1-A_x(t))^2)\}$$

A differentiation to obtain the distribution yields:

$$\Pr[T = t|X = x] = 2A'_x(t)(1-A_x(t)) = \begin{cases} 4(1-2t) & \text{if x > t and 1-x < t} \\ 2(1-x-t) & \text{if t > x and x \le \frac 12} \\ 2(x-t) & \text{if t > 1 - x and x \ge \frac 12} \end{cases}$$

We can then integrate this to obtain the expectation value; this is plainly messy and you shouldn't desire to do it by hand.

For c., the orange area indicated in the diagram now represents where both patrol units should be to ensure the second unit reaches the scene within time $\frac15$; a similar analysis can be performed to determine the distribution function.

I hope this gives you enough insight to understand the problem, and how to attack it.

-