1
$\begingroup$

The Problem: A worker wakes at 6 am and lies in bed for up to 2 hours. Upon rising it takes him an hour to shower and prepare which is preceded by him doing whatever he pleases. He never leaves for work later than 10am.

It would be impossible to claim that there is an interval of time from 6am to 8am in which he is more or less likely to get up than any other (interval of the same length).

Also from the time he has showered and prepared to 10 am ,there is no particular time at which the worker is more or less likely to leave than any other.

Let X be the time in hours that the worker lay in bed yesterday (after waking at 6 AM), and Y the number of hours from waking to the moment he left home.

Find:

  • $f(x)$, the marginal pdf of $X$
  • $f(y|x)$, the conditional pdf of $Y$ given $X = x$
  • $f(x,y)$ , the joint pdf of $X$ and $Y$
  • $f(y)$, the marginal pdf of $Y$

There are a few more requirements after this but I feel that once I get my head around the problem I should be able to do it. I am basically having trouble grasping how to lay it out basically due to the time period in which he can get up. The only interval I feel is set is that it takes him an hour to prepare. Otherwise he could get out of bed whenever he wants and also leave after this prep period. Any guidelines would help me a lot. I have written out values of $X$ and $Y$ so basically if he is out of bed at 6:30 $X = 1/2$ 7:00 $X = 1$, and similarly for $Y$, (if he leaves for work at 8am $Y = 2$)

$\endgroup$

1 Answer 1

2
$\begingroup$

You have made a good start. Since the trouble you are having may be due to the randomness involved, let's begin by describing one particular morning during which we observe the worker's actions. According to the problem statement,

  • $X$ is the rising time (in hours past 6 am), $0 \le X \lt 8-6=2$.

  • Therefore showering takes place from $X$ to $X+1$.

  • $Y$ is the departure time (in hours past 6 am), $X+1 \le Y \lt 10-6=4$.

At this juncture it can be useful to sketch, in $(X,Y)$ coordinates, the set of possible joint values of these variables:

Figure

Now consider $X$ and $Y$ as random. We need information about the relative likelihoods of the various $(X,Y)$ locations within the shaded area of possibilities. There are two key phrases in the problem statement:

It would be impossible to claim that there is an interval of time from 6am to 8am in which he is more or less likely to get up than any other ...

This is an elliptical way of telling you to assume that $X$ has a uniform distribution. Similarly,

from the time he has showered and prepared to 10 am ,there is no particular time at which the worker is more or less likely to leave than any other

also asserts that something also has a uniform distribution. In terms of the established notation, the time elapsed from the end of showering to departure is given by the interval $[X+1, Y]$. We have been told that all such intervals of this form, from $Y=X+1$ through $Y=4$, are equally likely. In other words, the distribution of $Y$ conditional on $X$ is uniform in the interval $[X+1, 4]$.

(This seems to be the key concept being tested by the question. Make sure you understand why the information you have been given is intended to correspond to this conditional distribution and not to the marginal distribution of $Y$ itself.)

In the figure, the probability model for $(X,Y)$ amounts to choosing a horizontal coordinate $X$ uniformly at random and then, having selected that coordinate, choosing a vertical coordinate $Y$ uniformly at random within the blue area lying above $X$. This visualization of the joint distribution can be a helpful guide to finding the requested density functions.

Looking now at the question itself, it should be apparent that we have been told the answers to the first two bullets:

  • $f_X(x)$, the marginal PDF of $X$, is the PDF of a uniform distribution on $[0,2]$. Write it down.

  • $f_{Y|x}(y)$, the conditional PDF of $Y$ given $X=x$, is the PDF of a uniform distribution on $[x+1, 4]$. Write it down. (It depends explicitly on $x$.)

From this information it should be straightforward to compute the joint distribution $f_{X,Y}(x,y)$ from the relationship between $f_X(x), f_{Y|x}(y),$ and $f_{X,Y}(x,y)$. That--finally--gives you full information about the joint distribution of $X$ and $Y$. From it you can easily derive the marginal PDF of $Y$, $f_Y(y)$, by integrating out $x$ from $f_{X,Y}(x,y)dx$.


The question commits a terrible abuse of notation in using the same letter "$f$" for all four distinct functions. Your answers will be four different functions. In particular, it seems to imply that the marginal distributions of $X$ and $Y$ must be the same, because they are both given by the PDF "$f$". That is wrong. I have therefore distinguished the PDFs by suitably mnemonic subscripts. You should do something similar, for otherwise your calculations may become confused.

$\endgroup$
7
  • $\begingroup$ Thankyou, I got this before $f(x) = 1/2 , 0 \leq x < 2$ and 0 other wise $\endgroup$
    – tbaker
    Commented May 19, 2015 at 13:55
  • $\begingroup$ and for the next bit using your help I have $f(y|x) = 1/(3-x), ~~ 1 \leq y < 4$ ... sorry about the abuse of "$f$" just going on from my previous question $\endgroup$
    – tbaker
    Commented May 19, 2015 at 14:01
  • $\begingroup$ That's the right idea, but you need to check the limits on $y$: they must give the vertical extent of the blue (shaded) area in the plot for each individual $x$ and therefore it is obvious the lower limit depends on $x$. (That obviousness is what makes the plot so useful!) $\endgroup$
    – whuber
    Commented May 19, 2015 at 15:24
  • $\begingroup$ sorry yeh I got that so the limit of y would be $x+1 \leq y < 4$ but then the joint pdf would be $1/2*1/(3-x),0 \leq x < 2, x+1 \leq y < 4$ and on the double integral of this the pdf wouldn't = 1? Sorry I feel I keep making stupid errors. $\endgroup$
    – tbaker
    Commented May 19, 2015 at 15:33
  • $\begingroup$ When I compute this integral I get $$\iint_{0\le x\le 2,\ x+1\le y\le 4} \frac{dx\, dy}{2(3-x)} = 1,$$ as it should be. $\endgroup$
    – whuber
    Commented May 19, 2015 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.