Midterm Exam #1 Make-Up (20232)

Midterm Exam #1 Make-Up (20232)

FIZ228 - Numerical Analysis
Dr. Emre S. Tasci, Hacettepe University

23/05/2024

  1. Import the data from the FIZ228_20232_MT1_MakeUp_data.csv file.

  2. Fit each one of the following function forms to the data:

\[f_1(x;A,\mu,\sigma,b) = A\exp[-\frac{(x-\mu)^2}{2\sigma^2}] + b\]
\[f_2(x;A,\omega,\phi,b) = A\sin(\omega x+\phi) + b\]
  1. Calculate the error estimations between the given data and your model using the following error function:\(\DeclareMathOperator\erf{erf}\)

  • \(\erf = \sqrt{\sum_{i}{(y_i - e_i)^2}}\)

where \(y\) indicates the given data and \(e\) the model estimation.

  1. Calculate the coefficient of determination (\(r^2\)) for each model.

  2. Which one of the functions would you pick for the most representative of the data? Briefly explain.

Submit your answer as a zip file containing both the html and the ipynb formats of your jupyter notebook, all the filenames formatted as “FIZ228_20232_MT1MU_NameSurname” (.html, .ipynb, .zip)