2014 Paper 2 Q12

Year: 2014
Paper: 2
Question Number: 12

Course: UFM Statistics
Section: Cumulative distribution functions

Difficulty: 1600.0 Banger: 1484.8

Problem

The lifetime of a fly (measured in hours) is given by the continuous random variable \(T\) with probability density function \(f(t)\) and cumulative distribution function \(F(t)\). The hazard function, \(h(t)\), is defined, for \(F(t) < 1\), by \[ h(t) = \frac{f(t)}{1-F(t)}\,. \]
  1. Given that the fly lives to at least time \(t\), show that the probability of its dying within the following \(\delta t\) is approximately \(h (t) \, \delta t\) for small values of \(\delta t\).
  2. Find the hazard function in the case \(F(t) = t/a\) for \(0< t < a\). Sketch \(f(t)\) and \(h(t)\) in this case.
  3. The random variable \(T\) is distributed on the interval \(t > a\), where \(a>0\), and its hazard function is \(t^{-1}\). Determine the probability density function for \(T\).
  4. Show that \(h(t)\) is constant for \(t > b\) and zero otherwise if and only if \(f(t) =ke^{-k(t-b)}\) for \(t > b\), where \(k\) is a positive constant.
  5. The random variable \(T\) is distributed on the interval \(t > 0\) and its hazard function is given by \[ h(t) = \left(\frac{\lambda}{\theta^\lambda}\right)t^{\lambda-1}\,, \] where \(\lambda\) and \(\theta\) are positive constants. Find the probability density function for \(T\).

