\typeout{new file: Verification_Tests_Chapter.tex}

\chapter{Verification Tests}
\label{sec:verification}

This chapter reports the results of the verification tests performed with the new fuel data, \textit{i.e.} Ethylene ($\rm C_2H_4$), Ethane ($\rm C_2H_6$), Propylene ($\rm C_3H_6$), Propane ($\rm C_3H_8$), Toluene ($\rm C_7H_8$),
  \textit{n}-Heptane ($\rm C_7H_{16}$), Methanol ($\rm CH_3OH$), Methyl Methacrylate ($\rm C_5H_8O_2$). Synthetic transmissivity spectrum were generated with RadCal and compared with all the experimental data they were extract from. The experimental data resolution was adjusted to match that of RadCal:
\begin{equation}
 \begin{cases}
   5~{\rm cm}^{-1},\, & \om \leq 1000 {\rm cm^{-1}}\\
    25~{\rm cm}^{-1},\,& 5000 > \om > 1000 {\rm cm^{-1}} \\
    50~{\rm cm}^{-1},\,& \om > 5000 {\rm cm^{-1}}
 \end{cases}
\end{equation}

The relative error between the experimental and the RadCal-generated transmissivity, denoted $\epsilon{(\tau_{\omega})}$, was also quantified. The relative error between the experimental and the RadCal calculated transmissivities can also be quantified by a weighted average relative error $\epsilon$ over the entire experimental spectrum. A useful test function to perform the weighting is given by the spectral emissivity. Assuming Kirchhoff's law applies for each wavenumber over a narrow band, the spectral emissivity of a narrow band, denoted $\bar{\varepsilon}_{\omega}$, is given by:
\begin{equation}
 \bar{\varepsilon}_{\omega} = 1 -\bar{\tau}_{\omega}.
\end{equation}
The weighted average error is then defined by the following relation:
\begin{equation}
\label{eq:WeightedError}
 \langle\epsilon{(\bar{\tau}_{\omega})}\rangle = \dfrac{\displaystyle\int\limits_{700}^{4000}\bar{\varepsilon}_{\omega}\epsilon(\bar{\tau}_{\omega}) {\rm d} \omega}{\displaystyle\int\limits_{700}^{4000}\bar{\varepsilon}_{\omega} {\rm d} \omega}.
\end{equation}

Figure~\ref{fig:Verify_All} plots the maximum relative error and the maximum integrated weighted error for all the new species. Note that the values given in these plot correspond to the maximum over the set of tested temperatures.

\begin{figure}
\begin{center}
      \includegraphics[width=\textwidth]{../Verification/Results_Test2/Test2_Results.pdf}
\end{center}
 \caption{Left: Maximum relative error, in percent, across the whole spectrum and temperature for the new molecules implemented in RadCal. Right: Maximum integrated weighted error (across tested temperatures) calculated using Eq.~\ref{eq:WeightedError}. \label{fig:Verify_All}}
\end{figure}

In the following sections below, for each species, detailed plots comparing the spectral experimental transmissivities with the synthetic ones calculated with RadCal are presented along with plots of the spectral relative error in transmissivity for each pressure-path and temperature tested. Very good agreement is overall found except in some well localized parts of the spectrum for the heaviest molecules and usually at elevated temperature. The reason behind it is that at elevated temperature, the experimental measurements were very close to the optically thin limit, \textit{i.e.} $\tau \rightarrow 1$, and thus some of the measurements were affected by the FTIR sensitivity. Nevertheless, when comparing integrated quantities, \textit{e.g.} the integrated weighted error, the match between experimental and predicted results is very good.

\clearpage

\section{Ethylene: $\rm C_2H_4$}

\begin{figure}[h]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethylene_296.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethylene of an isothermal homogeneous column of ethylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.305, 0.18, and 0.0784 atm.cm. The gas temperature is set at 296~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethylene_Verify_296K}}
\end{figure}

\newpage

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethylene_400.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethylene of an isothermal homogeneous column of ethylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.305, 0.18, and 0.0784 atm.cm. The gas temperature is set at 400~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethylene_Verify_400K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethylene_450.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethylene of an isothermal homogeneous column of ethylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.305, 0.18, and 0.0784 atm.cm. The gas temperature is set at 450~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethylene_Verify_450K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethylene_500.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethylene of an isothermal homogeneous column of ethylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.305, 0.18, and 0.0784 atm.cm. The gas temperature is set at 500~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethylene_Verify_500K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethylene_601.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethylene of an isothermal homogeneous column of ethylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.305, 0.18, and 0.0784 atm.cm. The gas temperature is set at 601~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethylene_Verify_600K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethylene_801.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethylene of an isothermal homogeneous column of ethylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.305, 0.18, and 0.0784 atm.cm. The gas temperature is set at 801~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethylene_Verify_801K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethylene_1000.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethylene of an isothermal homogeneous column of ethylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.305, 0.18, and 0.0784 atm.cm. The gas temperature is set at 1000~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethylene_Verify_1000K}}
\end{figure}

\clearpage

\section{Ethane: $\rm C_2H_6$}

\begin{figure}[h]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethane_296.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethane of an isothermal homogeneous column of ethane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.339, 0.211, and 0.0812 atm.cm. The gas temperature is set at 296~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethane_Verify_296K}}
\end{figure}

\newpage

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethane_400.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethane of an isothermal homogeneous column of ethane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.339, 0.211, and 0.0812 atm.cm. The gas temperature is set at 400~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethane_Verify_400K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethane_450.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethane of an isothermal homogeneous column of ethane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.339, 0.211, and 0.0812 atm.cm. The gas temperature is set at 450~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethane_Verify_450K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethane_500.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethane of an isothermal homogeneous column of ethane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.339, 0.211, and 0.0812 atm.cm. The gas temperature is set at 500~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethane_Verify_500K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethane_600.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethane of an isothermal homogeneous column of ethane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.339, 0.211, and 0.0812 atm.cm. The gas temperature is set at 600~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethane_Verify_600K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethane_800.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethane of an isothermal homogeneous column of ethane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.339, 0.211, and 0.0812 atm.cm. The gas temperature is set at 801~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethane_Verify_800K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Ethane_1000.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of ethane of an isothermal homogeneous column of ethane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.339, 0.211, and 0.0812 atm.cm. The gas temperature is set at 1000~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:ethane_Verify_1000K}}
\end{figure}

\clearpage

\section{Propylene: $\rm C_3H_6$}

\begin{figure}[h]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propylene_296.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propylene of an isothermal homogeneous column of propylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.476, 0.318, and 0.159 atm.cm. The gas temperature is set at 296~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propylene_Verify_296K}}
\end{figure}

\newpage

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propylene_390.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propylene of an isothermal homogeneous column of propylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.476, 0.318, and 0.159 atm.cm. The gas temperature is set at 390~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propylene_Verify_390K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propylene_444.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propylene of an isothermal homogeneous column of propylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.476, 0.318, and 0.159 atm.cm. The gas temperature is set at 444~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propylene_Verify_444K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propylene_491.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propylene of an isothermal homogeneous column of propylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.476, 0.318, and 0.159 atm.cm. The gas temperature is set at 491~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propylene_Verify_491K}}
\end{figure}
\newpage

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propylene_594.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propylene of an isothermal homogeneous column of propylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.476, 0.318, and 0.159 atm.cm. The gas temperature is set at 594~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propylene_Verify_594K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propylene_793.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propylene of an isothermal homogeneous column of propylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.476, 0.318, and 0.159 atm.cm. The gas temperature is set at 793~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propylene_Verify_793K}}
\end{figure}
\newpage

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propylene_1003.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propylene of an isothermal homogeneous column of propylene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.476, 0.318, and 0.159 atm.cm. The gas temperature is set at 1003~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propylene_Verify_1003K}}
\end{figure}

\clearpage

\section{Propane: $\rm C_3H_8$}

\begin{figure}[h]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propane_295.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propane of an isothermal homogeneous column of propane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.127, 0.0794, and 0.0318 atm.cm. The gas temperature is set at 295~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propane_Verify_295K}}
\end{figure}

