Class 18

Between Class Sessions - Prep for Day 18

Please spend around 2 hours working between class sessions, focusing on the tasks below. Use any extra time to complete KnewtonAlta assignments and/or work on Project tasks.

Pick something from your prep today that you can share with your group in class. It might be something new that you learned. It might be questions you have that are still unanswered, or a question along with what helped you eventually answer it. It might be something tricky that you solved. It might be a review topic that helped you remember something. It might be a conversation you had with AI that was helpful. You will have a chance to share this with your peers during class. Come ready to articulate your thinking and questions.

Preparation

(1) Derivative Rules

Watch the following videos.

(2) Function Decomposition (composing and decomposing functions)

Complete as much of this Composing and Decomposing Practice worksheet as you can.

Regular Reminders

Skill Practice (KA Homework)

  • Complete 2 – Derivative Rules (Power Function, Sum/Difference, Constant Multiple) assignment
  • Begin 2 – Derivative Rules (Product and Quotient) assignment

Applied Practice (Project Work)

  • Complete and Submit Project 1
  • Continue working on Project 2 Task 1
    • For each general function listed in Project 2 Task 1 and the points \((t_i,y_i)\) with \(i = 1, 2, 3, ... 43, 44\), complete the following. Assume the residuals (or errors) are independent and normally distributed (with \(\mu = 0\) and \(\sigma = 1\)). This means the probability model for one residual is \(p(r_i) = \frac{1}{\sqrt{2\pi}}e^{-\frac{r_i^2}{2}}\).
      • Write down the likelihood function for the 44 independent residuals.
      • Write down the loglikelihood function. How could you use the properties of logarithms to rewrite each the loglikelihood function as a sum rather than a product?

During Class

Brain Gains

  1. Compute \(\frac{df}{dx}\) for \(f(x) = 5x^8+3e^x-7\ln x-4\sqrt{x}+\frac{5}{x^3}\)
Answer

\[f'(x) = 40x^7 + 3e^x - \frac{7}{x} - \frac{2}{\sqrt{x}} - \frac{15}{x^4}\]

  1. Compute \(g'(x)\) for \(g(x) = (e^x)(x^3)\)
Answer

\[\frac{dg}{dx} = 3x^2 e^x + x^3 e^x\]

  1. Compute \(h'(x)\) for \(h(x) = \dfrac{3x^2}{2\ln x}\)
Answer

\[D_x h(x) = \frac{3x}{\ln x} - \frac{3x}{2(\ln x)^2}\]

More Likelihood Practice

You have been given a list of data for 400 customers, \((x_i, t_i)\), were \(x_i\) is the number of months the since the boot was purchased and \(t_i\) is the tread thickness of the boot for the \(i^{\text{th}}\) customer. A model for the tread thickness on the bottom of a boot is \(f(x;m,b) = mx+b\), where \(x\) is the number of months since the date the boot was purchased.

  • Write the formula for the residuals.

Assume the residuals (errors) are independent and normally distributed (with mean of 0 and standard deviation of 1), which means we’re assuming the probability model for the residuals is \(p(r) = \frac{1}{\sqrt{2\pi}}e^{-\frac{r^2}{2}}\). Match each function below with a term on the right.

\[ \begin{aligned} r_i(m, b; x_i, t_i) &= t_i - f(x_i; m, b) \\ &= t_i - (mx_i + b) \\ &= t_i - mx_i - b \end{aligned} \]

Likelihood function

\(J(x_i,t_i;m,b) = \prod_{i=1}^{400} \frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(t_i - mx_i -b)^2}\)

\(i\)th residual

\(L(m,b; x_i,t_i) = \prod_{i=1}^{400} \frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(t_i - mx_i -b)^2}\)

Loglikelihood function

\(\ell(m,b; x_i,t_i) = \ln\left(\prod_{i=1}^{400} \frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(t_i - mx_i -b)^2}\right)\)

Joint Distribution

Now simplify the loglikelihood function using properties of logs and sums.

Answers

First we write a formula for the residuals (or errors) to obtain

\[ \begin{aligned} r_i(m, b; x_i, t_i) &= t_i - f(x_i; m, b) \\ &= t_i - (mx_i + b) \\ &= t_i - mx_i - b \end{aligned} \]

Because the errors are independent we can multiply the probability models to find the joint probability model as \[J(x_i,t_i;m,b) = \prod_{i=1}^{400} \frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(t_i - mx_i -b)^2}\]

The likelihood function (interchange the role of variables and parameters) is then \[L(m,b; x_i,t_i) = \prod_{i=1}^{400} \frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(t_i - mx_i -b)^2}\]

The natural log of the likelihood function gives the loglikelihood function as \[\ell(m,b; x_i,t_i) = \ln\left(\prod_{i=1}^{400} \frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(t_i - mx_i -b)^2}\right)\]

Using the properties of logarithms and sums we find \[\ell(m,b; x_i,t_i) = 400\ln\left(\frac{1}{\sqrt{2\pi}}\right) -\frac{1}{2}\sum_{i=1}^{400} (t_i - mx_i -b)^2\]

Group Meeting

Start by giving each person a moment to share what they chose to prepare for class. Help each other address any questions. When each person has had a chance to share, move on the other activities.

Activity - Computing Derivatives Practice

Below is a list of derivative rules (most of which we have seen) that you are welcome to use as you complete this activity and any homework in Knewton Alta. It’s not crucial that you memorize all these rules. Some you will memorize from just using them each time.

Derivative Rules

  • Are there any exercises from your homework you would like to revisit with your group? Take turns at the chalk board solving these problems.
  • After you’ve discussed any problems from the homework, continue taking turns at the chalkboard to compute the derivative of each of the following functions (remember to pass the chalk after each problem). Explain which rules you used to complete each step. Whenever we work on problems at the chalk boards we are practicing our communication and use of mathematical notation.
  1. For \(f(x) = (3x^2-7x+5)\ln(x)\), find \(f'(x)\). Remember to identify which rules you used at each step (on this and each problem).

  2. For \(g(x) = \frac{3}{x}e^x\), find \(g'(x)\).

  3. For \(h(x) = \frac{6\ln(x)}{5\sqrt{x}}\), find \(\frac{dh}{dx}\).

  4. For \(r(t) = 7\ln t - \frac{3}{t^2}\), find \(\frac{dr}{dt}\).

  5. For \(f(p) = \sum_{j=3}^7 4^jp^2\), find \(f'(p)\).

  6. For \(h(r) = \sum_{n=1}^{40} n\ln(r)\), find \(h'(r)\).

  7. For \(t(x) = \sum_{m=1}^{40} m x^m\), find \(\frac{dt}{dx}\).

  8. For \(p(x) = ax^2+be^x+c\ln(x)\), find \(\frac{dp}{dx}\) assuming that \(a,b,c\) are constants.

  9. For \(p(a) = ax^2+be^x+c\ln(x)\), find \(\frac{dp}{da}\) assuming that \(x,b,c\) are constants.

  10. For \(r(y) = \frac{6y^2e^y}{5\sqrt{y}}\), find \(\frac{dr}{dy}\).

  11. For \(q(t) = (3x+1)(x^2-4)(5x-3\sqrt{x})(1-e^x)\) find \(D_t q\).


Source: Class.18 on byuimath.com