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

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

\begin{document}

\title{Homework 1}

\date{}

\maketitle 

\thispagestyle{fancy}  
\pagestyle{fancy}      

\begin{enumerate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries Estimating logarithm function.} 
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)} 
    Prove that $\ln(1-x) \leq - x - \frac{x^2}2.$
    
    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    \newpage
    
    \item {\bfseries (5 points)} 
    For $x\in[0,1/2]$, prove that 
        $$\ln(1-x) \geq  -x-x^2.$$
        
    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    \end{enumerate}
\newpage 




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries Tight Estimations}
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.$ 
    
    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
    \newpage
    
    \item {\bfseries (5 points)} 
    $A_n = n!.$
    
    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
    \newpage
    
    \item {\bfseries (10 points)} 
    $B_n =\binom{2n}{n} = \frac{(2n)!}{(n!)^2}.$ 
    
    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    \end{enumerate} 
\newpage





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries Understanding Joint Distribution.}
 Recall that in the lectures we considered the joint distribution $(\T,\B)$ over the sample space $\{4,5,\dotsc,11\}\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.%
    \begin{table}[h]
    \begin{center}\footnotesize 
    \begin{tabular}{|c|c|c|}\hline 
    $t$ & $b$ & \probX{\T=t,\B=b} \\\hline
      4 & \pred T & 0.04 \\\hline
      4 & \pred F & 0.02 \\\hline 
      5 & \pred T & 0.03 \\\hline
      5 & \pred F & 0.01 \\\hline 
      6 & \pred T & 0.20 \\\hline
      6 & \pred F & 0.10 \\\hline 
      7 & \pred T & 0.30 \\\hline
      7 & \pred F & 0.05 \\\hline 
      8 & \pred T & 0.15 \\\hline
      8 & \pred F & 0 \\\hline 
      9 & \pred T & 0.04 \\\hline
      9 & \pred F & 0.04 \\\hline 
      10 & \pred T & 0 \\\hline
      10 & \pred F & 0.01 \\\hline 
      11 & \pred T & 0 \\\hline
      11 & \pred F & 0.01 \\\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 9 a.m. or earlier, but do not have breakfast. 
    That is, calculate $\probX{\T\leq 9, \B= \pred F}.$
    
    {\bfseries Solution.} 
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
    
    \newpage
    
    \item {\bfseries (5 points)} 
    Calculate the probability that I wake up at 9 a.m. or earlier. That is, calculate $\probX{\T\leq 9}.$
    
    {\bfseries Solution.}   
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
    
    \vspace{0.5\textheight} %%% <-- ERASE THIS LINE
    
    \item {\bfseries (5 points)} Calculate the probability that I skip breakfast conditioned on the fact that I woke up at 9 a.m. or earlier. 
    That is, compute $\probX{\B=\pred F ~|~ \T\leq 9}.$ 
  
    {\bfseries Solution.}   
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
    \end{enumerate}
\newpage
    
    
    
    
    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries Random Walk.}
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,7,8\}$. 
Then, it jumps uniformly at random along the Y-axis to some point $(\X,\Y)$, where $\Y \in \{1,2,3,4,5\}$. 
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 more than 3 units along the Y-axis. That is, compute $\probX{\Y > 3}.$
    
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
    \vspace{0.3\textheight} %%% <-- ERASE THIS LINE
      
    \item {\bfseries (5 points)} 
    What is the probability that the final position of the frog is within the circle $X^2 + Y^2 = 9?$
    That is, compute $\probX{\X^2+\Y^2 \leq 9}.$
    
    
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
    \newpage
    
    \item {\bfseries (5 points)} 
    What is the probability that the frog has jumped $2$ units along X-axis conditioned on the fact that its final position is outside the circle $X^2 + Y^2 = 9?$
    That is, compute $\probX{\X=2 \vert \X^2+\Y^2 >9}.$
    
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
  \end{enumerate}
