davidwhogg / DataAnalysisRecipes

chapters of a book Hogg will never write
90 stars 20 forks source link

Uncertainties and variances #42

Open m-wells opened 4 years ago

m-wells commented 4 years ago

I believe there is a typo in https://github.com/davidwhogg/DataAnalysisRecipes/blob/710a6c959aa0072607d82e9a67a2f389a4c943d3/straightline/straightline.tex#L370 which should be

    When the uncertainties are Gaussian and their variances $\sigma_{yi}^2$

I also found this problem to be poorly worded https://github.com/davidwhogg/DataAnalysisRecipes/blob/710a6c959aa0072607d82e9a67a2f389a4c943d3/straightline/straightline.tex#L1767-L1774

The statement

setting all $\sigma_{yi}^2=S$, that is, ignoring the uncertainties and replacing them all with the same value $S$

is not self-consistent. I believe it should read as

\begin{problem}\label{prob:chi2} 
 Re-do the fit of \problemname~\ref{prob:easy} but setting all 
 $\sigma_{yi}=S$, that is, ignoring the uncertainties and replacing 
 them all with the same value $\sqrt(S)$.  What uncertainty variance $S$ would 
 make $\chi^2 = N-2$?  Relevant plots are shown in 
 \figurename~\ref{fig:chi2}.  How does it compare to the mean and 
 median variance of the uncertainty $\allsigmay$? 
 \end{problem} 
jobovy commented 4 years ago

I don't think this is correct that we set sigma_y equal to S in this exercise (exercise 11 in the arXiv version). The code that produces these figures is here (we re-numbered the exercises after writing the code) and you can see that we set the data covariance to S x identity matrix as stated in the problem.

m-wells commented 4 years ago

@jobovy You are correct and I was in mid edit correction as I was looking my work. I still think the wording is a bit unclear though.

m-wells commented 4 years ago

@jobovy I have edited my initial comment.

m-wells commented 4 years ago

My confusion essentially boils down to two typos which I have fixed in the PR.