\documentclass{article}

% set up telugu
\usepackage{fontspec}
\newfontfamily\telugufont{Potti Sreeramulu}[Script = Telugu]
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{telugu}

%other packages
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{physics}
\usepackage{siunitx}
\usepackage{todonotes}
\usepackage[plain]{fancyref}
\usepackage{luacode}
\usepackage{titling}
\usepackage{enumerate}

% custom deepak packages
% \usepackage{luatrivially}
\usepackage{subtitling}

\begin{luacode*}
	math.randomseed(31415926)
\end{luacode*}

\title{Problem 1.2}
\subtitle{Probability distributions}
\author{\begin{telugu}హృదయ్ దీపక్ మల్లుభొట్ల\end{telugu}}
% want empty date
\predate{}
\date{}
\postdate{}

% !TeX spellcheck = en_GB
\begin{document}
	\maketitle
	Three distributions:
	\begin{enumerate}[(i)]
		\item Uniform distribution, $\rho_{uniform}(x) = 1$
		\item Exponential distribution, $\rho_{exponential}(t) = e^{-\flatfrac{t}{\tau}}$
		\item Gaussian distribution, $\rho_{gaussian}(v) = \flatfrac{e^{\flatfrac{-v^2}{2\sigma^2}}}{\left( \sqrt{2\pi} \sigma \right)}$
	\end{enumerate}
	
	\begin{enumerate}[(a)]
		\item Likelihoods
		\begin{enumerate}[(i)]
			\item What is the probabliity that a random number uniform on $\left[0, 1\right)$ will lie between $x = 0.7$ and $x = 0.75$.
			\item That the waiting time for radioactive decay will be more than twice exponential decay time $\tau$?
			\item That your score will be above $2 \sigma$ above the mean?
		\end{enumerate}
		\item Normalization, mean and standard deviation.
		\begin{enumerate}[(I)]
			\item Show that these probability distributions are normalised.
			\item What is the mean $x_0$ of each distribution?
			\item The standard deviation $\sqrt{\int \dd{x} \left( x - x_0 \right)^2 \rho(x)}$?
		\end{enumerate}
		\item Sums of variables
		\begin{enumerate}
			\item Draw a graph of the probability distribution of the sum $x + y$ for two random variables drawn from a uniform distribution.
			\item Argue that in general the sum $z = x+y$ of two random variables with distributions $\rho_1(x)$ and $\rho_2(y)$ will have a distribution given by $\rho(z) = \int \rho_1(x) \rho_2(z-x)$.
		\end{enumerate}
		\item Multidimensional probability distributions
		Given $\rho(v_x, v_y, v_z)$ is the big expression in Sethna $\prod_{i=(x, y, z)} \sqrt{\frac{M}{2\pi k T}} \exp(\frac{-Mv_i^2}{2 kT})$.
		\begin{enumerate}
			\item Show that the mean kinetic energy is $\frac{kT}{2}$.
			\item Show that the probability that the speed is $\abs{v}$ is given by the distribution
				\begin{equation}
					\rho_{Maxwell}(v) = \sqrt{\frac{2}{\pi}}\frac{v^2}{\sigma^3} \exp(\frac{-v^2}{2 \sigma^2})
				\end{equation}
		\end{enumerate}		
	\end{enumerate}

	\section{Solution} \label{sec:solution}
	\subsection{Likelihoods} \label{subsec:sola}
	These are quite simple, straightforward integrals, so avoiding the details here.
	\begin{enumerate}[(i)]
		\item $\frac12$
		\item $\frac{1}{e^2}$
		\item $\flatfrac{(1 - \erf(\sqrt{2}))}{2} \approx 0.023$.
		Sethna really seems to give this one to the solver.
	\end{enumerate}
	
	\subsection{Standard Deviations}
	Normalisation is quite simple.
	Means are
	\begin{enumerate}[(i)]
		\item $\frac12$
		\item $\tau$
		\item $0$
	\end{enumerate}
	Standard deviations are
	\begin{enumerate}[(i)]
		\item 
		\begin{align}
			\sigma_{uniform} &= \sqrt{\int_0^1 \dd{x} \left( x - \frac12 \right)^2} \\
			&= \sqrt{\left. \frac13 \left( x - \frac12 \right)^3 \right|_0^1} \\
			&= \sqrt{\frac13 \left(\frac14 \right)} \\
			\sigma_{uniform} &= \frac{1}{\sqrt{12}}
		\end{align}
		\item
		\begin{align}
			\sigma_{exponential} &= \sqrt{\int_0^\infty \dd{t} \left(t - \tau \right)^2 e^{\flatfrac{-t}{\tau}}} \\
			&= \tau
		\end{align}
		\item
		\begin{align}
			\sigma_{Gaussian} &= \sqrt{\int_{-\infty}^\infty \dd{v} \left(v\right)^2 \flatfrac{e^{\flatfrac{-v^2}{2\sigma^2}}}{\left( \sqrt{2\pi} \sigma \right)} } \\
			&= \sigma
		\end{align}
	\end{enumerate}
	\newpage
	\listoftodos

\end{document}
