\documentclass[a4paper]{article}

\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{url}
\usepackage{stackengine}
\usepackage [english]{babel}
\usepackage [autostyle, english = american]{csquotes}
\usepackage{courier}
\usepackage{listings}
\usepackage{minted}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{float}

\lstset{
  basicstyle=\footnotesize\ttfamily,
  frame=single,
  numbers=left,
  captionpos=b
}

\begin{document}

\title{AI Assessed Exercise}

\author{Ross Meikleham 1107023m}

\maketitle

\section{Chapter 1 - Design}

\begin{itemize}
\item \textbf{Performance} \- A metric used to tell how "well" the intelligent agent
is performing, it can also be described as a criteria for success.
\item \textbf{Environment} \- An environment can be through of as a state in which
the agent can percieve data from as well as changing its state by acting upon it.
An environment may be static, or change over time (dynamic), An environment can contain other agents (Multiagent environment).
An environment also limits the circumstances the agent can deal with.
\item \textbf{Sensors} \- How the intelligent agent percieves its environment
\item \textbf{Actuators} \- Actuators let the intelligent agent act on its environment.
\end{itemize}

In the laboratory experiment the PEAS terms are:
\begin{itemize}
\item \textbf{Performance} \- Average loss when predicting the class the data belongs to must
be below a certain percentage.
\item \textbf{Environment} \- Audio samples
\item \textbf{Sensors} \- Reading short term energy and magnitude signals, as well as
zero crossing rate from the audio data.
\item \textbf{Actuators} \-  Generates discriminant functions to be able
to predict whether the audio contains voice, or is silent.
\end{itemize}

\section{Chapter 2 - Theory}

\subsection{Extracting Short Term Signals} \label{sec:extract}

The properties of a signal are stable in the short-term but change, so we need
to use a sliding window that spans the entire signal at regular intervals of time.
In this exercise we use a rectangular window. The samples inside a rectangular window
have the value 1, and samples outside the window have the value 0.

A rectangular window is defined as follows:

\begin{equation}
w[n] =
    \begin{cases}
        1, & 0 \leq n \leq N-1\\
        0, & \text{otherwise}
    \end{cases}
\end{equation}

\subsubsection{Extracting Energy} \label{sec:energy}

The equation for calcuating the energy is as follows:
\begin{equation}
 E[n] = \sum_{k=-\infty}^{\infty}\frac{(s[k])^2}{N}.w[n-k]
\end{equation}

However, since we're using a rectangular window; we know that $w[n]$ is 0 for k values in which $n - k$
is outside of the window, and as a result the equation at these k values will always result in 0.
So we can restrict the sum over the values in which $n - k$ is inside the window.

From this we can extract the energy with the rectangular window using the following
equation:

\begin{equation}
 E[n] = \sum_{k=n-N+1}^{n}\frac{(s[k])^2}{N}.w[n-k]
\end{equation}

\begin{figure}[H]
\begin{center}
\includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{images/energy.png}
\caption{Plot of Energy on a 300ms sample}
\end{center}
\end{figure}

\subsubsection{Extracting Magnitude}

The equation for calculating the magnitude is as follows:

\begin{equation}
 E[n] = \sum_{k=-\infty}^{\infty}\frac{|s[k]|}{N}.w[n-k]
\end{equation}

Using the same reasoning as in section \ref{sec:energy} we can extract the
magnitude with the rectangular window using the following equation:

\begin{equation}
 E[n] = \sum_{k=n-N+1}^{n}\frac{|s[k]|}{N}.w[n-k]
\end{equation}

\begin{figure}[H]
\begin{center}
\includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{images/magnitude.png}
\caption{Plot of Magnitude on a 300ms sample}
\end{center}
\end{figure}

\subsubsection{Extracting Zero Crossing Rate}

The Zero Crossing Rate provides the rate at which a signal changes from
positive to negative, or vice-versa.

The equation for calculating the Zero-Crossing Rate(ZCR) is as follows:

\begin{equation}
 E[n] = \frac{1}{2N}\sum_{k=-\infty}^{\infty}|sign(s[k] - sign(s[k-1]])|.w[n-k]
\end{equation}

where
\begin{equation}
sign[n] =
    \begin{cases}
        -1, & n  < 0\\
         1, & n  > 0\\
         0, & n  = 0
    \end{cases}
\end{equation}

Using the same reasoning as in section \ref{sec:energy} we can extract the
ZCR with the rectangular window using the following equation:

\begin{equation}
 E[n] = \frac{1}{2N}\sum_{k=n-K+1}^{N}|sign(s[k] - sign(s[k-1]])|.w[n-k]
\end{equation}

\begin{figure}[H]
\begin{center}
\includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{images/zcr.png}
\caption{Plot of ZCR on a 300ms sample}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{images/signals.png}
\caption{Energy, Magnitude, ZCR, all plotted at once }
\end{center}
\end{figure}

\subsection{Decisions}

The exercise is a binary classification problem in that we need to determine
if a given sample contains speech or not. The classification property is the
presence of speech.

$R(B_i,\vec x)$ is called Bayes Risk, where in this case

\begin{equation}
R(B_1|\vec x) = \pi(B_1|C_1)p(C_1|\vec x) + \pi(B_1|C_2)p(C_2|\vec x)
\end{equation}

\begin{equation}
R(B_2|\vec x) = \pi(B_2|C_1)p(C_1|\vec x) + \pi(B_2|C_2)p(C_2|\vec x)
\end{equation}

where $B_i$ is the correct action for decision $C_i$.
$\vec x$ is a set of features.

We can manipulate the Risk equations above to get the following:

\begin{equation}
\frac{p(\vec x|C_1)}{p(\vec x|C_2)} > \frac{\pi(B_1|C_2) - \pi(B_2|C_2)}{\pi(B_2|C_1) - \pi(B_1|C_1)}.\frac{p(C_2)}{p(C_1)}
\end{equation}

If the likelihood ratio is larger than the expression on the right hand side, the decision made is $B_1$ otherwise
the decision made is $B_2$

We need to be able to calculate a value for the amount of loss calculated
from the prediction value compared to the actual value.

For this exercise we use a Zero-One Loss function to calculate the loss, which is defined as follows:

\begin{equation}
\pi(B_i|C_i) =
    \begin{cases}
        0, & i == j \\
        1, & i \neq j
     \end{cases}
\end{equation}

\subsection{Feature Values}

We have three feature values for each sample which we use to predict which class a sample belongs to.
\begin{itemize}
\item The logarithm of the average value of the short-term energy signal
\item The logarithm of the average value of the short-term magnitude signal
\item The average value of the Zero Crossing Rate signal
\end{itemize}

These values can be computed after using the methods described in section \ref{sec:extract}
to extract the ZCRs, short-term energy signals, and the short-term magnitude signals.

With the given set of 100 samples we then compute the feature values for each sample
and then plot them against each other; resulting in the following graphs:

\begin{figure}[H]
\begin{center}
\includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{../src/AI/Lab2/eam.png}
\label{plot1}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{../src/AI/Lab2/eac.png}
\label{plot2}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{../src/AI/Lab2/maz.png}
\label{plot3}
\end{center}
\end{figure}

\subsection{Gaussian Discriminant} \label{sec:gauss}

The following is a set of discriminant functions:
\begin{equation}
G = \lbrace \gamma_1(\vec x),...,\gamma_L(\vec x) \rbrace
\end{equation}

We select the largest $\gamma_k(\vec x)$ in G, the decision made is
then $C_k$.

For our case using a Zero-One loss function we obtain the following discriminant functions:

\begin{equation}
\log(\gamma_i(\vec x)) \simeq \log(p(\vec x|C_i)) + \log(p(C_i))
\end{equation}

The Univariate Gaussian is a probability density function

\begin{equation}
p(x) = \frac{1}{\sqrt{2 \pi \sigma}}e^{-\frac{(x - \mu)^2}{2 \sigma^2}}
\end{equation}

Where $\mu$ is the mean, and $\sigma^2$ is the variance.

We assume that the distribution of each of our features is a
guassian distribution.

We then get the following Gaussian discriminant functions:

\begin{equation}
\log(\gamma_i(\vec x)) = -\log\sqrt{2 \pi \sigma} - \frac{(x - \mu_i)^2}{2 \sigma^2_i} + \log(p(C_i))
\end{equation}

There is one problem with using a univariate gaussian discriminant in this case as we have 3 seperate
feature variables, and a univariate gaussian only operates on a single variable. We need to modify
our discriminant functions to work with this.

\begin{equation}
M_i = \lbrace \alpha_{1_i}(\vec x_i),...,\alpha_{L_i}(\vec x_i) \rbrace
\end{equation}

\begin{equation}
\begin{split}
\log(\gamma_k(\vec x))) &= \log(\alpha_{k_1}(\vec x)) + \log(\alpha_{k_2}(\vec x)) + \log(\alpha_{k_3}(\vec x))\\
 &= \log(\alpha_{k_1}(\vec x)) \alpha_{k_2}(\vec x) \alpha_{k_3}(\vec x))
\end{split}
\end{equation}

Where $M_i$ is a set of univariate gaussian distribution functions on the ith feature,
for $ 1 \leq i \leq 3$.

From this we can generate gaussian discriminant functions from a subset of our data to
predict whether a sample has speech in it or not.

\section{Chapter 3 - Experiments}

From our samples we extract the features using a window size of 15ms, then we randomly
split the data into 10 disjoint subsets, ensuring that each subset contains equal amounts
of voice samples and silence samples.

We then take one of the subsets as a test set and then
concatonate the reminaing subsets into a single training set (using 90\% of the data
as test data, and 10\% as training data). We generate our gaussian discriminant functions
on the training data using the method described in section \ref{sec:gauss}. We then
use the gaussian discriminant functions to predict which class each sample in the training
set belongs to and compute the loss using our loss function. We then average the total
loss.

We then take another subset as the training set and perform the same steps, and add the average loss
to the previous average loss.

We repeat this until all subsets have been used as the training set, and divide the total average
loss over the amount of subset to obtain the average.

With this I averaged a loss of 0.05. Which corresponds to 5\%. So the cross validation
approach was around 95\% accurate.

\newpage

\appendix

\section{Lab1 Processing Code} (Haskell)

\subsection{Lab1.hs}
\inputminted{haskell}{../src/AI/Lab1/Lab1.hs}

\subsection{Main.hs}
\inputminted{haskell}{../src/AI/Lab1/Main.hs}

\section{Lab1 Plotting Code} (Python)
\inputminted{python}{../src/AI/Lab1/plotting.py}

\section{Lab2 Processing Code (Haskell)}

\subsection{Lab2.hs}
\inputminted{haskell}{../src/AI/Lab2/Lab2.hs}

\subsection{Main.hs}
\inputminted{haskell}{../src/AI/Lab2/Main.hs}

\section{Lab2 Plotting Code (Python)}
\inputminted{python}{../src/AI/Lab2/plotting.py}

\end{document}


\documentclass{beamer}
% \usepackage[utf8]{inputenc}

\usepackage{amsmath, amsfonts, amssymb}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{physics}
\usepackage[super]{nth}

\usepackage{graphicx}
\graphicspath{{../figures/}}

\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{standalone}
\usepackage{subcaption}
\usepackage{siunitx}

\usepackage[english]{isodate}

% \usepackage{xcolor}
% \textcolor variant for math mode: \mathcolor
\makeatletter
\def\mathcolor#1#{\@mathcolor{#1}}
\def\@mathcolor#1#2#3{%
  \protect\leavevmode
  \begingroup
    \color#1{#2}#3%
  \endgroup
}
\makeatother