\newpage

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propane_396.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propane of an isothermal homogeneous column of propane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0318, 0.0794, and 0.127 atm.cm. The gas temperature is set at 396~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propane_Verify_396K}}
\end{figure}
\newpage

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propane_435.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propane of an isothermal homogeneous column of propane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0318, 0.0794, and 0.127 atm.cm. The gas temperature is set at 435~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propane_Verify_435K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propane_513.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propane of an isothermal homogeneous column of propane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0318, 0.127, and 0.0794 atm.cm. The gas temperature is set at 513~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propane_Verify_513K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propane_578.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propane of an isothermal homogeneous column of propane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0318, 0.0794, and 0.127 atm.cm. The gas temperature is set at 578~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propane_Verify_578K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propane_790.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propane of an isothermal homogeneous column of propane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0318, 0.0794, and 0.127 atm.cm. The gas temperature is set at 790~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propane_Verify_790K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Propane_1009.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of propane of an isothermal homogeneous column of propane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0318, 0.0794, and 0.127 atm.cm. The gas temperature is set at 1009~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:propane_Verify_1009K}}
\end{figure}

\clearpage

\section{Toluene: $\rm C_7H_8$}

\begin{figure}[h]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Toluene_300.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of toluene of an isothermal homogeneous column of toluene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.101, 0.0809, and 0.136 atm.cm. The gas temperature is set at 300~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:toluene_Verify_300K}}
\end{figure}

\newpage

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Toluene_396.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of toluene of an isothermal homogeneous column of toluene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.081, 0.125, and 0.0959 atm.cm. The gas temperature is set at 396~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:toluene_Verify_396K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Toluene_440.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of toluene of an isothermal homogeneous column of toluene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.109, 0.0846, and 0.0743 atm.cm. The gas temperature is set at 440~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:toluene_Verify_440K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Toluene_477.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of toluene of an isothermal homogeneous column of toluene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0831, 0.126, and 0.0963 atm.cm. The gas temperature is set at 477~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:toluene_Verify_477K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Toluene_587.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of toluene of an isothermal homogeneous column of toluene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.118, 0.0961, and 0.0812 atm.cm. The gas temperature is set at 587~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:toluene_Verify_587K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Toluene_795.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of toluene of an isothermal homogeneous column of toluene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.128, 0.0966, and 0.0834 atm.cm. The gas temperature is set at 795~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:toluene_Verify_795K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Toluene_999.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of toluene of an isothermal homogeneous column of toluene. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.138, 0.104, and 0.0896 atm.cm. The gas temperature is set at 999~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:toluene_Verify_999K}}
\end{figure}

\clearpage

\section{\textit{n}-Heptane: $\rm C_7H_{16}$}

\begin{figure}[h]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Heptane_293.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of \textit{n}-heptane of an isothermal homogeneous column of \textit{n}-heptane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.015, 0.0313, and 0.0493 atm.cm. The gas temperature is set at 293~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:nheptane_Verify_293K}}
\end{figure}

\newpage

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Heptane_400.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of \textit{n}-heptane of an isothermal homogeneous column of \textit{n}-heptane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0476, 0.0302, and 0.0145 atm.cm. The gas temperature is set at 400~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:nheptane_Verify_400K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Heptane_450.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of \textit{n}-heptane of an isothermal homogeneous column of \textit{n}-heptane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0497, 0.0312, and 0.0152 atm.cm. The gas temperature is set at 450~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:nheptane_Verify_450K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Heptane_490.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of \textit{n}-heptane of an isothermal homogeneous column of \textit{n}-heptane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0496, 0.0306, and 0.015 atm.cm. The gas temperature is set at 490~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:nheptane_Verify_490K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Heptane_593.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of \textit{n}-heptane of an isothermal homogeneous column of \textit{n}-heptane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0504, 0.0315, and 0.0152 atm.cm. The gas temperature is set at 593~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:nheptane_Verify_593K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Heptane_794.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of \textit{n}-heptane of an isothermal homogeneous column of \textit{n}-heptane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0149, 0.0441, and 0.0302 atm.cm. The gas temperature is set at 794~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:nheptane_Verify_794K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Heptane_1000.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of \textit{n}-heptane of an isothermal homogeneous column of \textit{n}-heptane. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0308, 0.0174, and 0.0365 atm.cm. The gas temperature is set at 1000~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:nheptane_Verify_1000K}}
\end{figure}

\clearpage

\section{Methanol: $\rm CH_3OH$}

\begin{figure}[h]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Methanol_293.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of methanol of an isothermal homogeneous column of methanol. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0498, 0.0716, and 0.0925 atm.cm. The gas temperature is set at 293~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:methanol_Verify_293K}}
\end{figure}

\newpage

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Methanol_396.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of methanol of an isothermal homogeneous column of methanol. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0505, 0.0738, and 0.0932 atm.cm. The gas temperature is set at 396~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:methanol_Verify_396K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Methanol_443.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of methanol of an isothermal homogeneous column of methanol. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0459, 0.071, and 0.094 atm.cm. The gas temperature is set at 443~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:methanol_Verify_443K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Methanol_483.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of methanol of an isothermal homogeneous column of methanol. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0489, 0.0703, and 0.0907 atm.cm. The gas temperature is set at 483~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:methanol_Verify_483K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Methanol_570.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of methanol of an isothermal homogeneous column of methanol. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0922, 0.05, and 0.0726 atm.cm. The gas temperature is set at 570~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:methanol_Verify_570K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Methanol_804.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of methanol of an isothermal homogeneous column of methanol. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0537, 0.0785, and 0.101 atm.cm. The gas temperature is set at 804~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:methanol_Verify_804K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/Methanol_1000.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of methanol of an isothermal homogeneous column of methanol. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.097, 0.0731, and 0.049 atm.cm. The gas temperature is set at 1000~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:methanol_Verify_1000K}}
\end{figure}

\clearpage

\section{Methyl Methacrylate: $\rm C_5H_8O_2$}

\begin{figure}[h]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/MMA_297.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of MMA of an isothermal homogeneous column of MMA. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.1, 0.0785, and 0.0545 atm.cm. The gas temperature is set at 297~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:MMA_Verify_297K}}
\end{figure}

\newpage

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/MMA_396.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of MMA of an isothermal homogeneous column of MMA. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.102, 0.179, and 0.0782 atm.cm. The gas temperature is set at 396~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:MMA_Verify_396K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/MMA_441.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of MMA of an isothermal homogeneous column of MMA. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0946, 0.074, and 0.0508 atm.cm. The gas temperature is set at 441~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:MMA_Verify_443K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/MMA_483.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of MMA of an isothermal homogeneous column of MMA. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0956, 0.0742, and 0.0512 atm.cm. The gas temperature is set at 483~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:MMA_Verify_483K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/MMA_597.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of MMA of an isothermal homogeneous column of MMA. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.0966, 0.0746, and 0.0516 atm.cm. The gas temperature is set at 597~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:MMA_Verify_597K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/MMA_803.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of MMA of an isothermal homogeneous column of MMA. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.106, 0.081, and 0.0554 atm.cm. The gas temperature is set at 803~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:MMA_Verify_803K}}
\end{figure}

\begin{figure}[p]
\includegraphics[width=\textwidth]{../Verification/Results_Test2/MMA_1014.pdf}
\caption{Top: comparison between the experimental (solid lines) and RadCal-generated synthetic (dashed lines) spectral transmissivity profiles, denoted $\tau_{\omega}$, of MMA of an isothermal homogeneous column of MMA. Bottom: relative transmissivity error, denoted $\epsilon{(\tau_{\omega})}$, between the experiment and the synthetic profiles presented on the top figure. Three different pressure path lengths are considered: 0.114, 0.0879, and 0.0598 atm.cm. The gas temperature is set at 1014~K and the total pressure is 101 kPa. Note: the experimental data resolution has been changed to match that of the narrow band model. \label{fig:MMA_Verify_1014K}}
\end{figure}


