Skip to content

Q1

← Back

Basic Info

Probability
└── Homework
    └── W9
        └── Q1.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 \#9}
\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 1}

    \noindent Calculate the entropy in bits for each of the following random variables:

    \bigskip

    \begin{enumerate}[start=1,label={\bfseries Part \arabic*:},leftmargin=0in]
        \bigskip\item Pixel values in an image whose possible grey values are all the integers from $0$ to $255$ with uniform probability.

        \subsection*{Solution}

            \[256 = 255 - 0 + 1\]

            \[H(X) = \bE(I(X)) = -256 \cdot \frac{1}{256}\left(log_2\left(\frac{1}{256}\right)\right) = 8 \text{bits}\]

        \subsection*{Answer}

        \[\boxed{
            H(X) = 8 \text{bits}
        }\]

        \bigskip\item Gender in a tri-sexed insect population whose three genders occur with probabilities $\frac{1}{4}$, $\frac{1}{4}$, and $\frac{1}{2}$.

        \subsection*{Solution}

            \[H(X) = \bE(I(X)) = - \left(
                2 \cdot \frac{1}{4}\left(log_2\left(\frac{1}{4}\right)\right)
                + \frac{1}{2}\left(log_2\left(\frac{1}{2}\right)\right)
            \right) = 1.5 \text{bits}\]

        \subsection*{Answer}

        \[\boxed{
            H(X) = 1.5 \text{bits}
        }\]

        \bigskip\item A population of persons classified by whether they are older, or not older, than the population's median age.

        \subsection*{Solution}

            \[H(X) = \bE(I(X)) = - \left(
            2 \cdot \frac{1}{2}\left(log_2\left(\frac{1}{2}\right)\right)\right) = 1 \text{bits}\]

        \subsection*{Answer}

        \[\boxed{H(X) = 1 \text{bits}}\]
    \end{enumerate}

\end{document}