How to find ratio of two Continuous random variables
Matthew Barrera
A quiz is 1 hour long, and has two questions. The time you give to Q1 is represented by the random variable $X$ which has the following pdf:$$f_X(x)=12x(1-x)^2\qquad 0 ≤ x ≤ 1$$The rest of the time is given to Q2. The value of $X$ is chosen based on the relative lengths of the questions. Let $Z$ be the ratio between the time you give to the longer question and the time you give the shorter question: Z = longer question / shorter question. Note that Z ≥ 1. Find P(Z ≤ 2)
This is how I have solved this.
We already know that Z has to be greater or equal to zero. So, Question 1(Longer question) will always take up more time. I am assuming here that x represents the time to get Question 1 done. And I am already given that I want Z to be between 1 and 2. So, from the ration, I get limits for Shorter Question.
Shorter Question = X/Z. When X is 0.5 and Z is 1 then Shorter question is 0.5. Similarly when Z is 2 and X is 0.75 then Shorter question is 0.35. And then I integrate the given PDF for limits 0.5 to 0.75 and 0.35 to 0.5. I get probabilities 0.2 and 0.2 which I add up to give probability for Z. However, I am highly doubtful of my solution
$\endgroup$ 21 Answer
$\begingroup$Since $X$ is the time you give to one question, the remaining time $1-X$ is given to the other question.
Going by the problem, I think we have
\begin{align} Z=\frac{\max(X,1-X)}{\min(X,1-X)}=\begin{cases}\frac{X}{1-X}&,\text{ if }X\geqslant 1/2\\\\\frac{1-X}{X}&,\text{ if }X<1/2\end{cases} \end{align}
So, purely mechanically, we can write (using the total probability theorem)
\begin{align} P(Z\leqslant 2)&=P(Z\leqslant 2\,,\,X\geqslant 1/2)+P(Z\leqslant 2\,,\,X<1/2) \\\\&=P\left(\frac{X}{1-X}\,,\,X\geqslant 1/2\right)+P\left(\frac{1-X}{X}\,,\,X<1/2\right) \\\\&=P\left(\frac{1}{2}\leqslant X\leqslant \frac{2}{3}\right)+P\left(\frac{1}{3}\leqslant X<\frac{1}{2}\right) \\\\&=P\left(\frac{1}{3}\leqslant X\leqslant \frac{2}{3}\right) \\\\&=\int_{1/3}^{2/3}f_X(x)\,dx \end{align}
According to Wolfram Alpha, the integral gives $$P(Z\leqslant 2)=\frac{13}{27}\approx 0.481481$$
There might be an easier way to do this logically.
$\endgroup$ 1