\newpage






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries Coin Tossing Word Problem.}
 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}=\frac27,\probX{\C_1=T}=\frac57$, 
    
    \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}=\frac25$ and $\probX{\C_3=T}=\frac35$. 
    \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 second coin twice. 
    Otherwise, (i.e., if $\omega_1=T$) toss the third coin twice. 
    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)?

    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
    \newpage
      
    \item {\bfseries (5 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$?
    
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
    \vspace{0.35\textheight} %%% <-- ERASE THIS LINE
      
    \item {\bfseries (5 points)} 
    In the experiment mentioned above, what is the probability that a majority of the three outcomes are different from the first outcome?
   
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    \end{enumerate}
\newpage




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries An Useful Estimate.}

For an integers $n$ and $t$ satisfying $0\leq t\leq n/2,$ define 
  $$ P_n(t) = \left(1-\frac1n\right)\left(1-\frac2n\right)\dotsi\left(1-\frac{t}n\right) $$
We will estimate the above expression.
({\footnotesize {\em Remark}: You shall see the usefulness of this estimation in the topic ``Birthday Paradox'' that we shall cover in the forthcoming lectures.})

    \begin{enumerate}
    \item {\bfseries (10 points)}
    Show that 
        $$ \exp\left(-\frac{t^2}{2n} - \frac{t}{2n} - \frac{\Theta\left(t^3\right)}{6n^2}\right) 
        \geq P_n(t) \geq 
        \exp\left(-\frac{t^2}{2n} - \frac{t}{2n} -\frac{\Theta\left(t^3\right)}{3n^2}\right).$$
        
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
    \newpage
    
    \item {\bfseries (5 points)}
    When $t=\sqrt{2cn},$ where $c$ is a positive constant, the expression above is
      $$ P_n(t) = \exp\left(-c - \Theta\left(1/\sqrt n\right)\right)$$
    
    {\bfseries Solution.}
    
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
    \end{enumerate}
\newpage





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% PROBLEM 7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries Jensen's Inequality Proof.(15 points)} 
In this problem, our objective is to prove the Jensen's inequality using the Lagrange form of the Taylor's Remainder Theorem. 
These theorems are presented below. 

\begin{boxedminipage}{\linewidth}
\begin{definition}[Convex Functions]
    A twice-differentiable function $g\colon {\mathbb R} \to {\mathbb R}$ is convex if (and only if) $g''(x)\geq 0$ for all $x\in{\mathbb R}.$
\end{definition}

\begin{theorem}[Jensen's Inequality]
    Let $g\colon {\mathbb R} \to {\mathbb R}$ be a convex function.
    Then, for any $p\in[0,1]$ and $q=1-p$, the following inequality holds:
        $$ g(px + qy) \leq p\cdot g(x) + q\cdot g(y). $$
\end{theorem}
\end{boxedminipage} 


\begin{boxedminipage}{\linewidth} 
Let $f^{(i)}$ be the $i$-th derivative of the function $f\colon \bbR\to\bbR.$

\begin{theorem} [Lagrange form of the Taylor's Remainder Theorem]
    For any $k\in\bbN$ and $(k+1)$-differentiable function $f$ the following result holds. 
    For every $a, \epsilon {\in \mathbb{R}},$ there exists $\theta \in (0, 1)$ such that 
        $$ f(a + \epsilon) = \left( f(a) + f^{(1)}(a) \frac{\epsilon}{1!} + f^{(2)}(a) \frac{\epsilon^2}{2!} + \dotsc + f^{(k)}(a) \frac{\epsilon^k}{k!}\right) + f^{(k+1)}(a + \theta \epsilon) \frac{\epsilon^{k+1}}{(k+1)!} $$
    where the term $R = f^{(k+1)}(a + \theta \epsilon) \frac{\epsilon^{k+1}}{(k+1)!}$ is the Lagrange Remainder.
\end{theorem}
\end{boxedminipage} 

{\bfseries Solution.}
    
\   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
\newpage





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% Bonus %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item {\bfseries Bonus Problem: Generalized Jensen's Inequality [Probability].(0 points)} 
In the context of probability theory, Jensen's Inequality is typically stated in the following form in terms of the expected value. 
\begin{theorem}[Jensen's Inequality]
    Let  $\rvX$ be a real-valued random variable. 
    Let $f$ be a convex function. 
    Suppose $f\left( \mathbb{E}[\rvX] \right)$ and $\mathbb{E}[f(\rvX)]$ are both finite. 
    Then
        $$ f\left( \mathbb{E}[\rvX] \right) \leq \mathbb{E}[f(\rvX)].$$
\end{theorem}

{\bfseries Solution.}
    
\   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
    
\newpage

\end{enumerate}
\end{document}
