\chapter{The Standard Model and Extensions}\label{chapter:theory}

\section{The Standard Model}\label{section:standard_model}

The Standard Model of particle physics is the collection of \glspl{QFT} that describes the interactions of elementary matter with three of the four%
\footnote{Gravity is noticeably absent, as at the time of writing there is no working quantum theory of gravitation.}
known forces of Nature: the electromagnetic force, the weak nuclear force, and the strong nuclear force.
These theories collectively form a symmetry group%
\footnote{$\mathrm{SU}(n)$ is the special unitary group of degree $n$ which is the Lie group  of $n\times n$ unitary matrices with determinant of $1$.
 As the group is non-Abelian the gauge symmetries that belong to these groups are known as ``non-Abelian gauge symmetries.''}
of $\mathrm{SU}(3)_{C} \otimes \mathrm{SU}(2)_{L} \otimes \mathrm{U}(1)_{Y}$ that elegantly encode all of these interactions in a Lagrangian formalism compactly enough that they can be fully written on a single blackboard (or even further condensed down to fit on the side of a coffee mug) while giving predictions of Nature that agree fantastically with experiment for processes across 15 orders of magnitude in cross section, as seen in \Cref{fig:cross_section_experiment_theory}.
Though known to be an incomplete model, it has proven to be a successful guide and predictive tool for more than half a century.

\begin{figure}
 \centering
 \includegraphics[width=\textwidth]{theory/ATLAS_SMSummary_FiducialXsect_rotated.eps}
 \caption[Summary of several Standard Model total and fiducial production cross section measurements using LHC proton-proton collisions, corrected for leptonic branching fractions, compared to the corresponding theoretical expectations.]{%
  Summary of several Standard Model total and fiducial production cross section measurements using LHC proton-proton collisions, corrected for leptonic branching fractions, compared to the corresponding theoretical expectations.
  All theoretical expectations were calculated at NLO or higher.
  The dark-color uncertainty bar represents the statistical uncertainty.
  The lighter-color uncertainty bar represents the full uncertainty, including systematics and luminosity uncertainties.
  The data/theory ratio, luminosity used and reference for each measurement are also shown.
  Uncertainties for the theoretical predictions are quoted from the original ATLAS papers.
  They were not always evaluated using the same prescriptions for PDFs and scales.
  The $W\gamma$ and $Z\gamma$ theoretical cross-sections have non-perturbative corrections applied to the NNLO fixed order calculations~\cite{STDM-2011-17}.
  Not all measurements are yet statistically significant~\cite{web:ATLAS_SM_summary_plots}.}
 \label{fig:cross_section_experiment_theory}
\end{figure}

The quanta of the quantum fields of the Standard Model are the particles of matter and the mediators of the fundamental forces of Nature, shown in \Cref{fig:Standard_Model}.
The spin-$1/2$ fermion fields result in the three ``generations'' of the six quarks and six leptons, which compose all matter in the Universe.
The leptons are divided into the electrically charged leptons --- the electron $(e)$, muon $(\mu)$, and tau $(\tau)$ --- and their electrically neutral neutrino counterparts --- ``flavor'' eigenstates of $\nu_{e}$, $\nu_{\mu}$, and $\nu_{\tau}$.
The quarks have fractional electric charge, with the up $(u)$, charm $(c)$, and top $(t)$ quarks having $+2/3$ elementary charge, and the down $(d)$, strange $(s)$, and bottom $(b)$ quarks having $-1/3$, as well as all of them carrying a ``color'' charge that allows them to participate in strong nuclear interactions.
They do not exist as free particles by themselves, but always in bound configurations of either two or three quarks, respectively known as ``mesons'' and ``baryons'' (e.g., pions and protons, respectively).
In addition to the matter particles are the five vector gauge bosons that are mediators of fundamental forces of Nature.
The photon $(\gamma)$ is the mediator of the electromagnetic force and interacts with all particles that carry electrical charge (i.e. the quarks, charged leptons, and charged vector bosons).
The weak nuclear force that governs nuclear interactions, such as beta decay, is mediated by the $W^{+}$, $W^{-}$, and $Z$ massive weak vector bosons.
The electrically charged $W$ bosons mediate charged flavor changing interactions between the quarks and the leptons (e.g., $c \to d + W^{+}$ and $e^{-} \to \bar{\nu}_{e} + W^{-}$), and the $Z$ boson mediates electrically neutral flavor changing interactions (e.g., $e^{+}e^{-} \to Z \to \mu^{+}\mu^{-}$ and charged lepton scattering from neutrinos).
The eight%
\footnote{As a result of the $\mathrm{SU}(3)$ symmetry.}
massless gluons mediate the strong nuclear force and so have couplings with all particles that have color charge: the quarks and the gluons themselves.
The coupling strength of the gluons varies with distance between color charged particles --- being extremely strong at close ranges and then sharply dropping of at the distance of confinement (approximately the radius of the proton).
Finally, the Higgs boson imparts mass to particles that it couples to, with stronger coupling strengths manifesting as larger masses.
This process --- which has been come to be known as the ``Higgs mechanism'' --- gives rise to the non-zero mass of the $W^{\pm}$ and $Z$ through a processes called ``electroweak symmetry breaking'' and will be discussed more throughly in \Cref{section:EWSB}.

\begin{figure}
 \centering
 \includegraphics[width=\textwidth]{theory/Standard_Model.pdf}
 \caption[Diagram of the particles of the Standard Model.]{%
  Diagram of the particles of the Standard Model.
  Shown are the three generations of fermions (the quarks and leptons), the gauge vector bosons (gluons, photon, $W^{\pm}$, and $Z$), and the Higgs boson.
  This figure was inspired and adapted from~\cite{web:Carsten_Burgard}.}
 \label{fig:Standard_Model}
\end{figure}

The following discussion of the theories that compose the Standard Model is my summary of many post-lecture conversations with former SMU professor Kent Hornbostel and readings of~\cite{Pich:2005mk}.

\clearpage
\section{Quantum Field Theories}\label{section:QFT}

\acrlong{QFT} is the mathematical framework for modern particle physics calculations.
QFT naturally incorporates quantum theory with special relativity to give a relativistic description of the interaction of quantum fields through their quantized excitations (particles).
All possible physical interactions of these fields are encoded in the terms of the Lagrangian density, $\Lagrangian$, which is a scalar and so (crucially) Lorentz invariant --- physics fundamentally works the same regardless of reference frame.
Given the ubiquity of the use of the Lagrangian density in calculations it will be interchangeably referred to as the ``Lagrangian'' henceforth, with hopefully minimal confusion.
Additionally, the Lagrangian density must be locally gauge invariant; meaning that it is invariant under certain Lie group transformations.
Local gauge invariance is an expression that representations of the Lagrangian density that result in the same physical interactions must be equivalently valid.
A local gauge symmetry is distinct from a global gauge symmetry, as would arise in Noether's theorem, in that a local gauge symmetry results in a gauge invariance for the spacetime point of consideration, but is not guaranteed to be valid in all cases.
That is, a global gauge symmetry is in some sense a special case of a local gauge symmetry, where the symmetry applies for all points.
As an example, consider the Dirac Lagrangian
\begin{equation}
 \Lagrangian_{\textrm{Dirac}} = \bar{\psi} \left(i \gamma^{\mu}\partial_{\mu} - m\right)\psi.
 \label{eq:Dirac_Lagrangian}
\end{equation}
If a global gauge transformation of a phase shift is applied,
\[
 \psi \to e^{-i\theta} \psi, \qquad \bar{\psi} \to \bar{\psi}\,e^{i\theta},
\]
then it is readily seen that the Lagrangian has remained invariant
\[
 \Lagrangian \to \bar{\psi} \left(i \gamma^{\mu}\partial_{\mu} - m\right)\psi.
\]
However, if a local gauge transformation of a phase shift dependent on the field's spacetime is applied
\[
 \psi \to e^{-i\theta(x)} \psi, \qquad \bar{\psi} \to \bar{\psi}\,e^{i\theta(x)},
\]
then for the Lagrangian
\[
 \Lagrangian \to \bar{\psi} \left(i \gamma^{\mu}\partial_{\mu} - m\right)\psi + \bar{\psi}\, \gamma^{\mu} \left(\partial_{\mu} \theta\right)\psi
\]
to preserve the definition of the four-gradient under such a local transformation requires the addition of a gauge field $A_{\mu}(x)$ to form the covariant%
\footnote{``Covariant'' in that it transforms with the gauge fields so that the derivative remains unchanged.}
derivative,
\[
 D_{\mu} \equiv \partial_{\mu} - iq A_{\mu}(x),
\]
with local gauge transformation
\[
 A_{\mu} \to A_{\mu} - \frac{1}{q} \partial_{\mu}\theta,
\]
such that
\[
 \theta(x) = q \Lambda(x),
\]
resulting in the nice covariant form
\[
 \Lagrangian \to \bar{\psi} \left(i \gamma^{\mu}D_{\mu} - m\right)\psi = \bar{\psi} \left(i \slashed{D} - m\right)\psi.
\]
Given the implications of local gauge invariance, the gauge may be arbitrarily chosen to simplify calculations with no less of generality.

Two examples of highly successful \glspl{QFT} are \gls{QED} and \gls{QCD}, which are briefly discussed here.

\subsection{Quantum Electrodynamics (QED)}\label{subsection:QED}

The Glashow-Weinberg-Salam theory of electromagnetic interactions~\cite{Glashow:1961tr,Goldstone:1962es,Weinberg:1967tq} defines electromagnetic interactions of matter in the Standard Model.
The Lagrangian density for QED --- which describes the interactions of a spin-$1/2$ field with the electromagnetic field --- possesses a global $\mathrm{U}(1)$ symmetry, manifest through the conservation of electric charge, and is given by
\begin{equation}
 \Lagrangian_{\textrm{QED}} = -\frac{1}{4}F_{\mu\nu} F^{\mu\nu} + \bar{\psi} \left(i \slashed{D} - m\right)\psi
 \label{eq:QED_Lagrangian}
\end{equation}
where $F_{\mu\nu} = \partial_{\mu}A_{\nu} - \partial_{\nu}A_{\mu}$ is the electromagnetic field strength tensor.
In the QED Lagrangian, the kinetic term $-\frac{1}{4}F_{\mu\nu} F^{\mu\nu}$ describes the behavior of the electromagnetic field --- which along with the Euler-Lagrange equations result in Maxwell's equations --- and the term $\bar{\psi} \left(i \slashed{D} - m\right)\psi$ gives the interactions of the electromagnetic field with charged particles.

\subsection{Quantum Chromodynamics (QCD)}\label{subsection:QCD}

\gls{QCD} is the gauge field theory that describes the interactions of quarks and gluons governed by the strong nuclear force, and characterized by a $\mathrm{SU}(3)$ symmetry.
The QCD Lagrangian density is
\begin{equation}
 \Lagrangian_{\textrm{QCD}} = -\frac{1}{4}G_{\mu \nu}^{a} G_{a}^{\mu \nu} + \sum_{f} i \bar{\psi}_{f} D_{\mu} \gamma^{\mu} \psi_{f},
 \label{eq:QCD_Lagrangian}
