Exercise 15.1.1

Exercise 15.1.1#

Write a program which reads the data file ./data/cepheid_data.csv calculates the linear least-squares coefficients \(a_0\) and \(a_1\) in \(M = a_0 + a_1 \log P\).

Plot the data points and the straight line calculated. (Answer: \(a_0 = -1.619033,~~~a_1 = -2.547323.\))