Midterm Exam #1 (20232) Written Session

Midterm Exam #1 (20232) Written Session

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

19/04/2024

Assume that you have been given a dataset with x and corresponding y values.

You have two theoretical models for the related phenomenon, let’s say \(f_1(x)\) and \(f_2(x)\). These functions can be of very different varieties and can require completely different parameters (e.g., \(f_1(x)\) can be a Gaussian like: \(f_1(x;\mu,\sigma) = e^{-\frac{\left(x-\mu\right)^2}{2\sigma^2}}\), while \(f_2(x)\) can be a sinusoidal function like: \(f_2(x;A,\omega,\varphi) = A\sin(\omega x + \varphi)\)).

Describe in detail, starting from the very beginning, how you would determine of the two proposed models, the one that fits the given data best. Please present your process, clearly and in steps, like phrasing a recipe:

  1. Do this by using …

  2. _Calculate the … _

You are not being asked to write a code (actually, please do not include any code!) – imagine transcribing this recipe to a fellow programmer working alongside: they know how to code but not what to do, so you need to tell them what is to be done, step by step. If you want them to calculate the error, you need to specify what you mean by “the error” (the formula); if you want them to fit the data, you need to specify what you mean by “fitting the data”, how it is done, on what criteria. (Any parts not covered by your instructions will be used against you!” ;)