\end{equation}
for the $f$ families of quarks, $\psi_{f}$.
The Lagrangian is written without the color index for readability, but, as both the quarks and gluons carry a color charge, then the quark fields $\psi$ are column vectors with color index $\alpha$ and the gluon fields $G_{\mu}^{a}$ are matrices with color indices $\alpha$ and $\beta$.
The kinetic term $-\frac{1}{4}G_{\mu \nu}^{a} G_{a}^{\mu \nu}$ describes the self interactions of the gluon fields $G_{\mu}^{a}$ given the gluon field strength tensor $G_{\mu\nu}^{a} = \partial_{\mu} G_{\nu}^{a} - g_{s} f^{abc} G_{\mu}^{b} G_{\nu}^{c}$
for strong coupling constant $g_{s}$ and $\mathrm{SU}(3)$ structure constants $f^{abc}$.
The term $\sum_{f} i \bar{\psi}_{f} D_{\mu} \gamma^{\mu} \psi_{f}$ with covariant derivative
\[
 D_{\mu} = \partial_{\mu} - i g_{s} G_{\mu}^{a} T^{a},
\]
where $T^{a}$ are the generators of the $\mathrm{SU}(3)$ symmetry group, is the kinetic term for the quarks and describes the interactions between quarks and gluons.
All terms in the Lagrangian density that involve quarks and gluons are color singlets, which promotes the idea of ``color confinement.''
In Nature this color confinement is seen empirically by the observation of quarks only in bound states with other quarks that are colorless --- i.e., free quarks have never been directly observed.
These bound states of quarks are known as ``hadrons.''
Half-integer spin hadrons formed from an even number of quarks are known as ``mesons,'' and integer spin hadrons formed from an odd number of quarks are known as ``baryons.''
In strong interactions at hadron colliders there is enough energy to break individual quarks and gluons out of their hadronic forms, however these free partons then immediately ``hadronize'' by forming bound states with other quarks, even if that requires sacrificing some of their energy to pull another quark from the vacuum.
This process of hadronization, and subsequent decays, creates a shower of hadrons and leptons that is collectively referred to as a ``jet'' and will be discussed more in \Cref{section:jets}.
Jets play an important role in understanding the physics of QCD, and the observation of three jet systems is the best experimental evidence of the existence of gluons~\cite{Brandelik:1979bd,Ellis:1978wp,Andersson:1983ia,Brandelik:1980vs}.

QCD is a deeply rich theory that deserves much attention (c.f.~\cite{Campbell:2017hsr}), but for the purposes of this thesis it will only be introduced here to motivate a more complete picture of the QFTs that build the Standard Model.

\section{Spontaneous Symmetry Breaking}\label{section:symmetry_breaking}

Spontaneous symmetry breaking is the process by which a physical system that has a symmetry does not express that symmetry for perturbations around the ground state of the system.
It is worth noting, given the somewhat confusing nature of the use of ``breaking,'' that the symmetry of the Lagrangian is not destroyed under symmetry breaking, but rather is not manifest given the ground state into which the system has been perturbed.
A classical example of spontaneous symmetry breaking is that of a pen being balanced upright on its tip on a table.
In the unstable equilibrium state of the pen being balanced (the high energy/excited state configuration) the pen possesses a $\mathrm{U}(1)$ symmetry of rotation about its axis.
If the pen is perturbed from this state by a small vibration it will fall into its ground state onto the surface of the table and will lie along some direction ``breaking'' the symmetry that was exhibited by the previous state.
Another example is that of Heisenberg’s model of the ferromagnet, which has Hamiltonian of $\mathcal{H} = -\sum_{i\neq j} J_{ij}\,\vec{s}_{i} \cdot \vec{s}_{j}$ across neighboring atoms.
This Hamiltonian also possesses a rotational symmetry above the Curie temperature --- rotating all the spins by some amount leaves the total spin of the system invariant.
However, below the Curie temperature a non-zero magnetization will arise along a particular direction which will cause all spins to become aligned parallel to it, breaking the symmetry.

A final illustrative toy model, that will prove useful in the context of the Higgs mechanism, is that of a massive complex scalar field
\[
 \phi = \frac{1}{\sqrt{2}} \left(\phi_{1} + i \phi_{2}\right),
\]
with Lagrangian density
\[
 \Lagrangian = \partial_{\mu}\phi^{\dagger}\partial^{\mu}\phi + m^{2}\phi^{\dagger}\phi - \frac{\lambda}{4} \left(\phi^{\dagger}\phi\right)^{2}
\]
composed of the kinetic term, $\partial_{\mu}\phi^{\dagger}\partial^{\mu}\phi$, and the potential $V\left(\phi\right) = -m^{2}\phi^{\dagger}\phi + \frac{\lambda}{4} \left(\phi^{\dagger}\phi\right)^{2}$.
The potential is zero at $\phi=0$, but has its minima occur at
\[
 \phi^{\dagger}\phi = \frac{1}{2}\left(\phi_{1}^{2} - \phi_{2}^{2}\right) = \frac{2m^2}{\lambda} \equiv \frac{1}{2}v^{2}
\]
with magnitude
\[
 \abs{\phi} = \frac{1}{\sqrt{2}}v = \frac{\sqrt{2} v}{\lambda^{1/2}}.
\]
It is seen that this potential possesses a $\mathrm{U}(1)$ symmetry, such that it is invariant under $\phi \to e^{-i\theta}\phi$, resulting in an infinite number of possible minima.
Rewriting the fields using polar coordinates in field space,
\[
 \phi(x) = \frac{1}{\sqrt{2}} \rho\left(x\right) e^{-i \theta(x)/v},
\]
and choosing the arbitrary ground state --- breaking the symmetry --- of $\rho=v$ and $\theta=0$ then allows for the redefinition of the fields as
\[
 \phi(x) = \frac{1}{\sqrt{2}} \left(v + h\left(x\right)\right) e^{-i \theta(x)/v},
\]
where $h$ and $\theta$ become the normal modes.
Perturbations about the minima result in massive radial $h$ modes and massless rotational $\theta$ modes.
These radial modes result in a massive particle, and the rotational modes result in massless particles known as Nambu-Goldstone bosons~\cite{Nambu:1960tm,Goldstone:1961eq}.

\section{Electroweak Symmetry and Interactions}\label{section:EW_interactions}

The electroweak interactions are encoded in the symmetry group $\mathrm{SU}(2)_{L} \otimes \mathrm{U}(1)_{Y}$, where $\mathrm{SU}(2)$ is the symmetry of weak-isospin and $Y$ is weak-hypercharge.
The gauge group requires all left-handed spinors to be doublets, and the right-handed spinors to be singlets.
Considering only the first generation of quarks and leptons, this can be written for the leptons as
\[
 \psi_{e\,1}\left(x\right) = \begin{pmatrix}
  \nu_{e} \\
  e^{-}
 \end{pmatrix}_{L},\quad
 \psi_{e\,2}\left(x\right) = \nu_{e\,R},\quad
 \psi_{e\,3}\left(x\right) = e_{R}^{-}\,,
\]
and for the quarks as
\[
 \psi_{u\,1}\left(x\right) = \begin{pmatrix}
  u \\
  d
 \end{pmatrix}_{L},\quad
 \psi_{u\,2}\left(x\right) = u_{R},\quad
 \psi_{u\,3}\left(x\right) = d_{R}\,.
\]
The ``free'' Lagrangian density (the kinetic term) is then
\[
 \Lagrangian = \sum_{j=1}^{3} i \,\bar{\psi}_{e\,j}\left(x\right) \slashed{\partial} \,\psi_{e\,j}\left(x\right) + i \,\bar{\psi}_{u\,j}\left(x\right) \slashed{\partial} \,\psi_{u\,j}\left(x\right)\,,
\]
which should be invariant under local gauge transformations of the symmetry group,
\[
 \begin{split}
  \psi_{e\,1}&\left(x\right) \to e^{iy_{1} \beta(x)}\, U_{L}\left(x\right)\psi_{e\,1}\left(x\right), \qquad U_{L}\left(x\right) = \exp\left(i\,\frac{\tau^{i}}{2} \alpha^{i}(x)\right)\\
  \psi_{e\,2}&\left(x\right) \to e^{iy_{2} \beta(x)}\, \psi_{e\,2}\left(x\right)\\
  \psi_{e\,3}&\left(x\right) \to e^{iy_{3} \beta(x)}\, \psi_{e\,3}\left(x\right)
 \end{split}
\]
The generators of $\mathrm{SU}(2)$ are the Pauli spin matrices,
\[
 \tau^{0} = \begin{pmatrix}%
  1 & 0 \\%
  0 & 1
 \end{pmatrix},\quad
 \tau^{1} = \begin{pmatrix}%
  0 & 1 \\%
  1 & 0
 \end{pmatrix},\quad
 \tau^{2} = \begin{pmatrix}%
  0 & -i \\%
  i & 0
 \end{pmatrix},\quad
 \tau^{3} = \begin{pmatrix}%
  1 & 0  \\%
  0 & -1 %
 \end{pmatrix}\,,%
\]
and the resulting four degrees of freedom (three from $\mathrm{SU}(2)$ and one from $\mathrm{U}(1)$) manifest as the gauge bosons of the weak vector fields $W_{\mu}^{k}\left(x\right)$:
\[
 B_{\mu}\left(x\right) = W_{\mu}^{0}\left(x\right)\tau^{0}, \qquad \vec{W}_{\mu}\left(x\right) = W_{\mu}^{i}\left(x\right)\frac{\tau^{i}}{2}\,.
\]
As a result, the covariant derivative is
\begin{align}
 D_{\mu}\psi_{1}(x) & = \left(\partial_{\mu} - ig_{1}\, y_{1} B_{\mu}(x) - ig_{2} \vec{W}_{\mu}(x)\right)\psi_{1}(x)\label{eq:EW_derivative} \\
 D_{\mu}\psi_{2}(x) & = \left(\partial_{\mu} - ig_{1}\, y_{2} B_{\mu}(x)\right)\psi_{2}(x)\notag                                             \\
 D_{\mu}\psi_{3}(x) & = \left(\partial_{\mu} - ig_{1}\, y_{3} B_{\mu}(x)\right)\psi_{3}(x)\notag
\end{align}
for weak hypercharge $y_{i}$ coupling $g_{1}$ and weak isospin coupling $g_{2}$, this gives the requirements for the local transformations of the vector gauge fields,
\[
 B_{\mu}(x) \to B_{\mu}(x) + \frac{1}{g_{1}} \partial_{\mu}\beta(x), \qquad%
 \vec{W}_{\mu}(x) \to U_{L}(x)\vec{W}_{\mu}(x)\,U_{L}^{\dagger}(x) - \frac{i}{g_{2}} \left(\partial_{\mu}U_{L}(x)\right)
 U_{L}^{\dagger}(x)
\]
The kinetic term of the electroweak vector gauge field Lagrangian density is then seen to be
\[
 \Lagrangian_{\textrm{kinetic}} = -\frac{1}{4}B_{\mu\nu}B^{\mu\nu} - \frac{1}{2}\mathrm{Tr}\left(\vec{W}_{\mu\nu}\vec{W}^{\mu\nu}\right) = -\frac{1}{4}B_{\mu\nu}B^{\mu\nu} -\frac{1}{4} W_{\mu\nu}^{i} W_{i}^{\mu\nu}.
\]
It is seen that the $\mathrm{SU}(2)_{L} \otimes \mathrm{U}(1)_{Y}$ gauge symmetry forbids a mass term for the vector fields, and fermion masses are also forbidden as the term would mix the left and right handed fields which have different transformation properties --- which would explicitly break the gauge symmetry.

\subsection{Electroweak Interactions}

