Download presentation
Presentation is loading. Please wait.
1
January 31, 2006Lecture 2bSlide #1 Minimizing e 2 : A Refresher in Calculus Minimizing error The derivative Slope at a point Differentiation Rules of Derivation –Power rule –Constants & Sums –Products & Quotients –The Chain-rule Critical points –Factoring equations
2
January 31, 2006Lecture 2bSlide #2 What’s in e? Measurement error –Imperfect operationalizations –Imperfect measure application Bias and noise Modeling error/misspecification –Missing model explanation –Incorrect assumptions about associations –Incorrect assumptions about distributions More bias and more noise Sum of errors affecting measurement and model? –Ideally, lots of small and independent influence Results in random quality of error –When error is systematic, may bias estimates
3
January 31, 2006Lecture 2bSlide #3 Measuring Error: Residuals 2 Y X Objective: to estimate model such that we minimize ∑e. For computational reasons, we minimize ∑e 2.
4
January 31, 2006Lecture 2bSlide #4 The Derivative Minimization requires specifying an estimator of b 0 and b 1 such that ∑e 2 is at the lowest possible value. –Easy in the linear case, but ∑e 2 is curvilinear (quadratic) Need calculus of derivatives –Allow identification of slope at a point x1x1 x2x2 x3x3 Y=f(X) The function is f(X) The derivative is f´(X) Said as “f-prime X” or
5
January 31, 2006Lecture 2bSlide #5 More on Derivatives If we knew the formula for f´(X), we could plug in the value of X to find the slope at that point. That means differential calculus is preoccupied with the rules for defining the derivative, given the various possible functional forms of f(X) Now take a deep breath…
6
January 31, 2006Lecture 2bSlide #6 Power Rule & Constant Rule If f(X) = x n, then f´(X) = nx n-1 Example: if f(X) = x 6, then f´(X) = 6x 5 If f(X) = c, then f´(X) = 0 Example: if f(X) = 5, then f´(X) = 0
7
January 31, 2006Lecture 2bSlide #7 Calculating Slope for (x,y) Pairs XY -5 -2 0 2 5 25 4 0 4 25 Y= f(X) =x 2 f´(X) =2x XSlope -5 -2 0 2 5 -10 -4 0 4 10
8
January 31, 2006Lecture 2bSlide #8 More Rules A derivative of a constant times a function –If f(X) = c · u(X), then f´(X) = c · u´(x) –Example: f(X)=5x 2 ; f´(x)= 5 · 2x = 10x Example: plot Y= f(x) = x 2 - 6x + 5 –Find f´(x).
9
January 31, 2006Lecture 2bSlide #9 Plot and Derivative for Y= f(x) = x 2 -6x+5 XY 0 1 2 3 4 5 6 7 12 5 0 -3 -4 -3 0 5 12 Y= f(X) XSlope 0 1 2 3 4 5 6 7 -8 -6 -4 -2 0 2 4 6 8 Y= f´(X)
10
January 31, 2006Lecture 2bSlide #10 More Rules Differentiating a sum –If f(x) = u(x) + v(x) then f´(x) = u´(x) + v´(x) –Example: f(x) = 32x + 4x 2 ; f´(x) = 32 + 8x If f(x) = 4x 2 - 3x, what is f´(x)?
11
January 31, 2006Lecture 2bSlide #11 Product Rule If f(x) = u(x) · v(x) then f´(x) = u(x) · v´(x) + u´(x) · v(x) Example: f(x) = x 3 (x - 5); find f´(x) –f´(x) = [x 3 · 1] + [3x 2 · (x - 5)] = x 3 + 3x 3 - 15x 2 = 4x 3 - 15x 2 You get the same result using only the power rule But the product rule is easier when f(x) is complex Example: f(x) = (x 4 + 3)(3x 3 + 1); find f´(x) –f´(x) = [(x 4 + 3) · 9x 2 ] + [4x 3 · (3x 3 + 1)]
12
January 31, 2006Lecture 2bSlide #12 Quotient Rule Example:
13
January 31, 2006Lecture 2bSlide #13 Chain Rule If f(x)=[u(x)] n then f´(x) = n[u(x)] n-1 · u´(x) Example: if f(x) = (7x 2 - 2x + 13) 5 then f´(x) = 5(7x 2 - 2x + 13) 4 · (14x - 2) Try this: if f(x) = (3x + 1) 10 then f´(x) = ?
14
January 31, 2006Lecture 2bSlide #14 Critical Points Finding minima and maxima Key: where f´(x) = 0, slope is zero Example: if f(x) = x 2 - 4x +5 then f´(x) = 2x - 4 Set (2x - 4) = 0, then x - 2 = 0; so x = 2 when f´(x) = 0 Y coordinate when x = 2 is 1 (calculate it!!) So: f(x) has a critical point at x = 2, y = 1
15
January 31, 2006Lecture 2bSlide #15 Critical Points, Continued How do you determine if it’s a minima or a maxima? –How many humps in the functional form? At least exponent minus one –Identify x,y coordinates and plot –Identify the derivative: f´(x) on either side of the critical point
16
January 31, 2006Lecture 2bSlide #16 Identification of Critical Point for f(x) = x 2 - 4x + 5 If f´(x) = 2x - 4, then the value of f´(x) is negative (slope is negative) up to 2, and positive (slope is positive) above 2. Therefore, the critical point at (2,0) is a minimum
17
January 31, 2006Lecture 2bSlide #17 Factoring Ugly Functions Sometimes a quadratic functional form can be simplified by factoring. When the equation can be written as: ax 2 + bx + c The factors can be derived as follows: For example: f(x) = x 3 - 6x 2 + 9x; f´(x) = 3x 2 - 12x + 9 To find the critical points, we’d need to find the values at which f´(x) = 0. Factoring reduces f´(x) to: f´(x) = (x - 3)(3x - 3); so both x = 3 and x = 1 are CP’s
18
January 31, 2006Lecture 2bSlide #18 Partial Derivation When an equation includes two variables, one can take a “partial derivative” with respect to only one variable. The other variable is simply treated as a constant:
19
January 31, 2006Lecture 2bSlide #19 Some Puzzles 1. Differentiate f(x) = x 3 - 4x + 7 2. Differentiate f(x) = (x - 3)(x 2 + 7x + 10) 3. Differentiate f(x) = (x 2 - 5)/(x + 7) 4. Differentiate f(x) = (x 2 - 3x + 5) 12 5. Find all critical points for Y = f(x) = x 3 + 3x 2 + 1 Plot the function, identify the CP’s. 6. Find all critical points for Y= f(x) = x 4 - 8x 3 + 18x 2 - 27 Plot, and identify CP’s. 7. Y = f(x,z) = x 4 + 15z 2 + 2xz 2 - 456z 12 Find f’(x)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.