Learning Objectives for Quiz 6
Numerical Methods in R
Root Finding
- Define a root of a function \(f\).
- Explain why we might need to find roots of a function \(f\) numerically, rather than algebraically.
- Give an example of a function where we cannot, in general, find its roots algebraically.
- Use
uniroot()
to find a root of function \(f\).
- 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.
- Give a (rough) description of how the Bisection Method finds a root of a function.
- Use
uniroot()
to find where a function \(f\) takes a non-zero value.
- Use
uniroot()
to find the quantiles of a continuous random variable \(X\) given its cumulative distribution function \(F\).
Optimization
- Explain why statisticians care about optimization.
- State the 3 main methods in Base R used for numerical optimization.
- Use
optimize()
to find local minima and / or maxima of a function \(f\) of a scalar variable \(x\).
- Give a (rough) description of how successive parabolic interpolation can be used to find local optima of a function \(f\).
- Use
Vectorize()
to vectorize a function in terms of one or more of its arguments.
- Use
curve()
to find a reasonable starting value for the interval
argument of optimize()
.
Numerical Quadrature
- Define numerical quadrature.
- Explain why one might need to use numerical quadrature rather than use an indefinite integral and the Fundamental Theorem of Calculus to find the area under a curve.
- Use
integrate()
to evaluate a definite integral.
- Both proper and improper definite integrals.
- Find the cumulative distribution function \(F\) of a continuous random variable \(X\) using its probability density function \(f\) and
integrate()
.
Symbolic Differentiation with the Deriv
Package
- Define a symbolic derivative.
- Use
Deriv()
to compute the symbolic derivative of a function \(f\) up to some order.
- Define the \(r\)-th moment of a random variable \(X\).
- Use a given moment generating function \(M_{X}(t)\) of a random variable \(X\) to find its \(r\)-th moment using
Deriv()
.