Given the covariant derivative, \Cref{eq:EW_derivative}, and resulting Lagrangian density for the fermions,
\[
 \Lagrangian = \sum_{j=1}^{3} i \,\bar{\psi}_{e\,j}\left(x\right) \slashed{D} \,\psi_{e\,j}\left(x\right) + i \,\bar{\psi}_{u\,j}\left(x\right) \slashed{D} \,\psi_{u\,j}\left(x\right)\,,
\]
it is seen that there are interactions between the fermions and the vector gauge fields (dropping fermion index for compactness),
\[
 \Lagrangian \subset g_{2} \bar{\psi}_{1} \gamma^{\mu}\vec{W}_{\mu} \psi_{1} + g_{1} B_{\mu} \sum_{j=1}^{3} y_{j}\bar{\psi}_{j} \gamma^{\mu} \,\psi_{j}\,.
\]
The first term, which contains the $\mathrm{SU}(2)_{L}$ matrix
\[
 \vec{W}_{\mu} = W_{\mu}^{i}(x) \frac{\tau^{i}}{2} = \frac{1}{\sqrt{2}} \begin{pmatrix}%
  \sqrt{2} W_{\mu}^{3} & W_{\mu}^{\dagger}     \\
  W_{\mu}              & -\sqrt{2} W_{\mu}^{3}
 \end{pmatrix}\,,
\]
gives rise to the charged current interactions of the charged $W$ boson fields
\[
 W_{\mu} = \frac{1}{\sqrt{2}} \left(W_{\mu}^{1}  + i W_{\mu}^{2}\right), \qquad W_{\mu}^{\dagger} = \frac{1}{\sqrt{2}} \left(W_{\mu}^{1}  - i W_{\mu}^{2}\right)
\]
with the left-handed quarks and charged leptons, seen in \Cref{fig:EW_W_quarks} and \Cref{fig:EW_W_leptons}.
Likewise, through mixing of the neutral $W_{\mu}^{3}$ and $B_{\mu}$ fields,
\[
 \begin{pmatrix}
  A_{\mu} \\
  Z_{\mu}
 \end{pmatrix}
 = \begin{pmatrix}
  \cos\theta_{W}  & \sin\theta_{W} \\
  -\sin\theta_{W} & \cos\theta_{W}
 \end{pmatrix}
 \begin{pmatrix}
  B_{\mu} \\
  W_{\mu}^{3}
 \end{pmatrix}\,,
\]
with Weinberg mixing angle
\[
 \sin\theta_{W} = \frac{g_{1}}{\sqrt{g_{1}^{2} + g_{2}^{2}}}, \qquad \cos\theta_{W} = \frac{g_{2}}{\sqrt{g_{1}^{2} + g_{2}^{2}}},
\]
the mass eigenstates of the $Z$ boson and photon arise
\[
 \begin{split}
  Z_{\mu} &= W_{\mu}^{3} \cos\theta_{W} - B_{\mu} \sin\theta_{W} = \frac{1}{\sqrt{g_{1}^{2} + g_{2}^{2}}} \left(g_{2} W_{\mu}^{3} - g_{1} B_{\mu}\right) \\
  A_{\mu} &= W_{\mu}^3 \sin\theta_{W} + B_{\mu} \cos\theta_{W} = \frac{1}{\sqrt{g_{1}^{2} + g_{2}^{2}}} \left(g_{1} W_{\mu}^{3} + g_{2} B_{\mu}\right)
 \end{split}
\]
which mediate the neutral current interactions with the fermions, seen in \Cref{fig:EW_Z} and \Cref{fig:QED_photon}.

\begin{figure}[htbp]
 \centering
 \begin{subfigure}[t]{0.23\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/QED_photon.pdf}
  \caption[The vertex for interactions of an electrically charged particle and a photon.]{%
   The vertex for interactions of an electrically charged particle and a photon.}
  \label{fig:QED_photon}
 \end{subfigure}%
 \quad
 \begin{subfigure}[t]{0.23\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/electroweak_Z.pdf}
  \caption[The vertex for neutral current interactions of an fermion and a $Z$ boson.]{%
   The vertex for neutral current interactions of an fermion and a $Z$ boson.}
  \label{fig:EW_Z}
 \end{subfigure}%
 \quad
 \begin{subfigure}[t]{0.23\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/electroweak_W_quarks.pdf}
  \caption[The vertex for charged current interactions of quarks with a $W$ boson.]{%
   The vertex for charged current interactions of quarks with a $W$ boson.}
  \label{fig:EW_W_quarks}
 \end{subfigure}%
 \quad
 \begin{subfigure}[t]{0.23\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/electroweak_W_leptons.pdf}
  \caption[The vertex for charged current interactions of a charged lepton and neutrino with a $W$ boson.]{%
   The vertex for charged current interactions of a charged lepton and neutrino with a $W$ boson.}
  \label{fig:EW_W_leptons}
 \end{subfigure}%
 \caption[The Feynman diagrams for allowed QED and electroweak interactions.]{%
  The Feynman diagrams for allowed QED and electroweak interactions in the Standard Model.}
 \label{fig:electroweak_vertices}
\end{figure}

\section{Electroweak Symmetry Breaking}\label{section:EWSB}

To break the electroweak symmetry and provide masses to the weak vector bosons, consider the discussion given in \Cref{section:symmetry_breaking} and a complex scalar doublet (introduced by, among others~\cite{Guralnik:1964eu,Kibble:2015mwa}, Brout and Englert~\cite{Englert:1964et}, and Higgs~\cite{Higgs:1964ia,Higgs:1964pj})
\begin{equation}
 \phi = \begin{pmatrix}%
  \phi^{+} \\%
  \phi^{0}
 \end{pmatrix} = \frac{1}{\sqrt{2}} \begin{pmatrix}%
  \phi_{1} + i \phi_{2} \\%
  \phi_{3} + i \phi_{4}%
 \end{pmatrix}%
 \label{eq:Higgs_doublet}
\end{equation}
with Lagrangian density
\begin{equation}
 \Lagrangian_{\textrm{Higgs}} = \left(D_{\mu}\phi\right)^{\dagger}D^{\mu}\phi - \mu^{2}\phi^{\dagger}\phi - \lambda \left(\phi^{\dagger}\phi\right)^{2}
 \label{eq:Higgs_Lagrangian}
\end{equation}
that is invariant under local $\mathrm{SU}(2)_{L} \otimes \mathrm{U}(1)_{Y}$ transformations.
The Higgs potential
\begin{equation}
 V\left(\phi\right) = \mu^{2}\phi^{\dagger}\phi + \lambda \left(\phi^{\dagger}\phi\right)^{2},
 \label{eq:Higgs_potential}
\end{equation}
shown in \Cref{fig:Higgs_potential}, is chosen such that $\mu^{2} < 0$ and $\lambda > 0$ to provide stable minima.
As before in \Cref{section:symmetry_breaking} with the case of the toy model of the massive complex scalar field, once a ground state has been arbitrarily chosen this spontaneously breaks the $\mathrm{SU}(2)_{L} \otimes \mathrm{U}(1)_{Y}$ symmetry to the subgroup $\mathrm{U}(1)_{\textrm{QED}}$.
This time, the four fields of the complex scalar doublet are reparameterized into
\[
 \phi(x) = \frac{1}{\sqrt{2}} \begin{pmatrix}
  0 \\
  v + h(x)
 \end{pmatrix}
 \exp\left(i \frac{\tau^{i}}{2} \theta^{i}(x)\right)
\]
which gives the real scalar field $h(x)$, corresponding to radial perturbations of the minima, and three%
\footnote{There is much beauty in electroweak symmetry breaking, but the simple, insightful choice of the doublet to give as many Nambu-Goldstone bosons as vector gauge fields is marvelous.}
Nambu-Goldstone fields $\theta^{i}(x)$ with rotational symmetry --- their values have become gauge choices.
Exploiting this gauge freedom, and choosing the unitary gauge $\theta^{i}(x)=0$, results in kinetic term $\left(\textrm{where } g = \sqrt{g_{1}^{2} + g_{2}^{2}}\right)$
\[
 \Lagrangian \subset \frac{1}{2}\partial_{\mu} h \partial^{\mu} h + \left(v + h\right)^{2} \left(\frac{g^{2}}{4} W_{\mu}^{\dagger}W^{\mu} + \frac{g^{2}}{8 \cos^2 \theta_{W}} Z_{\mu}^{\dagger}Z^{\mu}\right)
\]
where the $W^{\pm}$ and $Z$ bosons have absorbed the Nambu-Goldstone bosons as polarizations and respectively acquired masses of
\[
 m_{W} = \frac{1}{2}vg, \qquad m_{Z} = \frac{m_{W}}{\cos\theta_{W}} = \frac{vg}{2\cos\theta_{W}}\,.
\]
Through self-coupling the scalar field --- the Higgs field --- also acquires a mass term of
\[
 m_{h} = \sqrt{-2\mu^{2}} = \sqrt{2\lambda}v.
\]
In the Standard Model $v$, $g_{1}$, $g_{2}$ are free parameters to be measured by experiment, and so the masses of the bosons are not directly predicted.
However, the value%
\footnote{Often referred to as the ``weak scale'' or the ``vacuum expectation value.''}
of $v$ has been calculated independently~\cite{Plehn:2005nk} to be approximately $246~\GeV$.
It is also noted that in further interactions the quarks and charged leptons acquire a mass term from Yukawa couplings~\cite{Yukawa:1935xg}, $c_i$, with the Higgs field
\[
 \begin{split}
  \Lagrangian_{\textrm{Yukawa}} &= -\frac{1}{\sqrt{2}} \left(v+h\right) \left(c_{1}\bar{d}d + c_{2}\bar{u}u + c_{3}\bar{e}e\right) \\
  &= - \left(1 + \frac{h}{v}\right)\left(m_{d}\bar{d}d + m_{u}\bar{u}u + m_{e}\bar{e}e\right)\,.
 \end{split}
\]
The neutrinos notably do not participate in this interaction, and their observed non-zero mass~\cite{Ahmad:2001an} is unexplained through electroweak symmetry breaking in the Standard Model and is currently unresolved.

\begin{figure}[htbp]
 \centering
 \includegraphics[width=\linewidth]{theory/higgs_potential.pdf}
 \caption[Sketch of the Higgs potential shape.]{%
 Sketch of the Higgs potential's ``wine bottle'' shape.
 The trough (the bottom of the eponymous wine bottle) contains the infinite choices of minima at the vacuum expectation value, $v$, that can be selected upon spontaneously breaking the $\mathrm{SU}(2)_{L} \otimes \mathrm{U}(1)_{Y}$ symmetry to the subgroup $\mathrm{U}(1)_{\textrm{QED}}$.}
 \label{fig:Higgs_potential}
\end{figure}

\section{The Higgs Boson}\label{section:Higgs_boson}

The massive Higgs boson produced though the ``Higgs mechanism'' approach to electroweak symmetry breaking is a particle of great interest, as the interactions of the Higgs field with all other elementary particle fields generates their mass.
As a result, through these couplings the Higgs boson can be produced through a large number of interactions.
As this thesis is focused on experimental efforts at CERN's \gls{LHC}, the production mechanisms of interest will be the leading ones in a hadron collider with center-of-mass energy $\sqrt{s}=13~\TeV$.
In order of decreasing cross section, those production modes are: gluon-gluon fusion (ggF), vector boson fusion (VBF), vector boson-associated production or ``Higgsstrahlung'' (VH), and associated production with $t\bar{t}$ ($t\bar{t}H$) and $b\bar{b}$ ($b\bar{b}H$), seen in \Cref{fig:Higgs_production_diagrams}.
The predicted cross section for these production modes are given in \Cref{table:Higgs_production_cross_section} and plotted with theory uncertainties in \Cref{fig:Higgs_production_cross_section_theory}.

\begin{figure}[htbp]
 \centering
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/Higgs_ggF.pdf}
  \caption[Feynman diagram for Higgs production through gluon-gluon fusion.]{%
   Feynman diagram for Higgs production through gluon-gluon fusion.}
  \label{fig:Higgs_ggF}
 \end{subfigure}%
 \quad
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/Higgs_VBF.pdf}
  \caption[Feynman diagram for Higgs production through vector boson fusion.]{%
   Feynman diagram for Higgs production through vector boson fusion.}
  \label{fig:Higgs_VBF}
 \end{subfigure}%

 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/Higgs_strahlung.pdf}
  \caption[Feynman diagram for Higgs production through vector boson associated production (Higgsstrahlung).]{%
   Feynman diagram for Higgs production through vector boson associated production (Higgsstrahlung).}
  \label{fig:Higgs_associated_production}
 \end{subfigure}%
 \quad
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/Higgs_ttbar_associated.pdf}
  \caption[Feynman diagram for Higgs production through associated production with heavy quarks ($t\bar{t}$ and $b\bar{b}$).]{%
   Feynman diagram for Higgs production through associated production with heavy quarks ($t\bar{t}$ and $b\bar{b}$).}
  \label{fig:Higgs_associated_production_ttbar}
 \end{subfigure}%
 \caption[The leading production modes at the LHC for Higgs bosons.]{%
  The leading production modes at the LHC for Higgs bosons.}
 \label{fig:Higgs_production_diagrams}
\end{figure}

