2004 Paper 2 Q12

Year: 2004
Paper: 2
Question Number: 12

Course: UFM Statistics
Section: Cumulative distribution functions

Difficulty: 1600.0 Banger: 1516.0

Problem

Sketch the graph, for \(x \ge 0\,\), of $$ y = kx\e^{-ax^2} \;, $$ where \(a\) and \(k\) are positive constants. The random variable \(X\) has probability density function \(\f(x)\) given by \begin{equation*} \f(x)= \begin{cases} kx\e^{-ax^2} & \text{for \(0 \le x \le 1\)}\\[3pt] 0 & \text{otherwise}. \end{cases} \end{equation*} Show that \(\displaystyle k=\frac{2a}{1-\e^{-a}}\) and find the mode \(m\) in terms of \(a\,\), distinguishing between the cases \(a < \frac12\) and \(a > \frac12\,\). Find the median \(h\) in terms of \(a\), and show that \(h > m\) if \(a > -\ln\left(2\e^{-1/2} - 1\right).\) Show that, \(-\ln\left(2\e^{-1/2}-1\right)> \frac12 \,\). Show also that, if \(a > -\ln\left(2\e^{-1/2} - 1\right) \,\), then $$ P(X > m \;\vert\; X < h) = {{2\e^{-1/2}-\e^{-a}-1} \over 1-\e^{-a}}\;. $$

Solution

