Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are...
Transcript of Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are...
![Page 1: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/1.jpg)
Math Camp
Justin Grimmer
Associate ProfessorDepartment of Political Science
Stanford University
September 7th, 2016
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 1 / 1
![Page 2: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/2.jpg)
Optimization
Political scientists are often concerned with finding extrema: maxima orminima
- Given data, most likely value of a parameter
- Game theory: given other player’s strategy, action that maximizesutility
- Across substantive areas: what is the optimal action, strategy,prediction?
How to Optimize
- When functions are well behaved and known analytic solutions
- Differentiate, set equal to zero, solve- Check end points and use second derivative test
- More difficult problems computational solutions
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 2 / 1
![Page 3: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/3.jpg)
Optimization
Political scientists are often concerned with finding extrema: maxima orminima
- Given data, most likely value of a parameter
- Game theory: given other player’s strategy, action that maximizesutility
- Across substantive areas: what is the optimal action, strategy,prediction?
How to Optimize
- When functions are well behaved and known analytic solutions
- Differentiate, set equal to zero, solve- Check end points and use second derivative test
- More difficult problems computational solutions
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 2 / 1
![Page 4: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/4.jpg)
Optimization
Political scientists are often concerned with finding extrema: maxima orminima
- Given data, most likely value of a parameter
- Game theory: given other player’s strategy, action that maximizesutility
- Across substantive areas: what is the optimal action, strategy,prediction?
How to Optimize
- When functions are well behaved and known analytic solutions
- Differentiate, set equal to zero, solve- Check end points and use second derivative test
- More difficult problems computational solutions
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 2 / 1
![Page 5: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/5.jpg)
Optimization
Political scientists are often concerned with finding extrema: maxima orminima
- Given data, most likely value of a parameter
- Game theory: given other player’s strategy, action that maximizesutility
- Across substantive areas: what is the optimal action, strategy,prediction?
How to Optimize
- When functions are well behaved and known analytic solutions
- Differentiate, set equal to zero, solve- Check end points and use second derivative test
- More difficult problems computational solutions
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 2 / 1
![Page 6: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/6.jpg)
Optimization
Political scientists are often concerned with finding extrema: maxima orminima
- Given data, most likely value of a parameter
- Game theory: given other player’s strategy, action that maximizesutility
- Across substantive areas: what is the optimal action, strategy,prediction?
How to Optimize
- When functions are well behaved and known analytic solutions
- Differentiate, set equal to zero, solve- Check end points and use second derivative test
- More difficult problems computational solutions
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 2 / 1
![Page 7: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/7.jpg)
Optimization
Political scientists are often concerned with finding extrema: maxima orminima
- Given data, most likely value of a parameter
- Game theory: given other player’s strategy, action that maximizesutility
- Across substantive areas: what is the optimal action, strategy,prediction?
How to Optimize
- When functions are well behaved and known analytic solutions
- Differentiate, set equal to zero, solve- Check end points and use second derivative test
- More difficult problems computational solutions
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 2 / 1
![Page 8: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/8.jpg)
Optimization
Political scientists are often concerned with finding extrema: maxima orminima
- Given data, most likely value of a parameter
- Game theory: given other player’s strategy, action that maximizesutility
- Across substantive areas: what is the optimal action, strategy,prediction?
How to Optimize
- When functions are well behaved and known analytic solutions
- Differentiate, set equal to zero, solve
- Check end points and use second derivative test
- More difficult problems computational solutions
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 2 / 1
![Page 9: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/9.jpg)
Optimization
Political scientists are often concerned with finding extrema: maxima orminima
- Given data, most likely value of a parameter
- Game theory: given other player’s strategy, action that maximizesutility
- Across substantive areas: what is the optimal action, strategy,prediction?
How to Optimize
- When functions are well behaved and known analytic solutions
- Differentiate, set equal to zero, solve- Check end points and use second derivative test
- More difficult problems computational solutions
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 2 / 1
![Page 10: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/10.jpg)
Optimization
Political scientists are often concerned with finding extrema: maxima orminima
- Given data, most likely value of a parameter
- Game theory: given other player’s strategy, action that maximizesutility
- Across substantive areas: what is the optimal action, strategy,prediction?
How to Optimize
- When functions are well behaved and known analytic solutions
- Differentiate, set equal to zero, solve- Check end points and use second derivative test
- More difficult problems computational solutions
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 2 / 1
![Page 11: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/11.jpg)
Optimization
Political scientists are often concerned with finding extrema: maxima orminima
- Given data, most likely value of a parameter
- Game theory: given other player’s strategy, action that maximizesutility
- Across substantive areas: what is the optimal action, strategy,prediction?
How to Optimize
- When functions are well behaved and known analytic solutions
- Differentiate, set equal to zero, solve- Check end points and use second derivative test
- More difficult problems computational solutions
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 2 / 1
![Page 12: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/12.jpg)
Intuition: Optimization with Derivatives, Known wellbehaved functions
−3 −2 −1 0 1 2 3
−4
−2
02
46
Rolle's Theorem
x
f(x)
f'(x) = 0
- Rolle’s theoremguarantee’s that, atsome point, f
′(x) = 0
- Intuition fromproof—what happens aswe approach from theleft?
- Intuition fromproof—what happens aswe approach from theright?
- critical intuition first,second derivatives
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 3 / 1
![Page 13: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/13.jpg)
Intuition: Optimization with Derivatives, Known wellbehaved functions
−3 −2 −1 0 1 2 3
−4
−2
02
46
Rolle's Theorem
x
f(x)
f'(x) = 0
- Rolle’s theoremguarantee’s that, atsome point, f
′(x) = 0
- Intuition fromproof—what happens aswe approach from theleft?
- Intuition fromproof—what happens aswe approach from theright?
- critical intuition first,second derivatives
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 3 / 1
![Page 14: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/14.jpg)
Intuition: Optimization with Derivatives, Known wellbehaved functions
−3 −2 −1 0 1 2 3
−4
−2
02
46
Rolle's Theorem
x
f(x)
f'(x) = 0
- Rolle’s theoremguarantee’s that, atsome point, f
′(x) = 0
- Intuition fromproof—what happens aswe approach from theleft?
- Intuition fromproof—what happens aswe approach from theright?
- critical intuition first,second derivatives
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 3 / 1
![Page 15: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/15.jpg)
Intuition: Optimization with Derivatives, Known wellbehaved functions
−3 −2 −1 0 1 2 3
−4
−2
02
46
Rolle's Theorem
x
f(x)
f'(x) = 0
- Rolle’s theoremguarantee’s that, atsome point, f
′(x) = 0
- Intuition fromproof—what happens aswe approach from theleft?
- Intuition fromproof—what happens aswe approach from theright?
- critical intuition first,second derivatives
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 3 / 1
![Page 16: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/16.jpg)
Intuition: Optimization with Derivatives, Known wellbehaved functions
−3 −2 −1 0 1 2 3
−4
−2
02
46
Rolle's Theorem
x
f(x)
f'(x) = 0
- Rolle’s theoremguarantee’s that, atsome point, f
′(x) = 0
- Intuition fromproof—what happens aswe approach from theleft?
- Intuition fromproof—what happens aswe approach from theright?
- critical intuition first,second derivatives
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 3 / 1
![Page 17: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/17.jpg)
Second Derivatives
Definition
Suppose f : < → < is differentiable. Recall we write this as f′
andsuppose that f
′: < → <. Then if the limit,
limx→x0
R(x) =f′(x)− f
′(x0)
x − x0
exists, we call this the second derivative at x0, f′′
(x0).
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 4 / 1
![Page 18: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/18.jpg)
Example of Second Derivatives
f (x) = x
f′(x) = 1
f′′
(x) = 0
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 5 / 1
![Page 19: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/19.jpg)
Example of Second Derivatives
f (x) = ex
f′(x) = ex
f′′
(x) = ex
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 5 / 1
![Page 20: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/20.jpg)
Example of Second Derivatives
f (x) = log(x)
f′(x) =
1
x
f′′
(x) =−1
x2
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 5 / 1
![Page 21: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/21.jpg)
Example of Second Derivatives
f (x) =1
x
f′(x) =
−1
x2
f′′
(x) =2
x3
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 5 / 1
![Page 22: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/22.jpg)
Example of Second Derivatives
f (x) = −x2 + 20
f′(x) = −2x
f′′
(x) = −2
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 5 / 1
![Page 23: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/23.jpg)
Approximating functions and second order conditions
Theorem
Taylor’s Theorem Suppose f : < → <, f (x) is infinitely differentiablefunction. Then, the taylor expansion of f (x) around a is given by
f (x) = f (a) +f′(a)
1!(x − a) +
f′′
(a)
2!(x − a)2 +
f′′′
(a)
3!(x − a)3 + . . .
f (x) =∞∑n=0
f n(a)
n!(x − a)n
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 6 / 1
![Page 24: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/24.jpg)
R Code!
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 7 / 1
![Page 25: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/25.jpg)
Concavity, Convexity, Inflections
Second derivatives provide further information about functions
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x)
0 1 2 3 4 5
−5
−4
−3
−2
−1
01
Log(x)
Xf(
x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 8 / 1
![Page 26: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/26.jpg)
Concavity, Convexity, Inflections
Second derivatives provide further information about functions
1 2 3 4 5
0.5
1.0
1.5
2.0
1/X
X
f(x)
0 1 2 3 4 5
−5
05
1015
20
−x^2 + 20
Xf(
x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 8 / 1
![Page 27: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/27.jpg)
Concave Up/ Convex
Definition
Suppose f : [a, b]→ < is a twice differentiable function. If, for allx ∈ [a, b] and y ∈ [a, b] and t ∈ (0, 1)
f ((1− t)x + ty) < (1− t)f (x) + tf (y)
We say that f is strictly concave up or convex. Equivalently if f′′
(x) > 0for all x ∈ [a, b], we say that f is strictly concave up.
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 9 / 1
![Page 28: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/28.jpg)
Concave Up, Graphical Testf (x) = ex , [1, 4]
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 10 / 1
![Page 29: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/29.jpg)
Concave Up, Graphical Testf (x) = ex , [1, 4]
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x)
●(1, e^(1))
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 10 / 1
![Page 30: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/30.jpg)
Concave Up, Graphical Testf (x) = ex , [1, 4]
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x)
●(1, e^(1))
● (4, e^(4))
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 10 / 1
![Page 31: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/31.jpg)
Concave Up, Graphical Testf (x) = ex , [1, 4]
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x)
●(1, e^(1))
● (4, e^(4))
●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 10 / 1
![Page 32: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/32.jpg)
Concave Up, Graphical Testf (x) = ex , [1, 4]
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x)
●(1, e^(1))
● (4, e^(4))
●● ●
●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 10 / 1
![Page 33: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/33.jpg)
Concave Up, Graphical Testf (x) = ex , [1, 4]
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x)
●(1, e^(1))
● (4, e^(4))
●● ●
● ●
●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 10 / 1
![Page 34: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/34.jpg)
Concave Up, Graphical Testf (x) = ex , [1, 4]
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x)
●(1, e^(1))
● (4, e^(4))
●● ●
● ●
●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 10 / 1
![Page 35: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/35.jpg)
Concave Up, Second Derivative
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x)
f (x) = ex
f′(x) = ex
f′′
(x) = ex
ex > 0 for all x ∈ [1, 4]
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 11 / 1
![Page 36: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/36.jpg)
Concave Up, Second Derivative
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x) f (x) = ex
f′(x) = ex
f′′
(x) = ex
ex > 0 for all x ∈ [1, 4]
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 11 / 1
![Page 37: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/37.jpg)
Concave Up, Second Derivative
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x) f (x) = ex
f′(x) = ex
f′′
(x) = ex
ex > 0 for all x ∈ [1, 4]
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 11 / 1
![Page 38: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/38.jpg)
Concave Up, Second Derivative
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x) f (x) = ex
f′(x) = ex
f′′
(x) = ex
ex > 0 for all x ∈ [1, 4]
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 11 / 1
![Page 39: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/39.jpg)
Concave Up, Second Derivative
0 1 2 3 4 5
050
100
150
e^(x)
X
f(x) f (x) = ex
f′(x) = ex
f′′
(x) = ex
ex > 0 for all x ∈ [1, 4]
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 11 / 1
![Page 40: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/40.jpg)
Concave Down
Definition
Suppose f : [a, b]→ < is a twice differentiable function. If, for allx ∈ [a, b] and y ∈ [a, b] and t ∈ (0, 1)
f ((1− t)x + ty) > (1− t)f (x) + tf (y)
We say that f is strictly concave down. Equivalently if f′′
(x) < 0 for allx ∈ [a, b], we say that f is strictly concave down.
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 12 / 1
![Page 41: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/41.jpg)
Concave Down
0 1 2 3 4 5
−5
−4
−3
−2
−1
01
Log(x)
X
f(x)
- Show Concave down with graph test for x ∈ [1, 4]
- Show concave down with second derivative test for x ∈ [1, 4]
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 13 / 1
![Page 42: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/42.jpg)
Optimization
Theorem
Extreme Value Theorem Suppose f : [a, b]→ < and that f is continuous.Then f obtains its extreme value on [a, b].
Corollary
Suppose f : [a, b]→ <, that f is continuous and differentiable, and thatf (a) nor f (b) is the extreme value. Then f obtains its maximum on (a, b)and if f (x0) is the extreme value of f x0 ∈ (a, b) then, f
′(x0) = 0.
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 14 / 1
![Page 43: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/43.jpg)
Extrema on End Points
0 1 2 3 4 5
01
23
45
f(x) = x
X
f(X
)
●
●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 15 / 1
![Page 44: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/44.jpg)
Maximum in Middle, Concave Down
f (x) = −x2 + 5.
−3 −2 −1 0 1 2 3
−4
−2
02
46
Rolle's Theorem
x
f(x)
f'(x) = 0
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 16 / 1
![Page 45: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/45.jpg)
Minimum in Interior, Concave Upf (x) = x2 + 9x + 9
−10 −8 −6 −4 −2 0
−10
−5
05
1015
20
x
f(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 17 / 1
![Page 46: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/46.jpg)
Local Optimaf (x) = sin(x)
−20 −10 0 10 20
−1.
0−
0.5
0.0
0.5
1.0
x
f(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 18 / 1
![Page 47: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/47.jpg)
Inflection pointsf (x) = x3
−3 −2 −1 0 1 2 3
−20
−10
010
20
x
f(x)
●
●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 19 / 1
![Page 48: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/48.jpg)
Framework for Optimization
Recipe for optimization
- Find f′(x).
- Set f′(x) = 0 and solve for x . Call all x0 such that f
′(x0) = 0 critical
values.
- Find f′′
(x). Evaluate at each x0.
- If f′′
(x) > 0, Concave up, local minimum- If f
′′(x) < 0, Concave down, local maximum
- If f′′
(x) = 0, No knowledge—local minimum, maximum, or inflectionpoint
- Check End Points!
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 20 / 1
![Page 49: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/49.jpg)
Framework for Optimization
Recipe for optimization
- Find f′(x).
- Set f′(x) = 0 and solve for x . Call all x0 such that f
′(x0) = 0 critical
values.
- Find f′′
(x). Evaluate at each x0.
- If f′′
(x) > 0, Concave up, local minimum- If f
′′(x) < 0, Concave down, local maximum
- If f′′
(x) = 0, No knowledge—local minimum, maximum, or inflectionpoint
- Check End Points!
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 20 / 1
![Page 50: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/50.jpg)
Framework for Optimization
Recipe for optimization
- Find f′(x).
- Set f′(x) = 0 and solve for x . Call all x0 such that f
′(x0) = 0 critical
values.
- Find f′′
(x). Evaluate at each x0.
- If f′′
(x) > 0, Concave up, local minimum- If f
′′(x) < 0, Concave down, local maximum
- If f′′
(x) = 0, No knowledge—local minimum, maximum, or inflectionpoint
- Check End Points!
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 20 / 1
![Page 51: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/51.jpg)
Framework for Optimization
Recipe for optimization
- Find f′(x).
- Set f′(x) = 0 and solve for x . Call all x0 such that f
′(x0) = 0 critical
values.
- Find f′′
(x). Evaluate at each x0.
- If f′′
(x) > 0, Concave up, local minimum- If f
′′(x) < 0, Concave down, local maximum
- If f′′
(x) = 0, No knowledge—local minimum, maximum, or inflectionpoint
- Check End Points!
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 20 / 1
![Page 52: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/52.jpg)
Framework for Optimization
Recipe for optimization
- Find f′(x).
- Set f′(x) = 0 and solve for x . Call all x0 such that f
′(x0) = 0 critical
values.
- Find f′′
(x). Evaluate at each x0.
- If f′′
(x) > 0, Concave up, local minimum
- If f′′
(x) < 0, Concave down, local maximum- If f
′′(x) = 0, No knowledge—local minimum, maximum, or inflection
point
- Check End Points!
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 20 / 1
![Page 53: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/53.jpg)
Framework for Optimization
Recipe for optimization
- Find f′(x).
- Set f′(x) = 0 and solve for x . Call all x0 such that f
′(x0) = 0 critical
values.
- Find f′′
(x). Evaluate at each x0.
- If f′′
(x) > 0, Concave up, local minimum- If f
′′(x) < 0, Concave down, local maximum
- If f′′
(x) = 0, No knowledge—local minimum, maximum, or inflectionpoint
- Check End Points!
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 20 / 1
![Page 54: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/54.jpg)
Framework for Optimization
Recipe for optimization
- Find f′(x).
- Set f′(x) = 0 and solve for x . Call all x0 such that f
′(x0) = 0 critical
values.
- Find f′′
(x). Evaluate at each x0.
- If f′′
(x) > 0, Concave up, local minimum- If f
′′(x) < 0, Concave down, local maximum
- If f′′
(x) = 0, No knowledge—local minimum, maximum, or inflectionpoint
- Check End Points!
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 20 / 1
![Page 55: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/55.jpg)
Framework for Optimization
Recipe for optimization
- Find f′(x).
- Set f′(x) = 0 and solve for x . Call all x0 such that f
′(x0) = 0 critical
values.
- Find f′′
(x). Evaluate at each x0.
- If f′′
(x) > 0, Concave up, local minimum- If f
′′(x) < 0, Concave down, local maximum
- If f′′
(x) = 0, No knowledge—local minimum, maximum, or inflectionpoint
- Check End Points!
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 20 / 1
![Page 56: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/56.jpg)
Example 1: f (x) = −x2, x ∈ [−3, 3]
−4 −2 0 2 4
−25
−20
−15
−10
−5
0
−x^2
X
f(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 21 / 1
![Page 57: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/57.jpg)
Example 1: f (x) = −x2, x ∈ [−3, 3]
1) Critical Value:
f′(x) = −2x
0 = −2x∗
x∗ = 0
2) Second Derivative:
f′(x) = −2x
f′′
(x) = −2
f′′
(x) < 0, local maximum
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 21 / 1
![Page 58: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/58.jpg)
Example 1: f (x) = −x2, x ∈ [−3, 3]
1) Critical Value:
f′(x) = −2x
0 = −2x∗
x∗ = 0
2) Second Derivative:
f′(x) = −2x
f′′
(x) = −2
f′′
(x) < 0, local maximum
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 21 / 1
![Page 59: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/59.jpg)
Example 1: f (x) = −x2, x ∈ [−3, 3]
1) Critical Value:
f′(x) = −2x
0 = −2x∗
x∗ = 0
2) Second Derivative:
f′(x) = −2x
f′′
(x) = −2
f′′
(x) < 0, local maximum
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 21 / 1
![Page 60: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/60.jpg)
Example 1: f (x) = −x2, x ∈ [−3, 3]
1) Critical Value:
f′(x) = −2x
0 = −2x∗
x∗ = 0
2) Second Derivative:
f′(x) = −2x
f′′
(x) = −2
f′′
(x) < 0, local maximum
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 21 / 1
![Page 61: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/61.jpg)
Example 1: f (x) = −x2, x ∈ [−3, 3]
3) Check end points
f (0) = −02 = 0
f (−3) = −(−3)2 = −9
f (3) = −(3)2 = −9
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 22 / 1
![Page 62: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/62.jpg)
Example 2: f (x) = x3, x ∈ [−3, 3]
−4 −2 0 2 4
−10
0−
500
5010
0
x^3
X
f(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 23 / 1
![Page 63: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/63.jpg)
Example 2: f (x) = x3, x ∈ [−3, 3]
1) Critical Values:
f′(x) = 3x2
0 = 3(x∗)2
x∗ = 0
2) Second Derivative:
f′′
(x) = 6x
f′′
(0) = 0
No information
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 23 / 1
![Page 64: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/64.jpg)
Example 2: f (x) = x3, x ∈ [−3, 3]
1) Critical Values:
f′(x) = 3x2
0 = 3(x∗)2
x∗ = 0
2) Second Derivative:
f′′
(x) = 6x
f′′
(0) = 0
No information
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 23 / 1
![Page 65: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/65.jpg)
Example 2: f (x) = x3, x ∈ [−3, 3]
3) Check End Points:
f (0) = 03 = 0
f (−3) = −33 = −27
f (3) = 33 = 27
Neither maximum nor minimum, saddle point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 24 / 1
![Page 66: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/66.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy space
Suppose legislator i and policies x , i ∈ <.Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 67: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/67.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy spaceSuppose legislator i and policies x , i ∈ <.
Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 68: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/68.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy spaceSuppose legislator i and policies x , i ∈ <.Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 69: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/69.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy spaceSuppose legislator i and policies x , i ∈ <.Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 70: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/70.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy spaceSuppose legislator i and policies x , i ∈ <.Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 71: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/71.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy spaceSuppose legislator i and policies x , i ∈ <.Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 72: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/72.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy spaceSuppose legislator i and policies x , i ∈ <.Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 73: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/73.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy spaceSuppose legislator i and policies x , i ∈ <.Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 74: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/74.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy spaceSuppose legislator i and policies x , i ∈ <.Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 75: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/75.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy spaceSuppose legislator i and policies x , i ∈ <.Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 76: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/76.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy spaceSuppose legislator i and policies x , i ∈ <.Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal point
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 77: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/77.jpg)
Example 3: Spatial ModelA large literature in Congress supposes legislators and policies can besituated in policy spaceSuppose legislator i and policies x , i ∈ <.Define legislator i ’s utility as, U : < → <,
Ui (x) = −(x − µ)2
Ui (x) = −x2 + 2xµ− µ2
What is i ’s optimal policy over the range x ∈ [µ− 2, µ+ 2]?
U′i (x) = −2(x − µ)
0 = −2x∗ + 2µ
x∗ = µ
Second Derivative Test
U′′i (x) = −2 < 0→ Concave Down
We call µ legislator i ’s ideal pointJustin Grimmer (Stanford University) Methodology I September 7th, 2016 25 / 1
![Page 78: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/78.jpg)
Example 3: Spatial Model
Ui (µ) = −(µ− µ)2 = 0
Ui (µ− 2) = −(µ− 2− µ)2 = −4
Ui (µ+ 2) = −(µ+ 2− µ)2 = −4
Maximize utility at µ
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 26 / 1
![Page 79: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/79.jpg)
Example 4: Maximum Likelihood Estimation
In 350a, we’ll learn about parameters from data.
Here is an example likelihood function: We want to find the Maximumlikelihood estimate
f (µ) =N∏i=1
exp(−(Yi − µ)2
2)
= exp(−(Y1 − µ)2
2)× . . .× exp(−(YN − µ)2
2)
= exp(−∑N
i=1(Yi − µ)2
2)
Theorem
Suppose f : < → (0,∞). If x0 maximizes f , then x0 maximizes log(f (x)).
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 27 / 1
![Page 80: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/80.jpg)
Example 4: Maximum Likelihood Estimation
In 350a, we’ll learn about parameters from data.Here is an example likelihood function: We want to find the Maximumlikelihood estimate
f (µ) =N∏i=1
exp(−(Yi − µ)2
2)
= exp(−(Y1 − µ)2
2)× . . .× exp(−(YN − µ)2
2)
= exp(−∑N
i=1(Yi − µ)2
2)
Theorem
Suppose f : < → (0,∞). If x0 maximizes f , then x0 maximizes log(f (x)).
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 27 / 1
![Page 81: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/81.jpg)
Example 4: Maximum Likelihood Estimation
In 350a, we’ll learn about parameters from data.Here is an example likelihood function: We want to find the Maximumlikelihood estimate
f (µ) =N∏i=1
exp(−(Yi − µ)2
2)
= exp(−(Y1 − µ)2
2)× . . .× exp(−(YN − µ)2
2)
= exp(−∑N
i=1(Yi − µ)2
2)
Theorem
Suppose f : < → (0,∞). If x0 maximizes f , then x0 maximizes log(f (x)).
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 27 / 1
![Page 82: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/82.jpg)
Example 4: Maximum Likelihood Estimation
In 350a, we’ll learn about parameters from data.Here is an example likelihood function: We want to find the Maximumlikelihood estimate
f (µ) =N∏i=1
exp(−(Yi − µ)2
2)
= exp(−(Y1 − µ)2
2)× . . .× exp(−(YN − µ)2
2)
= exp(−∑N
i=1(Yi − µ)2
2)
Theorem
Suppose f : < → (0,∞). If x0 maximizes f , then x0 maximizes log(f (x)).
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 27 / 1
![Page 83: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/83.jpg)
Example 4: Maximum Likelihood Estimation
In 350a, we’ll learn about parameters from data.Here is an example likelihood function: We want to find the Maximumlikelihood estimate
f (µ) =N∏i=1
exp(−(Yi − µ)2
2)
= exp(−(Y1 − µ)2
2)× . . .× exp(−(YN − µ)2
2)
= exp(−∑N
i=1(Yi − µ)2
2)
Theorem
Suppose f : < → (0,∞). If x0 maximizes f , then x0 maximizes log(f (x)).
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 27 / 1
![Page 84: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/84.jpg)
Example 4: Maximum Likelihood Estimation
In 350a, we’ll learn about parameters from data.Here is an example likelihood function: We want to find the Maximumlikelihood estimate
f (µ) =N∏i=1
exp(−(Yi − µ)2
2)
= exp(−(Y1 − µ)2
2)× . . .× exp(−(YN − µ)2
2)
= exp(−∑N
i=1(Yi − µ)2
2)
Theorem
Suppose f : < → (0,∞). If x0 maximizes f , then x0 maximizes log(f (x)).
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 27 / 1
![Page 85: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/85.jpg)
Example 4: Maximum LIkelihood Estimation
log f (µ) = log
(exp(−
∑Ni=1(Yi − µ)2
2)
)
= −∑N
i=1(Yi − µ)2
2)
= −1
2
(N∑i=1
Y 2i − 2µ
N∑i=1
Yi + N × µ2
)∂ log f (µ)
∂µ= −1
2
(−2
N∑i=1
Yi + 2Nµ
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 28 / 1
![Page 86: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/86.jpg)
Example 4: Maximum LIkelihood Estimation
log f (µ) = log
(exp(−
∑Ni=1(Yi − µ)2
2)
)
= −∑N
i=1(Yi − µ)2
2)
= −1
2
(N∑i=1
Y 2i − 2µ
N∑i=1
Yi + N × µ2
)∂ log f (µ)
∂µ= −1
2
(−2
N∑i=1
Yi + 2Nµ
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 28 / 1
![Page 87: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/87.jpg)
Example 4: Maximum LIkelihood Estimation
log f (µ) = log
(exp(−
∑Ni=1(Yi − µ)2
2)
)
= −∑N
i=1(Yi − µ)2
2)
= −1
2
(N∑i=1
Y 2i − 2µ
N∑i=1
Yi + N × µ2
)∂ log f (µ)
∂µ= −1
2
(−2
N∑i=1
Yi + 2Nµ
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 28 / 1
![Page 88: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/88.jpg)
Example 4: Maximum LIkelihood Estimation
log f (µ) = log
(exp(−
∑Ni=1(Yi − µ)2
2)
)
= −∑N
i=1(Yi − µ)2
2)
= −1
2
(N∑i=1
Y 2i − 2µ
N∑i=1
Yi + N × µ2
)
∂ log f (µ)
∂µ= −1
2
(−2
N∑i=1
Yi + 2Nµ
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 28 / 1
![Page 89: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/89.jpg)
Example 4: Maximum LIkelihood Estimation
log f (µ) = log
(exp(−
∑Ni=1(Yi − µ)2
2)
)
= −∑N
i=1(Yi − µ)2
2)
= −1
2
(N∑i=1
Y 2i − 2µ
N∑i=1
Yi + N × µ2
)∂ log f (µ)
∂µ= −1
2
(−2
N∑i=1
Yi + 2Nµ
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 28 / 1
![Page 90: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/90.jpg)
Example 4: Maximum Likelihood Estimation
0 = −1
2
(−
N∑i=1
Yi + 2Nµ∗
)
2N∑i=1
Yi = 2Nµ∗
∑Ni=1 Yi
N= µ∗
Y = µ∗
Second Derivative Test
f′(µ) = −1
2
(−2
N∑i=1
Yi + 2Nµ
)f′′
(µ) = −N
−N < 0, concave down, maximum(!!)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 29 / 1
![Page 91: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/91.jpg)
Example 4: Maximum Likelihood Estimation
0 = −1
2
(−
N∑i=1
Yi + 2Nµ∗
)
2N∑i=1
Yi = 2Nµ∗
∑Ni=1 Yi
N= µ∗
Y = µ∗
Second Derivative Test
f′(µ) = −1
2
(−2
N∑i=1
Yi + 2Nµ
)f′′
(µ) = −N
−N < 0, concave down, maximum(!!)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 29 / 1
![Page 92: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/92.jpg)
Example 4: Maximum Likelihood Estimation
0 = −1
2
(−
N∑i=1
Yi + 2Nµ∗
)
2N∑i=1
Yi = 2Nµ∗
∑Ni=1 Yi
N= µ∗
Y = µ∗
Second Derivative Test
f′(µ) = −1
2
(−2
N∑i=1
Yi + 2Nµ
)f′′
(µ) = −N
−N < 0, concave down, maximum(!!)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 29 / 1
![Page 93: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/93.jpg)
Example 4: Maximum Likelihood Estimation
0 = −1
2
(−
N∑i=1
Yi + 2Nµ∗
)
2N∑i=1
Yi = 2Nµ∗
∑Ni=1 Yi
N= µ∗
Y = µ∗
Second Derivative Test
f′(µ) = −1
2
(−2
N∑i=1
Yi + 2Nµ
)f′′
(µ) = −N
−N < 0, concave down, maximum(!!)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 29 / 1
![Page 94: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/94.jpg)
Example 4: Maximum Likelihood Estimation
0 = −1
2
(−
N∑i=1
Yi + 2Nµ∗
)
2N∑i=1
Yi = 2Nµ∗
∑Ni=1 Yi
N= µ∗
Y = µ∗
Second Derivative Test
f′(µ) = −1
2
(−2
N∑i=1
Yi + 2Nµ
)f′′
(µ) = −N
−N < 0, concave down, maximum(!!)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 29 / 1
![Page 95: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/95.jpg)
Example 4: Maximum Likelihood Estimation
0 = −1
2
(−
N∑i=1
Yi + 2Nµ∗
)
2N∑i=1
Yi = 2Nµ∗
∑Ni=1 Yi
N= µ∗
Y = µ∗
Second Derivative Test
f′(µ) = −1
2
(−2
N∑i=1
Yi + 2Nµ
)f′′
(µ) = −N
−N < 0, concave down, maximum(!!)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 29 / 1
![Page 96: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/96.jpg)
Example 4: Maximum Likelihood Estimation
0 = −1
2
(−
N∑i=1
Yi + 2Nµ∗
)
2N∑i=1
Yi = 2Nµ∗
∑Ni=1 Yi
N= µ∗
Y = µ∗
Second Derivative Test
f′(µ) = −1
2
(−2
N∑i=1
Yi + 2Nµ
)
f′′
(µ) = −N
−N < 0, concave down, maximum(!!)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 29 / 1
![Page 97: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/97.jpg)
Example 4: Maximum Likelihood Estimation
0 = −1
2
(−
N∑i=1
Yi + 2Nµ∗
)
2N∑i=1
Yi = 2Nµ∗
∑Ni=1 Yi
N= µ∗
Y = µ∗
Second Derivative Test
f′(µ) = −1
2
(−2
N∑i=1
Yi + 2Nµ
)f′′
(µ) = −N
−N < 0, concave down, maximum(!!)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 29 / 1
![Page 98: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/98.jpg)
Example 5: IR Bargaining (from Jim Fearon, Part 1)Countries fight wars, usually to get stuff.
- Suppose two countries 1, 2 are fighting for something they value at v .
- Each country decides to invest a1 ∈ [0, 1] and a2 ∈ [0, 1].
- The probability of country 1 winning the war is
p(a1, a2) =an1
an1 + an2
- Country 1’s utility is given by
U1(a1) = 1− a1︸ ︷︷ ︸cost
+ p(a1, a2)v︸ ︷︷ ︸Expected Benefit
= 1− a1 +an1
an1 + an2v
- Suppose country 2 selected value x . What should country 1 invest tomaximize utility?
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 30 / 1
![Page 99: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/99.jpg)
Example 5: IR Bargaining (from Jim Fearon, Part 1)Countries fight wars, usually to get stuff.
- Suppose two countries 1, 2 are fighting for something they value at v .
- Each country decides to invest a1 ∈ [0, 1] and a2 ∈ [0, 1].
- The probability of country 1 winning the war is
p(a1, a2) =an1
an1 + an2
- Country 1’s utility is given by
U1(a1) = 1− a1︸ ︷︷ ︸cost
+ p(a1, a2)v︸ ︷︷ ︸Expected Benefit
= 1− a1 +an1
an1 + an2v
- Suppose country 2 selected value x . What should country 1 invest tomaximize utility?
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 30 / 1
![Page 100: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/100.jpg)
Example 5: IR Bargaining (from Jim Fearon, Part 1)Countries fight wars, usually to get stuff.
- Suppose two countries 1, 2 are fighting for something they value at v .
- Each country decides to invest a1 ∈ [0, 1] and a2 ∈ [0, 1].
- The probability of country 1 winning the war is
p(a1, a2) =an1
an1 + an2
- Country 1’s utility is given by
U1(a1) = 1− a1︸ ︷︷ ︸cost
+ p(a1, a2)v︸ ︷︷ ︸Expected Benefit
= 1− a1 +an1
an1 + an2v
- Suppose country 2 selected value x . What should country 1 invest tomaximize utility?
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 30 / 1
![Page 101: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/101.jpg)
Example 5: IR Bargaining (from Jim Fearon, Part 1)Countries fight wars, usually to get stuff.
- Suppose two countries 1, 2 are fighting for something they value at v .
- Each country decides to invest a1 ∈ [0, 1] and a2 ∈ [0, 1].
- The probability of country 1 winning the war is
p(a1, a2) =an1
an1 + an2
- Country 1’s utility is given by
U1(a1) = 1− a1︸ ︷︷ ︸cost
+ p(a1, a2)v︸ ︷︷ ︸Expected Benefit
= 1− a1 +an1
an1 + an2v
- Suppose country 2 selected value x . What should country 1 invest tomaximize utility?
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 30 / 1
![Page 102: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/102.jpg)
Example 5: IR Bargaining (from Jim Fearon, Part 1)Countries fight wars, usually to get stuff.
- Suppose two countries 1, 2 are fighting for something they value at v .
- Each country decides to invest a1 ∈ [0, 1] and a2 ∈ [0, 1].
- The probability of country 1 winning the war is
p(a1, a2) =an1
an1 + an2
- Country 1’s utility is given by
U1(a1) = 1− a1︸ ︷︷ ︸cost
+ p(a1, a2)v︸ ︷︷ ︸Expected Benefit
= 1− a1 +an1
an1 + an2v
- Suppose country 2 selected value x . What should country 1 invest tomaximize utility?
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 30 / 1
![Page 103: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/103.jpg)
Example 5: IR Bargaining (from Jim Fearon, Part 1)Countries fight wars, usually to get stuff.
- Suppose two countries 1, 2 are fighting for something they value at v .
- Each country decides to invest a1 ∈ [0, 1] and a2 ∈ [0, 1].
- The probability of country 1 winning the war is
p(a1, a2) =an1
an1 + an2
- Country 1’s utility is given by
U1(a1) = 1− a1︸ ︷︷ ︸cost
+ p(a1, a2)v︸ ︷︷ ︸Expected Benefit
= 1− a1 +an1
an1 + an2v
- Suppose country 2 selected value x . What should country 1 invest tomaximize utility?
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 30 / 1
![Page 104: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/104.jpg)
Example 5: IR Bargaining (from Jim Fearon, Part 1)Countries fight wars, usually to get stuff.
- Suppose two countries 1, 2 are fighting for something they value at v .
- Each country decides to invest a1 ∈ [0, 1] and a2 ∈ [0, 1].
- The probability of country 1 winning the war is
p(a1, a2) =an1
an1 + an2
- Country 1’s utility is given by
U1(a1) = 1− a1︸ ︷︷ ︸cost
+ p(a1, a2)v︸ ︷︷ ︸Expected Benefit
= 1− a1 +an1
an1 + an2v
- Suppose country 2 selected value x . What should country 1 invest tomaximize utility?
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 30 / 1
![Page 105: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/105.jpg)
Example 5: IR Bargaining (from Jim Fearon, Part 1)Countries fight wars, usually to get stuff.
- Suppose two countries 1, 2 are fighting for something they value at v .
- Each country decides to invest a1 ∈ [0, 1] and a2 ∈ [0, 1].
- The probability of country 1 winning the war is
p(a1, a2) =an1
an1 + an2
- Country 1’s utility is given by
U1(a1) = 1− a1︸ ︷︷ ︸cost
+ p(a1, a2)v︸ ︷︷ ︸Expected Benefit
= 1− a1 +an1
an1 + an2v
- Suppose country 2 selected value x . What should country 1 invest tomaximize utility?
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 30 / 1
![Page 106: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/106.jpg)
Example 5: IR Bargaining (from Jim Fearon, Part 1)
0.0 0.2 0.4 0.6 0.8 1.0
0.4
0.5
0.6
0.7
0.8
0.9
1.0
n = 1,v = 0.5
a1
Util
ity
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 31 / 1
![Page 107: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/107.jpg)
Example 5: IR War (from Jim Fearon, Part 1)
∂U1(a1)
∂a1= −1 +
nan−11 (an1 + xn)− (nan−1
1 an1)
(an1 + xn)2v
= −1 +nan−1
1 xn
(an1 + xn)2v
Set n = 1 (for simplicity)
0 = −1 +x
(a1 + x)2v
a∗1 =√v√x − x
(0.1)
Second derivative!
U′′1 (a1) =
−2vx
(a1 + x)3
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 32 / 1
![Page 108: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/108.jpg)
Example 5: IR Bargaining (from Jim Fearon, Part 1)
One more—check endpoints
a∗1 = 0, if√v√x − x < 0
a∗1 = 0, if√v <√x
a∗1 =√v√x − x otherwise
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 33 / 1
![Page 109: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/109.jpg)
Optimization Challenge Problem- Suppose a candidate is attempting to mobilize voters. Suppose that
for each investment of x ∈ [0,∞) the candidate receives return ofx1/2, but incurs cost of ax . So, candidate utility is,
Ui = x1/2 − ax
What is the optimal investment x∗?
0.0 0.1 0.2 0.3 0.4 0.5
−1.
0−
0.5
0.0
0.5
1.0
x
Util
ity
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 34 / 1
![Page 110: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/110.jpg)
Computational Optimization Approaches
Analytic (Closed form) Often difficult, impractical, or unavailable
Computational iterative algorithm that converges to a solution(hopefully the right one!)
- Methods for optimization:
- Newton’s method and related methods- Gradient descent (ascent)- Expectation Maximization- Genetic Optimization- Branch and Bound ...
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 35 / 1
![Page 111: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/111.jpg)
Computational Optimization Approaches
Analytic (Closed form) Often difficult, impractical, or unavailableComputational
iterative algorithm that converges to a solution(hopefully the right one!)
- Methods for optimization:
- Newton’s method and related methods- Gradient descent (ascent)- Expectation Maximization- Genetic Optimization- Branch and Bound ...
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 35 / 1
![Page 112: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/112.jpg)
Computational Optimization Approaches
Analytic (Closed form) Often difficult, impractical, or unavailableComputational iterative algorithm that converges to a solution(hopefully the right one!)
- Methods for optimization:
- Newton’s method and related methods- Gradient descent (ascent)- Expectation Maximization- Genetic Optimization- Branch and Bound ...
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 35 / 1
![Page 113: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/113.jpg)
Computational Optimization Approaches
Analytic (Closed form) Often difficult, impractical, or unavailableComputational iterative algorithm that converges to a solution(hopefully the right one!)
- Methods for optimization:
- Newton’s method and related methods- Gradient descent (ascent)- Expectation Maximization- Genetic Optimization- Branch and Bound ...
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 35 / 1
![Page 114: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/114.jpg)
Computational Optimization Approaches
Analytic (Closed form) Often difficult, impractical, or unavailableComputational iterative algorithm that converges to a solution(hopefully the right one!)
- Methods for optimization:
- Newton’s method and related methods
- Gradient descent (ascent)- Expectation Maximization- Genetic Optimization- Branch and Bound ...
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 35 / 1
![Page 115: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/115.jpg)
Computational Optimization Approaches
Analytic (Closed form) Often difficult, impractical, or unavailableComputational iterative algorithm that converges to a solution(hopefully the right one!)
- Methods for optimization:
- Newton’s method and related methods- Gradient descent (ascent)
- Expectation Maximization- Genetic Optimization- Branch and Bound ...
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 35 / 1
![Page 116: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/116.jpg)
Computational Optimization Approaches
Analytic (Closed form) Often difficult, impractical, or unavailableComputational iterative algorithm that converges to a solution(hopefully the right one!)
- Methods for optimization:
- Newton’s method and related methods- Gradient descent (ascent)- Expectation Maximization
- Genetic Optimization- Branch and Bound ...
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 35 / 1
![Page 117: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/117.jpg)
Computational Optimization Approaches
Analytic (Closed form) Often difficult, impractical, or unavailableComputational iterative algorithm that converges to a solution(hopefully the right one!)
- Methods for optimization:
- Newton’s method and related methods- Gradient descent (ascent)- Expectation Maximization- Genetic Optimization
- Branch and Bound ...
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 35 / 1
![Page 118: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/118.jpg)
Computational Optimization Approaches
Analytic (Closed form) Often difficult, impractical, or unavailableComputational iterative algorithm that converges to a solution(hopefully the right one!)
- Methods for optimization:
- Newton’s method and related methods- Gradient descent (ascent)- Expectation Maximization- Genetic Optimization- Branch and Bound ...
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 35 / 1
![Page 119: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/119.jpg)
Newton-Raphson Method
Iterative procedure to find a root
Often solving for x when f (x) = 0 is hard complicated functionSolving for x when f (x) is linear easyApproximate with tangent line, iteratively update
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 36 / 1
![Page 120: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/120.jpg)
Newton-Raphson Method
Iterative procedure to find a rootOften solving for x when f (x) = 0 is hard complicated function
Solving for x when f (x) is linear easyApproximate with tangent line, iteratively update
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 36 / 1
![Page 121: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/121.jpg)
Newton-Raphson Method
Iterative procedure to find a rootOften solving for x when f (x) = 0 is hard complicated functionSolving for x when f (x) is linear easy
Approximate with tangent line, iteratively update
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 36 / 1
![Page 122: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/122.jpg)
Newton-Raphson Method
Iterative procedure to find a rootOften solving for x when f (x) = 0 is hard complicated functionSolving for x when f (x) is linear easyApproximate with tangent line, iteratively update
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 36 / 1
![Page 123: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/123.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 124: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/124.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 125: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/125.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 126: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/126.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 127: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/127.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 128: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/128.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 129: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/129.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 130: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/130.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 131: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/131.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 132: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/132.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 133: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/133.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 134: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/134.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 135: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/135.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 136: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/136.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 137: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/137.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 138: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/138.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 139: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/139.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 140: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/140.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 141: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/141.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 142: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/142.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 143: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/143.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 144: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/144.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 145: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/145.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 146: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/146.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 147: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/147.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 148: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/148.jpg)
Tangent Line
2 4 6 8 10
0.0
0.5
1.0
1.5
2.0
X
F(x
)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 37 / 1
![Page 149: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/149.jpg)
Tangent Line
Formula for Tangent line at x0:
g(x) = f′(x0)(x − x0) + f (x0)
We’ll use formula for tangent line to generate updates
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 38 / 1
![Page 150: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/150.jpg)
Tangent Line
Formula for Tangent line at x0:
g(x) = f′(x0)(x − x0) + f (x0)
We’ll use formula for tangent line to generate updates
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 38 / 1
![Page 151: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/151.jpg)
Tangent Line
Formula for Tangent line at x0:
g(x) = f′(x0)(x − x0) + f (x0)
We’ll use formula for tangent line to generate updates
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 38 / 1
![Page 152: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/152.jpg)
Tangent Line
Formula for Tangent line at x0:
g(x) = f′(x0)(x − x0) + f (x0)
We’ll use formula for tangent line to generate updates
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 38 / 1
![Page 153: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/153.jpg)
Tangent Line
Formula for Tangent line at x0:
g(x) = f′(x0)(x − x0) + f (x0)
We’ll use formula for tangent line to generate updates
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 38 / 1
![Page 154: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/154.jpg)
Newton-Raphson Method
Suppose we have some initial guess x0. We’re going to approximate f′(x)
with the tangent line to generate a new guess
g(x) = f′′
(x0)(x − x0) + f′(x0)
0 = f′′
(x0)(x1 − x0) + f′(x0)
x1 = x0 −f′(x0)
f ′′(x0)
Perform iteratively until change in |xt+1 − xt | < threshold
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 39 / 1
![Page 155: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/155.jpg)
Newton-Raphson Method
Suppose we have some initial guess x0. We’re going to approximate f′(x)
with the tangent line to generate a new guess
g(x) = f′′
(x0)(x − x0) + f′(x0)
0 = f′′
(x0)(x1 − x0) + f′(x0)
x1 = x0 −f′(x0)
f ′′(x0)
Perform iteratively until change in |xt+1 − xt | < threshold
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 39 / 1
![Page 156: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/156.jpg)
Newton-Raphson Method
Suppose we have some initial guess x0. We’re going to approximate f′(x)
with the tangent line to generate a new guess
g(x) = f′′
(x0)(x − x0) + f′(x0)
0 = f′′
(x0)(x1 − x0) + f′(x0)
x1 = x0 −f′(x0)
f ′′(x0)
Perform iteratively until change in |xt+1 − xt | < threshold
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 39 / 1
![Page 157: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/157.jpg)
Newton-Raphson Method
Suppose we have some initial guess x0. We’re going to approximate f′(x)
with the tangent line to generate a new guess
g(x) = f′′
(x0)(x − x0) + f′(x0)
0 = f′′
(x0)(x1 − x0) + f′(x0)
x1 = x0 −f′(x0)
f ′′(x0)
Perform iteratively until change in |xt+1 − xt | < threshold
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 39 / 1
![Page 158: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/158.jpg)
Example Functionf (x) = x3 + 2x2 − 1 find x that maximizes f (x) with x ∈ [−3, 0]
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 40 / 1
![Page 159: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/159.jpg)
f′(x) = 3x2 + 4x
f′′
(x) = 6x + 4
Suppose we have guess xt then the next step is:
xt+1 = xt −3x2
t + 4xt6xt + 4
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 41 / 1
![Page 160: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/160.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 42 / 1
![Page 161: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/161.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 42 / 1
![Page 162: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/162.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 42 / 1
![Page 163: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/163.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
●●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 42 / 1
![Page 164: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/164.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
●●●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 42 / 1
![Page 165: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/165.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
●●●●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 42 / 1
![Page 166: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/166.jpg)
x∗ = −1.3333
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
●●●●●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 42 / 1
![Page 167: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/167.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 168: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/168.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 169: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/169.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 170: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/170.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 171: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/171.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 172: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/172.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 173: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/173.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 174: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/174.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 175: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/175.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 176: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/176.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 177: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/177.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 178: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/178.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 179: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/179.jpg)
What is Happening with the Roots
−3 −2 −1 0 1 2 3
010
2030
40
3x^2 + 4x
X
f'(x)
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 43 / 1
![Page 180: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/180.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 181: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/181.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 182: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/182.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●● ●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 183: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/183.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●● ●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 184: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/184.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●● ●●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 185: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/185.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●● ●●●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 186: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/186.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 187: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/187.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 188: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/188.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 189: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/189.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
●●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 190: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/190.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
●●●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 191: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/191.jpg)
−3 −2 −1 0 1 2 3
−10
010
2030
40
x^3 + 2 x^2 − 1
X
f(x)
●
●●●●●
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 192: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/192.jpg)
To the R Code!
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 44 / 1
![Page 193: Justin Grimmer - Stanford Universitystanford.edu/~jgrimmer/Math16/mc3_16.pdfPolitical scientists are often concerned with ndingextrema:maximaor minima-Given data,mostlikely value of](https://reader033.fdocuments.us/reader033/viewer/2022050408/5f85020383e5110a994c7314/html5/thumbnails/193.jpg)
Today/Tomorrow
- A Framework for optimization
- Analytic: pencil and paper math- Computational: iterative algorithm that aids in solution
- Integration: antidifferentation/area finding
Justin Grimmer (Stanford University) Methodology I September 7th, 2016 45 / 1