%!TEX root = ../notes.tex
\section{March 1, 2022}
\subsection{Power Residues}
For this section, corresponds to pages 45-46 of Ireland \& Rosen \cite{ireland1990classical} are a good reference.
\begin{definition}[Power Residue]
    If $m, n\in \ZZ_+$ and $a\in \ZZ$ such that $(a, m) = 1$, then we say that \ul{$a$ is an $n^\mathrm{th}$ power residue} modulo $m$ if and only if the congruence
    \begin{equation}\label{eqn:pow-residue}x^n\equiv a\mod m\end{equation}
    has solutions.
\end{definition}
Given \cref{eqn:pow-residue}, we're interested in two questions:
\begin{enumerate}[1)]
    \item Does \cref{eqn:pow-residue} have a solution?
    \item If yes, then how many?
\end{enumerate}

\begin{proposition}\label{prop:4.2.1}
    If $m\in\ZZ_+$ is such that $U(m)$ is cyclic, and $a\in\ZZ$ is such that $(a, m)=1$, then
    \[x^n\equiv a\mod m\]
    has solutions if and only if
    \[a^{\phi(m)/d}\equiv 1\mod m\]
    where $d = (\phi(m), n)$.

    If there are solutions, then there are exactly $d$ solutions.
\end{proposition}
\begin{proof}
    Let $g$ be a primitive root mod $m$, and let
    \[a=g^b.\]
    Suppose $x = g^y$. Then
    \begin{alignat*}{3}
         &        &  & x^n    &  & \equiv a\mod m       \\
         & \iff\  &  & g^{ny} &  & \equiv g^b\mod m     \\
         & \iff   &  & ny     &  & \equiv b\mod \phi(m)
    \end{alignat*}
    This is solvable if and only if $d=(\phi(m), n)\mid b$. If there is at least one solution, then there are exactly $d$ solutions.

    Now we show that $d\mid b\Leftrightarrow a^{\phi(m)/d}\equiv 1\mod m$.

    Forward direction:
    \[a^{\phi(m)/d} = g^{b\cdot \phi(m)/d} = \left(g^{\phi(m)}\right)^{b/d} = 1\mod m\]

    Backward direction:
    \[a^{\phi(m)/d}\equiv 1\mod m \Rightarrow g^{b\cdot \phi(m)/d}\equiv 1\mod m \Rightarrow \phi(m)\mid b\cdot \phi(m)/d \Rightarrow \frac{b}{d}\in\ZZ\]
\end{proof}

We can prove this using a similar group theory theorem that we can apply directly.
\begin{theorem}\label{thm:ft-cyclic-groups}
    Let $G$ be a cyclic group of order $n$, suppose $k\in\ZZ_+$ and $a\in G$. Then $a=b^k$ ($a$ is a $k^\mathrm{th}$ power in $G$) iff $a^{n/(k,n)} = e$ iff $x^k = a$ has $(n, k)$ solutions in $G$.
\end{theorem}

The proof of this theorem uses the following lemma:
\begin{lemma}
    Let $G$ be a cyclic group of order $n$ and let $H$ be a subgroup of $G$ of order $d$. Then $x\in H$ iff $x^d = e$ iff $\ord(x)\mid d$.
\end{lemma}

\begin{proof}[Proof of \cref{thm:ft-cyclic-groups}]
    Let $H$ be a subgroup of $k^\mathrm{th}$ powers in $G$\footnote{This is indeed a subgroup. We use the fact that $G$ is Abelian.}, and let $g\in G$ be such that $G = \langle g\rangle$.

    Then $H = \{g^{jk}\mid j\in \ZZ\} = \langle g^k\rangle$. Since $\ord(g^k) = \frac{n}{(k, n)}$ (\emph{exercise}), we that $|H| - \frac{n}{(k,n)}$.

    Consider $\phi: G\to G$ that powers by $k$, $\phi: x\mapsto x^k$. Then $\im(\phi) = H$, so this implies that $\phi$ is a $(k, n)$-to-$1$ mapping (so gives us the number of solutions to each power, and how many $k$ powers there are).
\end{proof}

Knowing how to solve these modulo a group of units gives us ways using CRT/Sunzi's Theorem to solve mod composite numbers.

We write $m = 2^ep_1^{e_1}\cdots p_r^{e_r}$ where $p_i$ are pairwise distinct odd primes. Then
\[x^n\equiv a\mod m, \quad (a, m) = 1\]
is solvable if and only if the system
\begin{align*}
    x^n & \equiv a\mod 2^e       \\
    x^n & \equiv a\mod p_i^{e_i} \\
        & \vdots                 \\
    x^n & \equiv a\mod p_r^{e_r}
\end{align*}
is solvable.

We have that $U(p_i^{e_i}), U(2), U(4)$ are all cyclic. Hence our prior discussion can be applied to those.

\begin{ques*}
    How do we solve
    \[x^n\equiv a\mod m\]
    where $e\geq 3$ (for powers of $2$)?
\end{ques*}
\begin{proposition}[4.2.2 from Text]
    Let $a\in\ZZ$ be odd, $e\geq 3$, and consider $x^n\equiv a\mod 2^e$.

    If $n$ is odd, then $a$ solution exists and is unique. If $n$ is even, $a$ solution exists if and only if $a\equiv 1\mod 4$ and $a^{2^{e-2}/d}\equiv 1\mod 2^e$ where $d = (n, 2^{e-2})$. When a solution exists, there are exactly $2d$ solutions.
\end{proposition}
\begin{proof}
    \emph{Exercise to come.}
\end{proof}

\subsection{Quadratic Residues}
Things are a lot simpler and nicer when we consider only quadratic congruences (as opposed to arbitrary residues).
\begin{definition}[Quadratic Residue]
    Let $a\in\ZZ$, $m\in\ZZ_+$, $(a, m) = 1$. We say that $a$ is a \ul{quadratic residue mod $m$} if the congruence
    \begin{equation}\label{eqn:quadratic-residue}x^2\equiv a\mod m\end{equation}
    has a solution.
\end{definition}

Conversely, if $a$ is not a quadratic residue (that is, \cref{eqn:quadratic-residue} does not have a solution), we call it a \ul{nonresidue} or a \ul{quadratic nonresidue}.

We extract the consequences of previous propositions to get special cases of propositions 4.2.3 and 4.2.4 from text.

\begin{enumerate}[1)]
    \item
          Let $p\in\ZZ_+$ be an odd prime, and suppose $a\in\ZZ$ with $p\nmid a$. Then
          \begin{align*}
              x^2 & \equiv a\mod p
              \intertext{is solvable iff}
              x^2 & \equiv a\mod p^e
          \end{align*}
          is solvable for all $e\geq 1$.
    \item
          Let $a\in\ZZ$ be odd. Then
          \begin{align*}
              x^2 & \equiv a\mod 8
              \intertext{is solvable iff }
              x^2 & \equiv a\mod 2^e
          \end{align*}
          is solvable for all $e\geq 3$.
\end{enumerate}
\begin{proposition}[5.1.1 from Text]
    Let
    \[m = 2^ep_1^{e_1}\cdots p_r^{e_r}\]
    be the prime factorization of $m\in\ZZ_+$, and suppose $(a, m) = 1$.

    Then
    \begin{equation}\label{eqn:5.1.1}
        x^2\equiv a\mod m
    \end{equation}
    is solvable if and only if three conditions are satisfied:
    \begin{enumerate}[i.]
        \item If $e = 2$, then $a\equiv 1\mod 4$.
        \item If $e\geq 3$, then $a\equiv 1\mod 8$.
        \item For each $i$, have
              \[a^{(p_i-1)/2}\equiv 1\mod p_i\]
    \end{enumerate}
\end{proposition}
\begin{proof}
    Sunzi's theorem tells us that \cref{eqn:5.1.1} is solvable iff
    \begin{align*}
        x^2 & \equiv x\mod 2^e       \\
        x^2 & \equiv a\mod p_1^{e_1} \\
            & \vdots                 \\
        x^2 & \equiv a\mod p_r^{e_r}
    \end{align*}
    are \emph{all} solvable.

    First consider the first equation $x^2\equiv 1\mod 2^e$. $1$ is the only quadratic residue mod $4$ and the same thing is true mod $8$. On the other hand, black box 2 gives us $x^2\equiv a\mod 8$ is solvable iff $x^2\equiv a\mod 2^e$ for $e\geq 3$. This gives us conditions i and ii.

    Now consider $x^2\equiv a\mod p_i^{e_i}$. \Cref{prop:4.2.1} gives that $x^2\equiv a\mod p_i$ is solvable iff $a^{(p_i - 1)/2}\equiv 1\mod p_i$. Black box 1 then tells us that
    \begin{align*}
        x^2           & \equiv a\mod p_i\quad\text{is solvable}        \\
        \iff\quad x^2 & \equiv a\mod p_i^{e_i}\quad\text{is solvable.}
    \end{align*}
    which concludes our proof.