TikZ diagram
\begin{align*} && 1 &= \int_0^1 f(x) \d x \\ &&&= \int_0^1 kx e^{-ax^2} \d x \\ &&&= \left [-\frac{k}{2a}e^{-ax^2} \right]_0^1 \\ &&&= \frac{k(1-e^{-a})}{2a} \\ \Rightarrow && k &= \frac{2a}{1-e^{-a}} \end{align*} To find the mode, we want \(f'(x) = 0\), ie \begin{align*} && 0 &= f'(x) \\ &&&= -2kax^2e^{-ax^2} + k e^{-ax^2} \\ &&&= ke^{-ax^2} \left (1-2ax^2 \right)\\ \end{align*} So either \(m = \frac{1}{\sqrt{2a}}\) (if \(a > \frac12\)) or \(f(x)\) is increasing and the mode is \(m = 1\) (if \(a < \frac12\)). \begin{align*} && \frac12 &= \int_0^h f(x) \d x \\ &&&= \left [ -\frac{e^{-ax^2}}{1-e^{-a}} \right]_0^h \\ &&&= \frac{1-e^{-ah^2}}{1-e^{-a}} \\ \Rightarrow && e^{-ah^2}&= 1-\frac12(1-e^{-a}) \\ \Rightarrow && -a h^2 &= \ln \left ( \frac12(1+e^{-a}) \right) \\ \Rightarrow && h &= \sqrt{-\frac1a \ln (\tfrac12(1+e^{-a}))} \end{align*} \(h > m\) already means \(a > \frac12\) so \begin{align*} && h &> m \\ \Leftrightarrow &&\sqrt{-\frac1a \ln (\tfrac12(1+e^{-a}))} &> \frac{1}{\sqrt{2a}} \\ \Leftrightarrow && -\ln (\tfrac12(1+e^{-a})) &> \frac12 \\ \Leftrightarrow && e^{-1/2} & > \frac12(1+e^{-a}) \\ \Leftrightarrow && 2e^{-1/2}-1 &>e^{-a} \\ \Leftrightarrow && \ln(2e^{-1/2}-1) &>-a \\ \Leftrightarrow && a& > -\ln(2e^{-1/2}-1) \\ \end{align*} Noting that \begin{align*} && -\ln(2e^{-1/2} - 1) &= -\ln \left (\frac{2-\sqrt{e}}{e^{1/2}} \right) \\ &&&= \frac12 -\ln(\underbrace{2 - \sqrt{e}}_{<1}) \\ &&&> \frac12 \end{align*} If \(a > -\ln(2e^{-1/2}-1)\) then \begin{align*} && \mathbb{P}(X > m | X < h) &= \frac{\mathbb{P}(m < X < h)}{\mathbb{P}(X < h)} \\ &&&= \frac{e^{-am^2}-e^{-ah^2}}{1-e^{-ah^2}} \\ &&&= \frac{e^{-a\frac{1}{2a}}-e^{\ln \left ( \frac12(1+e^{-a}) \right)}}{1-e^{\ln \left ( \frac12(1+e^{-a}) \right)}} \\ &&&= \frac{e^{-1/2}-\frac12(1+e^{-a})}{1-\frac12(1+e^{-a})} \\ &&&= \frac{2e^{-1/2}-1-e^{-a}}{1-e^{-a}} \end{align*} as required.
Rating Information

Difficulty Rating: 1600.0

Difficulty Comparisons: 0

Banger Rating: 1516.0

Banger Comparisons: 1

Show LaTeX source
Problem source
Sketch the graph, for $x \ge 0\,$, of 
$$ 
y = kx\e^{-ax^2} \;,
$$
where $a$ and $k$ are  positive constants.
The random variable $X$ has probability density function
$\f(x)$ given by
\begin{equation*}
\f(x)=
\begin{cases}
kx\e^{-ax^2} & \text{for $0 \le x \le 1$}\\[3pt]
            0 & \text{otherwise}. 
\end{cases}
\end{equation*}
Show that $\displaystyle k=\frac{2a}{1-\e^{-a}}$ and find the mode $m$ in terms of $a\,$, distinguishing between the cases $a < \frac12$ and $a > \frac12\,$.
Find the median $h$ in terms of $a$,  and  show that $h > m$ if $a > -\ln\left(2\e^{-1/2} - 1\right).$
Show that, $-\ln\left(2\e^{-1/2}-1\right)> \frac12 \,$.
Show also that, if $a > -\ln\left(2\e^{-1/2} - 1\right) \,$,  then 
$$
P(X > m \;\vert\; X < h) = 
{{2\e^{-1/2}-\e^{-a}-1} \over 1-\e^{-a}}\;.
$$
Solution source

\begin{center}
    \begin{tikzpicture}
    \def\functionf(#1){((#1)*exp(-(#1)^2))};
    \def\xl{-1}; 
    \def\xu{5};
    \def\yl{-0.01}; 
    \def\yu{.6};
    
    % 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=green!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 (\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);

         \foreach \x in {5,6,7,8,9,10} {
            \draw[curveB, fill=orange!40] ({\x-0.5}, 0) rectangle ({\x+0.5}, {\functionf(\x)});
        }
        
        \draw[curveA, domain=0:\xu, samples=150] 
            plot ({\x},{\functionf(\x)});

    \end{scope}
    
    % Annotate Function Names
    \node[curveA, labelbox] at ({1.5}, {\functionf(1.5)}) {$y = ke^{-ax^2}$};
    % \node[curveB, labelbox] at (1.85, -1.1) {$x = \frac{4y^2+1}{3}$};
    

    \end{tikzpicture}
\end{center}

\begin{align*}
&& 1 &= \int_0^1 f(x) \d x \\
&&&= \int_0^1 kx e^{-ax^2} \d x \\
&&&= \left [-\frac{k}{2a}e^{-ax^2} \right]_0^1 \\
&&&= \frac{k(1-e^{-a})}{2a} \\
\Rightarrow && k &= \frac{2a}{1-e^{-a}}
\end{align*}

To find the mode, we want $f'(x) = 0$, ie

\begin{align*}
&& 0 &= f'(x) \\
&&&= -2kax^2e^{-ax^2} + k e^{-ax^2} \\
&&&= ke^{-ax^2} \left (1-2ax^2 \right)\\
\end{align*}

So either $m = \frac{1}{\sqrt{2a}}$ (if $a > \frac12$) or $f(x)$ is increasing and the mode is $m = 1$ (if $a < \frac12$).

\begin{align*}
&& \frac12 &= \int_0^h f(x) \d x \\
&&&= \left [ -\frac{e^{-ax^2}}{1-e^{-a}} \right]_0^h \\
&&&= \frac{1-e^{-ah^2}}{1-e^{-a}} \\
\Rightarrow && e^{-ah^2}&= 1-\frac12(1-e^{-a}) \\
\Rightarrow && -a h^2 &= \ln \left ( \frac12(1+e^{-a}) \right) \\
\Rightarrow && h &= \sqrt{-\frac1a \ln (\tfrac12(1+e^{-a}))}
\end{align*}

$h > m$ already means $a > \frac12$ so 

\begin{align*}
&& h &> m \\
\Leftrightarrow &&\sqrt{-\frac1a \ln (\tfrac12(1+e^{-a}))} &> \frac{1}{\sqrt{2a}} \\
\Leftrightarrow && -\ln (\tfrac12(1+e^{-a})) &> \frac12 \\
\Leftrightarrow && e^{-1/2} & > \frac12(1+e^{-a})  \\
\Leftrightarrow && 2e^{-1/2}-1 &>e^{-a} \\
\Leftrightarrow && \ln(2e^{-1/2}-1) &>-a \\
\Leftrightarrow && a& > -\ln(2e^{-1/2}-1) \\
\end{align*}

Noting that
\begin{align*}
&& -\ln(2e^{-1/2} - 1) &= -\ln \left (\frac{2-\sqrt{e}}{e^{1/2}} \right) \\
&&&= \frac12 -\ln(\underbrace{2 - \sqrt{e}}_{<1}) \\
&&&> \frac12
\end{align*}

If $a > -\ln(2e^{-1/2}-1)$ then

\begin{align*}
&& \mathbb{P}(X > m | X < h) &= \frac{\mathbb{P}(m < X < h)}{\mathbb{P}(X < h)} \\
&&&= \frac{e^{-am^2}-e^{-ah^2}}{1-e^{-ah^2}} \\
&&&= \frac{e^{-a\frac{1}{2a}}-e^{\ln \left ( \frac12(1+e^{-a}) \right)}}{1-e^{\ln \left ( \frac12(1+e^{-a}) \right)}} \\
&&&= \frac{e^{-1/2}-\frac12(1+e^{-a})}{1-\frac12(1+e^{-a})} \\
&&&= \frac{2e^{-1/2}-1-e^{-a}}{1-e^{-a}}
\end{align*}

as required.