Numerical Methods in R

Root Finding

  1. Define a root of a function \(f\).
  2. Explain why we might need to find roots of a function \(f\) numerically, rather than algebraically.
  3. Give an example of a function where we cannot, in general, find its roots algebraically.
  4. Use uniroot() to find a root of function \(f\).
  5. State the special case of the intermediate value theorem involving roots, and sketch a picture of why the intermediate value must be true under the hypotheses of the intermediate value theorem.
  6. Give a (rough) description of how the Bisection Method finds a root of a function.
  7. Use uniroot() to find where a function \(f\) takes a non-zero value.
  8. Use uniroot() to find the quantiles of a continuous random variable \(X\) given its cumulative distribution function \(F\).

Optimization

  1. Explain why statisticians care about optimization.
  2. State the 3 main methods in Base R used for numerical optimization.
  3. Use optimize() to find local minima and / or maxima of a function \(f\) of a scalar variable \(x\).
  4. Give a (rough) description of how successive parabolic interpolation can be used to find local optima of a function \(f\).
  5. Use Vectorize() to vectorize a function in terms of one or more of its arguments.
  6. Use curve() to find a reasonable starting value for the interval argument of optimize().