\end{proof}

\begin{remark*}
    Studying these quadratic congruences amounts to studying them modulo primes.
\end{remark*}

\subsection{The Legendre Symbol}
\begin{definition}[The Legendre Symbol]\label{defn:legendre-symbol}
    Let $p$ be an odd prime, and let $a\in\ZZ$.
    \[\lege{a}{p} = \begin{cases}
            1  & \text{if $a$ is a quadratic residue mod $p$} \\
            0  & \text{if $p\mid a$}                          \\
            -1 & \text{otherwise}
        \end{cases}\]
    This symbol $\lege{a}{p}$ is called the Legendre symbol.
\end{definition}

\begin{proposition}[5.1.2 of Text]\label{prop:5.1.2}
    We have the following properties of the Legendre symbol:
    \begin{enumerate}[(a)]
        \item
              \[\lege{a}{p} = a^{(p-1)/2}\mod p\]
              This is called \emph{Euler's Criterion}.
        \item
              \[\lege{ab}{p} = \lege{a}{p}\cdot\lege{b}{p}\]
              which is to say that the Legendre symbol is totally multiplicative.
        \item If $a\equiv b\mod p$, then
              \[\lege{a}{p} = \lege{b}{p}.\]
    \end{enumerate}
\end{proposition}


\documentclass[a4paper,12pt]{article}

\author{Fuad Aji Pratomo}
\title{LaTeX Intro}

\begin{document}

\maketitle

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\section{Introductio}
This section introduce a paper or journal
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

\section{Formatting}

\subsection{Formatting Subsection}

Let $D$ be a subset of $\bf R$ and let
$f \colon D \to \mathbf{R}$ be a real-valued function on
$D$. The function $f$ is said to be \emph{continuous} on
$D$ if, for all $\epsilon > 0$ and for all $x \in D$,
there exists some $\delta > 0$ (which may depend on $x$)
such that if $y \in D$ satisfies
\[ |y - x| < \delta \]
then
\[ |f(y) - f(x)| < \epsilon. \]

One may readily verify that if $f$ and $g$ are continuous
functions on $D$ then the functions $f+g$, $f-g$ and
$f.g$ are continuous. If in addition $g$ is everywhere
non-zero then $f/g$ is continuous.

\end{document}


\documentclass{article}%
\usepackage[T1]{fontenc}%
\usepackage[utf8]{inputenc}%
\usepackage{lmodern}%
\usepackage{textcomp}%
\usepackage{lastpage}%
%
\input{common_symbols_and_format.tex}%
\usepackage{tocloft}%
\renewcommand{\cfttoctitlefont}{\Large\bfseries}%
%
\begin{document}%
\normalsize%
\logo%
\rulename{Static Combination Regression}%
\tblofcontents%

\ruledescription{Regresses the one-day price changes against the lagged level and one day change of the signal for the specified number of days, using coefficients estimated from the start of the data.}
\howtotrade{
Given default parameter values, if the asset drift is 0.01 and the error is 0.05 (5\% daily volatility), this rule will take a $0.01 / (0.05)^2  = 4.0$ or 400\% position (leveraged).}
{
\begin{figure}[H]
\begin{multicols}{2}
  \centering
    \begin{subfigure}{\linewidth}
        \includegraphics[width=\linewidth]{\graphdir{market.png}}
        \caption{Market series data}
        \label{fig:01}
    \end{subfigure}
  \par
  \vspace{5mm}
  \begin{subfigure}{\linewidth}
    \includegraphics[width=\linewidth]{\graphdir{research.png}}
    \caption{Research series data}
    \label{fig:02}
  \end{subfigure}
  \par
  \begin{subfigure}{\linewidth}
    \includegraphics[width=\linewidth]{\graphdir{pa(StaticCombinationRegression).png}}
    \caption{ Suggested volume to buy or sell}
    \label{fig:03}
  \end{subfigure}
  \par
  \vspace{5mm}
  \begin{subfigure}{\linewidth}
    \includegraphics[width=\linewidth]{\graphdir{pr(StaticCombinationRegression).png}}
    \caption{Portfolio return}
    \label{fig:04}
  \end{subfigure}
  \end{multicols}
  \caption{Graphical depiction of the Static Combination Regression algorithm. 20 Days of trading data is visualised in the graphs (\ref{fig:01}) A line chart showing changes in the market price for multiple trading days. (\ref{fig:02}) A chart displaying the research series data. (\ref{fig:03}) Positive values indicate that buying the security by x\%. The negative values mean you are shorting the security by x\% (\ref{fig:04}) Chart showing the portfolio return when using the Static Combination Regression as the trading rule.}
  \label{fig:cps_graph}
\end{figure}

}

\ruleparameters{Kelly fraction}{1.0}{Amplitude weighting. 1.0 is maximum growth if regression is exact. <1.0 scales down positions taken.}{$\kellyfraction$}{Regression length}{50}{This is the number of days used to estimate the regression coefficients.}{$\lookbacklength$}%
\stoptable%

\section{Equation}
The equations below govern how the static combination regression rule calculates a trading position.

\begin{equation}
\regressionprice_\currenttime = \amplitudecoefficientone\research_\currenttime + \amplitudecoefficienttwo(\frac{\research_\currenttime}{\research_{\currenttime - 1}} - 1) +\amplitudecoefficientthree(\frac{\price_\currenttime}{\research_\currenttime}-1)+\constantc
\label{eq1}
\end{equation}\\

In the equation (\ref{eq1}), the predictive price  $\regressionprice_\currenttime$ is calculated using the static change regression, static difference regression and static level regression combined in one trading rule. Since we are using a static approach the amplitude coefficients $\amplitudecoefficient$ remain constant. In order to calculate the resultant fractional portfolio allocation $\position_{\currenttime}$ we use the Kelly fraction to obtain the maximum results for the long run.

\begin{equation}
\position_\currenttime = \kellyfraction \frac{\regressionprice_\currenttime}{ \rmserror_{\regressionprice}^{2}}  \\
\label{eq2}
\end{equation}

\hspace{200mm}
\\

where

$\research$:is the value of the research series.

$\regressionprice_\currenttime$: is the predicted price at time $\currenttime$.

$\rmserror_\regressionprice$: is the standard error.

$\kellyfraction$ is the Kelly Fraction.

$\position$: is the resultant fractional portfolio investment.

The standard error $\rmserror_{\regressionprice}$ is calculated and included in equation (\ref{eq2}) to normalize the predicted price.

\hspace{200mm}
\hspace{200mm}

\keyterms%
\furtherlinks%
\end{document}


\chapter{{\tt PatchAndGoInfo}: Pivot Modification Object}
\par
On occasion, an application will demand specific behavior
during a factorization.
We have written the {\tt PatchAndGoInfo} object to communicate
information to the {\tt Chv} object during a factorization of a front.
Most users can ignore this object.
However, if a different type of behavior is required, one could
extend this object by adding a new strategy to it and modifying the
{\tt Chv} methods that factor a front.
\par
Let us describe two strategies that we presently support.
\begin{itemize}
\item
Primal-dual linear programming may require repeated factorizations
of matrices of the form $AD^2A^T$, where $A$ comes from constraint
equations and $D$ is a diagonal matrix.
As the optimization proceeds,
$AD^2A^T$ becomes increasingly ill-conditioned because the
entries in $D$ go to zero or infinity.
Normally, when a small or zero pivot element is detected, we would
either signal an error (if we expected the matrix to be positive
definite) or pivot for stability.
However, in the primal-dual pivot context, a small or zero element
on the diagonal is not a calamity.
It signals that the variable associated with the small entry can be
``skipped'' in the solution process.
There are several ways to implement this behavior.
We have chosen a simple way: the diagonal entry is set to 1.0
and all off-diagonal entries in the corresponding column of $L$
are set to zero.
\item
In structural analysis, ``multi-point constraints'' are often
applied to a linear system. At times, applying these constraints
generates a matrix that is essentially singular. The singularity
may be benign, as in the following case.
$$
\left \lbrack \begin{array}{cc}
A_{1,1} & 0 \\
0 & A_{2,2}
\end{array} \right \rbrack
\left \lbrack \begin{array}{c}
X_1 \\
X_2
\end{array} \right \rbrack
=
\left \lbrack \begin{array}{c}
0 \\
B_2
\end{array} \right \rbrack
$$
If $A_{1,1}$ is singular, the solution $X_1 = 0$ and
$X_2 = A_{2,2}^{-1} B_2$ is perfectly acceptable.
In other cases, the location of the singularity can be
communicated back to the user to supply useful information
about the finite element model.
One common practice is to not use pivoting, but to check the
magnitude of the diagonal entry as a row and column is to be eliminated.
If the magnitude is smaller than a user-supplied parameter,
the diagonal entry is set to some multiple of the largest
offdiagonal entry in that row and column of the front,
the location and perturbation is noted,
and the factorization proceeds.
\end{itemize}
\par
Other strategies can be added to the {\tt PatchAndGoInfo} object.
For example, if a matrix is being factored that is believed to be
positive definite, and a negative value is found in a pivot
element, one could abort the factorization, or perturb the element
so that it is positive.


Implements the Gr\"obner bases based procedure as presented in~\cite{JLCA_CAI13}. In general, this procedure can detect only the unsatisfiability of a conjunction of equations. This module also supports the usage of these equations to further simplify all constraints in the conjunction of constraints forming its input and passes these simplified constraints to its backends. However, it cannot be guaranteed that backends perform better on the simplified constraints than on the constraints before simplification.

\paragraph{Efficiency} The worst case complexity of the underlying procedure is exponential in the number of variables of the input constraints. In the case that the conjunction of constraints to check for satisfiability contains equations, this module can be more efficient than other modules for NRA on finding out inconsistency.


% Generated by Sphinx.
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
%\usepackage{babel}
%\usepackage{times}
%\usepackage[Bjarne]{fncychap}

PyMC provides 35 built-in probability distributions. For each distribution, PyMC provides:
\begin{itemize}
    \item A function that evaluates its log-probability or log-density, for example \code{normal_like()}.
    \item A function that draws random variables, for example \code{rnormal()}.
    \item A function that computes the expectation associated with the distribution, for example \code{normal_expval()}.
    \item A \code{Stochastic} subclass generated from the distribution, for example \code{Normal}.
\end{itemize}

This section describes the likelihood functions of these distributions.
\index{pymc.distributions (module)}
\hypertarget{module-pymc.distributions}{}
%\declaremodule[pymc.distributions]{}{pymc.distributions}

\small

\section{Discrete distributions}
\index{bernoulli\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.bernoulli_like}{}\begin{funcdesc}{bernoulli\_like}{x, p}
The Bernoulli distribution describes the probability of successes (x=1) and
failures (x=0).
\begin{gather}
\begin{split}f(x \mid p) = p^{x} (1-p)^{1-x}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : Series of successes (1) and failures (0). $x=0,1$

\item {}
\emph{p} : Probability of success. $0 < p < 1$.

\end{itemize}

\item[Example] \leavevmode
\begin{Verbatim}[commandchars=@\[\]]
@PYGaQ[@textgreater[]@textgreater[]@textgreater[] ]bernoulli@_like(@PYGZlb[]@PYGaw[0],@PYGaw[1],@PYGaw[0],@PYGaw[1]@PYGZrb[], @PYGbe[.]@PYGaw[4])
@PYGaa[-2.8542325496673584]
\end{Verbatim}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(x)= p$

\item {}
$Var(x)= p(1-p)$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{binomial\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.binomial_like}{}\begin{funcdesc}{binomial\_like}{x, n, p}
Binomial log-likelihood.  The discrete probability distribution of the
number of successes in a sequence of n independent yes/no experiments,
each of which yields success with probability p.
\begin{gather}
\begin{split}f(x \mid n, p) = \frac{n!}{x!(n-x)!} p^x (1-p)^{n-x}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : {[}int{]} Number of successes, \textgreater{} 0.

\item {}
\emph{n} : {[}int{]} Number of Bernoulli trials, \textgreater{} x.

\item {}
\emph{p} : Probability of success in each trial, $p \in [0,1]$.

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(X)=np$

\item {}
$Var(X)=np(1-p)$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{categorical\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.categorical_like}{}\begin{funcdesc}{categorical\_like}{x, p}
Categorical log-likelihood. The most general discrete distribution.
\begin{gather}
\begin{split}f(x=i \mid p) = p_i\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}
for $i \in 0 \ldots k-1$.
\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : {[}int{]} $x \in 0\ldots k-1$

