2D BRUTE-FORCE FITTING FOR LAB 3 BASELINE DETERMINATION February 28, 2017

This is a recap of the recommended ‘brute-force’ fitting procedure to find the baselines B_{ew} and B_{ns}, which is equivalent to finding Q_{ew} and Q_{ns} (defined in the first few lines of section 8.4 in lab3 writeup).

1. Follow the first few lines of section 8.4.3 to find the best value for Q_{ew} assuming that Q_{ns} = 0. That is, generate a series of ‘guessed values’ for Q_{ew}. For each one, least-squares fit for the unknown coefficients (A, B) in eqn 12 and derive the sum-of-squared residuals S^{2}. Plot S^{2} vs Q_{ew}; the leastsquares fit for Q_{ew} is that value for which S^{2} is minimized.

Issues: Cover a large enough range of Q_{ew} in your guesses so that you find the true minimum, not just a local minimum. Also, make the guessed values close together enough so that you define the minimum well.

2. Repeat the above for a 2-d grid of guessed values for Q_{ew} and Q_{ns} and find the global minimum for S^{2} in this 2d space. Call this minimum value S_{min}^{2}.

The values for Q_{ew} and Q_{ns} at this global minimum are the best-fit values. Call these Q_{ew}∗ and Q_{ns}∗. Define ΔQ_{ew} = Q_{ew} − Q_{ew}∗ and ΔQ_{ns} = Q_{ns} − Q_{ns}∗.

3. Deriving the uncertainties in the best-fit values:

3.1. Convert your 2-d grid of S^{2} into a 2-d grid of ΔS^{2}, where ΔS^{2} = S^{2} − S_{min}^{2}. Then the Taylor expansion about the best-fit values begins with the second-order terms because the first-order ones are zero at the minimum. So with the second derivatives evaluated at S_{min}^{2}, we have

ΔS^{2} = \frac{1}{2} \frac{∂^{2}S^{2}}{∂Q_{ew}^{2}} ΔQ_{ew}^{2} + \frac{∂^{2}S^{2}}{∂Q_{ew}∂Q_{ns}} ΔQ_{ew}ΔQ_{ns} + \frac{1}{2} \frac{∂^{2}S^{2}}{∂Q_{ns}^{2}} ΔQ_{ns}^{2}  (1)

It’s much better to write this in matrix notation:

ΔS^{2} = ΔQ^{T} · [α] · ΔQ ,  (2)

where ΔQ is the column vector of guessed values minus the best-fit values, i.e.

ΔQ = [ \begin{matrix}ΔQ_{ew} \\ ΔQ_{ns} \end{matrix} ]  (3)

and [α] is the curvature matrix (equation 2.4a in ’least-squares-lite’), which is 2x2 and symmetric so it has 3 independent parameters—2 diagonal and 1 off-diagonal element:

[α] = [ \begin{matrix}\frac{1}{2} \frac{∂^{2}S^{2}}{∂Q_{ew}^{2}} & \frac{∂^{2}S^{2}}{∂Q_{ew}∂Q_{ns}} \\ \frac{∂^{2}S^{2}}{∂Q_{ew}∂Q_{ns}} & \frac{1}{2} \frac{∂^{2}S^{2}}{∂Q_{ns}^{2}} \end{matrix} ]  (4)

3.2. Extract approximate values for the elements of [α] by hand. Use your native intelligence to do this in an easy way. Specifically, use your 2d grid of ΔS^{2} versus Q_{ew} and Q_{ns} to numerically find the three second derivative matrix elements.

3.3. Having found [α], find the covariance matrix by taking its inverse.

3.4. Derive the uncertainties in Q_{ew} and Q_{ns} using this covariance matrix in equation 3.7 in ’lsfit-lite’.