MML - Review for Exam 1

We will have our first exam next Friday, Jan 30. The problems on that exam oughtta look something like the problems you see here.

Generally, I will expect solutions to the problems, as opposed to just answers. So, for example, if the answer to an optimization problem is \(y=5\), then the solution will consist of a clear explanation with correctly written supporting computations indicating why the answer is \(y=5\).

Note that there is a link at the bottom of this sheet labeled either “Start Discussion” or “Continue Discussion”, depending on the status of those discussions. Following that link will take you to my forum where you can create an account with your UNCA email address. You can ask questions and/or post responses and answers there.

The problems

  1. Figure 1 shows a scatter plot built from data for 343 penguins of three different species. Note that one point near the top is somewhat larger than the others and is of unknown species. Let’s suppose we apply a K-Nearest Neighbors algorithm to classify the species of that lone unknown penguin.

    1. Describe this procedure. That is, how does the KNN algorithm work?
    2. What would the result be for that unknown penguin if
      1. \(k=1\)?
      2. \(k=2\)?
  2. Figure 2 shows a contour plot of \(f(x,y) = x^2+x y+3 x+y^2+2 y\).

    1. Identify any max, min, or saddle points that you see on the graph.
    2. Note the grid of 9 points on figure 2. For each of those points, draw the corresponding gradient vector emanating from that point. Be sure to pay careful attention to the direction and relative magnitude of those vectors.
  3. Suppose we wish to fit a least-squares regression line using a function of the form \(f(x) = ax+b\) to the data

    [[-1,-1],[0,2],[1,1]]
    1. Write down the function \(E(a,b)\) that expresses the total squared error of the approximation.
    2. Compute the two partial derivatives \(\partial E/\partial a\) and \(\partial E/\partial b\) of your error function.
    3. Set those partial derivatives each to zero and solve the resulting system.
    4. Interpret your solution to part (c) to obtain the least squares regression line.
  4. Write down precise, mathematical definitions of each of the following:

    1. Critical point of a bivariate function
    2. Homogeneous system of equations
    3. Non-singular matrix
    4. Matrix transpose
  5. Provide examples of linear systems of three equations in three unknowns satisfying each of the following situations:

    1. The system has no solutions,
    2. The system has infinitely many solutions, and
    3. The system has exactly one solution.
  6. Let \(M\) denote the matrix \[ M = \begin{bmatrix} 2 & 1 & 5 & 10\\ 1 & -3 & -1 & -2\\ 4 & -2 & 6 & 12 \end{bmatrix} \]

    1. Place \(M\) into reduced row echelon form.
    2. Assuming that \(M\) is an augmented matrix representing a \(3\times3\) system, use your reduced row echelon form to solve that system. If the solution set is infinite, you should parameterize that solution set.
  7. The matrix \(A\) and its reduced row echelon form \(R\) are shown below.

    1. Explain why you can tell immediately from \(R\) that \(A\) is a singular matrix.
    2. Which columns of \(A\) are the pivot columns?
    3. Assuming that \(A\) is the coefficient matrix of a homogeneous system, find the solution set of that system.

\[A = \left[\begin{matrix}-2 & 0 & 2 & 4\\2 & -1 & -3 & -7\\-1 & -2 & -1 & -4\\1 & 1 & 0 & 1\end{matrix}\right]\]

\[R = \left[\begin{matrix}1 & 0 & -1 & -2\\0 & 1 & 1 & 3\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\end{matrix}\right]\]

Figures

Figure 1: A scatter plot off body mass vs culmen depth for penguins.
Figure 2: A contour plot of \(f(x,y) = x^2 + xy + 3x + y^2 + 2y\).

Your questions and answers

If you’d like to ask a question about or reply to a question on this sheet, you can do so by pressing the “Reply on Discourse” button below.