\item {}
\emph{p} : {[}float{]} $p > 0$, $\sum p = 1$

\end{itemize}

\end{description}
\end{funcdesc}
\index{discrete\_uniform\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.discrete_uniform_like}{}\begin{funcdesc}{discrete\_uniform\_like}{x, lower, upper}
Discrete uniform log-likelihood.
\begin{gather}
\begin{split}f(x \mid lower, upper) = \frac{1}{upper-lower}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : {[}int{]} $lower \leq x \leq upper$

\item {}
\emph{lower} : Lower limit.

\item {}
\emph{upper} : Upper limit (upper \textgreater{} lower).

\end{itemize}

\end{description}
\end{funcdesc}
\index{geometric\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.geometric_like}{}\begin{funcdesc}{geometric\_like}{x, p}
Geometric log-likelihood. The probability that the first success in a
sequence of Bernoulli trials occurs on the x'th trial.
\begin{gather}
\begin{split}f(x \mid p) = p(1-p)^{x-1}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : {[}int{]} Number of trials before first success (x \textgreater{} 0).

\item {}
\emph{p} : Probability of success on an individual trial, $p \in [0,1]$

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(X)=1/p$

\item {}
$Var(X)=\frac{1-p}{p^2}$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{hypergeometric\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.hypergeometric_like}{}\begin{funcdesc}{hypergeometric\_like}{x, n, m, N}
Hypergeometric log-likelihood. Discrete probability distribution that
describes the number of successes in a sequence of draws from a finite
population without replacement.
\begin{gather}
\begin{split}f(x \mid n, m, N) = \frac{\binom{m}{x}\binom{N-m}{n-x}}{\binom{N}{n}}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : {[}int{]} Number of successes in a sample drawn from a population.

\item {}
\emph{n} : {[}int{]} Size of sample drawn from the population.

\item {}
\emph{m} : {[}int{]} Number of successes in the population.

\item {}
\emph{N} : {[}int{]} Total number of units in the population.

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}
$E(X) = \frac{n n}{N}$
\end{notice}
\end{funcdesc}
\index{negative\_binomial\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.negative_binomial_like}{}\begin{funcdesc}{negative\_binomial\_like}{x, mu, alpha}
Negative binomial log-likelihood. The negative binomial distribution describes a
Poisson random variable whose rate parameter is gamma distributed. PyMC's chosen
parameterization is based on this mixture interpretation.
\begin{gather}
\begin{split}f(x \mid \mu, \alpha) = \frac{\Gamma(x+\alpha)}{x! \Gamma(\alpha)} (\alpha/(\mu+\alpha))^\alpha (\mu/(\mu+\alpha))^x\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : Input data (x \textgreater{} 0).

\item {}
\emph{mu} : mu \textgreater{} 0

\item {}
\emph{alpha} : alpha \textgreater{} 0

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E[x]=\mu$

\item {}
In Wikipedia's parameterization,
$r=\alpha$
$p=\alpha/(\mu+\alpha)$
$\mu=r(1-p)/p$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{poisson\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.poisson_like}{}\begin{funcdesc}{poisson\_like}{x, mu}
Poisson log-likelihood. The Poisson is a discrete probability distribution.
It is often used to model the number of events occurring in a fixed period of
time when the times at which events occur are independent. The Poisson
distribution can be derived as a limiting case of the binomial distribution.
\begin{gather}
\begin{split}f(x \mid \mu) = \frac{e^{-\mu}\mu^x}{x!}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : {[}int{]} $x \in {0,1,2,...}$

