\documentclass[11pt]{article}
\input{headers01}

\usepackage{fancyhdr}   
\pagestyle{fancy}      
\lhead{CS 355, FALL 2022}               
\rhead{Name: Hemanta K. Maji} %%% <-- REPLACE Hemanta K. Maji WITH YOUR NAME HERE

\usepackage[strict]{changepage}  
\newcommand{\nextoddpage}{\checkoddpage\ifoddpage{\ \newpage\ \newpage}\else{\ \newpage}\fi}  


\begin{document}

\title{Homework 1}

\date{}

\maketitle 

\thispagestyle{fancy}  
\pagestyle{fancy}      




\begin{enumerate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item {\bfseries Estimating logarithm function}{\bfseries (15 points).} For $x\in[0,1),$ we shall use the identity that 
  $$\ln(1-x) = -x - \frac{x^2}2 - \frac{x^3}3 - \dotsi.$$
\begin{enumerate} 
    \item {\bfseries (5 points)} For $x\in[0,1)$, prove that $\ln(1-x) \leq - x - \frac{x^2}2.$
    \newline
    {\bfseries Solution.} \newline 
    % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
    \newpage
    \item {\bfseries (10 points)} For $x\in[0,1/2]$, prove that 
      $$\ln(1-x) \geq -x - \frac{x^2}{2\cdot 2^0} - \frac{x^2}{2\cdot 2^1} -\frac{x^2}{2\cdot 2^2} - \frac{x^2}{2\cdot 2^3} - \dotsi = -x-x^2.$$
  \newline
  {\bfseries Solution.} \newline 
  % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
  
  \newpage 
\end{enumerate}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item {\bfseries Tight Estimations}{\bfseries (25 points)} 
  Provide meaningful upper-bounds and lower-bounds for the following expressions.
  \begin{enumerate}
  \item {\bfseries (10 points)} $S_n = \sum_{i=1}^n \ln i$,   \newline
  {\bfseries Solution.}  \newline
  % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
  
  \newpage
  \item {\bfseries (5 points)} $A_n = n!$  \newline
  {\bfseries Solution.}  \newline
  % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
  
  \newpage
  \item {\bfseries (10 points)} $B_n =\binom{2n}{n} = \frac{(2n)!}{(n!)^2}$ \newline
  {\bfseries Solution.} \newline
  % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
  
  \newpage  
  \end{enumerate} 


   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item {\bfseries Understanding Joint Distribution}{\bfseries (15 points)}
  Recall that in the lectures we considered the joint distribution $(\T,\B)$ over the sample space $\{4,5,\dotsc,10\}\times\{\pred T,\pred F\}$, where $\T$ represents the time I wake up in the morning, and $\B$ represents whether I have breakfast or not. 
  The following table summarizes the joint probability distribution.
  (Note that this table may not be the same as the one you saw in lecture.)%
  \begin{table}[h]
  \begin{center}\footnotesize 
  \begin{tabular}{|c|c|c|}\hline 
  $t$ & $b$ & \probX{\T=t,\B=b} \\\hline
  4 & \pred T & 0.03 \\\hline
  4 & \pred F & 0.06 \\\hline 
  5 & \pred T & 0.05 \\\hline
  5 & \pred F & 0.05 \\\hline 
  6 & \pred T & 0.08 \\\hline
  6 & \pred F & 0.04 \\\hline 
  7 & \pred T & 0.14 \\\hline
  7 & \pred F & 0.03 \\\hline 
  8 & \pred T & 0.13 \\\hline
  8 & \pred F & 0.12 \\\hline 
  9 & \pred T & 0.06 \\\hline
  9 & \pred F & 0.10 \\\hline 
  10 & \pred T & 0.02 \\\hline
  10 & \pred F & 0.09 \\\hline 
  \end{tabular} 
  \end{center}
  \end{table}
  
  Calculate the following probabilities.
  \begin{enumerate}
  \item {\bfseries (5 points)} Calculate the probability that I wake up at 8 a.m. or earlier, but do not have breakfast. 
    That is, calculate $\probX{\T\leq 8, \B= \pred F}$,   \newline
  {\bfseries Solution.}  \newline
  % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
  
  \newpage
  \item {\bfseries (5 points)} Calculate the probability that I wake up at 8 a.m. or earlier. That is, calculate $\probX{\T\leq 8}$,    \newline
  {\bfseries Solution.}  \newline
  % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
  
  \newpage
  \item {\bfseries (5 points)} Calculate the probability that I skip breakfast conditioned on the fact that I woke up at 8 a.m. or earlier. 
    That is, compute $\probX{\B=\pred F ~|~ \T\leq 8}$.   \newline
  {\bfseries Solution.}  \newline
  % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
  
  \newpage
  \end{enumerate} 
  
  
  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \item {\bfseries Random Walk}{\bfseries (20 points).}
  There is a frog sitting at the origin $(0,0)$ in the first quadrant of a two-dimensional Cartesian plane. The frog first jumps uniformly at random along the X-axis to some point $(\X,0)$, where $\X\in \{1,2,3,4,5,6\}$. 
  Then, it jumps uniformly at random along the Y-axis to some point $(\X,\Y)$, where $\Y \in \{1,2,3,4,5,6\}$. 
  So $(\X,\Y)$ represents the final position of the frog after these two jumps. 
  Note that $\X$ and $\Y$ are two independent random variables that are uniformly distributed over their respective sample spaces. 
  \begin{enumerate}
      \item {\bfseries (5 points)} What is the probability that the frog jumps 5 or more units along the Y-axis. That is, compute $\probX{\Y \geq 5}$.
      \newline
      {\bfseries Solution.} \newline
      % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
      
      \newpage
      \item {\bfseries (5 points)} What is the probability that the Euclidean distance of the final position of the frog from the origin is at least $7$. That is compute $\probX{\sqrt{\X^2+\Y^2} \geq 7}$?
      \newline
      {\bfseries Solution.} \newline
      % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
      
      \newpage
       \item {\bfseries (10 points)} What is the probability that the frog has jumped at least $5$ units along X-axis conditioned on the fact that the distance of the final position of the frog from the origin is at least 7?
       That is, compute $\probX{\X\geq 5 ~\vert~ \sqrt{\X^2+\Y^2 }\geq 7}$?
       \newline
       {\bfseries Solution.} \newline
       % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
       
  \end{enumerate}
  \newpage  
  
  
  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \item {\bfseries Coin Tossing Word Problem}{\bfseries (15 points).}
  We have three (independent) coins represented by random variables $\C_1,\C_2,$ and $\C_3$.
  \begin{enumerate}[label=(\roman*)]
      \item The first coin has $\probX{\C_1=H}=\frac12,
      \probX{\C_1=T}=\frac12$, 
      \item The second coin has $\probX{\C_2=H}=\frac34$ and $\probX{\C_2=T}=\frac14$, and
      \item The third coin has $\probX{\C_3=H}=\frac14$ and $\probX{\C_3=T}=\frac34$. 
  \end{enumerate}
  
  Consider the following experiment. 
  \begin{enumerate}[label=(\Alph*)]
      \item Toss the first coin. Let the outcome of the first coin-toss be $\omega_1$. 
      \item If $\omega_1=H$, then we toss the first coin once again and then toss the third coin once. 
        Otherwise, (i.e., if $\omega_1=T$) toss the second coin once and then toss the third coin once. 
        Let the two outcomes of this step be represented by $\omega_2$ and $\omega_3$. 
      \item Output $(\omega_1,\omega_2,\omega_3)$.
  \end{enumerate}
  Based on this experiment, compute the probabilities below. 

\begin{enumerate}
    \item {\bfseries (5 points)} 
  In the experiment mentioned above, what is the probability that a majority of the three outcomes $(\omega_1,\omega_2,\omega_3)$ are $H$ (head)?
  \newline
      {\bfseries Solution.} \newline 
      % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
      
      \newpage
    \item {\bfseries (10 points)} In the experiment mentioned above, what is the probability that a majority of the three outcomes are $H$, conditioned on the fact that the first outcome was $T$?
    \newline
      {\bfseries Solution.} \newline
      % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
      
      \newpage
  \end{enumerate}
  
  
  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item{\bfseries (10 points)}
Use the fact that $\exp(-x) \approx 1-x$ (when $x$ is small) to show 
$$ \left(1-\frac{1}{n} \right) \left(1-\frac{2}{n} \right) \ldots  \left(1-\frac{t-1}{n} \right) \approx \left(1-\frac{(t-1)t}{2n} \right)$$
when $t^2/n$ is small. 

  ({\footnotesize {\em Remark}: You shall see the usefulness of this estimation in the topic ``Birthday Bound'' that we shall cover in the forthcoming lectures.})\\\newline
  {\bfseries Solution.} \newline
  % \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
  
\end{enumerate}
\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PLEASE LIST COLLABORATORS BELOW  %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\bfseries Collaborators:} \newline 
% ENTER THEIR NAMES HERE  


\end{document}
