% begin preamble
\documentclass[11pt,titlepage]{article}
\usepackage[margin=1in,noheadfoot]{geometry}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage[colorlinks,urlcolor=blue]{hyperref}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{wrapfig}

\newcommand{\e}[1]{\times 10^{#1}}
\newcommand{\q}{\mathrm}
\newcommand{\where}[1][where]{\qquad\mbox{#1}\qquad}
\newcommand{\bs}[1]{\boldsymbol{#1}}
\newcommand{\bh}[1]{\hat{\boldsymbol{#1}}}
\newcommand{\bv}[1]{\vec{\boldsymbol{#1}}}
\newcommand{\bt}[1]{\tilde{\boldsymbol{#1}}}
\newcommand{\ad}{^{\dagger}}
\newcommand{\flow}[1]{\mathcal{E}_{#1}}
\newcommand{\flux}[1]{\Phi_{#1}}
\newcommand{\dslash}{d \hspace{-0.5ex}\rule[1.2ex]{0.6ex}{.1ex}}
\newcommand{\ts}{\textsuperscript}
\def\rcurs{{\mbox{$\resizebox{.16in}{.08in}{\includegraphics{ScriptR}}$}\!\!}}
\def\brcurs{{\mbox{$\resizebox{.16in}{.08in}{\includegraphics{BoldR}}$}\!\!}}
\def\hrcurs{{\mbox{$\hat \brcurs$}\!}}
\newcommand{\var}{\mbox{Var}}
\newcommand{\cov}{\mbox{Cov}}
%end preamble

\begin{document}
\begin{center}
  {\bf University of Kentucky, Physics 335 \\
    Homework \#7, Rev. B, due Wednesday, 2023-10-25 }
\end{center}

\vspace{.3 in}

{\bf 1. } The {\bf asymmetry} $A=\frac{a-b}{a+b}$ is a convenient dimensionless parameter quantifying the {\it relative difference} between two positive observables $a$ and $b$.  It ranges from a maximum of $A=1$ if $a\gg b$ to a minimum value $A=-1$ if $a\ll b$, and $A=0$ if $a=b$.  It is also used to describe the {\it polarization} $P=\frac{N_{+}-N_{-}}{N_{+}+N_{-}}$ of a two-state species with $N_{+}$ particles in one [spin] state and $N_{-}$ in the other.

{\bf \quad a)} Calculate the uncertainty $\delta A$ of $A$ in terms of the covariance matrix $\delta^{2}v_{ij}$ of $\vec v=(a,b)$ with elements $\delta^{2}_{a}\equiv \cov(a,a)=\var(a)$, ~ $\delta^{2}_{ab} \equiv \cov(a,b) = \delta^{2}_{ba}$, and $\delta^{2}_{b}\equiv \cov(b,b)=\var(b)$, using the error propagation formula $\delta^{2}A_{\alpha\beta}(\vec v) = \sum_{i,j}
  \frac{\partial A_{\phantom{\beta}\!\!\!\alpha}}{\partial v_{i}}
  \frac{\partial A_{\beta}}{\partial v_{j}}
  \delta^{2}v_{ij}$ or $\delta^{2}\!A=J\delta^{2}\!v J^{T}$, where $J_{\alpha i}=\frac{\partial A_{\alpha}}{\partial v_{i}}$.  For a single function $A(\vec v)$, this reduces to the variance $\delta^{2}\!A = \left(\frac{\partial A}{\partial a}\right)^{2}\delta^{2}_{a} + 2 \left(\frac{\partial A}{\partial a}\right)\left(\frac{\partial A}{\partial b}\right)\delta^{2}_{ab} + \left(\frac{\partial A}{\partial b}\right)^{2}\delta^{2}_{b}$.

{\bf \quad b)} For extra practice and to verify the consistency of error propagation, we will now calculate the same formula in part c), deriving and using the following rules, which include covariance:
\begin{enumerate}
\item $\delta^2(u\pm v) = \delta^2_u \pm 2 \delta^2_{uv} + \delta^2_v$, and $\delta^2(u+v,u-v) = \delta^2_u - \delta^2_v$.
\item $\delta^{2}(\ln u) = \delta^{2}_{u}/u^{2}$ and $\delta^{2}(\ln u,\ln v) = \delta^{2}_{uv}/uv$.
\item $\delta^2(uv)/(uv)^{2} = \delta^2_u/u^{2} + 2 \delta^2_{uv}/uv + \delta^2_v/v^{2}$,~~$\delta^2(u/v)/(u/v)^{2} = \delta^2_u/u^{2} - 2 \delta^2_{uv}/uv + \delta^2_v/v^{2}$, and $\delta^2(uv,u/v)/u^2 = \delta^2_u/u^{2} - \delta^2_v/v^{2}$ directly from $\delta^{2}(uv)$, etc., and by applying rules 1 and 2 to the error of both sides of $\ln(uv)=\ln(u)+\ln(v)$ and $\ln(u/v)=\ln(u)-\ln(v)$.
\end{enumerate}

{\bf \quad c)} Apply this formula to the polarization $P$, where the particle counts $N_{+}$ and $N_{-}$ obey Poisson statistics: $\delta^{2}N_{\pm}=N_{\pm}$, and are uncorrelated: $\delta^{2}N_{+-}=0$.  Show that $N_{\pm}=\frac12 N(1\pm P)$, where $N=N_{+}+N_{-}$, and thus express $\delta P$ in terms of $N$ and $P$.


{\bf 2.} If individual measurements $x_{i}\pm \delta x_{i}$ have different uncertainties $\delta x_{i}$, they should be combined using the {\bf weighted average} $x = \sum_{i}w_{i} x_{i} / \sum_{i}w_{i}$ instead of the normal mean to emphasize the best data points, i.e. the ones with the smallest errors.

{\bf \quad a)} Calculate $\delta x$, assuming the weights have no error.
Following Bevington, show that the weights $w_{i}$ which minimize the combined error $\delta x$ are propotional to $w_{i}=\delta^{-2}x_{i}$, and the proportionality constant cancels in the weighted average.  [{\it bonus:} How does the combined error relate to $\chi^{2}$?]

{\bf \quad b)} [{\it bonus:} Likewise, show that the {\it median} $x_{1/2}$ minimizes the unweighted {\it absolute deviation} $\alpha(m)=\sum_{i}|x_{i}-m|$.  This is slightly different than Bevington's definition using the mean $\bar x$, but shows the connection between the median and absolute deviation.  It also shows that the median is a {\it robust estimator} of central tendency because it minimizes a lower-order moment, and thus is less sensitive to outliers.  The {\it mode} is the most robust of all, being completely unaffected by outliers as long as their frequency is less than that of the peak.]

{\bf \quad c)} Show for counts $N_{i}$ obeying Poisson statistics: $\delta^{2}N_{i}=N_{i}$, the sum $N=\sum_{i}N_{i}$ has variance $\delta^{2}N=N$, also obeying Poisson statistics, which is an important self-consistency check.

{\bf \quad d)} Given $n$ measurements of polarization $P_{i}=\frac{N^{+}_{i}-N^{-}_{i}}{N^{+}_{i}+N^{-}_{i}}\ll 1$, from individual counts $N^{\pm}_{i}$, each with $\delta^{2}P_{i}$ from question 1c), show that optimal weight is $w_{i}=N_{i}$ and thus $P=\sum_{i}w_{i}P_{i}/\sum_{i}w_{i} = \frac{N^{+}-N^{-}}{N^{+}+N^{-}}$, where $N^{\pm}=\sum_{i}N^{\pm}_{i}$ is the sum of the total counts in each state.  Thus it does not matter how you bin individual measurements before calculating the total polarization or asymmetry.


% {\bf 3. } given f(x), show by expanding the Taylor series of f that <f(x)> \approx f(<x>) + 1/2 f''(<x>)\delta^2 x.  Thus you should always evaulate a function at the centroid, not the center of the bin to cancel out first order corrections, and still there will be a bias if the function has curvature.


\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