\begin{table}[htpb]
 \centering
 \caption[The Standard Model Higgs boson production cross sections in units of pb for $m_{H}=125~\GeV$ in $pp$ collisions as a function of the center-of-mass energy, $\sqrt{s}$, at the LHC.]{%
  The SM Higgs boson production cross sections in units of pb for $m_{H}=125~\GeV$ in $pp$ collisions as a function of the center-of-mass energy, $\sqrt{s}$, at the LHC.
  The predictions for the ggF channel include the latest N3LO results leading to reduced theoretical uncertainties by a factor around 2 compared to the N2LO results~\cite{PDG2018:Ch11,deFlorian:2016spz}.}
 \begin{tabular}{@{}rrrrrrrr@{}} \toprule
  $\sqrt{s}~(\TeV)$ & ggF                  & VBF                  & $WH$                 & $ZH$                 & $t\bar{t}H$           & $b\bar{b}H$            & Total~(pb) \\ \midrule
  $13$              & $48.6_{-5\%}^{+5\%}$ & $3.78_{-2\%}^{+2\%}$ & $1.37_{-2\%}^{+2\%}$ & $0.88_{-5\%}^{+5\%}$ & $0.50_{-13\%}^{+9\%}$ & $0.49_{-24\%}^{+20\%}$ & $55.59$    \\
  \addlinespace[0.3em]
  $14$              & $54.7_{-5\%}^{+5\%}$ & $4.28_{-2\%}^{+2\%}$ & $1.51_{-2\%}^{+2\%}$ & $0.99_{-5\%}^{+5\%}$ & $0.60_{-13\%}^{+9\%}$ & $0.55_{-24\%}^{+20\%}$ & $62.65$    \\
  \bottomrule
 \end{tabular}\label{table:Higgs_production_cross_section}%
\end{table}

\begin{figure}
 \centering
 \includegraphics[width=0.5\textwidth]{theory/Higgs_XS_7-14TeV-2016.eps}
 \caption[The Standard Model Higgs boson production cross sections as a function of the center-of-mass energy, $\sqrt{s}$, for $pp$ collisions.]{%
  The Standard Model Higgs boson production cross sections as a function of the center-of-mass energy, $\sqrt{s}$, for $pp$ collisions.
  The VBF process is indicated as $qqH$.
  The theoretical uncertainties are indicated as bands~\cite{PDG2018:Ch11}.}
 \label{fig:Higgs_production_cross_section_theory}
\end{figure}

The SM Higgs has couplings to all the massive vector gauge fields and charged fermions, and so can decay into all such particles.
At leading order the Higgs will decay primarily to a pair of $b$-quarks $(b\bar{b})$, a pair of weak vector bosons with one of them being off-shell $(VV^{*})$, a pair of gluons $(gg)$, a pair of tau leptons $(\tau^{+}\tau^{-})$, or a pair of photons $(\gamma\gamma)$.
The decays to massless gauge bosons (gluons and photons) are facilitated through loops of massive particles.
The Feynman diagrams for these decays are shown in \Cref{fig:Higgs_decay_channels}, listed in descending (observed) branching ratio in \Cref{table:Higgs_BRs}, and plotted with theory uncertainties in \Cref{fig:Higgs_BRs}.
As the Higgs Yukawa couplings are proportional to the mass of the decay products, it is seen that the Higgs primarily decays to $b\bar{b}$ as $m_{H} < 2 m_{t}$.
However, as hadron colliders mostly produce multijet events%
\footnote{Discovery machines are a messy business.}
from QCD processes, identifying jets coming from resonant $H \to b\bar{b}$ events is quite challenging.

Through the combination of results from the ATLAS and CMS experiment collaborations using approximately $5~\ifb$ of LHC Run 1 data~\cite{Pieri:2016szr}, experimental measurements of the Standard Model Higgs production cross-sections and decay modes have been made, as seen in \Cref{fig:combined_experiment_production_cross_sections}, \Cref{fig:combined_experiment_decay_BRs}, and \Cref{fig:combined_experiment_sigma_BR}.
It is seen that given the uncertainties on the measurements there is generally good agreement between the predictions of the Standard Model and experimental measurements, with all best fit values within two standard deviations of the SM predictions.

\begin{figure}[htbp]
 \centering
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/Hbb.pdf}
  \caption[Feynman diagram for Higgs decay to $b\bar{b}$.]{%
   Feynman diagram for Higgs decay to $b\bar{b}$.}
  \label{fig:H_to_bb}
 \end{subfigure}
 \quad
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/H_WW.pdf}
  \caption[Feynman diagram for Higgs decay to $WW^{*}$.]{%
   Feynman diagram for Higgs decay to $WW^{*}$.}
  \label{fig:H_to_WW}
 \end{subfigure}

 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/Hgg.pdf}
  \caption[Feynman diagram for Higgs decay to $gg$.]{%
   Feynman diagram for Higgs decay to $gg$.}
  \label{fig:H_to_gg}
 \end{subfigure}
 \quad
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/Htautau.pdf}
  \caption[Feynman diagram for Higgs decay to $\tau^{+}\tau^{-}$.]{%
   Feynman diagram for Higgs decay to $\tau^{+}\tau^{-}$.}
  \label{fig:H_to_tautau}
 \end{subfigure}

 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/H_ZZ.pdf}
  \caption[Feynman diagram for Higgs decay to $ZZ^{*}$.]{%
   Feynman diagram for Higgs decay to $ZZ^{*}$.}
  \label{fig:H_to_ZZ}
 \end{subfigure}
 \quad
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/H_photons.pdf}
  \caption[Feynman diagram for Higgs decay to $\gamma\gamma$.]{%
   Feynman diagram for Higgs decay to $\gamma\gamma$.}
  \label{fig:H_to_photons}
 \end{subfigure}
 \caption[The leading decay channels of the Higgs boson.]{%
  The leading decay channels of the Higgs boson.}
 \label{fig:Higgs_decay_channels}
\end{figure}

\begin{table}[htpb]
 \centering
 \caption[The branching ratios and the relative uncertainty for a Standard Model Higgs boson with $m_{H}=125~\GeV$.]{%
  The branching ratios and the relative uncertainty for a Standard Model Higgs boson with $m_{H}=125~\GeV$~\cite{PDG2018:Ch11}.}
 \begin{tabular}{@{}lrr@{}} \toprule
  Decay Channel           & Branching Ratio       & Relative Uncertainty \\ \midrule
  $H\to b\bar{b}$         & $5.84 \times 10^{-1}$ & $_{-3.3\%}^{+3.2\%}$ \\
  \addlinespace[0.3em]
  $H\to W^{+}W^{-}$       & $2.14 \times 10^{-1}$ & $_{-4.2\%}^{+4.3\%}$ \\
  \addlinespace[0.3em]
  $H\to \tau^{+}\tau^{-}$ & $6.27 \times 10^{-2}$ & $_{-5.7\%}^{+5.7\%}$ \\
  \addlinespace[0.3em]
  $H\to ZZ$               & $2.62 \times 10^{-2}$ & $_{-4.1\%}^{+4.3\%}$ \\
  \addlinespace[0.3em]
  $H\to \gamma\gamma$     & $2.27 \times 10^{-3}$ & $_{-4.9\%}^{+5.0\%}$ \\
  \addlinespace[0.3em]
  $H\to Z\gamma$          & $1.53 \times 10^{-3}$ & $_{-8.9\%}^{+9.0\%}$ \\
  \addlinespace[0.3em]
  $H\to \mu^{+}\mu^{-}$   & $2.18 \times 10^{-4}$ & $_{-5.9\%}^{+6.0\%}$ \\
  \bottomrule
 \end{tabular}\label{table:Higgs_BRs}%
\end{table}

\begin{figure}
 \centering
 \includegraphics[width=0.5\textwidth]{theory/SMHiggsBR.eps}
 \caption[The branching ratios for the main decays of the Standard Model Higgs boson near $m_{H}=125~\GeV$.]{%
  The branching ratios for the main decays of the Standard Model Higgs boson near $m_{H}=125~\GeV$.
  The theoretical uncertainties are indicated as bands~\cite{PDG2018:Ch11}.}
 \label{fig:Higgs_BRs}
\end{figure}

\begin{figure}[htbp]
 \centering
 \includegraphics[width=0.5\textwidth]{theory/combined_experiment_production_cross_sections.pdf}
 \caption[Best fit results for the production signal strengths for the Standard Model Higgs boson for the combination of ATLAS and CMS data.]{%
  Best fit results for the production signal strengths for the Standard Model Higgs boson for the combination of ATLAS and CMS data.
  Also shown are the results from each experiment.
  The uncertainty bars indicate the $1\,\sigma$ (thick lines) and $2\,\sigma$ (thin lines) intervals.
  The measurements of the global signal strength $\mu$ are also shown~\cite{Pieri:2016szr}.}
 \label{fig:combined_experiment_production_cross_sections}
\end{figure}

\begin{figure}[htbp]
 \centering
 \includegraphics[width=0.45\textwidth]{theory/combined_experiment_decay_BRs.pdf}
 \caption[Best fit results for the decay signal strengths for the Standard Model Higgs boson for the combination of ATLAS and CMS data.]{%
  Best fit results for the decay signal strengths for the Standard Model Higgs boson for the combination of ATLAS and CMS data.
  Also shown are the results from each experiment.
  The uncertainty bars indicate the $1\,\sigma$ (thick lines) and $2\,\sigma$ (thin lines) intervals~\cite{Pieri:2016szr}.}
 \label{fig:combined_experiment_decay_BRs}
\end{figure}

\begin{figure}[htbp]
 \centering
 \includegraphics[width=0.45\textwidth]{theory/combined_experiment_sigma_BR.pdf}
 \caption[Best fit values of $\sigma_{i} \cdot B^{f}$ for each specific channel $i \to H \to f$, as obtained from the generic parameterization with 23 parameters for the combination of ATLAS and CMS measurements.]{%
  Best fit values of $\sigma_{i} \cdot B^{f}$ for each specific channel $i \to H \to f$, as obtained from the generic parameterization with 23 parameters for the combination of ATLAS and CMS measurements.
  The uncertainty bars indicate the $1\,\sigma$ intervals.
  The fit results are normalized to the SM predictions for the various parameters and the shaded bands indicate the theoretical uncertainties in these predictions.
  Only 20 parameters are shown because some are either not measured with a meaningful precision, in the case of the $H \to ZZ$ decay channel for the $WH$, $ZH$, and
  $ttH$ production processes, or not measured at all and therefore fixed to their corresponding SM predictions, in the case of the $H \to b\bar{b}$ decay mode for the ggF and VBF production processes~\cite{Pieri:2016szr}.}
 \label{fig:combined_experiment_sigma_BR}
\end{figure}

\clearpage
\section{Extensions to the Standard Model}

From astronomical observations of the rotation speeds of galaxies~\cite{Rubin:1970zza,Begeman:1991iy}, precision measurements of the cosmic microwave background~\cite{2013ApJS:darkmatter,Akrami:2018vks}, and gravitational lensing measurements~\cite{Trimble:10.1146,Bertone:2004pz,Feng:2010gw}, there is evidence that in addition to the normal matter of the Standard Model in the Universe there exists ``dark matter'' (DM) that constitutes approximately $26.8\%$ of the energy density of the Universe.
Dark matter is so far seen to interact with normal matter only through gravitation.
As it does not interact with normal matter through the electroweak or strong nuclear force, any interactions with normal matter are outside of the Standard Model.

To incorporate a model of particle dark matter there are a number of existing extensions of the Standard Model.
Among these are frameworks of simplified dark matter models~\cite{EXOT-2017-32,Jacques:2016dqz,Kahlhoefer:2015bea,Alves:2015pea} where new particles mediate the interactions of dark matter, $\chi$, with the Standard Model particles.
Among these are models for a single neutral vector mediator particle: a $\Zprime$.
One simple extension of the Standard Model is a vector or axial-vector simplified model through an additional $\mathrm{U}(1)$ gauge symmetry which gives dark matter particles a charge of this symmetry group~\cite{Abercrombie:2015wmb}, and results in either a vector $\left(\Zprime_{V}\right)$ or axial-vector $\left(\Zprime_{A}\right)$ boson mediator.
This model introduces five new parameters: the mass of the mediator, $m_{\Zprime}$, the mass of the Dirac fermion dark matter particle, $m_{\chi}$, the flavor-universal coupling of the $\Zprime$ to SM quarks, $g_{q}$, the coupling of the $\Zprime$ to all lepton flavors, $g_{\ell}$, and the coupling of the $\Zprime$ to dark matter, $g_{\chi}$.
The resulting interactions of the $\Zprime$ mediator and the particles are shown in \Cref{fig:Zprime_interactions}.

