Docsity

Minimizing Error: A Refresher on Calculus and Derivatives, Slides of Quantitative Techniques

Partial preview of the text

Download Minimizing Error: A Refresher on Calculus and Derivatives and more Slides Quantitative Techniques in PDF only on Docsity!

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

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

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

x1 x 2 x (^3)

Y= f (X)

The function is f (X) The derivative is f ´(X) Said as “f-prime X” or

∂ Y

∂ X

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…

Calculating Slope for (x,y) Pairs

X Y

Y= f (X) =x 2 f´ (X) =2x

X Slope

  • 0 2 5

5

10

15

20

25

30

-6 -4 -2 0 2 4 6

Y

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).

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)?

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)]

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) =?

Critical Points

  • Finding minima and maxima
  • Key: where f´(x) = 0, slope is zero
  • Example: if f(x) = x 2 - 4x +

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

Identification of Critical Point for

f(x) = x^2 - 4x + 5

0

10

20

30

40

50

60

-6 -4 -2 0 2 4 6 8 10

Y f '(X)

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

Factoring Ugly Functions

x =

− b ± b^2 − 4 ac 2 a

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

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.

  1. Find all critical points for

Y= f(x) = x^4 - 8x 3 + 18x 2 - 27 Plot, and identify CP’s.

  1. Y = f(x,z) = x 4 + 15z^2 + 2xz^2 - 456z 12 Find f’(x)