Solution

  1. \(\,\) \begin{align*} && \mathbb{P}(T > t + \delta t | T > t) &= \frac{\mathbb{P}(T < t + \delta t)}{\mathbb{P}(T > t )} \\ &&&= \frac{\int_t^{t+\delta t} f(s) \d s}{1-F(t)} \\ &&&\approx \frac{f(t)\delta t}{1-F(t)} \\ &&&= h(t) \delta t \end{align*}
  2. If \(F(t) = t/a\) then \(f(t) = 1/a\) and \(h(t) = \frac{1/a}{1-t/a} = \frac{1}{a-t}\)
    TikZ diagram
  3. \(\,\) \begin{align*} && \frac{F'}{1-F} &= \frac{1}{t} \\ \Rightarrow && -\ln (1-F) &= \ln t + C\\ \Rightarrow && 1-F &= \frac{A}{t} \\ && F &= 1 - \frac{A}{t} \\ F(a) = 0: && F &= 1 - \frac{a}{t} \\ && f(t) &= \frac{a}{t^2} \end{align*}
  4. (\(\Rightarrow\)) \begin{align*} && \frac{F'}{1-F} &= k \\ \Rightarrow && -\ln(1-F) &= kt+C \\ \Rightarrow && 1-F &= Ae^{-kt} \\ F(b) = 0: && 1 &= Ae^{-kb} \\ \Rightarrow && 1-F &= e^{-k(t-b)}\\ \Rightarrow && f &= ke^{-k(t-b)} \\ \end{align*} (\(\Leftarrow\)) \(f(t) = ke^{-k(t-b)} \Rightarrow F(t) = 1-e^{-k(t-b)}\) and the result is clear.
  5. \(\,\) \begin{align*} && \frac{F'}{1-F} &= \left ( \frac{\lambda}{\theta^{\lambda}} \right) t^{\lambda-1} \\ \Rightarrow && -\ln(1-F) &= \left ( \frac{t}{\theta} \right)^{\lambda} +C\\ \Rightarrow && F &= 1-A\exp \left (- \left ( \frac{t}{\theta} \right)^{\lambda} \right) \\ F(0) = 0: && 0 &= 1-A \\ \Rightarrow && F &= 1 - \exp \left (- \left ( \frac{t}{\theta} \right)^{\lambda} \right) \\ \Rightarrow && f &= \lambda t^{\lambda -1} \theta^{-\lambda} \exp \left (- \left ( \frac{t}{\theta} \right)^{\lambda} \right) \end{align*}
Examiner's report
— 2014 STEP 2, Question 12
Least Popular Least popular question on the paper

This was the least popular question on the paper. A large number of candidates who attempted this question seemed unable to work out where to start on the first part of the question. Much of the rest of the question requires working with the hazard function defined at the start of the question and so many candidates who attempted these parts were able to do the necessary integration to solve the differential equations that arose. A common error among those who attempted part (iv) was to ignore the "if and only if" statement in the question and only show the result one way round.

There were good solutions presented to all of the questions, although there was generally less success in those questions that required explanations of results or the use of diagrams and graphs to reach the solution. Algebraic manipulation was generally well done by many of the candidates although a range of common errors such as confusing differentiation and integration and simple arithmetic slips were evident. Candidates should also be advised to use the methods that are asked for in questions unless it is clear that other methods will be accepted (such as by the use of the phrase "or otherwise").

Source: Cambridge STEP 2014 Examiner's Report · 2014-full.pdf
Rating Information

Difficulty Rating: 1600.0

Difficulty Comparisons: 0

Banger Rating: 1484.8

Banger Comparisons: 1

Show LaTeX source
Problem source
The lifetime of a fly (measured in hours) is given by the continuous random variable $T$ with probability density function $f(t)$ and cumulative distribution function $F(t)$.  The \textit{hazard function}, $h(t)$, is defined, for $F(t) < 1$, by
  \[
  h(t) = \frac{f(t)}{1-F(t)}\,.
  \]
  \begin{questionparts}
\item Given that the fly lives to at least  time $t$, show that the  probability of its dying within the following $\delta t$ is approximately $h (t) \, \delta t$ for small values of $\delta t$. 
  \item Find the hazard function in the case $F(t) = t/a$    for $0<    t <   a$. 
   Sketch $f(t)$ and $h(t)$ in this case.
  \item The random variable $T$ is distributed on the interval $t >      a$, where $a>0$, and its hazard function is $t^{-1}$.  Determine    the probability density function for $T$.
  \item Show that $h(t)$ is constant for $t > b$ and zero otherwise if and only if $f(t) =ke^{-k(t-b)}$ for $t > b$, where $k$ is a positive constant.
  \item The random variable $T$ is distributed on the interval $t >   0$ and its hazard function is given by
    \[
    h(t) =
    \left(\frac{\lambda}{\theta^\lambda}\right)t^{\lambda-1}\,,
    \]
    where $\lambda$ and $\theta$ are positive constants.  Find the probability density function for $T$.
  \end{questionparts}
Solution source
\begin{questionparts}
\item $\,$ \begin{align*}
&& \mathbb{P}(T > t + \delta t | T > t) &= \frac{\mathbb{P}(T < t + \delta t)}{\mathbb{P}(T > t )} \\
&&&= \frac{\int_t^{t+\delta t} f(s) \d s}{1-F(t)} \\
&&&\approx \frac{f(t)\delta t}{1-F(t)} \\
&&&= h(t) \delta t
\end{align*}

\item If $F(t) = t/a$ then $f(t) = 1/a$ and $h(t) = \frac{1/a}{1-t/a} = \frac{1}{a-t}$


\begin{center}
    \begin{tikzpicture}
    \def\functionf(#1){1/1};
    \def\functiong(#1){1/(1-(#1))};
    \def\xl{-0.5}; 
    \def\xu{2};
    \def\yl{-0.5}; 
    \def\yu{5};
    
    % Calculate scaling factors to make the plot square
    \pgfmathsetmacro{\xrange}{\xu-\xl}
    \pgfmathsetmacro{\yrange}{\yu-\yl}
    \pgfmathsetmacro{\xscale}{10/\xrange}
    \pgfmathsetmacro{\yscale}{10/\yrange}
    
    % Define the reusable styles to keep code clean
    \tikzset{
        x=\xscale cm, y=\yscale cm,
        axis/.style={thick, draw=black!80, -{Stealth[scale=1.2]}},
        grid/.style={thin, dashed, gray!30},
        curveA/.style={very thick, color=cyan!70!black, smooth},
        curveB/.style={very thick, color=orange!90!black, smooth},
        curveC/.style={very thick, color=red!90!black, smooth},
        dot/.style={circle, fill=black, inner sep=1.2pt},
        labelbox/.style={fill=white, inner sep=2pt, rounded corners=2pt} % Protects text from lines
    }
    
    % Draw background grid
    \draw[grid] (\xl,\yl) grid[step=.2] (\xu,\yu);
    
    % Set up axes
    \draw[axis] (\xl,0) -- (\xu,0) node[right, black] {$x$};
    \draw[axis] (0,\yl) -- (0,\yu) node[above, black] {$y$};
    
    % Define the bounding region with clip
    \begin{scope}
        \clip (\xl,\yl) rectangle (\xu,\yu);
        \filldraw (0,0) circle (1.5pt) node[below left] {$O$};
        \draw[curveA, domain=0:1, samples=150] 
            plot ({\x},{\functionf(\x)});
        \draw[curveB, domain=0:.99, samples=150] 
            plot ({\x},{\functiong(\x)});
    \end{scope}
    

    \end{tikzpicture}
\end{center}


\item $\,$ \begin{align*}
&& \frac{F'}{1-F} &= \frac{1}{t} \\
\Rightarrow && -\ln (1-F) &= \ln t + C\\
\Rightarrow && 1-F &= \frac{A}{t} \\
&& F &= 1 - \frac{A}{t} \\
F(a)  = 0: && F &= 1 - \frac{a}{t} \\
&& f(t) &= \frac{a}{t^2}
\end{align*}

\item ($\Rightarrow$) \begin{align*}
&& \frac{F'}{1-F} &= k \\
\Rightarrow && -\ln(1-F) &= kt+C \\
\Rightarrow && 1-F &= Ae^{-kt} \\
F(b) = 0: && 1 &= Ae^{-kb} \\
\Rightarrow && 1-F &= e^{-k(t-b)}\\
\Rightarrow && f &= ke^{-k(t-b)} \\
\end{align*}

($\Leftarrow$) $f(t) = ke^{-k(t-b)} \Rightarrow F(t) = 1-e^{-k(t-b)}$ and the result is clear.

\item $\,$ \begin{align*}
&& \frac{F'}{1-F} &= \left ( \frac{\lambda}{\theta^{\lambda}} \right) t^{\lambda-1} \\
\Rightarrow && -\ln(1-F) &= \left ( \frac{t}{\theta} \right)^{\lambda} +C\\
\Rightarrow && F &= 1-A\exp \left (- \left ( \frac{t}{\theta} \right)^{\lambda} \right) \\
 F(0) = 0: && 0 &= 1-A \\
\Rightarrow && F &= 1 - \exp \left (- \left ( \frac{t}{\theta} \right)^{\lambda} \right) \\
\Rightarrow && f &= \lambda t^{\lambda -1} \theta^{-\lambda} \exp \left (- \left ( \frac{t}{\theta} \right)^{\lambda} \right)
\end{align*}

\end{questionparts}