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

\usepackage{fancyhdr}   
\pagestyle{fancy}      
\lhead{CS 355, SPRING 2020}               
\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 Trapezoid Rule.} 
  In the lecture, we saw that if $f$ is a concave upwards function then the following is true. 
    $$\frac{f(x-1)+f(x)}{2} \geq \int_{x-1}^xf(t)\dif t$$
    
  \begin{enumerate}
  \item {\bfseries (5 points)} Prove that if $f$ is a concave downwards function, we have
  $$\frac{f(x-1)+f(x)}{2} \leq \int_{x-1}^xf(t)\dif t$$
  \newline
  {\bfseries Solution.}
  \newpage
  \item {\bfseries (10 points)} Prove that, for a concave downwards function $f$, we have
    $$f(1) + f(2) + \dotsi + f(n) \leq \frac{f(1) + f(n)}2 + \int_{1}^nf(t)\dif t$$  \newline
    {\bfseries Solution.}  \newline
    \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE 
    \newpage
  \end{enumerate}
  







%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% 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$,   \newline
  {\bfseries Solution.}  \newline
   \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
   \newpage
  \item {\bfseries (10 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.}
  Recall that in the lectures we considered the joint distribution $(\T,\B)$ over the sample space $\{1,2,\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.%
  \begin{table}[h]
  \begin{center}\footnotesize 
  \begin{tabular}{|c|c|c|}\hline 
  $t$ & $b$ & \probX{\T=t,\B=b} \\\hline
  4 & \pred T & 0.05 \\\hline
  4 & \pred F & 0.04 \\\hline 
  5 & \pred T & 0 \\\hline
  5 & \pred F & 0.01 \\\hline 
  6 & \pred T & 0.1 \\\hline
  6 & \pred F & 0.25 \\\hline 
  7 & \pred T & 0.20 \\\hline
  7 & \pred F & 0.10 \\\hline 
  8 & \pred T & 0.10 \\\hline
  8 & \pred F & 0.03 \\\hline 
  9 & \pred T & 0.05 \\\hline
  9 & \pred F & 0.05 \\\hline 
  10 & \pred T & 0 \\\hline
  10 & \pred F & 0.02 \\\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 6 a.m. or earlier, but do not have breakfast. 
    That is, calculate $\probX{\T\leq 6, \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 6 a.m. or earlier. That is, calculate $\probX{\T\leq 6}$,    \newline
  {\bfseries Solution.}  \newline
  \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
  \vspace{0.5\textheight}
  \item {\bfseries (5 points)} Calculate the probability that I skip breakfast conditioned on the fact that I woke up at 6 a.m. or earlier. 
    That is, compute $\probX{\B=\pred F ~|~ \T\leq 6}$.   \newline
  {\bfseries Solution.}  \newline
  \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
  \newpage
  \end{enumerate} 
  
  \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\}$. 
  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 more than 4 units along the Y-axis. That is, compute $\probX{\Y > 4}$. 
      \newline
      {\bfseries Solution.}
      \vspace{0.5\textheight}
      \item {\bfseries (10 points)} What is the probability that the final position of the frog is above the line $X+Y=6$. That is compute $\probX{\X+\Y >6}$?
      \newline
      {\bfseries Solution.}
      \vspace{0.5\textheight}
       \item {\bfseries (10 points)} What is the probability that the frog has jumped $2$ units along X-axis conditioned on the fact that its final position is above the line $X+Y=6$?
       That is, compute $\probX{\X=2 ~|~ \X+\Y >6}$?
  \end{enumerate}
  \newpage
  \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}=\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 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)?
  \newline
      {\bfseries Solution.}
      \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$?
    \newline
      {\bfseries Solution.}
      \vspace{0.5\textheight}
      
    \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?
   \newline
      {\bfseries Solution.}
  
  
  \end{enumerate}


\end{enumerate}









\end{document}
