Skip to content

Q2

← Back

Basic Info

Probability
└── Homework
    └── W7
        └── Q2.tex

Preview

\documentclass[12pt]{article}

\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[margin=1in]{geometry}
\usepackage{fancyhdr}
\usepackage{enumerate}
\usepackage[shortlabels]{enumitem}

\pagestyle{fancy}
\fancyhead[l]{Li Yifeng}
\fancyhead[c]{Homework \#7}
\fancyhead[r]{\today}
\fancyfoot[c]{\thepage}
\renewcommand{\headrulewidth}{0.2pt}
\setlength{\headheight}{15pt}

\newcommand{\bE}{\mathbb{E}}
\newcommand{\bP}{\mathbb{P}}

\begin{document}

    \section*{Question 2}

    \noindent Assume that the random variable $X$ has the following probability mass function:

    \[
        p(x) =
        \begin{cases}
            \begin{aligned}
                \frac{1}{8},&\quad x = -1\\
                \frac{1}{4},&\quad x = 0\\
                \frac{1}{2},&\quad x = 1\\
                \frac{1}{8},&\quad x = 2
            \end{aligned}
        \end{cases}
    \]

    \bigskip

    \begin{enumerate}[start=1,label={\bfseries Part \arabic*:},leftmargin=0in]
        \bigskip\item Compute the expectation of $X$ and of $X^2$.

        \subsection*{Solution}

            Easy to get

            \[
                \begin{aligned}
                    \bE[X] &= -1p(-1) + 0p(0) + 1p(1) + 2p(2)\\
                    &= -\frac{1}{8} + 0 + \frac{1}{2} + \frac{1}{4}\\
                    &= \frac{5}{8}
                \end{aligned}
            \]

            As well as

            \[
            \begin{aligned}
                \bE\left[X^2\right] &= (-1)^2p(-1) + 0^2p(0) + 1^2p(1) + 2^2p(2)\\
                &= \frac{1}{8} + 0 + \frac{1}{2} + \frac{1}{2}\\
                &= \frac{9}{8}
            \end{aligned}
            \]

        \subsection*{Answer}

            \[\boxed{\begin{aligned}
                    \bE[X] &= \frac{5}{8}\\
                    \bE\left[X^2\right] &= \frac{9}{8}
            \end{aligned}}\]

        \bigskip\item Compute the variance of $X$ and of $X^2$.

        \subsection*{Solution}

            Easy to get the variance of $X$

            \[
                \begin{aligned}
                    V(X) &= \bE\left[X^2\right] - (\bE[X])^2\\
                    &= \frac{9}{8} - \left(\frac{5}{8}\right)^2\\
                    &= \frac{47}{64}
                \end{aligned}
            \]

            As well as the variance of $X^2$

            \[
                \begin{aligned}
                    V(X^2) &= - \left(\bE\left[X^2\right]\right)^2 + \bE\left[\left(X^2\right)^2\right]\\
                    &= -\frac{81}{64} + \left((-1)^4p(-1) + 0^4p(0) + 1^4p(1) + 2^4p(2)\right)\\
                    &= -\frac{81}{64} + \left(\frac{1}{8} + 0 + \frac{1}{2} + 2\right)\\
                    &= \frac{87}{64}
                \end{aligned}
            \]

        \subsection*{Answer}

            \[\boxed{\begin{aligned}
                    V(X) &= \frac{47}{64}\\
                    V(X^2) &= \frac{87}{64}
            \end{aligned}}\]

    \end{enumerate}

\end{document}