\begin{figure}[htbp]
 \centering
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/Zprime_SM_coupling.pdf}
  \caption[Feynman diagram of the interactions of the $\Zprime$ mediator with Standard Model fermions.]{%
   Feynman diagram of the interactions of the $\Zprime$ mediator with Standard Model fermions.}
  \label{fig:Zprime_SM_coupling}
 \end{subfigure}%
 \quad
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/Zprime_DM_coupling.pdf}
  \caption[Feynman diagram of the interactions of the $\Zprime$ mediator with dark matter.]{%
   Feynman diagram of the interactions of the $\Zprime$ mediator with dark matter.}
  \label{fig:Zprime_DM_coupling}
 \end{subfigure}%
 \caption[Feynman diagrams of the interactions of the $\Zprime$ mediator with both Standard Model fermions and dark matter.]{%
  Feynman diagrams of the interactions of the $\Zprime$ mediator with both Standard Model fermions and dark matter.}
 \label{fig:Zprime_interactions}
\end{figure}

Models with non-zero values of $g_{\ell}$ only slightly increase the mediator width, but further unnecessarily restrict the model space~\cite{Abercrombie:2015wmb}.
To simplify the model and the analysis done in this thesis, only leptophobic $\left(g_{\ell}=0\right)$ $\Zprime$ models are then considered.
This model then introduces the additional term to the Lagrangian density for a vector model of
\[
 \Lagrangian_{\textrm{vector}} = g_{q} \sum_{q} Z^{\prime}_{\mu} \bar{q} \gamma^{\mu} q + g_{\chi} Z^{\prime}_{\mu} \bar{\chi} \gamma^{\mu} \chi
\]
and for an axial-vector model
\[
 \Lagrangian_{\textrm{axial-vector}} = g_{q} \sum_{q} Z^{\prime}_{\mu} \bar{q} \gamma^{\mu}\gamma^{5} q + g_{\chi} Z^{\prime}_{\mu} \bar{\chi} \gamma^{\mu}\gamma^{5} \chi
\]
where $q$ and $\chi$ are respectively the Dirac spinors for the SM quark and dark matter fields and $g_{q}$ is democratic with respect to all quark flavors.

In $t$-channel processes that occur in scattering of dark matter off atomic nuclei, seen in \Cref{fig:Zprime_direct_detection}, the spin-independent interaction cross section of the vector mediator model is enhanced by $A^{2}$, where $A$ is the number of nucleons in the nucleus, as the result of spin coherence effects~\cite{Buchmueller:2014yoa,Chala:2015ama,EXOT-2017-32}.
These processes are relevant in dark matter direct detection experiments such as LUX~\cite{Akerib:2013tjd} and XENON100~\cite{Aprile:2013doa}, where the dark matter candidate considered is a weakly interacting massive particle (WIMP) model with a $\Zprime$ mediator.
For these experiments, the spin enhancement in the spin-independent model provides a limit more than $10^{4}$ stronger than the spin-dependent model limits, as seen for an example model with $g_{q} = 0.25$, $g_{\ell} = 0$, and $g_{\chi} = 1$ in \Cref{fig:direct_detection_exclusions}.
Similar results hold for the leptophilic models~\cite{EXOT-2017-32}.
Collider experiment searches exploit the $s$-channel process --- where there is no large spin dependence --- and as a result do not give competitive limits for vector mediator models, as seen in \Cref{fig:vector_model_exclusions}.
There is no large difference in collider detection sensitivity between vector and axial-vector mediator models, as seen in \Cref{fig:m_DM_vs_m_Zprime}.
However, for axial-vector models with $2 m_{\chi} > m_{\Zprime}$ there are unconstrained regions for low $\Zprime_{A}$ masses.
As a result, this thesis analysis considers an exotic signal search for only a low mass axial-vector leptophobic $\Zprime$ model in the high momentum regime to both further simplify the analysis and exploit similar analysis techniques developed for high momentum fully-hadronic decays of the Higgs boson.

\begin{figure}[htbp]
 \centering
 \includegraphics[width=0.4\textwidth]{theory/Zprime_direct_detection.pdf}
 \caption[Feynman diagram of the scattering of dark matter off Standard Model quarks through exchange of a $\Zprime$ mediator.]{%
  Feynman diagram of the $t$-channel scattering of dark matter, $\chi$, off Standard Model quarks, $q$, through exchange of a $\Zprime$ mediator.}
 \label{fig:Zprime_direct_detection}
\end{figure}

\begin{figure}[htbp]
 \centering
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/vector_model_exclusions.pdf}
  \caption[Limits on the spin-independent WIMP--nucleon scattering cross section for a $\Zprime$ vector mediator model.]{%
   Limits on the spin-independent WIMP--nucleon scattering cross section for a $\Zprime$ vector mediator model.}
  \label{fig:vector_model_exclusions}
 \end{subfigure}%
 \quad
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/axialvector_model_exclusions.pdf}
  \caption[Limits on the spin-dependent WIMP--neutron scattering cross section for a $\Zprime$ axial-vector mediator model.]{%
   Limits on the spin-dependent WIMP--neutron scattering cross section for a $\Zprime$ axial-vector mediator model.}
  \label{fig:axialvector_model_exclusions}
 \end{subfigure}%
 \caption[Comparison of inferred LHC experiment limits with the constraints from direct detection experiments on the WIMP--nucleon scattering cross section in the context of $\Zprime$ simplified model with $g_{q} = 0.25$, $g_{\ell} = 0$, and $g_{\chi} = 1$.]{%
  Comparison of inferred LHC experiment limits with the constraints from direct detection experiments on the WIMP--nucleon scattering cross section in the context of $\Zprime$ simplified model with $g_{q} = 0.25$, $g_{\ell} = 0$, and $g_{\chi} = 1$.
  LHC limits are shown at $95\%$ CL and direct detection limits at $90\%$ CL.
  The comparison is valid solely in the context of this model, assuming a mediator width fixed by the dark matter mass and the coupling values given.
  LHC searches and direct detection experiments exclude the shaded areas.
  Exclusions of smaller scattering cross sections do not imply that larger scattering cross sections are also excluded~\cite{EXOT-2017-32}.}
 \label{fig:direct_detection_exclusions}
\end{figure}

\begin{figure}[htbp]
 \centering
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/m_DM_vs_m_ZprimeV.pdf}
  \caption[Exclusions for a $\Zprime$ vector mediator model.]{%
   Exclusions for a $\Zprime$ vector mediator model.
   Above the curve annihilation processes described by the simplified model deplete the density to $\Omega h^{2} < 0.12$.}
  \label{fig:m_DM_vs_m_ZprimeV}
 \end{subfigure}%
 \quad
 \begin{subfigure}[t]{0.48\textwidth}
  \centering
  \includegraphics[width=\textwidth]{theory/m_DM_vs_m_ZprimeA.pdf}
  \caption[Exclusions for a $\Zprime$ axial-vector mediator model.]{%
   Exclusions for a $\Zprime$ axial-vector mediator model.
   Between the two curves annihilation processes described by the simplified model deplete the density to $\Omega h^{2} < 0.12$.}
  \label{fig:m_DM_vs_m_ZprimeA}
 \end{subfigure}%
 \caption[Regions in the (mediator-mass, DM-mass) plane excluded at $95\%$ CL by visible and invisible searches for leptophobic $\Zprime$ mediator simplified models with $g_{q} = 0.25$, $g_{\ell} = 0$, and $g_{\chi} = 1$.]{%
  Regions in the (mediator-mass, DM-mass) plane excluded at $95\%$ CL by visible and invisible searches for leptophobic $\Zprime$ mediator simplified models.
  The exclusions are computed for $g_{q} = 0.25$, $g_{\ell} = 0$, and $g_{\chi} = 1$.
  Dashed curves labeled ``thermal relic'' correspond to combinations of DM and mediator mass values that are consistent with a DM density of $\Omega h^{2} = 0.12$ and a standard thermal history~\cite{Baer:2014eja}, for dimensionless Hubble parameter $h$.
  The dotted line indicates the kinematic threshold where the mediator can decay on-shell into DM.
  Excluded regions that are in tension with the perturbative unitary considerations of~\cite{Kahlhoefer:2015bea} are indicated by shading in the upper left corner~\cite{EXOT-2017-32}.}
 \label{fig:m_DM_vs_m_Zprime}
\end{figure}


