Q3
← Back
Basic Info
Probability
└── Homework
└── W7
└── Q3.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 3}
\noindent Let $X$ denote the number of heads when tossing two fair coins.
\bigskip
\begin{enumerate}[start=1,label={\bfseries Part \arabic*:},leftmargin=0in]
\bigskip\item Construct the probability distribution of $X$. Compute the average and the standard deviation of $X$.
\subsection*{Solution}
By applying the principle of symmetry, easy to define the probability space as
\[
\begin{aligned}
\Omega &= \{\text{head}, \text{tail}\}\\
\mathcal{F} &= \mathcal{P}(\Omega)\\
\bP &:\enspace \bP(\{(\text{head}, \text{head})\}) = \bP(\{(\text{head}, \text{tail})\}) = \bP(\{(\text{tail}, \text{head})\}) = \bP(\{(\text{tail}, \text{tail})\}) = \frac{1}{4}
\end{aligned}
\]
Then we have the $pdf$ of $X$
\[
p_X(x) =
\begin{cases}
\begin{aligned}
\frac{1}{4},&\quad x = 0\\
\frac{1}{2},&\quad x = 1\\
\frac{1}{4},&\quad x = 2
\end{aligned}
\end{cases}
\]
Then we have the average of $X$
\[
\begin{aligned}
\mu_X &= 0p_X(0) + 1p_X(1) + 2p_X(2)\\
&= 0 + \frac{1}{2} + \frac{1}{2}\\
&= 1
\end{aligned}
\]
As well as the expectation of $X^2$
\[
\begin{aligned}
\bE\left[X^2\right] &= 0^2p_X(0) + 1^2p_X(1) + 2^2p_X(2)\\
&= 0 + \frac{1}{2} + 1\\
&= \frac{3}{2}
\end{aligned}
\]
Then we have the standard deviation of $X$
\[
\begin{aligned}
\sigma_X &= \sqrt{\bE\left[X^2\right] - {\mu_X}^2}\\
&= \sqrt{\frac{1}{2}}\\
&\approx 0.707
\end{aligned}
\]
\subsection*{Answer}
\[\boxed{
\begin{aligned}
p_X(x) &=
\begin{cases}
\begin{aligned}
\frac{1}{4},&\quad x = 0\\
\frac{1}{2},&\quad x = 1\\
\frac{1}{4},&\quad x = 2
\end{aligned}
\end{cases}\\
\mu_X &= 1\\
\sigma_X &= \sqrt{\frac{1}{2}} \approx 0.707
\end{aligned}
}\]
\bigskip\item Now suppose you toss a fair coin repeatedly until you get a tail. Let $Y$ be the number of heads obtained before the first tail. Construct the probability distribution of $Y$. Compute the average and the standard deviation of $Y$ and compare them with those of $X$.
\subsection*{Solution}
Easy to notice that $Y$ follows a geometric distribution with parameter $\frac{1}{2}$ (by applying the principle of symmetry), then we have the $pdf$ of $Y$
\[
p_Y(y) = \left(\frac{1}{2}\right)^y\left(\frac{1}{2}\right) = \frac{1}{2^{y+1}},\quad y\in\{0,1,\dots\}
\]
Then we have the average of $Y$
\[
\begin{aligned}
\mu_Y &= \sum_{y = 0}^{\infty}\frac{y}{2^{y+1}}\\
&= \frac{1}{2}\sum_{y=0}^{\infty}y\left(\frac{1}{2}\right)^y\\
&= \frac{1}{2}\left(\frac{\frac{1}{2}}{\left(1-\frac{1}{2}\right)^2}\right)\\
&= 1
\end{aligned}
\]
As well as the expectation of $Y^2$
\[
\begin{aligned}
\bE\left[Y^2\right] &= \sum_{y=0}^{\infty}\frac{y^2}{2^{y+1}}\\
&= \frac{1}{2}\sum_{y=0}^{\infty}y^2\left(\frac{1}{2}\right)^y\\
&= \frac{1}{2}\left(\frac{\frac{1}{2}\left(\frac{1}{2}+1\right)}{\left(1-\frac{1}{2}\right)^3}\right)\\
&= 3
\end{aligned}
\]
Then we have the standard deviation of $Y$
\[
\begin{aligned}
\sigma_Y &= \sqrt{\bE\left[Y^2\right] - {\mu_Y}^2}\\
&= \sqrt{2}\\
&\approx 1.414
\end{aligned}
\]
Comparison as
\[\mu_X = 1 = \mu_Y\]
\[\sigma_X = \sqrt{\frac{1}{2}} \approx 0.707 < 1.414 \approx \sqrt{2} = \sigma_Y\]
\subsection*{Answer}
\[\boxed{
\begin{aligned}
p_Y(y) &= \frac{1}{2^{y+1}},\quad y\in\{0,1,\dots\}\\
\mu_Y &= 1\\
\sigma_Y &= \sqrt{2} \approx 1.414\\
\mu_Y &= \mu_X\\
\sigma_Y &> \sigma_X
\end{aligned}
}\]
\end{enumerate}
\end{document}