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

\usepackage{fancyhdr}   
\pagestyle{fancy}      
\lhead{CS 355, FALL 2018}               
\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 Tightly Estimating Summations.} 
  Use integration to tightly estimate the following expressions.
  \begin{enumerate}
  \item {\bfseries (15 points)} $S_n = \sum_{i=1}^n \frac1i$,   \newline
  {\bfseries Solution.}  \newline
   \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
   \newpage
  \item {\bfseries (15 points)} $S_n = \sum_{i=1}^n \ln i$,  \newline
  {\bfseries Solution.}  \newline
   \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
   \newpage
  \item {\bfseries (15 points)} $S_n = n!$ \newline
  {\footnotesize (Remark: Recall that $n! = \prod_{i=1}^n i$) }\newline
  {\bfseries Solution.} \newline 
   \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
  \newpage  
  \end{enumerate} 
  


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

\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 (20 points)} Prove that, for a concave upwards function $f$, we have
    $$f(1) + f(2) + \dotsi + f(n) \geq \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
  \item {\bfseries (10 points)} Use this result to lower-bound the sum 
    $$S_n = \sum_{i=0}^{n-1} a^i,$$
    where $a$ is a positive real number.   \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)$, 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.03 \\\hline
  4 & \pred F & 0 \\\hline 
  5 & \pred T & 0.02 \\\hline
  5 & \pred F & 0 \\\hline 
  6 & \pred T & 0.30 \\\hline
  6 & \pred F & 0.05 \\\hline 
  7 & \pred T & 0.20 \\\hline
  7 & \pred F & 0.10 \\\hline 
  8 & \pred T & 0.10 \\\hline
  8 & \pred F & 0.08 \\\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 (10 points)} $\probX{\T\leq 7, \B=T}$,   \newline
  {\bfseries Solution.}  \newline
  \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
  \newpage
  \item {\bfseries (10 points)} $\probX{\T\leq 7}$, and   \newline
  {\bfseries Solution.}  \newline
  \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE  
  \newpage
  \item {\bfseries (10 points)} $\probX{\B=\pred T ~|~ \T\leq 7}$.   \newline
  {\bfseries Solution.}  \newline
  \   %%% <-- ERASE THIS LINE AND WRITE YOUR SOLUTION HERE
  \end{enumerate} 
  
  
   
  
  
  


\end{enumerate}









\end{document}