\documentclass[a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{url}
\usepackage{hyperref}

\newcommand{\concatA}{%
  \mathbin{\raisebox{1ex}{\scalebox{.7}{$\frown$}}}%
}
\newcommand{\concatB}{%
  \mathbin{\rotatebox[origin=c]{90}{\scalebox{.7}{(\kern1ex)}}}
}
\title{Gitchain: Decentralized Git Hosting}

\author{Yurii Rashkovskii \texttt{yrashk@gmail.com}}

\date{\today}

\begin{document}
\maketitle

\begin{abstract}
This paper presents an approach for a decentralized storage of Git repositories as well as non-conflicting, fair name allocation and secure maintenance of push permissions to those repositories.
\end{abstract}

\section{Introduction}

Over past couple of years, increased usage of Git and similar tools has brought services like GitHub, Bitbucket and Gitorious to life. However, once a centralized service is experiencing a malfunction, network problem or a denial of service attack, wide reliance on it is severely impacting development workflow as a huge percentage of open source projects effectively go offline for the period of outage.

There has been at least one known attempt to create a decentralized git system, GitTorrent \cite{fonseca06}, however, it did not gain any significant traction and has been effectively abandoned.

However, recent developments such as Bitcoin or Namecoin, combined with older ones such as different variations of DHT and public key cryptography warrant another attempt to remove a single point of failure present in today's Git infrastructure.

In order to make the problem simpler, this paper splits it into a few distinct parts and discusses them separately, in the order of logical significance. The goal of this paper is to design the simplest possible system while (ideally) allowing improvements to be stacked on top of it. Some of these improvements might be described within the paper.

\section{General Architecture}

Gitchain is built around a couple of concepts, and is largerly inspired by Bitcoin and Namecoin.

Gitchain maintains its own \emph{blockchain}. However, there are some notable differences:

\begin{itemize}
\item \emph{No scripting language}. Instead, different transaction types are used. This simplifies its implementation and helps addressing the transaction malleability \cite{txnmal} issue.
\item \emph{Target block discovery time is 30 seconds \todo{Not a final number yet}}. Network difficulty is adjusted every 8640 blocks (or roughly 3 days) \todo{Final numbers will depend on target discovery time}
\end{itemize}

In addition to the blockchain, Gitchain uses a DHT technique to store Git objects in a distributed manner.

\section{Public Key Cryptography}

Gitchain is using elliptic public key cryptography to implement signing and verification, using secp256k1 curve \todo{This is not a final decision. There's a lot of interesting materials available on this subject: \cite{safecurves} \cite{trough} \cite{nistcurvesdangers}}, the same one used in
Bitcoin.

\section{Transaction}

Every transaction on the Gitchain blockchain has a SHA256 hash $TransactionHash := sha256(Transaction)$. In this paper, transactions are typically represented with its name and record-like structure:

\begin{verbatim}
SampleTransaction{Value: ...}
\end{verbatim}

\subsection{Envelope}

Every Gitchain transaction is enveloped with this structure:

\begin{table}[h]
\centering
\begin{tabular}{|l|l|l|}
\hline
\textbf{Field} & \textbf{Description}\\ \hline
PreviousEnvelopeHash & $EnvelopeHash(PreviousEnvelope)$ \\ \hline
Signature & $ECDSASignature(EnvelopeHash(Envelope))$ \\ \hline
PublicKey & Public key used in the signature \\ \hline
NextPublicKey & Next public key in the transaction chain \\ \hline
\end{tabular}
\end{table}

$$H := sha256(TransactionHash(Transaction) \concatA PreviousEnvelopeHash \concatA NextPublicKey)$$ where $Transaction$ is the transaction enveloped and is used to uniquely address that envelope.

\section{Mining}

In order to maintain the blockchain, Gitchain nodes mine blocks, similarly to Bitcoin or Namecoin. However, to avoid Bitcoin miners
with optimized hardware to attempt taking over Gitchain mining, a different algorithm should be chosen.

\subsection{Block Attribution Transaction (BAT)}

While a block can be mined without attribution, it is generally recommended that a miner includes the following transaction into every block it mines. It can be later used as a proof of work record to be redeemed in other transactions.

\begin{verbatim}
BlockAttribution{}
\end{verbatim}

These transactions should never be broadcasted independently of a block. If a node receives an out-of-block BAT transaction, it is discarded immediately.

\section{Name Allocation}

Before any repository can be addressed (and therefore pulled from or pushed to), it needs to have a unique name, with following properties:

\begin{enumerate}
\item A name has a unique textual (defined as \texttt{hpath} in RFC1738 \cite{rfc1738}) representation (to be used as a part of HTTP URL)
\item Name allocation happens on a first-come basis
\item Name can be deallocated (for repository removal or renaming)
\item Fair and reasonable name prefix allocation should be possible (for example, to claim your own base user identifier, for example \texttt{johndoe/} in \texttt{johndoe/foobar})
\end{enumerate}

\subsection{Name Reservation Transaction (NRT)}

Similarly to Namecoin, before a name can be allocated it has to be securely reserved. The following transaction need to mature (12 confirmations\todo{Not a final number}) before the name can be allocated.

\begin{verbatim}
NameReservation(Hash: Hash(rand, name))
\end{verbatim}

The motivation behind this is the same as in Namecoin, this is to prevent others from stealing your name before you had a chance to get it included and confirmed.

\subsection{Name Allocation Transaction (NAT)}

After the corresponding NRT has matured, a name allocation can happen:

\begin{verbatim}
NameAllocation(Name: name, Rand: rand)
\end{verbatim}

Name allocation is considered mature after 12 confirmations.

\subsection{Name Deallocation Transaction (NDT)}

After the NAT has matured, one can deallocate the corresponding name.

\begin{verbatim}
NameDeallocation(Name: name)
\end{verbatim}

\section{Permission Management}

Upon name allocation, the holder of the private key used to allocate the name is granted full permissions to the repository.

\section{Repository Transactions}

\subsection{Object Announcement Transaction (OAT)}

\begin{verbatim}
ObjectAnnouncement(Hash: hash, Type: blob|tree|commit)
\end{verbatim}

\subsection{Reference Update Transaction (RUT)}

\begin{verbatim}
ReferenceUpdate(Repository: repository, Ref: ref, Hash: hash)
\end{verbatim}

\section{Object Storage}

Object storage is where Gitchain goes outside of the blockchain boundaries.

\begin{thebibliography}{9}

\bibitem{fonseca06}
  Jonas Fonseca,
  \emph{GitTorrent: a P2P-based Storage Backend for git}, 2006.
  \url{http://jonas.nitro.dk/tmp/foo/gittorrent.html/main.html}

\bibitem{rfc1738}
  \emph{Uniform Resource Locators (URL)}.
  \url{http://www.ietf.org/rfc/rfc1738.txt}

\bibitem{safecurves}
  Daniel J. Bernstein, Tanja Lange,
  \emph{SafeCurves: choosing safe curves for elliptic-curve cryptography}
  \url{http://safecurves.cr.yp.to/}

\bibitem{trough}
  Fabio Pietrosanti,
  \emph{Not every elliptic curve is the same: trough on ECC security}
  \url{http://infosecurity.ch/20100926/not-every-elliptic-curve-is-the-same-trough-on-ecc-security/}

\bibitem{nistcurvesdangers}
  Daniel J. Bernstein, Tanja Lange,
  \emph{Security dangers of the NIST curves}
  \url{http://www.hyperelliptic.org/tanja/vortraege/20130531.pdf}

\bibitem{qzheng}
  Qingji Zheng, Shouhuai Xu
  \emph{Secure and Efficient Proof of Storage with Deduplication}
  \url{http://eprint.iacr.org/2011/529.pdf}

\bibitem{ateniese}
  Giuseppe Ateniese, Seny Kamara, Jonathan Katz
  \emph{Proofs of Storage from Homomorphic Identification Protocols}
  \url{http://www.cs.jhu.edu/~ateniese/papers/pos.pdf}

\end{thebibliography}

\end{document}


\subsection{Paradigmatic vs Syntagmatic Representations of Word Context}
\label{sec:pvss}

To get a direct comparison of the paradigmatic and syntagmatic context
representations we feed 4 different co-occurrences defined in
Section~\ref{sec:representation} into the S-CODE algorithm.  The first
model accepts word ($W$) - right bigram ($C$) pairs as the input, the
second model accepts word ($W$) - left bigram($C$) pairs as the input,
the third model accepts word ($W$) - concatenation of the left and
right bigrams ($C$) pairs \cite{mintz2003frequent} as the input and
the final model accepts words ($W$) - left bigram($C_1$) and right
bigram ($C_2$) tuples \cite{20674613} as the input to the S-CODE.
Finally, we cluster the word type embeddings ($W$) with k-means
algorithm and report the results on Table \ref{tab:syntagmatic}.
\begin{table}[ht]
\centering
\caption{Summary of results in terms of the \mto\ and \vm\ scores of
  the S-CODE algorithm when the paradigmatic or syntagmatic
  representations are feed as an input.  Standard errors are given in
  parentheses when available.  Results of the statistically best
  performing system are written in bold.  We do not report the
  original results of Maron et al. \protect\shortcite{maron2010sphere}
  since our replication achieves higher accuracies.}
\begin{tabular}{|l|l|l|}
\hline
Input & \mto & \vm\\
\hline
$W$ (word) - $C$ (right bigram) & .6625 (.0115) & .5809 (.0066)\\
$W$ (word) - $C$ (left bigram) & .6604 (.0054) & .5983 (.0028)\\
$W$ (word) - $C$ (left and right bigram concatenation) & .7268 (.0091) & .6416 (.0052)\\
$W$ (word) - $C_1$, $C_2$ (left and right bigrams) & .7173 (.0061) & .6381 (.0032)\\
Maron et al. \shortcite{maron2010sphere}(replication)  & \bgmto & \bgvm \\
$W$ (word) - $C$ (random substitutes) & {\bf\wsmto} & {\bf\wsvm} \\
\hline
\end{tabular}
\label{tab:syntagmatic}
\end{table}

To replicate the work of Maron et al. \shortcite{maron2010sphere} we
feed word ($W$) - right bigram ($C$) pairs as the input.  At the end
each word $w$ in the vocabulary ends up with two points on the sphere,
a $\phi_w$ point representing the behavior of $w$ as the left word of
a bigram and a $\psi_w$ point representing it as the right word.  The
two vectors for $w$ are concatenated to create a 50-dimensional
representation at the end.  These 50-dimensional vectors are clustered
using the k-means algorithm.  Maron et al. \shortcite{maron2010sphere}
report many-to-one scores of .6880 (.0016) for 45 clusters and .7150
(.0060) for 50 clusters (on the PTB).  Using our default settings the
bigram model achieves \bgmto\ \mto\ and \bgvm\ \vm\ accuracies.  Table
\ref{tab:syntagmatic} summarizes all the results and shows that the
paradigmatic representation accuracies are significantly higher than
the syntagmatic representation \mto\ and \vm\ accuracies.


\documentclass[color=usenames,dvipsnames]{beamer}\usepackage[]{graphicx}\usepackage[]{color}
% maxwidth is the original width if it is less than linewidth
% otherwise use linewidth (to make sure the graphics do not exceed the margin)
\makeatletter
\def\maxwidth{ %
  \ifdim\Gin@nat@width>\linewidth
    \linewidth
  \else
    \Gin@nat@width
  \fi
}
\makeatother

\definecolor{fgcolor}{rgb}{0, 0, 0}
\newcommand{\hlnum}[1]{\textcolor[rgb]{0.69,0.494,0}{#1}}%
\newcommand{\hlstr}[1]{\textcolor[rgb]{0.749,0.012,0.012}{#1}}%
\newcommand{\hlcom}[1]{\textcolor[rgb]{0.514,0.506,0.514}{\textit{#1}}}%
\newcommand{\hlopt}[1]{\textcolor[rgb]{0,0,0}{#1}}%
\newcommand{\hlstd}[1]{\textcolor[rgb]{0,0,0}{#1}}%
\newcommand{\hlkwa}[1]{\textcolor[rgb]{0,0,0}{\textbf{#1}}}%
\newcommand{\hlkwb}[1]{\textcolor[rgb]{0,0.341,0.682}{#1}}%
\newcommand{\hlkwc}[1]{\textcolor[rgb]{0,0,0}{\textbf{#1}}}%
\newcommand{\hlkwd}[1]{\textcolor[rgb]{0.004,0.004,0.506}{#1}}%
\let\hlipl\hlkwb

\usepackage{framed}
\makeatletter
\newenvironment{kframe}{%
 \def\at@end@of@kframe{}%
 \ifinner\ifhmode%
  \def\at@end@of@kframe{\end{minipage}}%
  \begin{minipage}{\columnwidth}%
 \fi\fi%
 \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep
 \colorbox{shadecolor}{##1}\hskip-\fboxsep
     % There is no \\@totalrightmargin, so:
     \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
 \MakeFramed {\advance\hsize-\width
   \@totalleftmargin\z@ \linewidth\hsize
   \@setminipage}}%
 {\par\unskip\endMakeFramed%
 \at@end@of@kframe}
\makeatother

\definecolor{shadecolor}{rgb}{.97, .97, .97}
\definecolor{messagecolor}{rgb}{0, 0, 0}
\definecolor{warningcolor}{rgb}{1, 0, 1}
\definecolor{errorcolor}{rgb}{1, 0, 0}
\newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX

\usepackage{alltt}
%\documentclass[color=usenames,dvipsnames,handout]{beamer}

%\usepackage[roman]{../../lab1}
\usepackage[sans]{../../lab1}

\hypersetup{pdftex,pdfstartview=FitV}

%% New command for inline code that isn't to be evaluated
\definecolor{inlinecolor}{rgb}{0.878, 0.918, 0.933}
\newcommand{\inr}[1]{\colorbox{inlinecolor}{\texttt{#1}}}
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\begin{document}

\section{Intro}

\begin{frame}[plain]
  \LARGE
  \centering \par
  {\color{RoyalBlue}{\huge Lab 7 -- $A \times B$ Factorial Designs}} \par
  \vspace{1cm}
  \Large
  %%  October 1 \& 2, 2018 \\
  FANR 6750 \\
  \vfill
  \large
  Richard Chandler and Bob Cooper
\end{frame}

\begin{comment}
\begin{frame}[fragile]
  \frametitle{Data}
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{makeData} \hlkwb{<-} \hlkwd{data.frame}\hlstd{(}\hlkwc{precip}\hlstd{=}\hlkwd{rep}\hlstd{(}\hlkwd{c}\hlstd{(}\hlstr{"Wet"}\hlstd{,} \hlstr{"Dry"}\hlstd{),} \hlkwc{each}\hlstd{=}\hlnum{24}\hlstd{),}
                       \hlkwc{temp}\hlstd{=}\hlkwd{rep}\hlstd{(}\hlkwd{c}\hlstd{(}\hlstr{"Cold"}\hlstd{,} \hlstr{"Hot"}\hlstd{),} \hlkwc{times}\hlstd{=}\hlnum{24}\hlstd{))}
\hlstd{X} \hlkwb{<-} \hlkwd{model.matrix}\hlstd{(}\hlopt{~}\hlstd{precip}\hlopt{*}\hlstd{temp, makeData)} \hlcom{#~forest*season, makeData)}
\hlstd{E} \hlkwb{<-} \hlstd{X} \hlopt{%*%} \hlkwd{c}\hlstd{(}\hlnum{20}\hlstd{,} \hlnum{3}\hlstd{,} \hlopt{-}\hlnum{3}\hlstd{,} \hlopt{-}\hlnum{10}\hlstd{)}
\hlkwd{set.seed}\hlstd{(}\hlnum{3440}\hlstd{)}
\hlstd{species} \hlkwb{<-} \hlkwd{round}\hlstd{(}\hlkwd{rnorm}\hlstd{(}\hlkwd{nrow}\hlstd{(X), E,} \hlkwc{sd}\hlstd{=}\hlnum{2}\hlstd{))}
\hlstd{species}
\end{alltt}
\begin{verbatim}
##  [1] 27  9 23 10 21 12 28  8 23 11 20 10 24 12 21 12 26  8 22 10 21 11 25
## [24]  9 17 18 25 15 15 16 21 22 21 17 20 17 19 18 21 17 19 20 21 18 19 15
## [47] 21 17
\end{verbatim}
\begin{alltt}
\hlstd{richness} \hlkwb{<-} \hlkwd{data.frame}\hlstd{(species, makeData)}
\hlkwd{summary}\hlstd{(}\hlkwd{aov}\hlstd{(species} \hlopt{~} \hlstd{precip}\hlopt{*}\hlstd{temp, richness))}
\end{alltt}
\begin{verbatim}
##             Df Sum Sq Mean Sq F value   Pr(>F)
## precip       1   44.1    44.1   9.303  0.00387 **
## temp         1  736.3   736.3 155.389 4.92e-16 ***
## precip:temp  1  352.1   352.1  74.301 5.29e-11 ***
## Residuals   44  208.5     4.7
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
\end{verbatim}
\begin{alltt}
\hlkwd{summary}\hlstd{(}\hlkwd{aov}\hlstd{(species} \hlopt{~} \hlstd{precip}\hlopt{+}\hlstd{temp, richness))}
\end{alltt}
\begin{verbatim}
##             Df Sum Sq Mean Sq F value   Pr(>F)
## precip       1   44.1    44.1   3.539   0.0664 .
## temp         1  736.3   736.3  59.108 9.84e-10 ***
## Residuals   45  560.6    12.5
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
\end{verbatim}
\begin{alltt}
\hlkwd{write.csv}\hlstd{(richness,} \hlstr{"speciesRichness.csv"}\hlstd{,} \hlkwc{row.names}\hlstd{=}\hlnum{FALSE}\hlstd{)}
\end{alltt}
\end{kframe}
\end{knitrout}
\end{frame}
\end{comment}

\begin{frame}
  \frametitle{Situation}
%  \Large
%  \begin{itemize}[<+->]
%    \item
  There are 2 factors thought to influence the response variable \\
  \pause
  \vfill
%    \item
  The effect of each factor might depend on the other factor \\
  \pause
  \vfill
%    \item
  We have replicates for each \alert{combination} of factors \\
%  \end{itemize}
\end{frame}

%% \begin{frame}[fragile]
%%   \frametitle{Example: species richness by precip and temp}
%%   \scriptsize
%% <<>>=
%% richData <- read.csv("speciesRichness.csv")
%% head(richData, 4)
%% summary(richData)
%% @
%% \end{frame}

\begin{frame}[fragile]
  \frametitle{\small Example: effects of food and predators on voles}
%  \scriptsize
  Import the data
\begin{knitrout}\scriptsize
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{voleData} \hlkwb{<-} \hlkwd{read.csv}\hlstd{(}\hlstr{"microtus_data.csv"}\hlstd{)}
\hlcom{##head(voleData, 7)}
\hlkwd{str}\hlstd{(voleData)}
\end{alltt}
\begin{verbatim}
## 'data.frame':	24 obs. of  3 variables:
##  $ voles    : int  10 12 8 14 18 20 21 24 20 18 ...
##  $ food     : int  0 0 0 0 1 1 1 1 2 2 ...
##  $ predators: Factor w/ 2 levels "Absent","Present": 2 2 2 2 2 2 2 2 2 2 ...
\end{verbatim}
\end{kframe}
\end{knitrout}
%\pause
%\vfill
%\centering
%\LARGE %\normalsize
%What is wrong with the format of the data? \par
\pause
\vfill
Convert \inr{food} to a factor
\begin{knitrout}\scriptsize
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{voleData}\hlopt{$}\hlstd{food} \hlkwb{<-} \hlkwd{factor}\hlstd{(voleData}\hlopt{$}\hlstd{food)}
\hlkwd{str}\hlstd{(voleData)}
\end{alltt}
\begin{verbatim}
## 'data.frame':	24 obs. of  3 variables:
##  $ voles    : int  10 12 8 14 18 20 21 24 20 18 ...
##  $ food     : Factor w/ 3 levels "0","1","2": 1 1 1 1 2 2 2 2 3 3 ...
##  $ predators: Factor w/ 2 levels "Absent","Present": 2 2 2 2 2 2 2 2 2 2 ...
\end{verbatim}
\end{kframe}
\end{knitrout}
\end{frame}

% \begin{frame}[fragile]
%   \frametitle{Must convert {\tt food} to a factor}
%   \small
% <<factor>>=
% voleData$food <- factor(voleData$food)
% str(voleData)
% @
% \end{frame}

\begin{frame}[fragile]
  \frametitle{See how many replicates you have}
%  The {\tt table} function tabulates the
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{table}\hlstd{(voleData}\hlopt{$}\hlstd{predators, voleData}\hlopt{$}\hlstd{food)}
\end{alltt}
\begin{verbatim}
##
##           0 1 2
##   Absent  4 4 4
##   Present 4 4 4
\end{verbatim}
\end{kframe}
\end{knitrout}
\pause
\vfill
%\begin{columns}
%  \column{\dimexpr\paperwidth-20pt}
  Balanced design with 4 replicates of each combination of factors
  \begin{itemize}
    \small
    \item Factor A: Predators (Absent and Present)
    \item Factor B: Food (0, 1, and 2)
  \end{itemize}
%\end{columns}
\end{frame}

%% \begin{frame}[fragile]
%%   \frametitle{Boxplot with 2 factors}
%%   \vspace{-0.5cm}
%% %  \tiny
%% \begin{center}
%% <<fig=true,width=9,height=7>>=
%% boxplot(species ~ precip + temp, data=richData,
%%         ylab="Species richness", cex.lab=1.5)
%% @
%% \end{center}
%% \end{frame}

\begin{frame}[fragile]
  \frametitle{Boxplot with 2 factors}
\begin{knitrout}\scriptsize
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{boxplot}\hlstd{(voles} \hlopt{~} \hlstd{food} \hlopt{+} \hlstd{predators,} \hlkwc{data}\hlstd{=voleData,} \hlkwc{ylab}\hlstd{=}\hlstr{"Voles"}\hlstd{,} \hlkwc{cex.lab}\hlstd{=}\hlnum{1.5}\hlstd{)}
\end{alltt}
\end{kframe}
\end{knitrout}
\centering
\includegraphics[width=0.9\textwidth]{figure/box1-1} \\ %\par
\end{frame}

\section{\tt aov}

%% \begin{frame}[fragile]
%%   \frametitle{$A \times B$ interaction}
%%   \small
%% <<>>=
%% aov1 <- aov(species ~ precip * temp, data=richData)
%% summary(aov1)
%% @
%% \end{frame}

\begin{frame}[fragile]
  \frametitle{$A \times B$ interaction}
%  \small
\begin{knitrout}\footnotesize
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{aov1} \hlkwb{<-} \hlkwd{aov}\hlstd{(voles} \hlopt{~} \hlstd{food} \hlopt{*} \hlstd{predators,} \hlkwc{data}\hlstd{=voleData)}
\hlkwd{summary}\hlstd{(aov1)}
\end{alltt}
\begin{verbatim}
##                Df Sum Sq Mean Sq F value   Pr(>F)
## food            2 1337.3   668.6   40.56 2.15e-07 ***
## predators       1  975.4   975.4   59.16 4.27e-07 ***
## food:predators  2  518.3   259.1   15.72 0.000112 ***
## Residuals      18  296.8    16.5
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
\end{verbatim}
\end{kframe}
\end{knitrout}
\pause
\vfill
The interaction is significant, so the effect of food depends on
whether predators are present or not. %(and vice versa)
\end{frame}

%% \begin{frame}[fragile]
%%   \frametitle{No interaction}
%%   \small
%% <<>>=
%% aov2 <- aov(species ~ precip + temp, data=richData)
%% summary(aov2)
%% @
%% \end{frame}

\begin{comment}
\begin{frame}[fragile]
  \frametitle{No interaction}
  \small
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{aov2} \hlkwb{<-} \hlkwd{aov}\hlstd{(voles} \hlopt{~} \hlstd{food} \hlopt{+} \hlstd{predators,} \hlkwc{data}\hlstd{=voleData)}
\hlkwd{summary}\hlstd{(aov2)}
\end{alltt}
\begin{verbatim}
##             Df Sum Sq Mean Sq F value   Pr(>F)
## food         2 1337.3   668.6   16.41 6.06e-05 ***
## predators    1  975.4   975.4   23.94 8.81e-05 ***
## Residuals   20  815.0    40.8
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
\end{verbatim}
\end{kframe}
\end{knitrout}
\end{frame}
\end{comment}

\section{Follow-up}

%% \begin{frame}[fragile]
%%   \frametitle{Follow-up}
%%   \footnotesize
%% <<>>=
%% summary(aov(species ~ precip, data=richData, subset=temp=="Hot"))
%% @
%% \pause
%% \vfill
%% <<>>=
%% summary(aov(species ~ precip, data=richData, subset=temp=="Cold"))
%% @
%% \end{frame}

\begin{frame}[fragile]
  \frametitle{Follow-up}
%  \footnotesize
%  {\centering \large \bf Assess effect of food for each level of predator
%    factor \\}
  Test for an effect of food when predators are present
\begin{knitrout}\scriptsize
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{summary}\hlstd{(}\hlkwd{aov}\hlstd{(voles} \hlopt{~} \hlstd{food,} \hlkwc{data}\hlstd{=voleData,} \hlkwc{subset}\hlstd{=predators}\hlopt{==}\hlstr{"Present"}\hlstd{))}
\end{alltt}
\begin{verbatim}
##             Df Sum Sq Mean Sq F value  Pr(>F)
## food         2 193.50   96.75   14.82 0.00142 **
## Residuals    9  58.75    6.53
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
\end{verbatim}
\end{kframe}
\end{knitrout}
\pause
\vfill
  Test for an effect of food when predators are absent
\begin{knitrout}\scriptsize
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{summary}\hlstd{(}\hlkwd{aov}\hlstd{(voles} \hlopt{~} \hlstd{food,} \hlkwc{data}\hlstd{=voleData,} \hlkwc{subset}\hlstd{=predators}\hlopt{==}\hlstr{"Absent"}\hlstd{))}
\end{alltt}
\begin{verbatim}
##             Df Sum Sq Mean Sq F value   Pr(>F)
## food         2   1662   831.0   31.42 8.71e-05 ***
## Residuals    9    238    26.4
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
\end{verbatim}
\end{kframe}
\end{knitrout}
\end{frame}

\begin{frame}[fragile]
  \frametitle{Tukey's HSD}
  % \tiny %\scriptsize
  Multiple comparisons of all combinations of the two factors
\begin{knitrout}\scriptsize
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{tuk.out} \hlkwb{<-} \hlkwd{TukeyHSD}\hlstd{(aov1)}
\hlstd{tuk.out}\hlopt{$}\hlstr{'food:predators'}
\end{alltt}
\begin{verbatim}
##                       diff         lwr        upr        p adj
## 1:Absent-0:Absent    18.00   8.8756323  27.124368 8.272319e-05
## 2:Absent-0:Absent    28.50  19.3756323  37.624368 1.343228e-07
## 0:Present-0:Absent   -2.50 -11.6243677   6.624368 9.487798e-01
## 1:Present-0:Absent    7.25  -1.8743677  16.374368 1.684043e-01
## 2:Present-0:Absent    3.50  -5.6243677  12.624368 8.221335e-01
## 2:Absent-1:Absent    10.50   1.3756323  19.624368 1.890394e-02
## 0:Present-1:Absent  -20.50 -29.6243677 -11.375632 1.542664e-05
## 1:Present-1:Absent  -10.75 -19.8743677  -1.625632 1.577400e-02
## 2:Present-1:Absent  -14.50 -23.6243677  -5.375632 1.001292e-03
## 0:Present-2:Absent  -31.00 -40.1243677 -21.875632 3.654987e-08
## 1:Present-2:Absent  -21.25 -30.3743677 -12.125632 9.495014e-06
## 2:Present-2:Absent  -25.00 -34.1243677 -15.875632 9.539109e-07
## 1:Present-0:Present   9.75   0.6256323  18.874368 3.231246e-02
## 2:Present-0:Present   6.00  -3.1243677  15.124368 3.351103e-01
## 2:Present-1:Present  -3.75 -12.8743677   5.374368 7.780829e-01
\end{verbatim}
\end{kframe}
\end{knitrout}
\end{frame}

\section{Graphics}

\begin{frame}[fragile]
  \frametitle{Compute group means and SEs}
%  \tiny
\begin{knitrout}\tiny
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{ybar_ij.SE} \hlkwb{<-} \hlkwd{model.tables}\hlstd{(aov1,} \hlkwc{type}\hlstd{=}\hlstr{"means"}\hlstd{,} \hlkwc{se}\hlstd{=}\hlnum{TRUE}\hlstd{)}
\hlstd{ybar_ij.SE}
\end{alltt}
\begin{verbatim}
## Tables of means
## Grand mean
##
## 22.625
##
##  food
## food
##      0      1      2
## 12.250 26.125 29.500
##
##  predators
## predators
##  Absent Present
##   29.00   16.25
##
##  food:predators
##     predators
## food Absent Present
##    0 13.50  11.00
##    1 31.50  20.75
##    2 42.00  17.00
##
## Standard errors for differences of means
##          food predators food:predators
##         2.030     1.658          2.871
## replic.     8        12              4
\end{verbatim}
\end{kframe}
\end{knitrout}
\end{frame}

\begin{frame}[fragile]
  \frametitle{Extract group means and SEs}
  {\bf Group means}
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{ybar_ij.} \hlkwb{<-} \hlstd{ybar_ij.SE}\hlopt{$}\hlstd{tables}\hlopt{$}\hlstr{"food:predators"}
\hlstd{ybar_ij.}
\end{alltt}
\begin{verbatim}
##     predators
## food Absent Present
##    0 13.50  11.00
##    1 31.50  20.75
##    2 42.00  17.00
\end{verbatim}
\end{kframe}
\end{knitrout}

\pause
\vfill

{\bf Standard error}
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{SE_ij.} \hlkwb{<-} \hlkwd{as.numeric}\hlstd{(ybar_ij.SE}\hlopt{$}\hlstd{se}\hlopt{$}\hlstr{"food:predators"}\hlstd{)}
\hlstd{SE_ij.}
\end{alltt}
\begin{verbatim}
## [1] 2.871072
\end{verbatim}
\end{kframe}
\end{knitrout}
\end{frame}

%% \begin{frame}[fragile]
%%   \frametitle{Plot group means and SEs}
%% %  \tiny
%% <<ybarSE1,fig=TRUE,include=FALSE,width=8,height=6,echo=false>>=
%% plot(1:6, ybar_ij., xaxt="n", xlim=c(0.5, 6.5), ylim=c(0, 50), cex=1.5, cex.lab=1.5,
%%      pch=16, col=c("blue","blue","blue","black","black","black"),
%%      xlab="", ylab="Voles")
%% axis(1, 1:6, labels=c("Absent-0", "Absent-1", "Absent-2",
%%                       "Present-0", "Present-1", "Present-2"))
%% arrows(1:6, ybar_ij.-SE_ij., 1:6, ybar_ij.+SE_ij., code=3, angle=90, length=0.05, lwd=2)
%% @
%% %\begin{center}
%%   \includegraphics[width=0.95\textwidth]{lab07-factorial-ybarSE1}
%% %\end{center}
%% \end{frame}

%% par(mai=c(0.9,0.9,0.1,0.1))

\begin{frame}[fragile]
  \frametitle{Plot group means and SEs}
  \tiny
\begin{knitrout}\tiny
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{plot}\hlstd{(}\hlnum{1}\hlopt{:}\hlnum{3}\hlstd{, ybar_ij.[,}\hlnum{1}\hlstd{],} \hlkwc{xaxt}\hlstd{=}\hlstr{"n"}\hlstd{,} \hlkwc{xlim}\hlstd{=}\hlkwd{c}\hlstd{(}\hlnum{0.5}\hlstd{,} \hlnum{3.5}\hlstd{),} \hlkwc{ylim}\hlstd{=}\hlkwd{c}\hlstd{(}\hlnum{0}\hlstd{,} \hlnum{50}\hlstd{),} \hlkwc{type}\hlstd{=}\hlstr{"b"}\hlstd{,}
     \hlkwc{pch}\hlstd{=}\hlnum{16}\hlstd{,} \hlkwc{col}\hlstd{=}\hlstr{"blue"}\hlstd{,} \hlkwc{xlab}\hlstd{=}\hlstr{"Food"}\hlstd{,} \hlkwc{ylab}\hlstd{=}\hlstr{"Voles"}\hlstd{,} \hlkwc{cex}\hlstd{=}\hlnum{1.5}\hlstd{,} \hlkwc{cex.lab}\hlstd{=}\hlnum{1.5}\hlstd{,} \hlkwc{lwd}\hlstd{=}\hlnum{2}\hlstd{)}
\hlkwd{lines}\hlstd{(}\hlnum{1}\hlopt{:}\hlnum{3}\hlstd{, ybar_ij.[,}\hlnum{2}\hlstd{],} \hlkwc{pch}\hlstd{=}\hlnum{16}\hlstd{,} \hlkwc{col}\hlstd{=}\hlstr{"black"}\hlstd{,} \hlkwc{type}\hlstd{=}\hlstr{"b"}\hlstd{,} \hlkwc{cex}\hlstd{=}\hlnum{1.5}\hlstd{,} \hlkwc{lty}\hlstd{=}\hlnum{2}\hlstd{,} \hlkwc{lwd}\hlstd{=}\hlnum{2}\hlstd{)}
\hlkwd{axis}\hlstd{(}\hlnum{1}\hlstd{,} \hlnum{1}\hlopt{:}\hlnum{3}\hlstd{,} \hlkwc{labels}\hlstd{=}\hlkwd{c}\hlstd{(}\hlstr{"0"}\hlstd{,} \hlstr{"1"}\hlstd{,} \hlstr{"2"}\hlstd{))}
\hlkwd{arrows}\hlstd{(}\hlnum{1}\hlopt{:}\hlnum{3}\hlstd{, ybar_ij.[,}\hlnum{1}\hlstd{]}\hlopt{-}\hlstd{SE_ij.,} \hlnum{1}\hlopt{:}\hlnum{3}\hlstd{, ybar_ij.[,}\hlnum{1}\hlstd{]}\hlopt{+}\hlstd{SE_ij.,} \hlkwc{code}\hlstd{=}\hlnum{3}\hlstd{,} \hlkwc{angle}\hlstd{=}\hlnum{90}\hlstd{,}
       \hlkwc{length}\hlstd{=}\hlnum{0.05}\hlstd{,} \hlkwc{lwd}\hlstd{=}\hlnum{2}\hlstd{,} \hlkwc{col}\hlstd{=}\hlstr{"blue"}\hlstd{)}
\hlkwd{arrows}\hlstd{(}\hlnum{1}\hlopt{:}\hlnum{3}\hlstd{, ybar_ij.[,}\hlnum{2}\hlstd{]}\hlopt{-}\hlstd{SE_ij.,} \hlnum{1}\hlopt{:}\hlnum{3}\hlstd{, ybar_ij.[,}\hlnum{2}\hlstd{]}\hlopt{+}\hlstd{SE_ij.,} \hlkwc{code}\hlstd{=}\hlnum{3}\hlstd{,} \hlkwc{angle}\hlstd{=}\hlnum{90}\hlstd{,}
       \hlkwc{length}\hlstd{=}\hlnum{0.05}\hlstd{,} \hlkwc{lwd}\hlstd{=}\hlnum{2}\hlstd{)}
\hlkwd{legend}\hlstd{(}\hlnum{0.5}\hlstd{,} \hlnum{50}\hlstd{,} \hlkwd{c}\hlstd{(}\hlstr{"Absent"}\hlstd{,} \hlstr{"Present"}\hlstd{),} \hlkwc{col}\hlstd{=}\hlkwd{c}\hlstd{(}\hlstr{"blue"}\hlstd{,} \hlstr{"black"}\hlstd{),} \hlkwc{lty}\hlstd{=}\hlkwd{c}\hlstd{(}\hlnum{1}\hlstd{,}\hlnum{2}\hlstd{),} \hlkwc{title}\hlstd{=}\hlstr{"Predators"}\hlstd{,} \hlkwc{pch}\hlstd{=}\hlnum{16}\hlstd{)}
\end{alltt}
\end{kframe}
\end{knitrout}
\begin{center}
  \includegraphics[width=0.7\textwidth]{figure/ybarSE2-1}
\end{center}
\end{frame}

\begin{frame}[fragile]
  \frametitle{Plot group means and SEs}
  \tiny
\begin{knitrout}\tiny
\definecolor{shadecolor}{rgb}{0.878, 0.918, 0.933}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{bp} \hlkwb{<-} \hlkwd{barplot}\hlstd{(ybar_ij.,} \hlkwc{xlab}\hlstd{=}\hlstr{"Predators"}\hlstd{,} \hlkwc{args.legend}\hlstd{=}\hlkwd{list}\hlstd{(}\hlkwc{title}\hlstd{=}\hlstr{"Food"}\hlstd{),}
              \hlkwc{cex.lab}\hlstd{=}\hlnum{1.5}\hlstd{,} \hlkwc{cex.names}\hlstd{=}\hlnum{1.4}\hlstd{,} \hlkwc{col}\hlstd{=}\hlkwd{c}\hlstd{(}\hlstr{"linen"}\hlstd{,} \hlstr{"lightblue"}\hlstd{,} \hlstr{"turquoise"}\hlstd{),}
              \hlkwc{ylab}\hlstd{=}\hlstr{"Voles"}\hlstd{,} \hlkwc{beside}\hlstd{=}\hlnum{TRUE}\hlstd{,} \hlkwc{legend}\hlstd{=}\hlnum{TRUE}\hlstd{,} \hlkwc{ylim}\hlstd{=}\hlkwd{c}\hlstd{(}\hlnum{0}\hlstd{,} \hlnum{50}\hlstd{));} \hlkwd{box}\hlstd{()}
\hlkwd{arrows}\hlstd{(bp, ybar_ij., bp, ybar_ij.}\hlopt{+}\hlstd{SE_ij.,} \hlkwc{code}\hlstd{=}\hlnum{2}\hlstd{,} \hlkwc{angle}\hlstd{=}\hlnum{90}\hlstd{,} \hlkwc{length}\hlstd{=}\hlnum{0.05}\hlstd{,} \hlkwc{lwd}\hlstd{=}\hlnum{1}\hlstd{)}
\end{alltt}
\end{kframe}
\end{knitrout}
\begin{center}
  \includegraphics[width=0.8\textwidth]{figure/ybarSE3-1}
\end{center}
\end{frame}

\begin{frame}
%  \frametitle{Assignment - Due prior to lab next week}
  \frametitle{In-class exercise}
\scriptsize %\tiny

{\bf Fictitious Scenario \par}
Acid rain has lowered the pH of many lakes in the northeastern United
States, and as a result, some fish populations have declined. Managers
have resorted to aerial applications of lime (powdered calcium
carbonate) in hopes of increasing pH. To determine if lime
applications result in increased pH, they applied equal amounts of
lime to 15 lakes, and as a control, they applied the same amount of
inert white powder to an additional 15 lakes. Researchers suspected
that the effect of lime might depend upon the buffering effects of the
underlying bedrock. To assess this hypothesis, the 30 lakes were
chosen such that 10 had limestone bedrock, 10 had granite bedrock, and
10 had shist bedrock. pH was measured before and after each
application, and the difference in pH is recorded in the file
``acidityData.csv.'' \par
\pause
\vfill
{\bf Questions}
\begin{enumerate}[{\bf 1}]
  \item Use an $A \times B$ factorial ANOVA to determine if the effect
    of lime depend upon the bedrock type. List all of the null and
    alternative hypotheses associated with the analysis.
  \item Summarize your main conclusions using 2-3 sentences, and by
    plotting the estimates of the mean differences in pH for each
    combination of the two factors. Include 95\% confidence intervals.
  % \item What are the null and alternative hypotheses?
  % \item Test the null hypotheses using an  %Create an ANOVA table
  % using \inr {summary}.
\end{enumerate}
\pause
\vfill
Put your answers in a self-contained \R~script (or .Rmd file), and
upload the script to ELC at least one day before your next lab.
\end{frame}

\end{document}