\item {}
\emph{mu} : Expected number of occurrences during the given interval, $\mu \geq 0$.

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(x)=\mu$

\item {}
$Var(x)=\mu$

\end{itemize}
\end{notice}
\end{funcdesc}

\section{Continuous distributions}
\index{beta\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.beta_like}{}\begin{funcdesc}{beta\_like}{x, alpha, beta}
Beta log-likelihood. The conjugate prior for the parameter :math: \emph{p} of the binomial distribution.
\begin{gather}
\begin{split}f(x \mid \alpha, \beta) = \frac{\Gamma(\alpha + \beta)}{\Gamma(\alpha) \Gamma(\beta)} x^{\alpha - 1} (1 - x)^{\beta - 1}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : 0 \textless{} x \textless{} 1

\item {}
\emph{alpha} : alpha \textgreater{} 0

\item {}
\emph{beta} : beta \textgreater{} 0

\end{itemize}

\item[Example] \leavevmode
\begin{Verbatim}[commandchars=@\[\]]
@PYGaQ[@textgreater[]@textgreater[]@textgreater[] ]beta@_like(@PYGbe[.]@PYGaw[4],@PYGaw[1],@PYGaw[2])
@PYGaa[0.18232160806655884]
\end{Verbatim}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(X)=\frac{\alpha}{\alpha+\beta}$

\item {}
$Var(X)=\frac{\alpha \beta}{(\alpha+\beta)^2(\alpha+\beta+1)}$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{cauchy\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.cauchy_like}{}\begin{funcdesc}{cauchy\_like}{x, alpha, beta}
Cauchy log-likelihood. The Cauchy distribution is also known as the
Lorentz or the Breit-Wigner distribution.
\begin{gather}
\begin{split}f(x \mid \alpha, \beta) = \frac{1}{\pi \beta [1 + (\frac{x-\alpha}{\beta})^2]}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{alpha} : Location parameter.

\item {}
\emph{beta} : Scale parameter \textgreater{} 0.

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
Mode and median are at alpha.

\end{itemize}
\end{notice}
\end{funcdesc}
\index{chi2\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.chi2_like}{}\begin{funcdesc}{chi2\_like}{x, nu}
Chi-squared $\chi^2$ log-likelihood.
\begin{gather}
\begin{split}f(x \mid \nu) = \frac{x^{(\nu-2)/2}e^{-x/2}}{2^{\nu/2}\Gamma(\nu/2)}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : \textgreater{} 0

\item {}
\emph{nu} : {[}int{]} Degrees of freedom ( nu \textgreater{} 0 )

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(X)=\nu$

\item {}
$Var(X)=2\nu$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{degenerate\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.degenerate_like}{}\begin{funcdesc}{degenerate\_like}{x, k}
Degenerate log-likelihood.
\begin{gather}
\begin{split}f(x \mid k) = \left\{ \begin{matrix} 1 \text{ if } x = k \\ 0 \text{ if } x \ne k\end{matrix} \right.\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : Input value.

\item {}
\emph{k} : Degenerate value.

\end{itemize}

\end{description}
\end{funcdesc}
\index{exponential\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.exponential_like}{}\begin{funcdesc}{exponential\_like}{x, beta}
Exponential log-likelihood.

The exponential distribution is a special case of the gamma distribution
with alpha=1. It often describes the time until an event.
\begin{gather}
\begin{split}f(x \mid \beta) = \frac{1}{\beta}e^{-x/\beta}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : x \textgreater{} 0

\item {}
\emph{beta} : Survival parameter (beta \textgreater{} 0).

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(X) = \beta$

\item {}
$Var(X) = \beta^2$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{exponweib\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.exponweib_like}{}\begin{funcdesc}{exponweib\_like}{x, alpha, k, loc=0, scale=1}
Exponentiated Weibull log-likelihood.

The exponentiated Weibull distribution is a generalization of the Weibull
family. Its value lies in being able to model monotone and non-monotone
failure rates.
\begin{gather}
\begin{split}f(x \mid \alpha,k,loc,scale)  & = \frac{\alpha k}{scale} (1-e^{-z^k})^{\alpha-1} e^{-z^k} z^{k-1} \\
z & = \frac{x-loc}{scale}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : x \textgreater{} 0

\item {}
\emph{alpha} : Shape parameter

\item {}
\emph{k} : k \textgreater{} 0

\item {}
\emph{loc} : Location parameter

\item {}
\emph{scale} : Scale parameter (scale \textgreater{} 0).

\end{itemize}

\end{description}
\end{funcdesc}
\index{gamma\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.gamma_like}{}\begin{funcdesc}{gamma\_like}{x, alpha, beta}
Gamma log-likelihood.

Represents the sum of alpha exponentially distributed random variables, each
of which has mean beta.
\begin{gather}
\begin{split}f(x \mid \alpha, \beta) = \frac{\beta^{\alpha}x^{\alpha-1}e^{-\beta x}}{\Gamma(\alpha)}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : math:\emph{x ge 0}

\item {}
\emph{alpha} : Shape parameter (alpha \textgreater{} 0).

\item {}
\emph{beta} : Scale parameter (beta \textgreater{} 0).

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(X) = \frac{\alpha}{\beta}$

\item {}
$Var(X) = \frac{\alpha}{\beta^2}$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{half\_normal\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.half_normal_like}{}\begin{funcdesc}{half\_normal\_like}{x, tau}
Half-normal log-likelihood, a normal distribution with mean 0 limited
to the domain $x \in [0, \infty)$.
\begin{gather}
\begin{split}f(x \mid \tau) = \sqrt{\frac{2\tau}{\pi}}\exp\left\{ {\frac{-x^2 \tau}{2}}\right\}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : $x \ge 0$

\item {}
\emph{tau} : tau \textgreater{} 0

\end{itemize}

\end{description}
\end{funcdesc}
\index{hypergeometric\_like() (in module pymc.distributions)}

\begin{funcdesc}{hypergeometric\_like}{x, n, m, N}
Hypergeometric log-likelihood. Discrete probability distribution that
describes the number of successes in a sequence of draws from a finite
population without replacement.
\begin{gather}
\begin{split}f(x \mid n, m, N) = \frac{\binom{m}{x}\binom{N-m}{n-x}}{\binom{N}{n}}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : {[}int{]} Number of successes in a sample drawn from a population.

\item {}
\emph{n} : {[}int{]} Size of sample drawn from the population.

\item {}
\emph{m} : {[}int{]} Number of successes in the population.

\item {}
\emph{N} : {[}int{]} Total number of units in the population.

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}
$E(X) = \frac{n n}{N}$
\end{notice}
\end{funcdesc}
\index{inverse\_gamma\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.inverse_gamma_like}{}\begin{funcdesc}{inverse\_gamma\_like}{x, alpha, beta}
Inverse gamma log-likelihood, the reciprocal of the gamma distribution.
\begin{gather}
\begin{split}f(x \mid \alpha, \beta) = \frac{\beta^{\alpha}}{\Gamma(\alpha)} x^{-\alpha - 1} \exp\left(\frac{-\beta}{x}\right)\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : x \textgreater{} 0

\item {}
\emph{alpha} : Shape parameter (alpha \textgreater{} 0).

\item {}
\emph{beta} : Scale parameter (beta \textgreater{} 0).

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}
$E(X)=\frac{\beta}{\alpha-1}$  for $\alpha > 1$
$Var(X)=\frac{\beta^2}{(\alpha-1)^2(\alpha)}$  for $\alpha > 2$
\end{notice}
\end{funcdesc}
\index{laplace\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.laplace_like}{}\begin{funcdesc}{laplace\_like}{x, mu, tau}
Laplace (double exponential) log-likelihood.

The Laplace (or double exponential) distribution describes the
difference between two independent, identically distributed exponential
events. It is often used as a heavier-tailed alternative to the normal.
\begin{gather}
\begin{split}f(x \mid \mu, \tau) = \frac{\tau}{2}e^{-\tau |x-\mu|}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : $-\infty < x < \infty$

\item {}
\emph{mu} : Location parameter :math: \emph{-infty \textless{} mu \textless{} infty}