\newcommand{\ee}{\operatorname{e}}          % Euler's number
\newcommand{\ii}{\mathrm{i}}                % imaginary unit
\newcommand{\ad}[1]{a_{#1}^{\dagger}}       % creation operator
\newcommand*\mean[1]{\overline{#1}}         % mean

\usetheme[progressbar=frametitle]{metropolis}           % Use metropolis theme
% \usepackage{appendixnumberbeamer}
\setbeamercolor{background canvas}{bg=white}
% \usefonttheme{xefira}

\title{LASER WAKEFIELD ACCELERATION:\@ Studies using Particle in Cell Method}
\subtitle{Master Thesis}
\date{Bucharest, \today}
\author{Sebastian MICLUȚA-CÂMPEANU\\
Scientific Advisers\\
Prof.~dr.~Virgil BĂRAN \\
Conf.~dr.~Alexandru NICOLIN}

\institute{University of Bucharest}

\begin{document}
\maketitle%

%%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{Outline}
  \tableofcontents[]
\end{frame}

\section{Introduction}

%%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
  \begin{itemize}
	\item The aim of this thesis is to investigate the interaction of high power
	laser pulses with solid and gaseous targets.
    \item The fundamentals of the Particle in Cell method are detailed.
	\item A method of accelerating electrons with very intense lasers is presented.
  \end{itemize}
\end{frame}

\section{Classical Electrodynamics}

\begin{frame}{Maxwell's Equations}
	\begin{itemize}
		\item The dynamics of the electromagnetic fields are given by Maxwell's Equations
		\begin{subequations}%
		  \begin{align*}
		    \div{\vb{E}}  = \frac{\rho}{\varepsilon_0} &&
		    \div{\vb{B}}  = 0  \\
		    \curl{\vb{E}}  = - \pdv{\vb{B}}{t} &&
		    \curl{\vb{B}}  = \mu_0 \vb{j} + \frac{1}{c^2} \pdv{\vb{E}}{t}
		  \end{align*}
		\end{subequations}
		\item The dynamics of the charged particles are given by
		\begin{align*}
		  \dv{\vb{x}}{t} &= \vb{v} \\
		  \dv{\vb{v}}{t} &= \frac{q}{m} \left(\vb{E} + \vb{v}\cp\vb{B}\right)\,.
		\end{align*}
	\end{itemize}
\end{frame}

\subsection{Electron in a plane wave}

%%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{Electron in a plane wave}
	\begin{itemize}
		\begin{columns}[T, onlytextwidth]
	      \begin{column}{0.07\textwidth}

	      \end{column}
	      \begin{column}{0.3\textwidth}
			\item In a plane wave a relativistic electron has a non-trivial oscillation.
			\item In a particular frame of reference, its motion looks like an 8.
	      \end{column}
	      \begin{column}{0.7\textwidth}
	        \includegraphics[width=.95\textwidth]{fig8}
	      \end{column}
	    \end{columns}
	\end{itemize}
\end{frame}

\subsection{The Ponderomotive force}

%%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{The Ponderomotive force}
  \begin{itemize}
	\item In a spatially uniform electric field an electron would oscillate around
  	its equilibrium position (in a figure 8 pattern).
  	\item If there is a spatial gradient of the field, a ponderomotive force will
  	appear
  	\[
  	F_p = -\frac{e^2}{4m \omega^2} \grad{\vb{E}}^2
  	\]
	\end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{Laser Wakefield}
  \begin{itemize}
    \item When a high intensity laser propagates in plasma, the
	electric field pushes the electrons far away from their equilibrium
	position (via the ponderomotive force). This is known as the ``blowout phase''.
	\item This creates a high intensity field between the electrons and the
	nuclei left behind. Any charged particles trapped in this region will be accelerated.
	\item This low density bubble propagates through the plasma as the laser advances.
	\end{itemize}
\end{frame}

\section{The Particle in Cell Method}

\subsection{Particle Pusher}

\begin{frame}
	\begin{itemize}
		\item Solves the equations of motion for the electron
		\begin{subequations}
		  \begin{align*}
		    \frac{\vb{x}_{n+1}-\vb{x}_n}{\Delta t} &= \vb{v}_{n+1} \\
		    \frac{\vb{v}_{n+1/2}-\vb{v}_{n-1/2}}{\Delta t} &= \frac{q}{m}
		      \left(\vb{E}(\vb{x}_n) + \frac{\vb{v}_{n+1/2}+\vb{v}_{n-1/2}}{2} \cp \vb{B}(\vb{x}_n)\right)
		  \end{align*}
		\end{subequations}
		\item The Boris push algorithm: the motion is decomposed in the contribution from the electric
		and magnetic field.
	\end{itemize}
\end{frame}

\begin{frame}
	\begin{figure}
		\includegraphics[width=\textwidth]{Boris-rotation-3D}
	\end{figure}
\end{frame}

\begin{frame}{The Boris push}
	\begin{enumerate}
	  \item \(\vb{v}^- = \vb{v}_{n-1/2} + \frac{q \vb{E}}{m} \frac{\Delta t}{2}\)
	  \item rotate \(\vb{v}^-\) to obtain \(\vb{v}^+\) using
	  \begin{enumerate}
	    \item \(\vb{v}' = \vb{v}^- + \vb{v}^- \cp \vb{t}\), where \(\vb{t} = \frac{q \vb{B}}{m} \frac{\Delta t}{2}\)
	    \item \(\vb{v}^+ = \vb{v}^- + \vb{v}' \cp \vb{s}\), where \(\vb{s} = \frac{2 \vb{t}}{1+t^2}\)
	  \end{enumerate}
	  \item \(\vb{v}_{n+1/2} = \vb{v}^+ + \frac{q \vb{E}}{m} \frac{\Delta t}{2}\)
	\end{enumerate}
\end{frame}

\begin{frame}{Conservation properties}
	\begin{itemize}
		\item We want the algorithm to be as close as possible to
		the original continuous system in terms of symmetries and conserved
		quantities.
		\item A linear map \(A: \mathbb{R}^{2d} \to \mathbb{R}^{2d}\) is called
  		\emph{symplectic} if
		  \[
		  A^T J^{-1} A = J^{-1},\qquad \text{where} \ J = \mqty(0 & I \\ -I & 0)\,,
		  \]
		\item The Boris push algorithm is not symplectic, but it is volume preserving.
	\end{itemize}
\end{frame}

\subsection{The Field solver}

\begin{frame}{The Field solver}
	\begin{itemize}
		\item Solve Maxwell's equations using
		\begin{align*}
		  \pdv{\vb{B}}{t} & = - \curl{\vb{E}} \\
		  \pdv{\vb{E}}{t} & = c^2 \curl{\vb{B}} - \frac{1}{\varepsilon_0} \vb{j}\,.
		\end{align*}
		\item Let us consider the 1D case first
		\begin{subequations}%
			\small
		\begin{align*}
		    &\frac{B_y^{n+1/2}(k+\frac{1}{2}) - B_y^{n-1/2}(k+\frac{1}{2})}{\Delta t} =
		    - \frac{E_x^n(k+1) - E_x^n(k)}{\Delta z} \\
		    &\frac{E_x^{n+1}(k) - E_x^{n}(k)}{\Delta t} =
		    -c^2 \frac{B_y^{n+1/2}(k+\frac{1}{2}) - B_y^{n+1/2}(k-\frac{1}{2})}{\Delta z}
		    -\frac{1}{\varepsilon_0} j_x^{n+1/2}(k) \,.
		\end{align*}
		\end{subequations}
	\end{itemize}
\end{frame}

\begin{frame}
	\begin{itemize}
		\begin{columns}[T, onlytextwidth]
	      \begin{column}{0.07\textwidth}

	      \end{column}
	      \begin{column}{0.3\textwidth}
		  \item Yee's method uses a leapfrog-like algorithm for staggering in both
		  space and time.
		  \item Continuity equations for \(\vb{E}\) and \(\vb{B}\) are
		  automatically satisfied at cell boundaries.
	      \end{column}
	      \begin{column}{0.7\textwidth}
		  	\vspace{15mm}
	        \includegraphics[width=.95\textwidth]{yee}
	      \end{column}
	    \end{columns}
	\end{itemize}
\end{frame}

\begin{frame}{The 3D case}
	\begin{itemize}
		\item The magnetic field is given by
		\[
		\mathcolor{green}{\pdv{B_y}{t}} = -\mathcolor{blue}{\pdv{E_x}{z}} + \mathcolor{magenta}{\pdv{E_z}{x}}
		\]
		\item which is discretized as
		\begin{equation*}
		\small
		  \begin{aligned}
		    &\frac{\mathcolor{green}{B_y^{n+1/2}}(\mathcolor{magenta}{i+\frac{1}{2}},j,\mathcolor{blue}{k+\frac{1}{2}})
		    - \mathcolor{green}{B_y^{n-1/2}}(\mathcolor{magenta}{i+\frac{1}{2}},j,\mathcolor{blue}{k+\frac{1}{2}})}{\mathcolor{green}{\Delta t}} = \\
		    &- \frac{\mathcolor{blue}{E_x}^{\mathcolor{green}{n}}(\mathcolor{magenta}{i+\frac{1}{2}},j,\mathcolor{blue}{k+1}) -
		      \mathcolor{blue}{E_x}^{\mathcolor{green}{n}}(\mathcolor{magenta}{i+\frac{1}{2}},j,\mathcolor{blue}{k})}{\mathcolor{blue}{\Delta z}}
		    \\&+ \frac{\mathcolor{magenta}{E_z}^{\mathcolor{green}{n}}(\mathcolor{magenta}{i+1},j,\mathcolor{blue}{k+\frac{1}{2}}) -
		      \mathcolor{magenta}{E_z}^{\mathcolor{green}{n}}(\mathcolor{magenta}{i},j,\mathcolor{blue}{k+\frac{1}{2}})}{\mathcolor{magenta}{\Delta x}}
		  \end{aligned}
		\end{equation*}
		\item or
		\[
		\partial_t B_y \rvert^n_{i+\frac{1}{2},j,k+\frac{1}{2}} =
		  -\partial_z E_x \rvert^n_{i+\frac{1}{2},j,k+\frac{1}{2}}
		  +\partial_x E_z \rvert^n_{i+\frac{1}{2},j,k+\frac{1}{2}}
		\]
	\end{itemize}
\end{frame}

\begin{frame}{What about the other equations?}
	\begin{itemize}
		\item For \(\div{\vb{B}} = 0 \)
		\[
		\pdv{\div{\vb{B}}}{t} = \div{\pdv{\vb{B}}{t}} = \div{\left(-\curl{\vb{E}}\right)} = 0\,.
		\]
		\item For \(\div{\vb{E}} = \frac{\rho}{\varepsilon_0}\)
		\[
		\begin{aligned}
			\pdv{t} \left(\div{\vb{E}} - \frac{\rho}{\varepsilon_0}\right) &=
			-\frac{1}{\varepsilon_0} \left[\pdv{\rho}{t}
			-\div{\left(\frac{1}{\mu_0} \curl{\vb{B}} - \vb{j}\right)}\right]\\ &=
			-\frac{1}{\varepsilon_0} \left(\pdv{\rho}{t} + \div{\vb{j}}\right)
		\end{aligned}
		\]
	\end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{Numerical Stability}
  \begin{itemize}
    \item In order to accurately represent the physics, the temporal
		and spatial discretizations must be chosen appropriately.
		\item For the spatial discretizations, the dimension of a cell must be
		significantly smaller than the laser wavelength.
		\[
		D_{cell} \ll \lambda_L
		\]
		\item The timestep is then computed from the spatial discretizations
		automatically via the Courant condition.
		\[
		c \Delta t \leq \frac{1}{\sqrt{\frac{1}{\Delta x^2} + \frac{1}{\Delta y^2} + \frac{1}{\Delta z^2}}}
		\]
  \end{itemize}
\end{frame}

\subsection{PIC in practice}

\begin{frame}
	\begin{itemize}
		\item PIC codes require significant computational resources (HPC).
		\item The implementation must take advantage of all the available
		computing resources (MIP, SIMD, CUDA).
		\item Scalability is crucial for employing large parallel simulations.
		\item Amdahl's law
		\[
		S_A = \frac{1}{(1-p)+\frac{p}{n}}
		\qquad \text{and} \qquad
		\lim_{n\to\infty} S_A = \frac{1}{1-p}
		\]
	\end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
	\begin{figure}
		\includestandalone[width=\textwidth]{../figures/theoretical-scaling-Amdahl}%
		\caption{The speedup computed with Amdahl's law}
	\end{figure}
\end{frame}

% %%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{frame}
	\begin{figure}
		\includestandalone[width=\textwidth]{../figures/theoretical-scaling-all}%
		\caption{The theoretical speedup compared with linear axis and small number
	  of processors on the left and log-log scale with a large number of processors
	  on the right}
	\end{figure}
\end{frame}

\section{Results}

% %%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{frame}{Solid targets}
	\begin{figure}[h]
	  \centering
	  \begin{subfigure}[b]{0.475\textwidth}
	    \centering
	    \includegraphics[width=\textwidth]{i21-ek-init-e}
	    \caption{The kinetic energy of the electrons right after the pulse
	    hits the cone}%
	  \end{subfigure}
	  \hfill
	  \begin{subfigure}[b]{0.475\textwidth}
	    \centering
	    \includegraphics[width=\textwidth]{i21-ek-end-e}
	    \caption{The kinetic energy of the electrons a long time after the pulse
	    hits the cone}%
	  \end{subfigure}
	  \caption{The kinetic energy of the electrons for the
	  \(I=\SI{e21}{\watt\per\centi\metre\squared}\) laser pulse}%
	\end{figure}
\end{frame}

\begin{frame}
	\begin{figure}[h]
	  \centering
	  \begin{subfigure}[b]{0.475\textwidth}
	    \centering
	    \includegraphics[width=\textwidth]{i22-ek-init-e}
	    % \caption{The kinetic energy of the electrons right after the pulse
	    % hits the cone}%
	  \end{subfigure}
	  \hfill
	  \begin{subfigure}[b]{0.475\textwidth}
	    \centering
	    \includegraphics[width=\textwidth]{i22-ek-init-p}
	    % \caption{The kinetic energy of the protons right after the pulse
	    % hits the cone}%
	  \end{subfigure}
	  \caption{The kinetic energy of the electrons and protons for the
	  \(I=\SI{e22}{\watt\per\centi\metre\squared}\) laser pulse}%
	\end{figure}
\end{frame}

% %%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 19 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{frame}{Gaseous targets}
	\begin{figure}
		\includegraphics[width=\textwidth]{lwfa-i18-n-init-e}
	\end{figure}
\end{frame}

\begin{frame}
	\begin{figure}
		\includegraphics[width=\textwidth]{lwfa-i18-n-init1-e}
	\end{figure}
\end{frame}

\begin{frame}
	\begin{figure}
		\includegraphics[width=\textwidth]{lwfa-i18-n-mid-e}
	\end{figure}
\end{frame}

\begin{frame}
	\begin{figure}
		\includegraphics[width=\textwidth]{lwfa-i18-n-mid1-e}
	\end{figure}
\end{frame}

\begin{frame}
	\begin{figure}[h]
	  \centering
	  \includegraphics[width=\textwidth,height=0.5\textheight]{lwfa-i18-pond-f}
	  \caption{The ponderomotive force for the \(I=\SI{e18}{\watt\per\centi\metre\squared}\)
	  laser pulse}%
	\end{figure}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Conclusions}

\begin{frame}{Conclusions}
	\begin{itemize}
		\item This thesis addresses the large field of laser plasma interactions in a
		computational framework.
		\item This thesis is devoted to a class of self-consistent methods of
		solving the dynamics of electrically charged particles in strong electromagnetic
		fields.
		\item The most prominent effect observed in my numerical simulations is the
		laser wakefield acceleration visible in the case of gaseous targets subjected
		to highly intense laser pulses.
	\end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%% slide 27 %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[standout]
Thank you!
\end{frame}

\end{document}


% Instructions: you don't need to change anything in the macros, but
% feel free to define new commands as you wish. Starting from the main
% body, change the specs (e.g., your
% name). use \begin{solution} \end{solution} environment to write your
% solutions. Don't forget to list your collaborators.

\documentclass[12pt,addpoints,answers]{exam}
%============Macros==================%
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage[margin=1in]{geometry}
%--------------Cosmetic----------------%
\usepackage{mathtools}
\usepackage{hyperref}
\usepackage{fullpage}
\usepackage{microtype}
\usepackage{xspace}
\usepackage[svgnames]{xcolor}
\usepackage[sc]{mathpazo}
\usepackage{enumitem}
\setlist[enumerate]{itemsep=1pt,topsep=2pt}
\setlist[itemize]{itemsep=1pt,topsep=2pt}
%----------Header--------------------%
\def\course{CSCE629 Analysis of Algorithms}
\def\term{Texas A\&M U, Fall 2019}
\def\prof{Lecturer: Fang Song}
\newcommand{\handout}[5]{
   \renewcommand{\thepage}{\arabic{page}}
   \begin{center}
   \framebox{
      \vbox{
    \hbox to 5.78in { \hfill \large{\course} \hfill }
       \vspace{2mm}
       \hbox to 5.78in { {\Large \hfill \textbf{#5}  \hfill} }
       \vspace{2mm}
       \hbox to 5.78in { \term \hfill \emph{#2}}
       \hbox to 5.78in { {#3 \hfill \emph{#4}}}
      }
   }
   \end{center}
   \vspace*{4mm}
}
\newcommand{\hw}[4]{\handout{#1}{#2}{#3}{#4}{Homework #1}}

%-----defs and commands-----%
%\def\mG{[\textbf{G}]\xspace}
\def\veps{\varepsilon}
\newcommand{\bit}{\{0,1\}}
\newcommand{\negl}{\text{negl}}
\newcommand{\corr}[1]{{\color{blue}{#1}}}
\newcommand{\alg}[1]{\textsf{#1}}
\newcommand{\class}[1]{\text{#1}}
\newcommand{\NP}{\class{NP}}
%=======Main document==============%
\begin{document}

%----Specs: change accordingly-----%
\newif\ifstudent % comment out false
 \studenttrue
% \studentfalse

\def\hwnum{12}
\def\issuedate{11/12/19}
\def\duedate{10am, 12/02/19} %
\def\yourname{your name} % put your name here
%------------------------------%

\ifstudent
\hw{\hwnum}{\issuedate}{Student: \yourname}{Due: \duedate}%
\else
\hw{\hwnum}{\issuedate}{\prof}{Due: \duedate}%
\fi

\noindent \textbf{Instructions.}

\begin{itemize}
\item Typeset your submission by \LaTeX, and submit in PDF
  format. Your solutions will be graded on \emph{correctness} and
  \emph{clarity}. You should only submit work that you believe to be
  correct, and you will get significantly more partial credit if you
  clearly identify the gap(s) in your solution. You may opt for the
  ``I’ll take 15\%'' option.
\item You may collaborate with others on this problem set.  However,
  you must \textbf{{write up your own solutions}} and \textbf{{list
      your collaborators and any external sources}} for each
  problem. Be ready to explain your solutions orally to a course staff
  if asked.
\item For problems that require you to provide an algorithm, you must
  give a precise description of the algorithm, together with a proof
  of correctness and an analysis of its running time. You may use
  algorithms from class as subroutines. You may also use any facts
  that we proved in class or from the book.
\item \textbf{If you describe a Greedy algorithm, you will get no
    credit without a formal proof of correctness, even if your
    algorithm is correct.}
\end{itemize}

\noindent This assignment contains \numquestions\ questions,
\numpages\ pages for the total of \numpoints \ points and
\numbonuspoints\ bonus points. A random subset of the problems will be
graded. \medskip

\paragraph{Exercises. Do not turn in.}
\begin{questions}
  \question (Hat-check) Each of $n$ customers gives a hat to a
  hat-check person at a restaurant. The hat-check person gives the
  hats back to the customers in a uniformly random order. What is the
  expected number of customers who get back their own hat?  \question
  (Streaks) Suppose you flip a fair coin $n$ times. What is the
  longest streak of consecutive heads that you expect to see?
\end{questions}
\newpage
\paragraph{Problems to turn in.}

\begin{questions}
\question (Happy holidays) This time of year is here, you known,
  holidays, and everyone is facing various (joyful) challenges.
  \begin{parts}
  \part[10] For Kevin (character in movie ``Home
    Alone''), he is handed $n$ pieces of candy with weights
    $W[1,\ldots,n]$ (in ounces) that he needs to load into boxes. The
    goal is to load the candy into as many boxes as possible, so that
    each box contains at least $L$ ounces of candy. Help Kevin solve
    this by describing an efficient $2$-approximation algorithm for
    this problem. Prove that the approximation ratio of your algorithm
    is 2. [Hint: First consider the case where every piece of candy
    weighs less than $L$ ounces.]

  \part[10] For Juliet, this means that she needs to fulfill Romeo's
    wishlist - $n$ Nintendo\textsuperscript{\textregistered} Switch
    games. She happened to notice that in a personal care and beauty
    store \textsf{AROHPES}, her favorite lip balm includes a 99\%
    discount code for one of the $n$ games Romeo wants. However, the
    code is hidden at the bottom of the package, which Juliet cannot
    tell before purchasing and opening it, and the code comes in
    random so that it is equally likely to be good for any of the $n$
    games. She intends to purchase sufficient lip balms, which she
    likes and needs anyways, so she gets discount codes for all $n$
    games. How many lip balms does she need to buy \emph{in
      expectation} before getting a code for each game?

    \bonuspart[3] Continuing from Part (b), it's 7 days till
    Thanksgiving now. Due to popularity, \textsf{AROHPES} limits the
    number of this particular lip balms one can purchase in a day to
    $6$. She convinced Romeo to reduce his demand to 10 games. Can
    Juliet succeed in collecting all discount codes by Thanksgiving?
    [Hint: look up Markov's inequality]

  \end{parts}

  \newpage

\question[12] (3-Coloring) Suppose you are given a graph $G=(V,E)$, and we
  want to color each node with one of three colors, even if we aren't
  necessarily able to give different colors to every pair of adjacent
  nodes. We say an edge $(u,v)$ is satisfied if the colors assigned to
  $u$ and $v$ are different.

  Consider a coloring scheme that maximizes the number of satisfied
  edges, and let $c^*$ denote this number. Give a poly-time algorithm
  that produces a coloring that satisfies at least $\frac 2 3 c^*$
  edges. If you want to use an randomized algorithm, the
  \emph{expected} number of edges it satisfies should be at least
  $\frac 2 3 c^*$.

  \newpage

  \question (Errors in randomized algorithms) Suppose you want to
    write a computer program $C$ to compute a Boolean function
    $f: \{0, 1\}^n \to \{0, 1\}$, mapping $n$ bits to 1 bit. If $C$ is
    a deterministic algorithm, then ``$C$ successfully computes $f$''
    has a clear meaning that that $C(x) = f(x)$ for all inputs
    $x \in \bit^n$. But what if $C$ is a randomized algorithm?

  \begin{parts}
  \part[8] The best thing is if $C$ is a \emph{zero-error} algorithm with
    failure probability $p$. Namely
    \begin{itemize}
    \item on every input $x$, the output of $C(x)$ is either $f(x)$ or
      $\perp$ (denoting failure).
    \item on every input $x$ we have $\Pr[C(x) = \perp] \leq p$
      (NB. the probability is only over the internal randomness of
      $C$, not the random choice of $x$.).
    \end{itemize}

    \begin{enumerate}[label=\roman*)]
    \item If you have a zero-error algorithm $C$ for $f$ with failure
      probability $90\%$,
      show how to convert it to a zero-error algorithm $C'$ with
      failure probability at most $2^{-500}$. The ``slowdown'' should
      only be a factor of a few thousand.
    \item Alternatively, show how to convert $C$ to an algorithm $C''$
      for $f$ which: (i) always outputs the correct answer, meaning
      $C''(x) = f(x)$ for all $x$; (ii) has expected running time only
      a few powers of 2 worse than that of $C$. (Hint: look up the
      mean of a geometric random variable.)
    \end{enumerate}
  \part[5] The second best thing is if $C$ is a one-sided error algorithm
    for $f$, with failure probability $p$.  There are two kinds of
    such algorithms, ``no-false-positives'' and
    ``no-false-negatives''. For simplicity, let’s just consider ``no
    false-negatives'' (the other case is symmetric);
    \begin{itemize}
    \item on every input $x$, the output $C(x)$ is either $0$ or $1$;
    \item on every input $x$ such that $f(x) = 1$, the output $C(x)$
      is also 1;
    \item on every input $x$ such that $f(x) = 0$, we have
      $\Pr[C(x) = 1] \leq p$.
    \end{itemize}

    Show how to convert a no-false-negatives algorithm $C$ for $f$
    with failure probability $90\%$ to another no-false-negatives
    algorithm $C'$ for $f$ with failure probability at most
    $2^{-500}$. The ``slowdown'' should only be a factor of a few
    thousand.

  \part[5] The third possibility (which is rare in practice) is if $C$ is
    a two-sided error algorithm for $f$, with failure probability
    $p$. Namely,
    \begin{itemize}
  \item on every input $x$, the output $C(x)$ is either 0 or 1.
  \item on every input $x$, we have $\Pr[C(x) \neq f(x)] \leq p$.
  \end{itemize}

  If you have a two-sided error algorithm $C$ for $f$ with failure
  probability $40\%$, show how to convert it to a two-sided error
  algorithm $C'$ for $f$ with failure probability at most $2^{-500}$.
  The “slowdown” should only be a factor of a few dozen
  thousand. (Hint: look up the Chernoff bound.)
  \end{parts}

\end{questions}
\end{document}


%\documentclass[12pt]{article}
\documentclass[12pt,landscape]{article}

\usepackage[normalem]{ulem}
\include{preamble}

\newcommand{\instr}{\small Your answer will consist of a lowercase string (e.g. \texttt{aebgd}) where the order of the letters does not matter. \normalsize}

\title{Math 369 / 690 Fall \the\year{} \\ Midterm Examination Two}
\author{Professor Adam Kapelner}

\date{Thursday, November 11, \the\year{}}

\begin{document}
\maketitle

%\noindent Full Name \line(1,0){410}

\thispagestyle{empty}

\section*{Code of Academic Integrity}

\footnotesize
Since the college is an academic community, its fundamental purpose is the pursuit of knowledge. Essential to the success of this educational mission is a commitment to the principles of academic integrity. Every member of the college community is responsible for upholding the highest standards of honesty at all times. Students, as members of the community, are also responsible for adhering to the principles and spirit of the following Code of Academic Integrity.

Activities that have the effect or intention of interfering with education, pursuit of knowledge, or fair evaluation of a student's performance are prohibited. Examples of such activities include but are not limited to the following definitions:

\paragraph{Cheating} Using or attempting to use unauthorized assistance, material, or study aids in examinations or other academic work or preventing, or attempting to prevent, another from using authorized assistance, material, or study aids. Example: using an unauthorized cheat sheet in a quiz or exam, altering a graded exam and resubmitting it for a better grade, etc.
\\

\noindent By taking this exam, you acknowledge and agree to uphold this Code of Academic Integrity. \\

%\begin{center}
%\line(1,0){250} ~~~ \line(1,0){100}\\
%~~~~~~~~~~~~~~~~~~~~~signature~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date
%\end{center}

\normalsize
\vspace{-0.3cm}
\section*{Instructions}
This exam is 70 minutes (variable time per question) and closed-book. You are allowed \textbf{one} page (front and back) of a \qu{cheat sheet}, blank scrap paper and a graphing calculator. Please read the questions carefully. I recommend answering all questions that are easy first and then circling back to work on the harder ones. \ingray{Gray text} means the text is repeated verbatim from a previous problem. No food is allowed, only drinks. %If the question reads \qu{compute,} this means the solution will be a number otherwise you can leave the answer in \textit{any} widely accepted mathematical notation which could be resolved to an exact or approximate number with the use of a computer. I advise you to skip problems marked \qu{[Extra Credit]} until you have finished the other questions on the exam, then loop back and plug in all the holes. I also advise you to use pencil. The exam is 100 points total plus extra credit. Partial credit will be granted for incomplete answers on most of the questions. \fbox{Box} in your final answers. Good luck!

\pagebreak

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\problem\timedsection{10} These are conceptual questions about statistical inference and sampling.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{16}  We are interested in understanding times in milliseconds for router packet switching under heavy traffic situations on the Internet at two different sites: New York and Chicago which we will denote population 1 and 2 respectively. $n=15$ data points are recorded for New York and $n=15$ data points are recorded for Chicago. We can assume the DGP for samples from population 1 is iid and we can assume the DGP for samples from population 1 is iid and that samples between populations are independent. We also assume that both populations have their first two moments defined. Here are sample statistics: $\xbar_1 = 6.01$, $\xbar_2 = 10.50$, $s_1 = 14.54$ and $s_2 = 31.62$. We seek to prove a difference between the populations.

We first would like to prove that the population means are different. Denote the means of both populations by $\theta_1$ and $\theta_2$. We will employ $\thetahat_1 = \Xbar_1$ and $\thetahat_2 = \Xbar_2$.

\begin{enumerate}[(a)]
\item The DGP that produced sample 1 has the same DGP that produced sample 2 but with different
\item $\thetahat_1$ and $\thetahat_2$ are unbiased estimators
\item $\thetahat_1$ and $\thetahat_2$ are the method of moments estimators for $\theta_1$ and $\theta_2$ respectively
\item $\thetahat_1$ and $\thetahat_2$ are the maximum likelihood estimators for $\theta_1$ and $\theta_2$ respectively
\item $\thetahat_1$ and $\thetahat_2$ are asymptotically normal due to the central limit theorem
\item $\thetahat_1$ and $\thetahat_2$ are asymptotically normal due to the MLE monster theorem
\item It is a reasonable assumption that the variances of the DGP's for the two populations are equal

\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly normally distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is approximately normally distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly T distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is approximately T distributed
\item We have enough information to justify that the sampling distribution of $(\thetahat_1 - \thetahat_2)^2$ is exactly $\chi^2$ distributed
\item We have enough information to justify that the sampling distribution of $(\thetahat_1 - \thetahat_2)^2$ is approximately $\chi^2$ distributed
\item We have enough information to justify that the sampling distribution of $(\thetahat_1 - \thetahat_2)^2$ is exactly F distributed
\item We have enough information to justify that eth sampling distribution of $(\thetahat_1 - \thetahat_2)^2$ is approximately F distributed

\item $H_0: \theta_1 \neq \theta_2$
\end{enumerate}
\eenum\instr\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\problem\timedsection{7} These are conceptual questions about statistical inference and sampling.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{13}  \ingray{We are interested in understanding times in milliseconds for router packet switching under heavy traffic situations on the Internet at two different sites: New York and Chicago which we will denote population 1 and 2 respectively. $n=15$ data points are recorded for New York and $n=15$ data points are recorded for Chicago. We can assume the DGP for samples from population 1 is iid and we can assume the DGP for samples from population 1 is iid and that samples between populations are independent. We also assume that both populations have their first two moments defined. Here are sample statistics: $\xbar_1 = 6.01$, $\xbar_2 = 10.50$, $s_1 = 14.54$ and $s_2 = 31.62$. We seek to prove a difference between the populations.

We first would like to prove that the population means are different. Denote the means of both populations by $\theta_1$ and $\theta_2$. We will employ $\thetahat_1 = \Xbar_1$ and $\thetahat_2 = \Xbar_2$} to test $H_a: \theta_1 \neq \theta_2$. We will first assume both DGP's are normal and that $\sigma = 24.61$ Note that $F_Z(.975) = 1.96$ and $F_{T_{14}}(.975) = 2.15$.

\begin{enumerate}[(a)]
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly normally distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is approximately normally distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly T distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is approximately T distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly Fisher-Behrens distributed

\item A justified standardized test statistic is -0.4996635 rounded to the nearest 7 digits
\item A justified standardized test statistic is -0.4996494 rounded to the nearest 7 digits %%%%
\item A justified standardized test statistic is -0.7066109 rounded to the nearest 7 digits
\item A justified standardized test statistic is -0.1824462 rounded to the nearest 7 digits

\item The null is rejected at $\alpha = 5\%$
\item The null is retained at $\alpha = 5\%$

\item Fisher's $p$-value $ < \alpha = 5\%$
\item Fisher's $p$-value $ \geq \alpha = 5\%$
\end{enumerate}
\eenum\instr\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\problem\timedsection{10} These are conceptual questions about statistical inference and sampling.
%
%\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{14}  \ingray{We are interested in understanding times in milliseconds for router packet switching under heavy traffic situations on the Internet at two different sites: New York and Chicago which we will denote population 1 and 2 respectively. $n=15$ data points are recorded for New York and $n=15$ data points are recorded for Chicago. We can assume the DGP for samples from population 1 is iid and we can assume the DGP for samples from population 1 is iid and that samples between populations are independent. We also assume that both populations have their first two moments defined. Here are sample statistics: $\xbar_1 = 6.01$, $\xbar_2 = 10.50$, $s_1 = 14.54$ and $s_2 = 31.62$. We seek to prove a difference between the populations.
%
%We first would like to prove that the population means are different. Denote the means of both populations by $\theta_1$ and $\theta_2$. We will employ $\thetahat_1 = \Xbar_1$ and $\thetahat_2 = \Xbar_2$ to test $H_a: \theta_1 \neq \theta_2$. We will first assume both DGP's are normal and that} $\sigma_1 = \sigma_2$ but unknown. Note that $F_Z(.975) = 1.96$ and $F_{T_{14}}(.975) = 2.15$.
%
%\begin{enumerate}[(a)]
%\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly normally distributed
%\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is approximately normally distributed
%\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly T distributed
%\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is approximately T distributed
%\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly Fisher-Behrens distributed
%
%\item A justified standardized test statistic is -0.4996635 rounded to the nearest 7 digits
%\item A justified standardized test statistic is -0.4996494 rounded to the nearest 7 digits %%%%
%\item A justified standardized test statistic is -0.7066109 rounded to the nearest 7 digits
%\item A justified standardized test statistic is -0.1824462 rounded to the nearest 7 digits
%
%\item The null is rejected at $\alpha = 5\%$
%\item The null is retained at $\alpha = 5\%$
%
%\item Fisher's $p$-value $ < \alpha = 5\%$
%\item Fisher's $p$-value $ \geq \alpha = 5\%$
%\end{enumerate}
%\eenum\instr\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\problem\timedsection{5} These are conceptual questions about statistical inference and sampling.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{13}  \ingray{We are interested in understanding times in milliseconds for router packet switching under heavy traffic situations on the Internet at two different sites: New York and Chicago which we will denote population 1 and 2 respectively. $n=15$ data points are recorded for New York and $n=15$ data points are recorded for Chicago. We can assume the DGP for samples from population 1 is iid and we can assume the DGP for samples from population 1 is iid and that samples between populations are independent. We also assume that both populations have their first two moments defined. Here are sample statistics: $\xbar_1 = 6.01$, $\xbar_2 = 10.50$, $s_1 = 14.54$ and $s_2 = 31.62$. We seek to prove a difference between the populations.

We first would like to prove that the population means are different. Denote the means of both populations by $\theta_1$ and $\theta_2$. We will employ $\thetahat_1 = \Xbar_1$ and $\thetahat_2 = \Xbar_2$ to test $H_a: \theta_1 \neq \theta_2$. We will first assume both DGP's are normal and that} $\sigma_1 \neq \sigma_2$ and both values are unknown. Note that $F_Z(.975) = 1.96$ and $F_{T_{14}}(.975) = 2.15$.

\begin{enumerate}[(a)]
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly normally distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is approximately normally distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly T distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is approximately T distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly Fisher-Behrens distributed

\item A justified standardized test statistic is -0.4996635 rounded to the nearest 7 digits %%%%
\item A justified standardized test statistic is -0.4996494 rounded to the nearest 7 digits
\item A justified standardized test statistic is -0.7066109 rounded to the nearest 7 digits
\item A justified standardized test statistic is -0.1824462 rounded to the nearest 7 digits

\item The null is rejected at $\alpha = 5\%$
\item The null is retained at $\alpha = 5\%$

\item Fisher's $p$-value $ < \alpha = 5\%$
\item Fisher's $p$-value $ \geq \alpha = 5\%$
\end{enumerate}
\eenum\instr\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\problem\timedsection{5} These are conceptual questions about statistical inference and sampling.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{12}  \ingray{We are interested in understanding times in milliseconds for router packet switching under heavy traffic situations on the Internet at two different sites: New York and Chicago which we will denote population 1 and 2 respectively. $n=15$ data points are recorded for New York and $n=15$ data points are recorded for Chicago. We can assume the DGP for samples from population 1 is iid and we can assume the DGP for samples from population 1 is iid and that samples between populations are independent. We also assume that both populations have their first two moments defined. Here are sample statistics: $\xbar_1 = 6.01$, $\xbar_2 = 10.50$, $s_1 = 14.54$ and $s_2 = 31.62$. We seek to prove a difference between the populations.

We first would like to prove that the population means are different. Denote the means of both populations by $\theta_1$ and $\theta_2$. We will employ $\thetahat_1 = \Xbar_1$ and $\thetahat_2 = \Xbar_2$ to test $H_a: \theta_1 \neq \theta_2$. \sout{We will first assume both DGP's are normal.}} We have reason to suspect these distributions are very non-normal and extreme-tailed. Note that $F_Z(.975) = 1.96$ and $F_{T_{14}}(.975) = 2.15$.

\begin{enumerate}[(a)]
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly normally distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is approximately normally distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly T distributed
\item We have enough information to justify that the sampling distribution of $\thetahat_1 - \thetahat_2$ is exactly Fisher-Behrens distributed

\item A justified standardized test statistic is -0.4996635 rounded to the nearest 7 digits %%%%
\item A justified standardized test statistic is -0.4996494 rounded to the nearest 7 digits
\item A justified standardized test statistic is -0.7066109 rounded to the nearest 7 digits
\item A justified standardized test statistic is -0.1824462 rounded to the nearest 7 digits

\item The null is rejected at $\alpha = 5\%$
\item The null is retained at $\alpha = 5\%$

\item Fisher's $p$-value $ < \alpha = 5\%$
\item Fisher's $p$-value $ \geq \alpha = 5\%$
\end{enumerate}
\eenum\instr\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\problem\timedsection{6} These are conceptual questions about statistical inference and sampling.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{11} We have reason to suspect these distributions are very non-normal and extreme-tailed. One such model is the Lomax distribution which is a two-parameter survival model. To keep things tractable for the purposes of this class, we will set one parameter to be equal to one. Assume $\Xoneton \iid \text{Lomax}(1, \theta) := f(x; \theta) = \theta (1 + x)^{-(\theta + 1)}$ and $\support{X} = (0, \infty)$. Note: we are redefining the definition of $\theta$ now --- it is now a parameter within this assumed DGP! The mean of this rv is $\mu_1 := \expe{X} = 1 / (\theta -1)$. Here are sample statistics: $\xbar_1 = 6.01$, $\xbar_2 = 10.50$, $s_1 = 14.54$ and $s_2 = 31.62$.

\begin{enumerate}[(a)]
\item $\theta = (1 + \mu_1) / \mu_1$
\item $\thetahatmm = (1 + \muhat_1) / \muhat_1$
\item $\thetahatmm = (1 + \Xbar) / \Xbar$
\item $\thetahatmm = (1 + \hat{\sigma}) / \hat{\sigma}$

\item $\thetahatmm$ is definitely unbiased without further proof
\item $\thetahatmm$ is definitely asymptotically normal without further proof
\item $\thetahatmm$ is definitely asymptotically efficient (i.e. its variance approaches the CRLB of variance) without further proof
\item Since there is only one parameter of the DGP, $\thetahatmm = \thetahatmle$ definitely without further proof

\item $\thetahathatmm = (1 + \xbar) / \xbar$
\item $\thetahathatmm = (1 + s) / s$

\item $\thetahathatmm_2 = 1.095238$ rounded to the nearest 6 digits
\end{enumerate}
\eenum\instr\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\problem\timedsection{10} These are conceptual questions about statistical inference and sampling.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{17} \ingray{We have reason to suspect these distributions are very non-normal and extreme-tailed. One such model is the Lomax distribution which is a two-parameter survival model. To keep things tractable for the purposes of this class, we will set one parameter to be equal to one. Assume $\Xoneton \iid \text{Lomax}(1, \theta) := f(x; \theta) = \theta (1 + x)^{-(\theta + 1)}$ and $\support{X} = (0, \infty)$. Note: we are redefining the definition of $\theta$ now --- it is now a parameter within this assumed DGP! The mean of this rv is $\mu_1 := \expe{X} = 1 / (\theta -1)$. Here are sample statistics: $\xbar_1 = 6.01$, $\xbar_2 = 10.50$, $s_1 = 14.54$ and $s_2 = 31.62$.}

\begin{enumerate}[(a)]
\item $\mathcal{L}(\theta; x) = f(x; \theta)$
\item $\ell(\theta; x) = f(x; \theta)$
\item $\mathcal{L}(\theta; \xoneton) = \prod_{i=1}^n f(x_i; \theta)$
\item $\ell(\theta; \xoneton) = \prod_{i=1}^n \natlog{f(x_i; \theta)}$
\item $\thetahatmle = \Xbar$
\item $\thetahatmle = (1 + \Xbar) / \Xbar$
\item $\thetahatmle = n \inverse{\sum_{i=1}^n \natlog{1 + X_i}}$
\item $I(\theta) = \int_\reals \ell'(\theta; X)^2 \theta (1 + x)^{-(\theta + 1)} dx$
\item $I(\theta) = \int_\reals x \ell'(\theta; X)^2 dx$
\item $I(\theta) = -\expe{\ell''(\theta; X)}$
\item $I(\theta) = 1 / (\theta - 1)$
\item $I(\theta) = 1 / (\theta - 1)^2$
\item $I(\theta) = 1 / \theta^2$
\item $I(\theta) \propto 1$

\item $\thetahatmle$ is definitely unbiased without further proof
\item $\thetahatmle$ is definitely asymptotically normal without further proof
\item $\thetahatmle$ is definitely asymptotically efficient (i.e. its variance approaches the CRLB of variance) without further proof
\end{enumerate}
\eenum\instr\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\problem\timedsection{5} These are conceptual questions about statistical inference and sampling.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{10} \ingray{We have reason to suspect these distributions are very non-normal and extreme-tailed. One such model is the Lomax distribution which is a two-parameter survival model. To keep things tractable for the purposes of this class, we will set one parameter to be equal to one. Assume $\Xoneton \iid \text{Lomax}(1, \theta) := f(x; \theta) = \theta (1 + x)^{-(\theta + 1)}$ and $\support{X} = (0, \infty)$. Note: we are redefining the definition of $\theta$ now --- it is now a parameter within this assumed DGP! The mean of this rv is $\mu_1 := \expe{X} = 1 / (\theta -1)$. Here are sample statistics: $\xbar_1 = 6.01$, $\xbar_2 = 10.50$, $s_1 = 14.54$ and $s_2 = 31.62$.} In this setting, $\thetahatmle = n \inverse{\sum_{i=1}^n \natlog{1 + X_i}}$ and $I(\theta) = 1 / \theta^2$.

\begin{enumerate}[(a)]
\item For an estimator $\thetahat$ whose expectation is $\theta$, the standard deviation of $\thetahat$ must be at least $\theta  / \sqrt{n}$
\item The variance of $\thetahatmle$ is exactly $\theta^2 / n$
\item The variance of $\thetahatmle$ is approximately $\theta^2 / n$

\item $\thetahatmle \convp \theta$
\item $I(\thetahatmle) \convp I(\theta)$
\item $I(\thetahatmle)^{-1} \convp I(\theta)^{-1}$
\item $I(\thetahatmle) \convd \stdnormnot$
\item $\thetahatmle \convd \stdnormnot$
\item $\displaystyle \frac{\thetahatmle}{\se{\thetahatmle}} \convd \stdnormnot$
\item If $\displaystyle \frac{\thetahatmle}{\se{\thetahatmle}} \convd \stdnormnot$ then $\displaystyle \frac{\squared{\thetahatmle}}{\var{\thetahatmle}} \convd \chisq{1}$

\end{enumerate}
\eenum\instr\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\problem\timedsection{7} These are conceptual questions about statistical inference and sampling.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{10} \ingray{We have reason to suspect these distributions are very non-normal and extreme-tailed. One such model is the Lomax distribution which is a two-parameter survival model. To keep things tractable for the purposes of this class, we will set one parameter to be equal to one. Assume $\Xoneton \iid \text{Lomax}(1, \theta) := f(x; \theta) = \theta (1 + x)^{-(\theta + 1)}$ and $\support{X} = (0, \infty)$. Note: we are redefining the definition of $\theta$ now --- it is now a parameter within this assumed DGP! The mean of this rv is $\mu_1 := \expe{X} = 1 / (\theta -1)$. Here are sample statistics: $\xbar_1 = 6.01$, $\xbar_2 = 10.50$, $s_1 = 14.54$ and $s_2 = 31.62$. In this setting, $\thetahatmle = n \inverse{\sum_{i=1}^n \natlog{1 + X_i}}$ and $I(\theta) = 1 / \theta^2$.} We wish to prove that the $\theta$'s in the two populations are different. Given the raw data, we can compute the maximum likelihood estimates: $\thetahathatmle_1 = 0.996$ and $\thetahathatmle_1 = 0.998$ rounded to the nearest 3 digits. Note that $F_Z(.975) = 1.96$ and $F_{T_{14}}(.975) = 2.15$.

\begin{enumerate}[(a)]
\item The standardized test statistic can be expressed as $\displaystyle\frac{\thetahathatmle_1 - \thetahathatmle_2}{\theta / \sqrt{n}}$

\item The standardized test statistic can be expressed as $\displaystyle\frac{\thetahathatmle_1 - \thetahathatmle_2}{\theta \sqrt{2 / n}}$

\item A justified standardized test statistic is -0.4996635 rounded to the nearest 7 digits
\item A justified standardized test statistic is -0.01509039 rounded to the nearest 7 digits
\item A justified standardized test statistic is -0.005493704 rounded to the nearest 7 digits %%%%%%%%
\item A justified standardized test statistic is -0.0002225672 rounded to the nearest 7 digits

\item If the null hypothesis in the test of no mean difference was retained, then the confidence interval for the mean different *must* contain zero (for any valid $\alpha$).
\item $\doublehat{CI}_{\theta_1, 95\%}$ cannot be computed given the data at hand
\item $\doublehat{CI}_{\theta_1 - \theta_2, 95\%}$ cannot be computed given the data at hand

\item $\doublehat{CI}_{\theta_1, \alpha}$ can only be computed for some values of $\alpha$ but not other values of $\alpha$

\end{enumerate}
\eenum\instr\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\problem\timedsection{5} These are conceptual questions about statistical inference and sampling.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{11} \ingray{We have reason to suspect these distributions are very non-normal and extreme-tailed. One such model is the Lomax distribution which is a two-parameter survival model. To keep things tractable for the purposes of this class, we will set one parameter to be equal to one. Assume $\Xoneton \iid \text{Lomax}(1, \theta) := f(x; \theta) = \theta (1 + x)^{-(\theta + 1)}$ and $\support{X} = (0, \infty)$. Note: we are redefining the definition of $\theta$ now --- it is now a parameter within this assumed DGP! The mean of this rv is $\mu_1 := \expe{X} = 1 / (\theta -1)$. Here are sample statistics: $\xbar_1 = 6.01$, $\xbar_2 = 10.50$, $s_1 = 14.54$ and $s_2 = 31.62$. In this setting, $\thetahatmle = n \inverse{\sum_{i=1}^n \natlog{1 + X_i}}$ and $I(\theta) = 1 / \theta^2$. We wish to prove that the $\theta$'s in the two populations are different. Given the raw data, we can compute the maximum likelihood estimates: $\thetahathatmle_1 = 0.996$ and $\thetahathatmle_1 = 0.998$ rounded to the nearest 3 digits. Note that $F_Z(.975) = 1.96$ and $F_{T_{14}}(.975) = 2.15$.}

\begin{enumerate}[(a)]
\item The construction of a confidence interval estimate requires knowledge of the parameter(s)

\item $\doublehat{CI}_{\theta_1 - \theta_2, 95\%} \approx \bracks{0.4919545, 1.500046}$
\item $\doublehat{CI}_{\theta_1 - \theta_2, 95\%} \approx \bracks{-0.7155441, 0.7115441}$
\item $\doublehat{CI}_{\theta_1 - \theta_2, 95\%} \approx \bracks{-0.2617679, 0.2577679}$

\item The construction of $\doublehat{CI}_{\theta_1 - \theta_2, 95\%}$ in this problem relied on the central limit theorem
\item The construction of $\doublehat{CI}_{\theta_1 - \theta_2, 95\%}$ in this problem relied on the monster MLE theorem
\item The construction of $\doublehat{CI}_{\theta_1 - \theta_2, 95\%}$ in this problem relied on the asymptotic normality of $\thetahatmle_1  -\thetahatmle_2$
\item The construction of $\doublehat{CI}_{\theta_1 - \theta_2, 95\%}$ in this problem relied on the delta method
\item The construction of $\doublehat{CI}_{\theta_1 - \theta_2, 95\%}$ in this problem relied on Slutsky's theorem

\item $\prob{\theta_1 - \theta_2 \in \doublehat{CI}_{\theta_1 - \theta_2, 95\%}} \approx 95\%$
\item $\prob{\theta_1 - \theta_2 \in \hat{CI}_{\theta_1 - \theta_2, 95\%}} \approx 95\%$

\end{enumerate}
\eenum\instr\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\problem\timedsection{10} These are conceptual questions about statistical inference and sampling.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{7} \ingray{We have reason to suspect these distributions are very non-normal and extreme-tailed. One such model is the Lomax distribution which is a two-parameter survival model. To keep things tractable for the purposes of this class, we will set one parameter to be equal to one. Assume $\Xoneton \iid \text{Lomax}(1, \theta) := f(x; \theta) = \theta (1 + x)^{-(\theta + 1)}$ and $\support{X} = (0, \infty)$. Note: we are redefining the definition of $\theta$ now --- it is now a parameter within this assumed DGP! The mean of this rv is $\mu_1 := \expe{X} = 1 / (\theta -1)$. Here are sample statistics: $\xbar_1 = 6.01$, $\xbar_2 = 10.50$, $s_1 = 14.54$ and $s_2 = 31.62$. In this setting, $\thetahatmle = n \inverse{\sum_{i=1}^n \natlog{1 + X_i}}$ and $I(\theta) = 1 / \theta^2$. \sout{We wish to prove that the $\theta$'s in the two populations are different.} Given the raw data, we can compute the maximum likelihood estimates: $\thetahathatmle_1 = 0.996$ and $\thetahathatmle_1 = 0.998$ rounded to the nearest 3 digits. Note that $F_Z(.975) = 1.96$ and $F_{T_{14}}(.975) = 2.15$.} We are now interested in proving that $\theta_1^2 > \theta_0^2$ where $\theta_0 = 1$ which is a critical value in the Lomax distribution.

\begin{enumerate}[(a)]
\item The univariate delta method applies in our setting and where $g(\theta) = \theta^2$
\item $\displaystyle \frac{\squared{\thetahatmle_1} - \theta_0^2}{2 \theta_0^2 / \sqrt{n}} \convd \stdnormnot$
\item $\displaystyle \frac{\squared{\thetahatmle_1} - \theta_0^2}{2 \squared{\thetahatmle_1} / \sqrt{n}} \convd \stdnormnot$

\item A justified standardized test statistic is -0.01546095 rounded to the nearest 7 digits
\item A justified standardized test statistic is -0.01558538 rounded to the nearest 7 digits

\item $\hat{CI}_{\theta_1, 95\%} \approx \bracks{\thetahatmle_1 \pm 1.96 \times 2 \displaystyle\frac{\theta_0^2}{\sqrt{n}}}$
\item $\hat{CI}_{\theta_1, 95\%} \approx \bracks{\thetahatmle_1 \pm 1.96 \times  2 \displaystyle\frac{\squared{\thetahatmle_1}}{\sqrt{n}}}$
\end{enumerate}
\eenum\instr\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\problem\timedsection{6} These are conceptual questions about statistical inference and sampling.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{14}

\begin{enumerate}[(a)]
\item Beginning with a sample of data, it may be difficult to clearly define the population.
\item Beginning with a well-defined population, it may be difficult to sample uniformly from this population.
\item In a simple random sample, the probability of each item in the population being in the sample is the same.
\item Samples from a real-world population are never truly independent.
\item If you had access to the entire population, population parameter values would be known exactly.
\item Samples can sometimes be thought of realizations from a process defined by random variables, the DGP.
\item The data $\xoneton$ can be sampled only after assuming a DGP explicitly.
\item The goal of point estimation is to find an approximation of the true value of $\theta$.
\item The goal of theory testing is to find an approximation of the true value of $\theta$.
\item The goal of statistical inference (in general) is to learn the true values of $\xoneton$.
\item The goal of statistical inference (in general) is to learn the true values of $x_1, \ldots, x_N$.
\item Statistical estimates can only be computed after the data $\xoneton$ is sampled.
\item The sampling distribution can only be known after the data's values $\xoneton$ are known.
\item The estimator $\Xbar$ is unbiased for all DGP's (as long as the DGP's expectation exists).
\end{enumerate}
\eenum\instr\pagebreak

\problem\timedsection{15} Consider the DGP $\Xoneton \iid \bernoulli{\theta}$ and the estimators\\ $\thetahat_B = \Xbar + 0.1$ and $\thetahat_A = \Xbar + 0.1 / n$.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{19}

\begin{enumerate}[(a)]
\item The estimator $\thetahat_B$ is unbiased for all $\theta \in \Theta$.
\item The estimator $\thetahat_B$ is unbiased for at least one $\theta \in \Theta$.
\item The estimator $\thetahat_B$ is asymptotically unbiased for all $\theta \in \Theta$.
\item Every possible estimate $\thetahathat_B$ is in $\Theta$.
\item At least one estimate $\thetahathat_B$ is in $\Theta$.
\item The L1 loss for $\thetahat_B$ is always $\geq 0.1$.
\item The L2 loss for $\thetahat_B$ is always  $\geq 0.1$.
\item The L1 loss for $\thetahat_B$ is always  $\geq 0$.
\item The L2 loss for $\thetahat_B$ is always  $\geq 0$.
\item The risk under L1 loss for $\thetahat_B$ is 0.1.
\item The risk under L2 loss for $\thetahat_B$ is $\expe{(\Xbar - \theta)^2 + 0.2 (\Xbar - \theta)}$ + 0.01.
\item The risk under L2 loss for $\thetahat_B$ is $\theta(1-\theta)  / n$ + 0.01.
\item $\text{MSE}[\thetahat_B] = \theta(1-\theta)  / n$ + 0.01.
\item The sup risk under L2 loss for $\thetahat_B$ is $\inverse{4n}$.
\item The estimator $\thetahat_A$ is unbiased for all $\theta \in \Theta$.
\item The estimator $\thetahat_A$ is asymptotically unbiased for all $\theta \in \Theta$.
\item $\text{MSE}[\thetahat_A] = \theta(1-\theta)  / n + 0.01 /n^2$.
\item The sup risk under L2 loss for $\thetahat_A$ is $\inverse{4n}$.
\item The loss function $\ell(\thetahathat, \theta) = |\thetahathat - \theta|^{0.5}$ is a valid loss function for these both $\thetahat_B$ and $\thetahat_A$.
\end{enumerate}
\eenum\instr\pagebreak

\problem\timedsection{10} The following are conceptual question about hypothesis testing.

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{17}

\begin{enumerate}[(a)]
\item If you wish to prove a theory to the wide world, it is best to let detractors prove your theory wrong and if they cannot, your theory will be widely accepted.
\item If the value of $\theta$ were to be known, there would be no reason to do statistical hypothesis testing.
\item Using a sample of data, it is possible to absolutely prove (or disprove) a theory.
\item If you are trying to prove that your investment idea is correct, the null hypothesis should be that your investment idea is incorrect.
\item Type I errors are only possible if $H_0$ is true.
\item When doing a power calculation, we assume $H_0$ is true.
\item The type I error rate is unaffected by the sample size.
\item $\prob{\thetahat \in \text{RET}} = \alpha$.
\item If you retain $H_0$ it is impossible to know if you made a Type I error.
\item If you retain $H_0$ it is impossible to know if you made a Type II error.
%\item Level and size are always the same for any test.
%\item Fisher's p-value is unaffected by the value of $\alpha$.
\item The lower Fisher's p-value is, the more \qu{statistically significant} the result of the test becomes.
\item If $\alpha = 0$, power is always 1.
\item In the one-sample z test, if $\alpha$ decreases, power decreases.
\item In the one-sample z test, if $n$ decreases, power decreases.
\item In the one-sample z test, if $\sigsq$ decreases, power decreases.
\item In the one-sample z test, if $H_0: \theta \leq 3.6$, $H_a: \theta > 3.6$, this test would be \qu{one-sided} and \qu{right-tailed}.
\item In the one-sample z test, if $H_0: \theta \leq 3.6$, $H_a: \theta > 3.6$, $\alpha = 5\%$, $n=500$ and $\sigsq = 1.3$, power can be computed.
%\item In the one-sample z test, if $H_0: \theta \leq 3.6$, $H_a: \theta > 3.6$, $\alpha = 5\%$ and $\sigsq = 1.3$, power approaches 100\% as $n$ increases.
\end{enumerate}
\eenum\instr\pagebreak

\problem\timedsection{12} We flip a fair coin 7 times and record the proportion of heads $\thetahathat$. Let $\theta$ denote the probability of flipping heads. Below is a table of the PMF of the $\binomial{7}{0.5}$ rounded to three digits.

\begin{table}[h]
\centering
\begin{tabular}{c|cccccccc} %round(dbinom(0:7,7,0.5), 3)
$x$ & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline
$p(x)$ & 0.008 & 0.055 & 0.164 & 0.273 & 0.273 & 0.164 & 0.055 & 0.008
\end{tabular}
\end{table}

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{13}

\begin{enumerate}[(a)]
\item The sample size is $n=7$.\\

Assume for the following questions that we are trying to prove that the coin is unfair.
\item $H_0: \theta = 0.5$
\item The size 5\% is not attainable for our test scenario.
\item If the level was 1\%, the rejection region for $\thetahathat$ would be $\braces{0, 1}$.
\item If the level was 7.5\%, the rejection region for $\thetahathat$ would be $\braces{0, \oneover{7}, \frac{6}{7}, 1}$.
\item If the level was 5\%, and $\thetahathat  = 4/7$, the null hypothesis would be retained.
\item The test in (f) is called a \qu{Binomial Exact Test}.\\

Assume for the following questions that we are trying to prove that the coin is biased towards heads.
\item $H_0: \theta = 0.5$
\item If the level was 5\%, the rejection region for $\thetahathat$ would be $\braces{0, \oneover{7}, \frac{6}{7}, 1}$.
\item If the level was 5\%, and $\thetahathat  = 4/7$, the null hypothesis would be retained.
\item If the level was 5\%, and $\thetahathat  = 4/7$, Fisher's $p$-val would be 22.7\%.
\item If the level was 1\%, and $\thetahathat  = 5/7$, Fisher's $p$-val would be larger than Fisher's $p$-val when $\thetahathat  = 4/7$.
\item If the level was 1\%, and $\thetahathat  = 5/7$, you have enough information to compute power of this test.
\end{enumerate}
\eenum\instr\pagebreak

%set.seed(1)
%x = round(rnorm(7, 27, 2), 1)
%sum((x - mean(x))^2) / length(x)
%(27.1 - 29) / (sd(x) / sqrt(7))
%(27.1 - 29) / (sqrt(7/6*2.71) / sqrt(7))
\problem\timedsection{13} We suspect that pollution in a certain river is affecting the nutrition for a Atlantic Salmon and thereby making their adult size less than what is historically expected for salmon. Salmon are known to have mean length 29in with standard deviation 0.95in and for the distribution to be normal. However, we are not sure what the standard deviation for malnourished salmon will be. We collect the following lengths of salmon from the river: $\bv{x} = \angbraces{25.7, 27.4, 25.3, 30.2, 27.7, 25.4, 28.0}$ where $\xbar = 27.1$ and $\hat{\sigma}^2 = 2.71$. We would like to prove that $\theta$, the length of fish from the polluted river, are smaller than regular salmon via a 1-sample t-test. Below is a table of CDF values for the T distribution for many different degrees of freedom (df):

\begin{table}[h]
\centering
\begin{tabular}{c|ccccccc} %round(dbinom(0:7,7,0.5), 3)
df & 0.1\% & 0.5\% & 1\% & 5\% & 10\% & 15\% & 20\% \\ \hline
6 & -5.21 & -3.71 & -3.14 &-1.94 &-1.44 &-1.13 &-0.91 \\
7 & -4.79 & -3.50 &-3.00 &-1.89 &-1.41 &-1.12 &-0.90 \\
8 & -4.50 & -3.36 &-2.90 &-1.86 &-1.40 &-1.11 &-0.89 \\
\end{tabular}
\end{table}

\vspace{-0.2cm}\benum\truefalsesubquestionwithpoints{11}

\begin{enumerate}[(a)]
\item The value $\xbar = 27.1$ is a estimate realized from an unbiased estimator.
\item The value $\hat{\sigma}^2 = 2.71$ is a estimate realized from an unbiased estimator.
\item The reason why we use a 1-sample t-test is because we know $\sigma = 0.95$.
\item The value of $\xbar$ standardized is -1.855 rounded to the nearest 3 decimals.
\item The value of $\xbar$ standardized is -2.827 rounded to the nearest 3 decimals.
\item The value of $\xbar$ standardized is -3.298 rounded to the nearest 3 decimals.
\item The value of $\xbar$ standardized is -3.054 rounded to the nearest 3 decimals.
\item The null hypothesis is rejected at $\alpha = 1\%$.
\item The null hypothesis is rejected at $\alpha = 5\%$.
\item Fisher's $p$-val for this test is likely closest to 1\% among all the options in the table of CDF values for the T distribution.
\item Fisher's $p$-val for this test is likely closest to 5\% among all the options in the table of CDF values for the T distribution.
\end{enumerate}
\eenum\instr\pagebreak

\problem\timedsection{14} Chevalier de Mere was a French nobleman writer / philosopher who lived from 1607-1684. But he is far better known for his contribution to probability theory likely due to his compulsive gambling habit. Before notions of probabilitistic independence, complement rule, random variable theory (all the familiar 241 topics) were discovered, he wrote a letter to Blaise Pascal where he accurately conjectured that the probability of winning a certain dice game. In this dice game, you \qu{win} if you get at least one double 6 in a roll of two dice among 24 rolls of two dice. He conjectured that the probability of winning was less than 50\% and the actual probability is $\theta = 49.14\%$. Assuming each of these entire 24 rolls defines one game and he plays many games, then the DGP for winning of each game truly is $\iid \bernoulli{0.4914}$. Assuming he kept a flawless mental record of wins and losses, how many games would he need to observe to reject the null hypothesis that $\theta \geq 50\%$ at $\alpha = 5\%$ with power of 80\%? The two CDF values for the standard normal distribution that are needed are: $\Phi(-1.645)  = 5\%$ and $\Phi(0.84)  = 80\%$.

\vspace{-0.2cm}\benum\multchoicewithpoints{12}{Select the answer choice below whose number is \emph{closest} to your answer.}
\begin{multicols}{2}
\begin{enumerate}[(a)]
\item 1,000
\item 5,000
\item 7,500
\item 10,000
\item 15,000
\item 20,000
\item 30,000
\item 40,000
\item 50,000
\item 75,000
\item 100,000
\item 200,000

\end{enumerate}
\end{multicols}
\eenum\instr\pagebreak

\end{document}


\clearpage
\subsection{Pascal Function Call} % (fold)
\label{sub:pas_function_call}

\passyntax{passynt:function-decl-function-call}{a function call}{function-decl/function-call}

\passection{\pascode{plst:test-fn-call}{Example function calls}{code/pascal/storing-using-data/TestFnCalls.pas}}

\mynote{
\begin{itemize}
  \item A function call can be used to calculate a value within an expression.
  \item A Pascal function call is similar to a \nameref{sub:procedure call}.
  \item You use the name of the \nameref{sub:function}, its identifier, to indicate which function is called.
  \item Following the function's name is the list of \emph{arguments}, these are the values (or variables) that are being passed to the called function.
  \item In Listing \ref{plst:test-fn-call} the values of the inner function calls are passed to the arguments of the outer calls. This means that \texttt{Square(5)} is calculated first then \texttt{Square(4)}. The results of these two function calls are then passed as the \emph{arguments} into the call to the \texttt{Sum} function. In this case the function call will be \texttt{Sum(25, 16)} with \texttt{25} being the result returned by \texttt{Square(5)} and \texttt{16} being the result returned by \texttt{Square(4)}.
\end{itemize}
}
% subsection c_procedure_declaration (end)


\documentclass[main.tex]{subfiles}
\begin{document}

\marginpar{Friday\\ 2020-3-20, \\ compiled \\ \today}

\section{The physical effects of gravitational waves}

We want to discuss how we can build instruments which can detect gravitational waves.

An open question for decades (from 1916 to 1957) was to theoretically determine whether the effects of gravitational waves could be removed using a proper gauge choice.
At a conference in Chapel Hill a thought experiment was presented describing a non-removable gravitational wave effect: two beads on a stick which is positioned orthogonal to the GW propagation. As the GW passes by they move since their proper distance changes (while the stick is held in place by atomic forces), so they dissipate energy.

What happens to free particles in the TT gauge? The geodesic equation for the spatial indices reads
%
\begin{align}
\dv[2]{x^{i}}{\tau} = - \Gamma^{i}_{\mu \nu } \dv{x^{\mu }}{\tau } \dv{x^{\nu }}{\tau }
\,,
\end{align}
%
where the parameter \(\tau \) parametrize our curve.
We assume that the particle starts out at rest: then its four-velocity is \(\dv*{x^{\mu }}{\tau } = (\dv*{x^{0}}{\tau }, \vec{0})\). So, we get the simplification
%
\begin{align}
  \dv[2]{x^{i}}{\tau} =
  - \Gamma^{i}_{00} \qty(\dv{x^{0}}{\tau })^2
\,,
\end{align}
%
and in linearized gravity
%
\begin{align}
\Gamma^{i}_{00} \approx \frac{1}{2} \qty(2 \partial_0 h^{i}_{0} - \partial^{i} h_{00} ) =0
\,
\end{align}
%
if we use the TT gauge.
This means that the derivative of the velocity is zero: so, the velocity of a stationary particle remains zero indefinitely.
Let us consider geodesic deviation between two particles instead: say that the first particle has the geodesic \(x(\tau )\) and the second is \(x(\tau ) + \xi (\tau )\). Their geodesic equations will read
%
\begin{subequations}
\begin{align}
\dv[2]{x^{\sigma }}{\tau } + \Gamma^{\sigma }_{\mu \nu } (x) \dv{x^{\mu  }}{\tau } \dv{x^{\nu }}{\tau } &= 0 \label{eq:geodesic-equation-stationary}\\
\dv[2]{(x^{\sigma } + \xi^{\sigma}) }{\tau } + \Gamma^{\sigma }_{\mu \nu } (x + \xi ) \dv{(x^{\mu  } + \xi^{\mu })}{\tau } \dv{(x^{\nu } + x^{\nu })}{\tau } &= 0
\,,
\end{align}
\end{subequations}
%
which we can expand to first order using the perturbative expression: \(\Gamma^{\sigma }_{\mu \nu } (x + \xi ) = \Gamma^{\sigma }_{\mu \nu } (x) + \partial_{\gamma } \Gamma^{\sigma }_{\mu \nu } \xi^{\gamma } \). We use this, keep only the first order terms, subtract equation \eqref{eq:geodesic-equation-stationary} and finally get
%
\begin{align}
\dv[2]{\xi^{\sigma }}{\tau } + 2 \Gamma^{\sigma}_{\mu \nu } \dv{x^{\mu }}{\tau } \dv{\xi^{\nu }}{\tau } + \xi^{\gamma } \partial_{\gamma } \Gamma^{\sigma}_{\mu \nu } \dv{x^{\mu }}{\tau } \dv{x^{\nu }}{\tau } = 0
\,,
\end{align}
%
so if we restrict ourselves to only spatial components, and assume that the particles start out stationary we get, at \(\tau = 0\):
%
\begin{align} \label{eq:geodesic-deviation-equation-slow-objects}
\dv[2]{\xi ^{i}}{\tau } &= - 2 \Gamma^{i}_{0 \nu } \dv{x^{0}}{\tau } \dv{\xi^{\nu }}{\tau } + \xi^{\gamma  } \partial_{\gamma } \Gamma^{i}_{00} \dv{x^{0}}{\tau }  \dv{x^{0}}{\tau }  \\
&= -2 c \Gamma^{i}_{0 \nu } \dv{\xi^{\nu }}{\tau } + \xi^{\gamma }\partial_{\gamma } \Gamma^{i}_{00} c^2
\marginnote{We are keeping \(c \neq 1\) here.}
\,,
\end{align}
%
so, using the expressions for the Christoffel symbols in the TT gauge, where \(\Gamma^{i}_{00} = 0\) and \(\Gamma^{i}_{ 0 \nu} \) is nonzero only for \(\nu = j\), we get\footnote{We use the fact that, since in the TT gauge \(h^{0}_{\mu } = 0\),
%
\begin{align}
\Gamma^{i}_{0j} = \frac{1}{2} \qty( \partial_{0}h^{i}_{j} + \partial_{j} h^{i}_{0} - \partial^{i}h_{0j}) = \frac{1}{2} \partial_0 h^{i}_{j}
\,.
\end{align}
}
%
\begin{align}
\dv[2]{\xi^{i}}{\tau } = - 2 c \Gamma^{i}_{0j} \dv{\xi^{j}}{\tau } = -c \partial_0  h^{ij} \dv{\xi^{j}}{\tau }
\,,
\end{align}
%
but \(\dv*{\xi^{j}}{\tau }\) is zero if evaluated at \(\tau =0 \) for parallel geodesics!
So, parallel geodesics remain parallel: if the separation initially is stationary, it will remain so.

The issue is that in the TT gauge we are using a special set of coordinates which ``follow'' the gravitational wave.
We see \textbf{no change in coordinate distance} since the coordinates are moving around with the gravitational wave: we did a coordinate change using \(\xi^{\mu }\) satisfying \(\square \xi^{\mu } = 0\), so the coordinates are harmonically moving, together with the GW.

It is like we defined wave-like coordinates, ``gauging away'' the wave-like motion.

This is only an issue with our coordinates: the physically measurable quantities are \emph{proper distances}, not coordinate distances, which in general are computed as
%
\begin{align}
\dd{s^2} = g_{\mu \nu } \dd{x^{\mu }} \dd{x^{\nu }} = \dd{x^2} + h^{TT}_{\mu \nu } \dd{x^{\mu }} \dd{x^{\nu }}
\,.
\end{align}

Let us apply this to the case of a GW propagating along the \(z\) axis, for two particles initially separated along the \(x\) axis, whose coordinates are \(x_1 \) and \(x_2 \) (initially and also later, since as we saw the coordinate distance does not change in the TT gauge).
The full metric perturbation looks like
%
\begin{subequations}
\begin{align}
h^{\mu \nu }_{TT} = \left[\begin{array}{cccc}
0 & 0 & 0 & 0 \\
0 & h_{+} & h_{ \times} & 0 \\
0 & h_{ \times } & - h_{+} & 0 \\
0 & 0 & 0 & 0
\end{array}\right] e^{i \omega \qty(t - z/c)}
\,,
\end{align}
\end{subequations}
%
then the distance, in the case of an \(h_{+}\) polarized wave, becomes
%
\begin{align}
s = (x_1 - x_2 ) \sqrt{1 + h_{+} \cos(\omega t)}
\approx (x_1 -x_2 ) \qty(1 + \frac{1}{2} h_{+} \cos(\omega t))
\,.
\end{align}

So, the amplitude of the oscillation in the distance is given by \(h_{+} / 2\).
For two general events separated by the spacelike vector \(L^{\mu }\), whose norm is \(L > 0\):
%
\begin{align}
s^2 = \qty(\eta_{\mu \nu } + h_{\mu \nu } )L^{\mu } L^{\nu }
\approx L \qty(1 + \frac{1}{2 L^2} h_{ij} L^{i} L^{j})
\,.
\end{align}

We would, however, like to work in coordinates which do not oscillate with the GW.

\subsubsection{Free-falling frames}

The useful frame to define is the \emph{free-falling frame}, whose coordinates are rigid and not perturbed by the GW.

In order to build such a frame \textbf{in theory}, we will need to define 4 orthogonal vectors on the point \(P\):
%
\begin{align}
\eta_{\mu \nu } e^{\mu }_{\alpha } e^{\nu }_{\beta } = \eta_{\alpha \beta }
\,.
\end{align}

Consider a geodesic through point \(P\) whose tangent vector at \(P\) is a unit vector \(\hat{n}\).
If this unit vector is spacelike, we parametrize the geodesic by \(s\) (defined with \(\dd{s^2}\), from the metric), if it is timelike we parametrize it with \(\tau\) (defined by \(\dd{\tau^2 } = - \dd{s^2}\)).
We denote as \(\lambda \) either of \(s\) or \(\tau \).

Now, the coordinates of point \(Q\) are generically \(\lambda \hat{n}\), if the geodesic starting with unit vector \(\hat{n}\) reaches \(Q\) when its parameter is \(\lambda \).

We can reach almost every point this way, the points which are only connected through null geodesics to \(P\) can be reached by continuity, and in a small enough region the coordinates of a point \(Q\) are unique --- that is, the geodesics do not cross.

In this frame, then, \(g_{\mu \nu } (P) = \eta_{\mu \nu } (P)\); also, in the geodesic equation
%
\begin{align}
\dv[2]{x^{\mu }}{\lambda } + \Gamma^{\mu }_{ \nu \rho } \dv{x^{\nu }}{\lambda } \dv{x^{\rho }}{\lambda }
\,,
\end{align}
%
we have that the second derivatives are zero since \(x^{\mu}(\lambda )\) is linear in \(\lambda \), so we must have \(\Gamma^{\mu }_{\nu \rho } n^{\nu } n^{\rho } = 0\).
This must be true for any unit vector \(n^{\mu }\), therefore we have \(\Gamma^{\mu }_{\nu \rho } =0 \).
The linear system giving \(g_{\mu \nu , \rho } (P) \) from \(\Gamma^{\mu }_{\nu \rho }\) is nondegenerate, so the first derivatives of the metric also vanish: \(g_{\mu \nu , \rho }(P) =0\).\footnote{Do note that this reasoning works only at the point, since if we moved along a geodesic we do not have access to the other unit vectors anymore (in these coordinates).

This better be so: otherwise we would have proven that the first derivatives of the metric are zero in a neighborhood of a generic point \(P\), so the metric is constant in the whole neighborhood, which is nonphysical.}
These are called \textbf{Riemann normal coordinates}.

The conditions on the metric and its derivatives only hold at the point. We can do slightly better with \emph{Fermi normal coordinates}, where we require a gyroscope's angular momentum to be parallel-transported along the geodesics, so that an observer moving along a geodesic is indeed free-falling.

How do we make such a frame \textbf{experimentally}? We might think to use free-falling particles, and put them in orbit.
This is not actually that simple.
A satellite which accomplishes this task is called a \emph{drag-free satellite}.

Consider a particle orbiting the Sun.
The Sun's radiation pressure pushes the particle away from a geodesic.
The way to solve this issue is to put a thrusted spacecraft around our test mass to balance the Sun's radiation pressure, constantly measuring the distance to the test mass without touching it, and then balancing the thrusters by keeping at a constant distance from it.

\subsubsection{LISA's drag-free navigation}

This is the idea behind the satellites making up the space-based GW interferometer LISA (which we will discuss in greater detail later in the course).
The distances between the spacecrafts should be about \SI{5}{Gm} apart.
We do not measure the distances between the spacecrafts, but instead the distances between the test masses inside them, which are \SI{2}{kg}, \SI{4.6}{cm} side, gold-platinum shielded cubes.

The interferometric measurements have pico-meter (\SI{e-12}{m}) sensitivity.
It takes about \SI{30}{s} for light to move between the mirrors: this time-delayed interferometry needs special consideration.

We have a \emph{gravitational reference sensor}, a cubic shell around the cube: we keep measuring the distances between the two.
We also need to precisely discharge the masses with a Charge Management System, otherwise electrostatic forces are too strong.
Also, the thrusters need to be very weak, on the order of the \(\SI{}{\micro N }\).

The LISA Pathfinder mission successfully tested all of these technologies, except for time-delayed interferometry.
It only used one spacecraft, and measured how well the drag-free navigation worked.

In the final mission there will be two masses inside each satellite, so we will need to account for the gravitational pull between them.
Even accounting for this by relaxing the acceleration precision requirement 10-fold, the results of LISA Pathfinder were exceptional.

Let us discuss the sources of noise: at high frequencies, inertia prevents a force from creating significant displacement.
This applies to external forces, not to gravitational forces, since the latter are proportional to the mass.
So, there is a limit at high frequencies because of our inability to measure that fast.
At low frequencies, it is easy to measure, but it is hard to verify whether the mass is indeed in free fall.
We can also have issues with the parasitic coupling of the test mass to the spacecraft.

In the end, it was verified that we can do
%
\begin{align}
S^{1/2}_{a} \leq \SI{3e-14}{m / s^2 / \sqrt{Hz}}
\,
\end{align}
%
at \SI{1}{mHz}.
Solar radiation pressure is two orders of magnitude higher.
The LISA Pathfinder mission greatly outperformed its original requirements --- see figure 6 in the paper published by the LISA Pathfinder collaboration \cite[]{lisapathfindercollaborationLISAPathfinderFirst2017}.

\subsection{Proper detector frame}

Let us now come back to theory by discussing the \emph{proper detector frame}: coordinates defined by a rigid ruler.
Rigid rulers do not really exist, but we can approximate it well enough. If the gravitational pull is small compared to the restoring forces in the ruler, then its length will approximately not change.

Let us put ourselves in a free-falling frame in Fermi local coordinates, so that in the origin the metric is flat.
Then, we can expand it to second order in the spatial coordinates
%
\begin{subequations}
\begin{align}
g_{\mu \nu } (x) &\approx g_{\mu \nu } (0)
+ x^{i} \partial_{i} \eval{g_{\mu \nu }}_{x=0}
+ \frac{1}{2} x^{i} x^{j} \eval{\partial_{i} \partial_{j} g_{\mu \nu }}_{x=0} + \dots  \\
&= \eta_{\mu \nu } + \frac{1}{2} x^{i} x^{j} \eval{\partial_{i} \partial_{j} g_{\mu \nu }}_{x=0}
\,, \marginnote{The derivatives of the metric vanish in the free-falling frame.}
\end{align}
\end{subequations}
%
which we can rewrite in terms of the Riemann tensor by making use of the expression of the Riemann tensor in the LIF, which is
%
\begin{align} \label{eq:riemann-tensor-LIF}
R_{iklm} = \frac{1}{2} \qty(
  \partial_{k} \partial_{l} g_{im} +
  \partial_{i} \partial_{m} g_{kl} -
  \partial_{k} \partial_{m} g_{il} -
  \partial_{i} \partial_{l} g_{km}
)
\,,
\end{align}
%
we get
%
\begin{align}
\dd{s^2} \approx - c^2 \dd{t^2} \qty(1 + R_{0i0j} x^{i}x^{j})
-2 c \dd{t} \dd{x^{i}} \qty(\frac{2}{3}R_{0ijk} x^{j}x^{k})
+ \dd{x^{i}} \dd{x^{j}} \qty(\delta_{ij} - \frac{1}{3} R_{ijkl} x^{k} x^{l})
\,.
\end{align}

The corrections to the flat metric are of the order \(\order{r^2 / L_B^2}\), where \(r^2\) is the square distance from the origin, while \(L_B\) is the typical spatial scale of the variation of the metric, such that \(R_{0ijk} = \order{L_B^{-2}}\).
This \(L_B\) is the wavelength of the GW, if we are describing a GW.

So, the flat coordinate description works as long as the scale of the region we are describing is very small compared to the characteristic scale of the variations in the metric.

\end{document}