Exercise 16.1.1

Exercise 16.1.1#

Question 1#

Using pen-and-paper, reproduce the results from Equations (6), (5), (8) and (9) yourself.

Quesiton 2#

Write a program which reads the data file ./data/cepheid_data.csv calculates the linear least-squares coefficients \(a_0\) and \(a_1\) for the model \(M = a_0 + a_1 \log P\). Additionally, determine the uncertainties of \(M\), \(a_0\) and \(a_1\).

Plot the data points, the straight line calculated by the model and the expanded uncertanty interval about the model using a coverage factor of 2 (this may be done using lines or a fill-between, etc).

Answers:

  • \(a_0 = -1.62(0.15)\)

  • \(a_1 = -2.55(0.13)\)

  • \(u(M) = 0.28\)

Question 3#

In the data file ./exercise-data/data_lsqr_01.csv is a set of \(x\) and \(y\) data with the following model suggested:

\[ y = a_0 + a_1 \tanh(x) \]

It is assumed that the uncertainties for \(y\) are uniform.

Use linear least-squares minimization to find the best-fit values of \(a_0\) and \(a_1\), as well as the uncertainties of these and \(y\). Plot the data points, the model and the expanded uncertainty interval about the model using a coverage factor of 2.

Answers:

  • \(a_0 = 5.38(0.17)\)

  • \(a_1 = 3.31(0.21)\)

  • \(u(y) = 0.41\)