Source: https://www.econ.berkeley.edu/sites/default/files/course-homepage/2016-03-03/lecture-notes/Lecture 13 3-3 Outline and Slides_0.pdf