\chapter{Results}
\label{ch:results}

\section{Comparing Classical MC and Important-Sampling}

\subsection{Plots of Convergence}

\textbf{Implement the classical and the important-sampling estimators in Matlab. Compare
the two estimators on the basis of: (a) computation time and (b) accuracy
of estimation. In other words, take a sample size, say n = 10000, and study the
computation time and the accuracy of the two estimators for that value of n.
Choose a = 6 and $\lambda$ = 1 for this study.}

\begin{flushleft}
\begin{figure}[htb]
\includegraphics[scale=0.5]{plot1_1.png} 
\caption{Convergence of Classical MC for a=6 and $\lambda$ = 1}
\end{figure}
\end{flushleft}


\begin{flushleft}
\begin{figure}[htb]
\includegraphics[scale=0.5]{plot1_2.png} 
\caption{Convergence of Tilted Density for a=6 $\lambda$ = 1}
\end{figure}
\end{flushleft}

\subsection{Computation Times}
\begin{tabular}{l|l}
\hline
Classical MC & 0.566971 seconds
\\
\hline
Important-sampling of tilted &    0.530406 seconds
\\
\hline
\end{tabular}


\subsection{Accuarcy and Consistency}
\begin{tabular}{|l|l|}
\hline
True Estimates & 0.0025
\\
\hline
\\
Classical MC & 0.0033
\\\hline
\\
Important-sampling of tilted & 0.0025
\end{tabular}





\subsection{Conclusion}

Analyzing the graphs, the classical MC approach took longer to converage. Also, in comparasion with computation time, the important-sampling titled was faster then the classical estimator.   In accuarcy the important-sampling titled estimate was more accuate (closer to true value) and more consistent then the classical MC approach.

%============================================================================
\newpage
\section{Comparation for different values of $a$ and $\lambda = 1$}


\textbf{Plot the convergence of $\hat{\theta_n}$ and $\tilde{\theta_n}$ versus $n$ for the following values of $a$ = 2, 4, 6,and 8, with $\lambda = 1$. Plot them in the separate plots and clearly label your plots. Show your final estimates for these cases in a table.}

\subsection{$a$ = 2 and $\lambda = 1$}


\begin{figure}[htb]
\centering
\includegraphics[scale=0.5]{plot2_1.png} 
\caption{Convergence of Classical MC for a=2 and $\lambda$ = 1}
\end{figure}




\begin{figure}[htb]
\centering
\includegraphics[scale=0.5]{plot2_2.png} 
\caption{Convergence of Tilted Density for a=2 $\lambda$ = 1}
\end{figure}





%========================================================
\newpage
\subsection{$a$ = 4 and $\lambda = 1$}


\begin{figure}[htb]
\centering
\includegraphics[scale=0.5]{plot4_1.png} 
\caption{Convergence of Classical MC for a=4 and $\lambda$ = 1}
\end{figure}




\begin{figure}[htb]
\centering
\includegraphics[scale=0.5]{plot4_2.png} 
\caption{Convergence of Tilted Density for a=4 $\lambda$ = 1}
\end{figure}





%===================================================
\newpage
\subsection{$a$ = 6 and $\lambda = 1$}


\begin{figure}[htb]
\centering
\includegraphics[scale=0.5]{plot6_1.png} 
\caption{Convergence of Classical MC for a=6 and $\lambda$ = 1}
\end{figure}




\begin{figure}[htb]
\centering
\includegraphics[scale=0.5]{plot6_2.png} 
\caption{Convergence of Tilted Density for a=6 $\lambda$ = 1}
\end{figure}




%=================================================================================
\newpage
\subsection{$a$ = 8 and $\lambda = 1$}


\begin{figure}[htb]
\centering
\includegraphics[scale=0.5]{plot8_1.png} 
\caption{Convergence of Classical MC for a=8 and $\lambda$ = 1}
\end{figure}




\begin{figure}[htb]
\centering
\includegraphics[scale=0.5]{plot8_2.png} 
\caption{Convergence of Tilted Density for a=8 $\lambda$ = 1}
\end{figure}



%====================================================================================
\newpage
\subsection{Table of Estimates}

\begin{tabular}{|c|c|c|c|c|c|}
\hline
a & $\hat{\theta_n}$ & $\tilde{\theta_n}$ & True value & Comutational time   $\hat{\theta_n}$ & Comutational time  $\tilde{\theta_n}$
\\
2 &  0.1377 & 0.1328 & 0.1353 & 0.568419 seconds. & 0.530554 seconds.
\\
4 & 0.0181 & 0.0185 & 0.0183 & 0.478063 seconds. &  0.467150 seconds.
\\
6 & 0.0024 & 0.0025 & 0.0025 & 0.566394 seconds. & 0.443624 seconds.
\\
8 & 4.0000e-004 & 3.4270e-004 & 3.34e-004& 0.553530 seconds. & 0.499536 seconds.
\\
\end{tabular}

