Professional Documents
Culture Documents
Summer Semester 2022 Prof. Dr. Jörg Schäfer & Fatima Sajid Butt
Sheet 2
Fitting Curves, Sampling and Errors
Issue Date: NA
Submission Date: NA
Fitting Curves
Exercise 1
Write an R or python script that generates M data points of a polynomial of degree N . Plot your
solutions for different values of N and M (using randomly generated or fixed data points).
Exercise 2
Based on the previous exercise, write an R or python script that computes an exact fit of a poly-
nomial of degree N to N − 1 points (xi , yi ). Plot your solutions for N = 1, . . . , 12 using randomly
generated (xi , yi ). (Hint: You can use the proof of lemma 1 of lecture 2.)
Exercise 3
Take two two-dimensional Gaussian distributions with µ1 = (2, 3), µ2 = (−15, −15) and covariance
matrices
100 36 64 −49
Σ1 = and Σ2 =
36 100 −49 100
(see page 28 of lecture 2).
1/1