Summary

This document contains a collection of mathematical exercises, covering topics like singular value decomposition, least squares fitting for parabolas and paraboloids, and also includes problems related to fitting functions and finding best-fit lines. It provides examples of different mathematical problems.

Full Transcript

## Exercise 8.1. Find the singular value decomposition of each of the following matrices. First do this by computing both $AA^T$ and $A^TA$, finding the eigenvalue/eigenvector pairs of each, finding the corresponding singular values, and putting the results together. Then check your answer via tech...

## Exercise 8.1. Find the singular value decomposition of each of the following matrices. First do this by computing both $AA^T$ and $A^TA$, finding the eigenvalue/eigenvector pairs of each, finding the corresponding singular values, and putting the results together. Then check your answer via technology. **(a) A =** $\begin{bmatrix} 1.0 & 2.0 & -3.0 \\ 0 & 1.0 & 1.0 \\ 1.0 & 2.0 & 5.0 \\ -1.0 & 0 & 2.0 \end{bmatrix}$ **(b) A =** $\begin{bmatrix} -1.0 & 0 & 2.0 & 2.0 & 2.0 \\ 0 & 2.0 & 3.0 & 0 & 1.0 \\ 1.0 & 2.0 & -2.0 & 1.0 & 2.0 \end{bmatrix}$ ## Exercise 4.3. Given the points: (-1,3), (0, 1), (1,2), (3,9) **(a)** Find the least-squares parabola $f(x) = ax^2 + bx + c$ for the points. **(b)** Plot $f(x)$ along with the points. **(c)** Use $f(x)$ to estimate all $x$ so that $f(x) = 10$. ## Exercise 4.6. Given the points: (-3,-2, 45) (2, -2, 30), (0,1,6), (-2, 3, 55), (6,5,230) **(a)** Find the least-squares paraboloid $f(x, y) = ax^2 + by^2$ for the points. **(b)** Use $f(x, y)$ to estimate $f(3,5)$. ## Exercise 4.7. Here is an interesting question - given the points (0,0), (0,1), (1, 1) if we're looking for a best-fit line it's possible to look both for $y = mx + b$ and for $x = ny + c$. Neither has an exact solution but both have least-squares solution. Find each of these. Show that these don't yield the same line. Plot the points and both lines. From a geometric perspective of minimizing distance from the line, what is going on here? ## Exercise 4.8. Suppose you would like to estimate the orbit of a certain object around the origin. Observations are made of both an angle and a distance. You collect five observations as follows where the first value is degrees and the second is in millions of miles: (23°, 152), (50°, 135), (100°, 102), (110°, 110), (152°, 137) The equation of an ellipse in polar coordinates can be given by the following for some A and B: $Ar^2 cos^2 θ + Br^2 sin2 θ = 1$ **(a)** Find the least-squares best-fit ellipse. **(b)** Use this to predict the distance of the object when $θ = 225°$. **(c)** What is the furthest that the object ever gets from the origin? ## Exercise 4.9. Repeating data points has an impact on the method of least squares. To visualize this, imagine we're trying to best-fit a straight line to a set of points. If a point appears more than once then the square of the distance to the line is being counted more than once and hence carries more weight in the method. To test this out find the least-squares line which best fits each of the following sets of points. Which line is closer to the point (3, 2)? **(a)** The points (1,1), (2, 1), (3, 2) **(b)** The points (1, 1), (2, 1), (3, 2), (3, 2) ## Exercise 4.10. Consider the set of $n + 2$ points: (1, 1), (2, 1), (3, 2), (3, 2), ..., (3, 2) n times Suppose you wish to best-fit these to a line $y = mx + b$ using least-squares. **(a)** Write down the corresponding matrix equation. **(b)** Solve for $\hat{m}$ using the method of least squares. Make sure you simplify; the answer should not be complicated. **(c)** Find $\lim_{n \to \infty} \hat{m}$. **(d)** The line corresponding to your answer in (c) passes through (3,2). Why does this make sense? ## Exercise 4.11. This problem loosely follows the data modeling example from class. Suppose you collect the following data points: (0, 4.2), (2, 5), (3, 5.3), (5, 6.1), (7, 7.9), (8, 8.6) When you plot these you see: y = 4 axis **(a)** Use least-squares to fit the function $f(x) = mx + b$. **(b)** Use least-squares to fit the function $f(x) = ax^2 + bx + c$. **(c)** If the data were to fit the function $f(x) = a + bc$, make an educated guess for $c$ and then use least-squares to fit the function. Hint: One idea might be to ignore $a$ and $b$ and suggest that $f(x) ≈ c$ especially for bigger $x$, but there are other options for guessing $c$. **(d)** Calculating the least-squares error for each, which seems to provide the best fit? **(e)** Use that function to predict $f(10)$. **(f)** Use that function to predict which $x$ would yield $f(x) = 50$. ## Exercise 4.12. The following sets of points each approximately follows a familiar function which is linear in some unknowns. First plot the points. Then make an educated sensible guess as to the form of the function. Finally use the method of least squares to find a best-fit function and estimate the $y$-value corresponding to the given $x$ value. The problems work from easier to more difficult. **(a)** Two unknowns, $x = 10$. (-1,8.5), (1, 2.5), (2, 0.53), (3, -1.5), (6, -7.4), (7, -9.5) **(b)** Two unknowns, $x = 20$. (-3, 20), (-1, 3.5), (1, 3.6), (2, 9.5), (5, 52), (7,100) **(c)** Three unknowns, $x = 2$. (-1, -5.4), (0, -1.9), (1, 0.51), (3, 2.5), (4, 2.0), (6, -1.9) **(d)** Two unknowns, $x = -10$. (-4, 6.1), (-1, 2.9), (0, 4.5), (2, 6.3), (6, 4.0), (7, 5.8), (8, 6.6), (10, 3.5), (11, 2.6) **(e)** Three unknowns, $x = 20$. (-2, -0.69), (-1, 1.5), (0, 2.5), (1, 1.8), (2, 0.08), (4, 0), (5, 2.2), (6, 3.7), (8, 1.9), (9, 0.49) ## Exercise 4.13. For which of the following function templates will the method of least squares work and for which will it not. Explain. For one of the ones for which it will not work cite an example and show in detail what goes wrong. Your answer to this second part should touch on the issue of linear vs nonlinear systems. **(a)** $f(x) = ax^2 + bx$ **(b)** $f(x) = a e^x + bx$ **(c)** $f(x) = e^{ax} + bx$ **(d)** $f(x) = a sin(x) + b cos(x) + c$ **(e)** $f(x) = a sin(bx) + c$ ## Exercise 6.2. Given the transition matrix: $T = \begin{bmatrix} 0.9 & 0 & 0.05 & 0 & 0.15 & 0.05 \\ 0 & 0.8 & 0.05 & 0.2 & 0.05 & 0.05 \\ 0.01 & 0.1 & 0.5 & 0 & 0 & 0.05 \\ 0.02 & 0.1 & 0.1 & 0.75 & 0 & 0.05 \\ 0.07 & 0 & 0.1 & 0 & 0.7 & 0.05 \\ 0 & 0 & 0.2 & 0.05 & 0.1 & 0.75 \end{bmatrix}$ **(a)** Draw the corresponding population movement diagram. **(b)** Is this matrix regular? Justify. ## Exercise 6.4. Given the following population movement diagram: [Diagram Description] **(a)** Write down the transition matrix $T$ for this. **(b)** Find each of the following without actually taking powers of $T$: **(a)** The (3,2) entry of $T$. **(b)** The (3,2) entry of $T^2$. **(c)** The (1,3) entry of $T^2$. Be careful! **(d)** The smallest $k$ such that the (5,3) entry of $T^k$ is nonzero and what that value is. **(e)** All (i, j) such that the (i, j) entery of $T^k$ is zero for all $k$. **(f)** Explain intuitively what will happen in the long term to any initial population distribution. Justify intuitively. This question can be answered to various degrees of detail, the most basic being - in which area(s) do the populations tend to eventually move and why? ## Exercise 6.5. Find a population movement diagram and the corresponding transition matrix $T$ such that $T^7 = I$ but $T^k \neq I $ for $k < 7$. ## Exercise 6.14. Consider: [Diagram Description] **(a)** Write down the corresponding transition matrix $T$. **(b)** Assuming that $0 < a < 1$ and $0 < β < 1$, find the limiting steady state vector for $T$. **(c)** If remove the above restrictions on $a$ and $β$ does $T$ have to have a limiting steady state vector? If it does not have to, can it? Justify.

Use Quizgecko on...
Browser
Browser