1

Suppose we have a street intersection. It consists of a center point and 4 one-mile-long streets from the center. Street 1 points up, street 2 points down, street 3 points to the right and street 4 points to the left. The city assigns an ambulance for this area and assume that the ambulance is equally likely distributed in these 4 streets. When an emergency happens at the very end of street 1, let X denote the distance the ambulance has to travel in order to get to the emergency. a. Find the cummulative distribution function FX(x).

The textbook suggests that we design Di to be the event that the ambulance is on the street i ( i=1,2,3,4). Then consider the random variable X given Di (X|Di) the image of this problem is here [http://imageshack.us/photo/my-images/694/36205974.jpg/]

Stefan Hansen
  • 25,582
  • 7
  • 59
  • 91
Alice
  • 11
  • Please make your question self-contained and avoid resorting to some off-site content. – Did Apr 30 '13 at 17:06
  • I just want to give people a visualization of the problem. i'm sorry if it causes any confuse. I come across this problem in an interesting text, so I just want to get it answered here with awesome people – Alice Apr 30 '13 at 17:14

2 Answers2

1

There's a neater way of doing it.

Let $E$ be the event that the ambulance is less than one mile away. Notice that $E$ is exactly the event that the ambulance is on street one. So we have $\mathbb P(E) = \frac 14$.

Now let $Y$ be the distance of the ambulance from the central point (in miles). Notice that:

$\circ\qquad$ $\mathbb P[ Y < y ] = y$ for $0<y<1$

$\circ\qquad$ The random variable $Y$ is independent of which street the ambulance is on.

Therefore for every $y\in(0,1)$ the events $[Y>y]$ and $E$ are independent.

Notice two more things

$\circ\qquad$ If the ambulance is on street one $X$ is the distance to one end of the street and $Y$ is the distance to the other end. So $X+Y = 1$

$\circ\qquad$ If the ambulance in on another street then it must drive through the central point and then one mile further. So $X = Y+1$.

So for $x<1$ we have $$\mathbb P[X<x] = \mathbb P\left(\left[Y>1-x\right] \cap E \right) = \left(1-\mathbb P\left[y<1-x\right]\right)\mathbb P(E) = \frac x4.$$

For $1<x<2$ we have $$\mathbb P[X<x] = \mathbb P(E) + \mathbb P\left([Y<x-1]\cap E^\complement\right) = \frac 14 + \mathbb P[Y< x-1]\mathbb P(E) = \frac{3x - 2}4. $$

So $F_X(x) = \frac x4$ for $x<1$ and $F_X(x) = \frac {3x-2}4$ for $x>1$.

Tim
  • 5,564
  • @ Tim: I once followed your way of thought but sadly it led me nowhere. so I came back to what the textbook suggests. could you please be more specific? I got screwed up with this problem since the last weekend. So if you can, please be clear and specific. thanks – Alice Apr 30 '13 at 17:27
  • OK, It sounded like a homework question so I was trying to hint rather than just tell you the answer. I'll edit my answer to put some equations in. – Tim Apr 30 '13 at 17:32
  • @ Tim: it's actually not a homework question. I randomly got this textbook today from a book sale fair and find this problem very interesting. I just want to get it solved since I like it and the author said this question is classic. if you could help, thanks. – Alice Apr 30 '13 at 17:40
  • @ Tim: your suggestion is nice. I followed the book's hint and get the same thing. the question also asks about E[X] and var[X]. i'm not sure which integral should I use to calculate E[X] and var[X]. could you guide me through these? I really appreciate it. – Alice May 01 '13 at 00:42
  • @ Alice: Even though $F_X$ has a corner you can still define the density $f_X(x) = \frac{d}{dx} F_X(x)$. So $f_X(x) = \frac 14$ for $x<1$ and $f_X(x) = \frac 34$ for $x>1$ So the integrals $\mathbb E(X) = \int_0^2 x f_x(x) dx$ and $\mathbb E(X^2) = \int_0^2 x^2 f_X(x) dx$ still make sense even though there's a point where $f_X$ is undefined. You just have to separate $\int_0^2\dots dx = \int_0^1\dots dx + \int_1^2\dots dx$. – Tim May 01 '13 at 07:14
  • Another way of thinking about it is that $X$ is the sum of two independent random variables: The distance the ambulance has to travel along the road it starts on (a uniform random variable in $(0,1)$ mean $\frac 12$ variance $\frac 1{12}$ and a Bernoulli$\left(\frac 34\right)$ random variable ($0$ if it starts on street 1, $1$ otherwise): mean $\frac 34$, variance $\frac 3{16}$. So the mean is $\frac 54$ and because the random variables are independent you can add the variances to get var$(X) = \frac {13}{48}$. This should give you the same answer as when you calculate the integrals. – Tim May 01 '13 at 07:25
  • @ Tim: I just revise what you did in your answer and could you please clarify why you get the following: P[Y<y]=y for 0<y<1,P[X<x]=P([Y>1−x]∩E)=(1−P[y<1−x])P(E)=x/4 and P[X<x]=P(E)+P([Y<x−1]∩E ∁ )=1 4 +P[Y<x−1]P(E)=3x−2/4. I don't really get why I got these results. i'm sorry but since i'm between the two hints (one is yours, the other is the text's) I've screwed up. please explain in detail. if you can, could you go over the way the book suggests to check whether it produces the same results. thanks – Alice May 01 '13 at 09:54
  • @ Alice: OK, I'll edit it again and go over the steps a bit slower when I have time. Well done for persisting by the way. – Tim May 01 '13 at 10:20
  • @ Tim: thanks for still being with me. i'm really into this problem because it's beautiful. if you can go over the original hint to check whether it yields the same result as yours, it's great. thanks – Alice May 01 '13 at 10:25
  • @ Tim: Are you still there? – Alice May 01 '13 at 12:58
  • @ Tim: I don't understand why in case of 1<x<2 you put P(E) + ... what is the role of P(E) here? – Alice May 01 '13 at 14:45
0

I thought I'd do it the way the book said and keep the other answer up so you can compare the two.

Let $Y$ be the distance of the ambulance to the central point and let $J$ be the number of the street the ambulance is on.

Fix a value of $y = \frac ab$ for natural numbers $0< a< b$. We want to know the probability that $Y<y$. First, it doesn't matter what street the ambulance is on the probability that $Y<y$ doesn't change if you know what street the ambulance is on.

Now let's divide the street up into $b$ portions with equal lengths. As the amblance is equally likely to be anywhere in the street the probability that it is in any one of the $b$ parts is $\frac 1b$.

Now there are $a$ of these parts that are closer to the centre than $\frac ab$ and $b-a$ of them that are further away. So the probability that the ambulance is less than $y$ miles away from the centre is $$\mathbb P[Y<\frac ab] = a\times \frac 1b = \frac ab = y$$ The probability that the ambulance is more than $\frac ab$ miles away from the centre is $$\mathbb P[Y>\frac ab] = (b-a)\times \frac 1b = \frac {b-a}b = 1-y$$

Now let $D_i$ be the event that $J=i$. The events $D_i$ are disjoint, they cannot occur together, so we have $$ \mathbb P[X < x] = \sum_{i=1}^4 \mathbb P[X< x \cap D_i]$$ $$ \hphantom{\mathbb P[X < x]} = \sum_{i=1}^4 \mathbb P[X< x |D_i] \times \mathbb P[D_i] $$

Now we need to calculate $\mathbb P[X<x | D_i]$ for each $i$.

For $i=1$ The distance to the end of street one is $X = 1-Y$. So we can say that $ \mathbb P[X< x |D_1] = \mathbb P[Y> 1-x] = 1-(1-x)=x$ for $x<1$ and $P[X< x |D_1] = 1$ for $x\geq 1$.

For $i = 2, 3$ or $4$ the distance to the end of street one is $X=Y+1$. Therefore $ \mathbb P[X< x |D_i] = \mathbb P[Y< x-1] = x-1$ for $x>1$ and $P[X< x |D_1] = 0$ for $x\leq 1$.

Now for every $i$ we must have $\mathbb P(D_i) = \frac 14$.
Notice that the last three terms of the sum are all the same so we may write

$$ \mathbb P[X < x] = \sum_{i=1}^4 \mathbb P[X< x \cap D_i]$$ $$ \hphantom{\mathbb P[X < x]} = \mathbb P[X< x | D_1]\mathbb P(D_1) + 3\times\mathbb P[X< x | D_2]\mathbb P(D_2)$$

So for $x<1$ we have

$$ \mathbb P[X < x] = x\times \frac 14 + 3\times 0 \times \frac 14 = \frac x4$$

And for $x>1$ $$ \mathbb P[X < x] = 1\times \frac 14 + 3\times (x-1) \times \frac 14 = \frac {3x-2}4$$

I took quite a few shotcuts last time. Firstly, I combined $D_2$, $D_3$ and $D_4$ into one event $E^\complement$. This didn't affect the conditional probabilities for $X<x$. All it meant was I had a $\mathbb P(E^\complement)$ insted of $3\mathbb P(D_2)$ and I didn't have to use the sum.

Probably the biggest difference is that in my original answer I didn't explicitly use $\mathbb P[x<X|D_i]$. Instead I introduced $Y$ and talked about the problem in terms of independence. I'm sorry if this confused you, there are some technical reasons for doing it that way which really don't matter at this level.

I also didn't make the point that for $x>1$ $\mathbb P[X< x | D_1] = 1$ this is obvious when it's pointed out (if the ambulance is on street one it's less than $x$ miles away if $x>1$.) But it probably wasn't helpful that it just appeared in an equation near the end with no explanation.

Tim
  • 5,564