\item {}
\emph{tau} : Scale parameter $\tau > 0$

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(X) = \mu$

\item {}
$Var(X) = \frac{2}{\tau^2}$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{logistic\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.logistic_like}{}\begin{funcdesc}{logistic\_like}{x, mu, tau}
Logistic log-likelihood.

The logistic distribution is often used as a growth model; for example,
populations, markets. Resembles a heavy-tailed normal distribution.
\begin{gather}
\begin{split}f(x \mid \mu, tau) = \frac{\tau \exp(-\tau[x-\mu])}{[1 + \exp(-\tau[x-\mu])]^2}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : $-\infty < x < \infty$

\item {}
\emph{mu} : Location parameter $-\infty < mu < \infty$

\item {}
\emph{tau} : Scale parameter (tau \textgreater{} 0)

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(X) = \mu$

\item {}
$Var(X) = \frac{\pi^2}{3\tau^2}$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{lognormal\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.lognormal_like}{}\begin{funcdesc}{lognormal\_like}{x, mu, tau}
Log-normal log-likelihood. Distribution of any random variable whose
logarithm is normally distributed. A variable might be modeled as
log-normal if it can be thought of as the multiplicative product of many
small independent factors.
\begin{gather}
\begin{split}f(x \mid \mu, \tau) = \sqrt{\frac{\tau}{2\pi}}\frac{
\exp\left\{ -\frac{\tau}{2} (\ln(x)-\mu)^2 \right\}}{x}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : x \textgreater{} 0

\item {}
\emph{mu} : Location parameter.

\item {}
\emph{tau} : Scale parameter (tau \textgreater{} 0).

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}
$E(X)=e^{\mu+\frac{1}{2\tau}}$
$Var(X)=(e^{1/\tau}-1)e^{2\mu+\frac{1}{\tau}}$
\end{notice}
\end{funcdesc}
\index{normal\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.normal_like}{}\begin{funcdesc}{normal\_like}{x, mu, tau}
Normal log-likelihood.
\begin{gather}
\begin{split}f(x \mid \mu, \tau) = \sqrt{\frac{\tau}{2\pi}} \exp\left\{ -\frac{\tau}{2} (x-\mu)^2 \right\}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : Input data.

\item {}
\emph{mu} : Mean of the distribution.

\item {}
\emph{tau} : Precision of the distribution, which corresponds to $1/\sigma^2$ (tau \textgreater{} 0).

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(X) = \mu$

\item {}
$Var(X) = 1/\tau$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{skew\_normal\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.skew_normal_like}{}\begin{funcdesc}{skew\_normal\_like}{x, mu, tau, alpha}
Azzalini's skew-normal log-likelihood
\begin{gather}
\begin{split}f(x \mid \mu, \tau, \alpha) = 2 \Phi((x-\mu)\sqrt{\tau}\alpha) \phi(x,\mu,\tau)\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}
where :math: Phi is the normal CDF and :math: phi is the normal PDF.
\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : Input data.

\item {}
\emph{mu} : Mean of the distribution.

\item {}
\emph{tau} : Precision of the distribution (\textgreater{} 0).

\item {}
\emph{alpha} : Shape parameter of the distribution.

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}
See \href{http://azzalini.stat.unipd.it/SN/}{http://azzalini.stat.unipd.it/SN/}
\end{notice}
\end{funcdesc}
\index{t\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.t_like}{}\begin{funcdesc}{t\_like}{x, nu}
Student's T log-likelihood. Describes a zero-mean normal variable whose precision is
gamma distributed. Alternatively, describes the mean of several zero-mean normal
random variables divided by their sample standard deviation.
\begin{gather}
\begin{split}f(x \mid \nu) = \frac{\Gamma(\frac{\nu+1}{2})}{\Gamma(\frac{\nu}{2}) \sqrt{\nu\pi}} \left( 1 + \frac{x^2}{\nu} \right)^{-\frac{\nu+1}{2}}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : Input data.

\item {}
\emph{nu} : Degrees of freedom.

\end{itemize}

\end{description}
\end{funcdesc}
\index{truncnorm\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.truncnorm_like}{}\begin{funcdesc}{truncnorm\_like}{x, mu, tau, a, b}
Truncated normal log-likelihood.
\begin{gather}
\begin{split}f(x \mid \mu, \tau, a, b) = \frac{\phi(\frac{x-\mu}{\sigma})} {\Phi(\frac{b-\mu}{\sigma}) - \Phi(\frac{a-\mu}{\sigma})},\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}
where $\sigma^2=1/\tau$, \emph{phi} is the standard normal PDF and \emph{Phi} is the standard normal CDF.
\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : Input data.

\item {}
\emph{mu} : Mean of the distribution.

\item {}
\emph{tau} : Precision of the distribution, which corresponds to 1/sigma**2 (tau \textgreater{} 0).

\item {}
\emph{a} : Left bound of the distribution.

\item {}
\emph{b} : Right bound of the distribution.

\end{itemize}

\end{description}
\end{funcdesc}
\index{uniform\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.uniform_like}{}\begin{funcdesc}{uniform\_like}{x, lower, upper}
Uniform log-likelihood.
\begin{gather}
\begin{split}f(x \mid lower, upper) = \frac{1}{upper-lower}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : $lower \leq x \leq upper$

\item {}
\emph{lower} : Lower limit.

\item {}
\emph{upper} : Upper limit (upper \textgreater{} lower).

\end{itemize}

\end{description}
\end{funcdesc}
\index{von\_mises\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.von_mises_like}{}\begin{funcdesc}{von\_mises\_like}{x, mu, kappa}
von Mises log-likelihood.
\begin{gather}
\begin{split}f(x \mid \mu, k) = \frac{e^{k \cos(x - \mu)}}{2 \pi I_0(k)}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}
where \emph{I\_0} is the modified Bessel function of order 0.
\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : Input data.

\item {}
\emph{mu} : Mean of the distribution.

\item {}
\emph{kappa} : Dispersion of the distribution

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(X) = \mu$

\end{itemize}
\end{notice}
\end{funcdesc}
\index{weibull\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.weibull_like}{}\begin{funcdesc}{weibull\_like}{x, alpha, beta}
Weibull log-likelihood
\begin{gather}
\begin{split}f(x \mid \alpha, \beta) = \frac{\alpha x^{\alpha - 1}
\exp(-(\frac{x}{\beta})^{\alpha})}{\beta^\alpha}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : $x \ge 0$

\item {}
\emph{alpha} : alpha \textgreater{} 0

\item {}
\emph{beta} : beta \textgreater{} 0

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(x)=\beta \Gamma(1+\frac{1}{\alpha})$

\item {}
$Var(x)=\beta^2 \Gamma(1+\frac{2}{\alpha} - \mu^2)$

\end{itemize}
\end{notice}
\end{funcdesc}

\section{Multivariate discrete distributions}
\index{multivariate\_hypergeometric\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.multivariate_hypergeometric_like}{}\begin{funcdesc}{multivariate\_hypergeometric\_like}{x, m}
The multivariate hypergeometric describes the probability of drawing x{[}i{]}
elements of the ith category, when the number of items in each category is
given by m.
\begin{gather}
\begin{split}\frac{\prod_i \binom{m_i}{x_i}}{\binom{N}{n}}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}
where $N = \sum_i m_i$ and $n = \sum_i x_i$.
\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : {[}int sequence{]} Number of draws from each category, (x \textless{} m).

\item {}
\emph{m} : {[}int sequence{]} Number of items in each categoy.

\end{itemize}

\end{description}
\end{funcdesc}
\index{multinomial\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.multinomial_like}{}\begin{funcdesc}{multinomial\_like}{x, n, p}
Multinomial log-likelihood. Generalization of the binomial
distribution, but instead of each trial resulting in ``success'' or
``failure'', each one results in exactly one of some fixed finite number k
of possible outcomes over n independent trials. `x{[}i{]}' indicates the number
of times outcome number i was observed over the n trials.
\begin{gather}
\begin{split}f(x \mid n, p) = \frac{n!}{\prod_{i=1}^k x_i!} \prod_{i=1}^k p_i^{x_i}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{description}
\item[x] \leavevmode{[}(ns, k) int{]}
Random variable indicating the number of time outcome i is
observed. $\sum_{i=1}^k x_i=n$, $x_i \ge 0$.

\item[n] \leavevmode{[}int{]}
Number of trials.

\item[p] \leavevmode{[}(k,) {]}
Probability of each one of the different outcomes.
$\sum_{i=1}^k p_i = 1)$, $p_i \ge 0$.

\end{description}

\end{description}

\begin{notice}{note}{Note:}\begin{itemize}
\item {}
$E(X_i)=n p_i$

\item {}
$Var(X_i)=n p_i(1-p_i)$

\item {}
$Cov(X_i,X_j) = -n p_i p_j$

\end{itemize}
\end{notice}
\end{funcdesc}

\section{Multivariate continuous distributions}
\index{dirichlet\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.dirichlet_like}{}\begin{funcdesc}{dirichlet\_like}{x, theta}
Dirichlet log-likelihood.

This is a multivariate continuous distribution.
\begin{gather}
\begin{split}f(\mathbf{x}) = \frac{\Gamma(\sum_{i=1}^k \theta_i)}{\prod \Gamma(\theta_i)}\prod_{i=1}^{k-1} x_i^{\theta_i - 1}\cdot\left(1-\sum_{i=1}^{k-1}x_i\right)^\theta_k\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{description}
\item[x] \leavevmode{[}(n, k-1) array {]}
Array of shape (n, k-1) where \emph{n} is the number of samples
and \emph{k} the dimension.
$0 < x_i < 1$,  $\sum_{i=1}^{k-1} x_i < 1$
\item[theta] \leavevmode{[}array{]}
An (n,k) or (1,k) array \textgreater{} 0.

\end{description}

\end{description}

\begin{notice}{note}{Note:}
Only the first \emph{k-1} elements of \emph{x} are expected. Can be used as a parent of Multinomial and Categorical
nevertheless.
\end{notice}
\end{funcdesc}
\index{inverse\_wishart\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.inverse_wishart_like}{}\begin{funcdesc}{inverse\_wishart\_like}{X, n, Tau}
Inverse Wishart log-likelihood. The inverse Wishart distribution is the conjugate
prior for the covariance matrix of a multivariate normal distribution.
\begin{gather}
\begin{split}f(X \mid n, T) = \frac{{\mid T \mid}^{n/2}{\mid X \mid}^{(n-k-1)/2} \exp\left\{ -\frac{1}{2} Tr(TX^{-1}) \right\}}{2^{nk/2} \Gamma_p(n/2)}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}
where $k$ is the rank of X.
\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{X} : Symmetric, positive definite matrix.

\item {}
\emph{n} : {[}int{]} Degrees of freedom (n \textgreater{} 0).

\item {}
\emph{Tau} : Symmetric and positive definite matrix.

\end{itemize}

\end{description}

\begin{notice}{note}{Note:}
Step method MatrixMetropolis will preserve the symmetry of Wishart variables.
\end{notice}
\end{funcdesc}
\index{mv\_normal\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.mv_normal_like}{}\begin{funcdesc}{mv\_normal\_like}{x, mu, tau}
Multivariate normal log-likelihood
\begin{gather}
\begin{split}f(x \mid \pi, T) = \frac{|T|^{1/2}}{(2\pi)^{1/2}} \exp\left\{ -\frac{1}{2} (x-\mu)^{\prime}T(x-\mu) \right\}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : (n,k)

\item {}
\emph{mu} : (k) Location parameter sequence.

\item {}
\emph{Tau} : (k,k) Positive definite precision matrix.

\end{itemize}

\end{description}

\strong{See Also:}

\hyperlink{pymc.distributions.mv_normal_chol_like}{\code{mv\_normal\_chol\_like()}}, \hyperlink{pymc.distributions.mv_normal_cov_like}{\code{mv\_normal\_cov\_like()}}

\end{funcdesc}
\index{mv\_normal\_chol\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.mv_normal_chol_like}{}\begin{funcdesc}{mv\_normal\_chol\_like}{x, mu, sig}
Multivariate normal log-likelihood.
\begin{gather}
\begin{split}f(x \mid \pi, \sigma) = \frac{1}{(2\pi)^{1/2}|\sigma|)} \exp\left\{ -\frac{1}{2} (x-\mu)^{\prime}(\sigma \sigma^{\prime})^{-1}(x-\mu) \right\}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : (n,k)

\item {}
\emph{mu} : (k) Location parameter.

\item {}
\emph{sigma} : (k,k) Lower triangular matrix.

\end{itemize}

\end{description}

\strong{See Also:}

\hyperlink{pymc.distributions.mv_normal_like}{\code{mv\_normal\_like()}}, \hyperlink{pymc.distributions.mv_normal_cov_like}{\code{mv\_normal\_cov\_like()}}

\end{funcdesc}
\index{mv\_normal\_cov\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.mv_normal_cov_like}{}\begin{funcdesc}{mv\_normal\_cov\_like}{x, mu, C}
Multivariate normal log-likelihood parameterized by a covariance
matrix.
\begin{gather}
\begin{split}f(x \mid \pi, C) = \frac{1}{(2\pi|C|)^{1/2}} \exp\left\{ -\frac{1}{2} (x-\mu)^{\prime}C^{-1}(x-\mu) \right\}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}\begin{description}
\item[Parameters] \leavevmode\begin{itemize}
\item {}
\emph{x} : (n,k)

\item {}
\emph{mu} : (k) Location parameter.

\item {}
\emph{C} : (k,k) Positive definite covariance matrix.

\end{itemize}

\end{description}

\strong{See Also:}

\hyperlink{pymc.distributions.mv_normal_like}{\code{mv\_normal\_like()}}, \hyperlink{pymc.distributions.mv_normal_chol_like}{\code{mv\_normal\_chol\_like()}}

\end{funcdesc}
\index{wishart\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.wishart_like}{}\begin{funcdesc}{wishart\_like}{X, n, Tau}
Wishart log-likelihood. The Wishart distribution is the probability
distribution of the maximum-likelihood estimator (MLE) of the precision
matrix of a multivariate normal distribution. If Tau=1, the distribution
is identical to the chi-square distribution with n degrees of freedom.

For an alternative parameterization based on $C=T{-1}$, see
\emph{wishart\_cov\_like}.
\begin{gather}
\begin{split}f(X \mid n, T) = {\mid T \mid}^{n/2}{\mid X \mid}^{(n-k-1)/2} \exp\left\{ -\frac{1}{2} Tr(TX) \right\}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}
where $k$ is the rank of X.
\begin{description}
\item[Parameters] \leavevmode\begin{description}
\item[X] \leavevmode{[}matrix{]}
Symmetric, positive definite.

\item[n] \leavevmode{[}int{]}
Degrees of freedom, \textgreater{} 0.

\item[Tau] \leavevmode{[}matrix{]}
Symmetric and positive definite

\end{description}

\end{description}

\begin{notice}{note}{Note:}
Step method MatrixMetropolis will preserve the symmetry of Wishart variables.
\end{notice}
\end{funcdesc}
\index{wishart\_cov\_like() (in module pymc.distributions)}

\hypertarget{pymc.distributions.wishart_cov_like}{}\begin{funcdesc}{wishart\_cov\_like}{X, n, C}
Wishart log-likelihood. The Wishart distribution is the probability
distribution of the maximum-likelihood estimator (MLE) of the covariance
matrix of a multivariate normal distribution. If C=1, the distribution
is identical to the chi-square distribution with n degrees of freedom.

For an alternative parameterization based on $T=C{-1}$, see
\emph{wishart\_like}.
\begin{gather}
\begin{split}f(X \mid n, C) = {\mid C^{-1} \mid}^{n/2}{\mid X \mid}^{(n-k-1)/2} \exp\left\{ -\frac{1}{2} Tr(C^{-1}X) \right\}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}
where $k$ is the rank of X.
\begin{description}
\item[Parameters] \leavevmode\begin{description}
\item[X] \leavevmode{[}matrix{]}
Symmetric, positive definite.

\item[n] \leavevmode{[}int{]}
Degrees of freedom, \textgreater{} 0.

\item[C] \leavevmode{[}matrix{]}
Symmetric and positive definite

\end{description}

\end{description}
\end{funcdesc}
\normalsize