{"generator":"Jekyll","link":[{"@attributes":{"href":"https:\/\/stephenlee.info\/feed.xml","rel":"self","type":"application\/atom+xml"}},{"@attributes":{"href":"https:\/\/stephenlee.info\/","rel":"alternate","type":"text\/html"}}],"updated":"2025-11-24T09:02:25-06:00","id":"https:\/\/stephenlee.info\/feed.xml","title":"Stephen M. Lee","subtitle":"Personal Website","entry":[{"title":"Music Theory as Constrained Combinatorics","link":{"@attributes":{"href":"https:\/\/stephenlee.info\/music\/math\/2025\/11\/22\/music-theory-constrained-combinatorics.html","rel":"alternate","type":"text\/html","title":"Music Theory as Constrained Combinatorics"}},"published":"2025-11-22T00:00:00-06:00","updated":"2025-11-22T00:00:00-06:00","id":"https:\/\/stephenlee.info\/music\/math\/2025\/11\/22\/music-theory-constrained-combinatorics","content":"<h2 id=\"introduction\">Introduction<\/h2>\n\n<p>When I first tried to learn about music, the vocabulary didn\u2019t make much sense to me. Specifically, the system of letters with arbtrary seeming full and half steps between them was hard for me to remember and memorize. What do you mean there\u2019s no \u201cC-flat\u201d?<\/p>\n\n<p>To make sense of things, I ended up constructing a numerical way of thinking about melody and scales using intervals inside a modular 12-number system. I was also learning basic computer programming at the time, so the connection was fairly straightforward and useful. I treat the root as 0, and everything else as its distance (in semitones) above that, modulo 12.<\/p>\n\n<p>This is obviously not a new idea or observation, but I don\u2019t see it easily accessible anywhere else, so this post is just me writing down the version that ended up making the most sense to me.<\/p>\n\n<p>The framework is simple:<\/p>\n\n<ul>\n  <li>define scales as subsets of a 12-element universe,<\/li>\n  <li>pick a few tones as \u201cstable,\u201d<\/li>\n  <li>treat the rest as \u201ccolor,\u201d<\/li>\n  <li>and describe melodies as sequences moving between those sets.<\/li>\n<\/ul>\n\n<p>This framework has helped me make sense, conceptually at least, of songs I like.<\/p>\n\n<hr \/>\n\n<h2 id=\"universe\">Universe<\/h2>\n\n<p>Define the universe of possible notes as:<\/p>\n\n\\[U = \\{0,1,2,\\dots,11\\} \\pmod{12}\\]\n\n<p>where \\(0\\) is the chosen root of the key.<\/p>\n\n<h3 id=\"frequencies\">Frequencies<\/h3>\n\n<p>In equal temperament, each step of this \\(0-11\\) system corresponds to a constant multiplicative change in frequency. If the root has frequency \\(f_0\\), the pitch class labeled \\(i\\) corresponds (including octaves) to<\/p>\n\n\\[f_i = f_0 \\cdot 2^{\\,i\/12}\\]\n\n<p>I don\u2019t use this relationship for anything that follows, but it was actually this fact that motivated my use of the modular number system for notes and scales.<\/p>\n\n<hr \/>\n\n<h2 id=\"scales\">Scales<\/h2>\n\n<p>A scale is just a subset, often a \u201c12 pick 7\u201d type of problem:<\/p>\n\n\\[S \\subseteq U\\]\n\n<p>For example, with \\(0 = C\\):<\/p>\n\n<ul>\n  <li>\n    <p>Major scale:\n\\(S = \\{0,2,4,5,7,9,11\\}\\)<\/p>\n  <\/li>\n  <li>\n    <p>Natural minor:\n\\(S = \\{0,2,3,5,7,8,10\\}\\)<\/p>\n  <\/li>\n  <li>\n    <p>Dorian:\n\\(S = \\{0,2,3,5,7,9,10\\}\\)<\/p>\n  <\/li>\n<\/ul>\n\n<p>This avoids note names and focuses only on interval structure.<\/p>\n\n<p><strong>Constraints:<\/strong><\/p>\n\n<p>While mathematically any subset of \\(U\\) could be a scale, most scales in practice follow these conventions:<\/p>\n\n<ul>\n  <li><strong>Size<\/strong>: Typically 5\u20137 notes (pentatonic through heptatonic scales)<\/li>\n  <li><strong>Consecutive semitones<\/strong>: No more than 2\u20133 consecutive semitone steps without a whole-step break<\/li>\n  <li><strong>Maximum gap<\/strong>: No more than 3 semitones between adjacent scale degrees<\/li>\n  <li><strong>Contains root<\/strong>: Almost always includes \\(0\\) as the tonal center<\/li>\n<\/ul>\n\n<p>These constraints ensure scales have recognizable patterns and a balance between stepwise motion and larger intervals.<\/p>\n\n<hr \/>\n\n<h2 id=\"stable-notes\">Stable Notes<\/h2>\n\n<p>Inside a scale \\(S\\), certain tones behave like \u201chome base.\u201d These are the stable tones, forming a subset:<\/p>\n\n\\[T \\subseteq S\\]\n\n<p>In many minor or Dorian contexts, a natural choice is:<\/p>\n\n\\[T = \\{0,3,7\\}\\]\n\n<p>corresponding to the root, minor third, and fifth. In the major scale for example, these would be \\(T = \\{0,4,7\\}\\) also \ncorresponding to the root, major third, and fifth.<\/p>\n\n<p>The color tones are just any note in the scale that is not a \u201cstable note\u201d:<\/p>\n\n\\[C = S \\setminus T\\]\n\n<p>These notes provide the majority of the songs complexity through motion, tension, brightness, and directional pull.<\/p>\n\n<p><strong>Constraints:<\/strong><\/p>\n\n<ul>\n  <li><strong>Size<\/strong>: Typically 3 notes (a triad: root, third, fifth)<\/li>\n  <li><strong>Must contain root<\/strong>: \\(0 \\in T\\) for tonal stability<\/li>\n  <li><strong>Contains the fifth<\/strong>: Usually \\(7 \\in T\\) (the perfect fifth provides strong harmonic support)<\/li>\n  <li><strong>Defines mode<\/strong>: The third (either \\(3\\) or \\(4\\)) typically belongs to \\(T\\) and determines major vs. minor character<\/li>\n<\/ul>\n\n<hr \/>\n\n<h2 id=\"melodies\">Melodies<\/h2>\n\n<p>A melody can be represented as a sequence:<\/p>\n\n\\[M = \\{m_1, m_2, \\dots, m_n\\}, \\quad m_i \\in S\\]\n\n<p>This makes it easy to talk about:<\/p>\n\n<ul>\n  <li>how often the melody visits \\(T\\) versus \\(C\\),<\/li>\n  <li>the size of intervals \\(m_i \\to m_{i+1}\\),<\/li>\n  <li>moments of tension (moving into \\(C\\) or taking larger leaps),<\/li>\n  <li>and moments of resolution (landing back on \\(T\\)).<\/li>\n<\/ul>\n\n<p>Small intervals and frequent returns to \\(T\\) generally feel stable; longer runs inside \\(C\\) feel more tense or exploratory.<\/p>\n\n<p><strong>Constraints:<\/strong><\/p>\n\n<p>Melodic movement typically follows these conventions:<\/p>\n\n<ul>\n  <li><strong>Mostly stepwise or chord tones<\/strong>: Movement is either small (1\u20132 semitones) or jumps between notes in the current chord \\(H_i\\)<\/li>\n  <li><strong>Avoid extreme leaps<\/strong>: Large jumps (&gt; 7 semitones) are rare and usually serve dramatic purposes<\/li>\n  <li><strong>Range<\/strong>: Stay within 1\u20132 octaves for singable melodies<\/li>\n  <li><strong>Cadence on stable tones<\/strong>: Phrases typically end on \\(t \\in T\\), especially \\(t = 0\\)<\/li>\n  <li><strong>Directional balance<\/strong>: Extended runs in one direction are usually followed by motion in the opposite direction<\/li>\n<\/ul>\n\n<hr \/>\n\n<h2 id=\"chords\">Chords<\/h2>\n\n<p>While melodies are sequences played over time, chords are sets of notes played simultaneously. In this framework, a chord is simply a subset:<\/p>\n\n\\[H \\subseteq S\\]\n\n<p>Common chords are just small, specific subsets chosen for their harmonic properties:<\/p>\n\n<ul>\n  <li><strong>Minor triad<\/strong>: \\(H = \\{0, 3, 7\\}\\)<\/li>\n  <li><strong>Major triad<\/strong>: \\(H = \\{0, 4, 7\\}\\)<\/li>\n  <li><strong>Minor 7th<\/strong>: \\(H = \\{0, 3, 7, 10\\}\\)<\/li>\n  <li><strong>Dominant 7th<\/strong>: \\(H = \\{0, 4, 7, 10\\}\\)<\/li>\n<\/ul>\n\n<p>Notice that the minor triad \\(\\{0, 3, 7\\}\\) is exactly what we called \\(T\\) in the minor\/Dorian contexts earlier. This isn\u2019t a coincidence\u2014stable tones are often chord tones. When a melody lands on \\(T\\), it\u2019s landing on notes that spell out the underlying harmony.<\/p>\n\n<p>A chord progression is then a sequence of these subsets:<\/p>\n\n\\[H_1, H_2, \\dots, H_k\\]\n\n<p>where each \\(H_i \\subseteq S\\). The melody \\(M\\) typically draws from the scale \\(S\\), moving between the chord tones in \\(H_i\\) and the remaining notes in \\(S \\setminus H_i\\), creating a natural interplay between the horizontal (melodic) and vertical (harmonic) dimensions.<\/p>\n\n<p>The same notation extends naturally to more complex chords. Here are some common variations:<\/p>\n\n<p><strong>Suspended chords<\/strong> replace the third with a neighboring scale degree:<\/p>\n\n<ul>\n  <li><strong>sus2<\/strong>: \\(H = \\{0, 2, 7\\}\\) \u2014 suspends the third with the major second<\/li>\n  <li><strong>sus4<\/strong>: \\(H = \\{0, 5, 7\\}\\) \u2014 suspends the third with the perfect fourth<\/li>\n<\/ul>\n\n<p>These chords have an open, unresolved quality because they lack the defining major or minor third.<\/p>\n\n<p><strong>Sixth chords<\/strong> add the sixth scale degree:<\/p>\n\n<ul>\n  <li><strong>Major 6th<\/strong>: \\(H = \\{0, 4, 7, 9\\}\\)<\/li>\n  <li><strong>Minor 6th<\/strong>: \\(H = \\{0, 3, 7, 9\\}\\)<\/li>\n<\/ul>\n\n<p><strong>Extended chords<\/strong> add notes beyond the seventh by borrowing from the next octave. The 9th is just the 2nd shifted up an octave (\\(2 + 12 \\equiv 2 \\pmod{12}\\)), so we represent it with the same pitch class:<\/p>\n\n<ul>\n  <li><strong>Major 9th<\/strong>: \\(H = \\{0, 4, 7, 11, 2\\}\\) \u2014 includes major 7th and 9th (the 2)<\/li>\n  <li><strong>Minor 9th<\/strong>: \\(H = \\{0, 3, 7, 10, 2\\}\\) \u2014 includes minor 7th and 9th<\/li>\n  <li><strong>Dominant 9th<\/strong>: \\(H = \\{0, 4, 7, 10, 2\\}\\)<\/li>\n<\/ul>\n\n<p>Similarly, 11ths and 13ths correspond to \\(5\\) and \\(9\\) respectively. These extended notes often come from the underlying scale \\(S\\), but played in a higher register to avoid muddiness in the lower octaves.<\/p>\n\n<p><strong>Altered dominant chords<\/strong> modify the 5th and\/or 9th:<\/p>\n\n<ul>\n  <li><strong>7\u266d5<\/strong>: \\(H = \\{0, 4, 6, 10\\}\\) \u2014 flatted fifth<\/li>\n  <li><strong>7\u266f5<\/strong>: \\(H = \\{0, 4, 8, 10\\}\\) \u2014 raised fifth<\/li>\n  <li><strong>7\u266d9<\/strong>: \\(H = \\{0, 4, 7, 10, 1\\}\\) \u2014 flatted ninth<\/li>\n  <li><strong>7\u266f9<\/strong>: \\(H = \\{0, 4, 7, 10, 3\\}\\) \u2014 raised ninth (the \u201cHendrix chord\u201d)<\/li>\n<\/ul>\n\n<p><strong>Diminished chords<\/strong> flatten both the third and fifth:<\/p>\n\n<ul>\n  <li><strong>Diminished triad<\/strong>: \\(H = \\{0, 3, 6\\}\\)<\/li>\n  <li><strong>Diminished 7th<\/strong>: \\(H = \\{0, 3, 6, 9\\}\\) \u2014 note the symmetry (all intervals of 3 semitones)<\/li>\n<\/ul>\n\n<p><strong>Augmented chords<\/strong> raise the fifth:<\/p>\n\n<ul>\n  <li><strong>Augmented triad<\/strong>: \\(H = \\{0, 4, 8\\}\\) \u2014 also symmetric (all intervals of 4 semitones)<\/li>\n<\/ul>\n\n<p>The interval structure makes these relationships clear. For instance, \\(\\{0, 5, 7\\}\\) (sus4) differs from \\(\\{0, 4, 7\\}\\) (major) by a single semitone\u2014moving \\(4 \\to 5\\) creates the suspension. Similarly, the diminished 7th chord \\(\\{0, 3, 6, 9\\}\\) divides the octave into four equal parts, which is why it sounds so symmetrical and tense.<\/p>\n\n<p><strong>Constraints:<\/strong><\/p>\n\n<p>Chords follow certain structural conventions:<\/p>\n\n<ul>\n  <li><strong>Size<\/strong>: Typically 3\u20135 notes (triads through 9th chords; larger chords can sound muddy)<\/li>\n  <li><strong>Stacking thirds<\/strong>: Most chords are built by stacking intervals of 3\u20134 semitones<\/li>\n  <li><strong>Voice spacing<\/strong>: Notes should be spread to avoid clusters (especially in lower registers)<\/li>\n<\/ul>\n\n<hr \/>\n\n<h2 id=\"implementation\">Implementation<\/h2>\n\n<p>I\u2019ve implemented a version of this in Python as a music generator that creates scales, melodies, and chord progressions following the constraints described above.<\/p>\n\n<p><strong><a href=\"\/assets\/scripts\/music_generator.py\">Download music_generator.py<\/a><\/strong><\/p>\n\n<p>Try it out:<\/p>\n\n<div class=\"language-bash highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"c\"># Generate music in C Dorian with guitar tabs<\/span>\npython3 music_generator.py <span class=\"nt\">--key<\/span> C <span class=\"nt\">--scale<\/span> dorian <span class=\"nt\">--tabs<\/span>\n\n<span class=\"c\"># Generate a random constrained scale<\/span>\npython3 music_generator.py <span class=\"nt\">--random<\/span> <span class=\"nt\">--tabs<\/span>\n\n<span class=\"c\"># Custom melody and progression lengths<\/span>\npython3 music_generator.py <span class=\"nt\">--key<\/span> A <span class=\"nt\">--scale<\/span> pentatonic_minor <span class=\"se\">\\<\/span>\n    <span class=\"nt\">--melody-length<\/span> 24 <span class=\"nt\">--progression-length<\/span> 8\n<\/code><\/pre><\/div><\/div>\n\n<p>The generator outputs everything in both interval notation and note names, making it easy to see how the mathematical framework translates to actual music.<\/p>\n\n<p>If you\u2019re in a rut with your music, give it a try!<\/p>","author":{"name":{}},"category":[{"@attributes":{"term":"Music"}},{"@attributes":{"term":"Math"}},{"@attributes":{"term":"music-theory"}},{"@attributes":{"term":"intervals"}},{"@attributes":{"term":"jazz"}},{"@attributes":{"term":"modeling"}}],"summary":"Introduction"},{"title":"A Balanced Toe-Hang Putter?","link":{"@attributes":{"href":"https:\/\/stephenlee.info\/physics\/golf\/2025\/11\/20\/balanced-toe-hang-putter.html","rel":"alternate","type":"text\/html","title":"A Balanced Toe-Hang Putter?"}},"published":"2025-11-20T00:00:00-06:00","updated":"2025-11-20T00:00:00-06:00","id":"https:\/\/stephenlee.info\/physics\/golf\/2025\/11\/20\/balanced-toe-hang-putter","content":"<h2 id=\"introduction\">Introduction<\/h2>\n\n<p>In a <a href=\"\/golf\/physics\/2025\/11\/19\/putter-torque-physics.html\">previous post<\/a>, I analyzed how different putter designs create torques that want to twist the face during your stroke. The key point was that putter head geometry creates two independent torque sources:<\/p>\n\n<ol>\n  <li><strong>Gravitational torque<\/strong>: This term is present even when the putter is held still. It depends on how far the center of mass is, in the heel-toe direction, from the shaft line when in the address position.<\/li>\n  <li><strong>Inertial torque<\/strong>: This term depends on how hard you accelerate the putter and on the distance from the shaft\u2019s pivot point to the putter\u2019s center of mass in the left-to-right direction (i.e. face to back of club).<\/li>\n<\/ol>\n\n<p>Traditional blade style toe-hang putters fight the natural arc geometry by closing the face during the backswing since the inertial torque dominates. But what if we could design a toe-hang putter where these torques cancel out?<\/p>\n\n<p>This post explores the \u201cbalanced toe-hang\u201d design\u2014a putter that achieves near-zero initial torques by deliberately using opposing gravitational and inertial forces.<\/p>\n\n<p><strong>Important caveat<\/strong>: This cancellation only occurs during the backswing. When you transition to the forward swing, the inertial torque reverses direction while gravity remains constant. Instead of canceling, both torques now work together to open the face. The result is a putter that feels fairly neutral on the backswing but wants to open aggressively during the forward strike.<\/p>\n\n<hr \/>\n\n<h2 id=\"the-cancellation-condition\">The Cancellation Condition<\/h2>\n\n<p>For the total torque to be zero:<\/p>\n\n\\[\\tau_{total} = \\tau_g + \\tau_{in} = 0\\]\n\n<p>Substituting the torque formulas:<\/p>\n\n\\[mgb_g + mab_a = 0\\]\n\n<p>The mass \\(m\\) cancels out, giving us the design constraint:<\/p>\n\n\\[gb_g = -ab_a\\]\n\n<p>Rearranging for the critical ratio:<\/p>\n\n\\[\\frac{b_g}{b_a} = -\\frac{a}{g}\\]\n\n<p>where:<\/p>\n<ul>\n  <li>\\(b_g\\) = front\/back COM offset from shaft (mm)<\/li>\n  <li>\\(b_a\\) = heel\/toe COM offset from shaft (mm)<\/li>\n  <li>\\(a\\) = stroke acceleration (m\/s\u00b2)<\/li>\n  <li>\\(g\\) = gravitational acceleration (9.8 m\/s\u00b2)<\/li>\n<\/ul>\n\n<p>For example, a stroke acceleration of \\(a = 9\\) m\/s\u00b2 requires:<\/p>\n\n\\[\\frac{b_g}{b_a} = -\\frac{9}{9.8} \\approx -0.918\\]\n\n<hr \/>\n\n<h2 id=\"calibration\">Calibration<\/h2>\n\n<p>If we assume a relative shaft-to-COM length of \\(b_a = -50\\) mm, meaning the shaft is positioned to the heel side of the COM by about 2 inches:<\/p>\n\n\\[b_g = -0.918 \\times (-50) = 45.9 \\text{ mm}\\]\n\n<p>Which just requires the shaft is also in front of the COM (toward the face) by about 2 inches also. This can be easily achieved through a large mallet with rear weight.<\/p>\n\n<h2 id=\"comparison\">Comparison<\/h2>\n\n<table>\n  <thead>\n    <tr>\n      <th>Parameter<\/th>\n      <th>Traditional Toe-Hang<\/th>\n      <th>Balanced Toe-Hang<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>\\(b_g\\) (forward offset)<\/td>\n      <td>+19 mm<\/td>\n      <td>+46 mm<\/td>\n    <\/tr>\n    <tr>\n      <td>\\(b_a\\) (heel\/toe offset)<\/td>\n      <td>-51 mm<\/td>\n      <td>-50 mm<\/td>\n    <\/tr>\n    <tr>\n      <td>\\(\\tau_g\\) @ rest<\/td>\n      <td>+0.065 N\u00b7m<\/td>\n      <td>+0.158 N\u00b7m<\/td>\n    <\/tr>\n    <tr>\n      <td>\\(\\tau_{in}\\) @ 9 m\/s\u00b2<\/td>\n      <td>-0.159 N\u00b7m<\/td>\n      <td>-0.158 N\u00b7m<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>Net torque<\/strong><\/td>\n      <td>-0.094 N\u00b7m<\/td>\n      <td><strong>~0 N\u00b7m<\/strong><\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>The balanced toe-hang achieves cancellation by having:<\/p>\n<ul>\n  <li>Large gravitational torque (wants to open face)<\/li>\n  <li>Equally large inertial torque (wants to close face)<\/li>\n  <li>Perfect cancellation at initial acceleration<\/li>\n<\/ul>\n\n<hr \/>\n\n<h2 id=\"performance\">Performance<\/h2>\n\n<p>The cancellation is acceleration-dependent. Here\u2019s how rotation varies with stroke aggressiveness:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Stroke Type<\/th>\n      <th>Acceleration<\/th>\n      <th>Traditional Toe-Hang<\/th>\n      <th>Balanced Toe-Hang<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>Gentle<\/td>\n      <td>6 m\/s\u00b2<\/td>\n      <td>-2.5\u00b0 (closes)<\/td>\n      <td>+3.1\u00b0 (opens)<\/td>\n    <\/tr>\n    <tr>\n      <td>Medium<\/td>\n      <td>9 m\/s\u00b2<\/td>\n      <td>-5.7\u00b0 (closes)<\/td>\n      <td><strong>\u00b10.0\u00b0<\/strong> (neutral)<\/td>\n    <\/tr>\n    <tr>\n      <td>Aggressive<\/td>\n      <td>12 m\/s\u00b2<\/td>\n      <td>-8.8\u00b0 (closes)<\/td>\n      <td>*-3.1\u00b0 (closes)<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>Observations:<\/p>\n\n<ol>\n  <li><strong>Traditional toe-hang<\/strong>: Always closes, fighting the required ~7\u00b0 arc opening<\/li>\n  <li><strong>Balanced toe-hang<\/strong>: Neutral at 9 m\/s\u00b2, with \u00b13\u00b0 variation across realistic stroke speeds<\/li>\n<\/ol>\n\n<p>The balanced design provides \u00b13\u00b0 variation compared to traditional toe-hang\u2019s 6\u00b0 range, but is still sensitive to tempo and rhythm (which manifest as acceleration) in the stroke.<\/p>\n\n<hr \/>\n\n<h2 id=\"when-two-wrongs-make-a-right\">When Two Wrongs Make a Right<\/h2>\n\n<p>Unlike zero torque putters that try to eliminate both offsets (\\(b_g \\approx 0\\), \\(b_a \\approx 0\\)), the balanced toe-hang uses large offsets in precise ratio to cancel their effects. Both torques are individually large (~0.16 N\u00b7m), but they oppose each other.<\/p>\n\n<p>This cancellation only works during the initial acceleration of the backswing, however. When you transition to the forward swing, the inertial torque reverses direction (acceleration flips sign) while gravitational torque remains roughly the same. Now instead of canceling, both torques add together to rotate the face open. The golfer experiences a putter that feels fairly neutral on the backswing but wants to open through impact. This may still explain their popularity \u2014 the neutral backswing feel is appealing, and the feeling of closing the face through impact is standard with every other club in the bag.<\/p>\n\n<p>If you want an example of this in action, check out the popular Taylor Made Spider putters with the plumber necks (a la Scottie Scheffler) that will have the toe hang ~45 degrees when laid down horizontally. Especially with their changable weights, I imagine they can get those pretty dialed to a players specific accelerations.<\/p>\n\n<p>Even more players are reducing torque than we thought!<\/p>","author":{"name":"Stephen Lee"},"category":[{"@attributes":{"term":"physics"}},{"@attributes":{"term":"golf"}},{"@attributes":{"term":"golf"}},{"@attributes":{"term":"physics"}},{"@attributes":{"term":"putters"}},{"@attributes":{"term":"torque"}}],"summary":"Introduction"},{"title":"Putter Torque and Face Rotation","link":{"@attributes":{"href":"https:\/\/stephenlee.info\/physics\/golf\/2025\/11\/19\/putter-torque-physics.html","rel":"alternate","type":"text\/html","title":"Putter Torque and Face Rotation"}},"published":"2025-11-19T00:00:00-06:00","updated":"2025-11-19T00:00:00-06:00","id":"https:\/\/stephenlee.info\/physics\/golf\/2025\/11\/19\/putter-torque-physics","content":"<h2 id=\"introduction\">Introduction<\/h2>\n\n<p>Dr. Sasho MacKenzie\u2019s research shows that successful putting requires managing three factors:<\/p>\n\n<ol>\n  <li>Start line\n    <ul>\n      <li>Primarily determined by face angle at impact<\/li>\n      <li>Tolerance: \u00b10.7\u00b0 on 12-foot putts<sup id=\"fnref:1\" role=\"doc-noteref\"><a href=\"#fn:1\" class=\"footnote\">1<\/a><\/sup><\/li>\n    <\/ul>\n  <\/li>\n  <li>Speed control\n    <ul>\n      <li>Determines capture width and is especially critical on breaking putts<\/li>\n      <li>Visual strategy (near vs. far focus) can affect speed control<sup id=\"fnref:2\" role=\"doc-noteref\"><a href=\"#fn:2\" class=\"footnote\">2<\/a><\/sup>. This is the basis of \u201cheads up\u201d putting.<\/li>\n    <\/ul>\n  <\/li>\n  <li>Aim\/alignment\n    <ul>\n      <li>Where you point the putter at address<\/li>\n      <li>Many golfers consistently mis-aim by several degrees<\/li>\n      <li>Perfect face control can appear bad when it\u2019s really an alignment issue. And vice versa.<\/li>\n    <\/ul>\n  <\/li>\n<\/ol>\n\n<p>Interestingly, path and contact location have much larger error tolerances - you\u2019d need path errors of \u00b13.5\u00b0 or contact errors of \u00b111mm to miss a 12-footer (far more forgiving than the \u00b10.7\u00b0 face angle tolerance).<sup id=\"fnref:1:1\" role=\"doc-noteref\"><a href=\"#fn:1\" class=\"footnote\">1<\/a><\/sup> The main point is that putting performance depends on the interaction of these factors. Even perfect face control won\u2019t overcome poor speed or mis-alignment.<\/p>\n\n<p>This post focuses specifically on face contol and how putter design influences the torque acting to twist the face during the stroke.<\/p>\n\n<hr \/>\n\n<h2 id=\"model\">Model<\/h2>\n\n<h3 id=\"the-stroke-arc\">The Stroke Arc<\/h3>\n\n<p>Even in a perfectly on-plane putting stroke, the putter head does not move straight back and straight through. This is because the putter sits on an inclined plane determined by the lie angle, the head traces a circle in that tilted plane. When you look down from above, that circle appears as an ellipse on the green.<\/p>\n\n<p><img src=\"\/assets\/images\/stroke_arc_projection.png\" alt=\"Stroke Arc Projection\" width=\"700\" \/><\/p>\n\n<p>To keep the putter face square to the path, the face must rotate to remain perpendicular to the tangent of that ellipse.\nThe needed face rotation is a purely geometric consequence of the lie angle.<\/p>\n\n<p>Let:<\/p>\n\n<ul>\n  <li>\\(\\phi\\) = lie angle (typ. 68\u201372\u00b0)<\/li>\n  <li>\\(\\theta\\) = stroke angle within the tilted plane<\/li>\n  <li>\\(R\\) = effective radius of the stroke arc<\/li>\n<\/ul>\n\n<p>A convenient orthonormal basis for the tilted plane is:<\/p>\n\n\\[\\mathbf{e}_1 = (1,0,0), \\qquad\n\\mathbf{e}_2 = (0,\\cos\\phi,-\\sin\\phi)\\]\n\n<p>Then the putter head\u2019s position is:<\/p>\n\n\\[\\mathbf{r}(\\theta)\n= R\\cos\\theta\\,\\mathbf{e}_1\n+ R\\sin\\theta\\,\\mathbf{e}_2\n=\n\\begin{pmatrix}\nR\\cos\\theta \\\\\nR\\sin\\theta\\cos\\phi \\\\\n-R\\sin\\theta\\sin\\phi\n\\end{pmatrix}\\]\n\n<h4 id=\"tangent\">Tangent<\/h4>\n\n<p>The tangent vector is:<\/p>\n\n\\[\\mathbf{t}(\\theta) = \\frac{d\\mathbf{r}}{d\\theta}\n=\n\\begin{pmatrix}\n-R\\sin\\theta \\\\\nR\\cos\\theta\\cos\\phi \\\\\n-R\\cos\\theta\\sin\\phi\n\\end{pmatrix}\\]\n\n<p>Putting is judged in the horizontal plane, so we project the tangent into the \\(x{-}y\\) plane:<\/p>\n\n\\[\\mathbf{t}_{xy}(\\theta)\n=\n\\begin{pmatrix}\n-R\\sin\\theta \\\\\nR\\cos\\theta\\cos\\phi\n\\end{pmatrix}\\]\n\n<p>The direction of the path on the green is the angle of this tangent:<\/p>\n\n\\[\\psi(\\theta)\n=\n\\arctan\\left(\n\\frac{R\\cos\\theta\\cos\\phi}{-R\\sin\\theta}\n\\right)\n=\n\\arctan\\left(\n-\\cot\\theta \\cdot \\cos\\phi\n\\right)\\]\n\n<p>This angle \\(\\psi(\\theta)\\) is exactly the orientation that the face must match to remain square to the arc.<\/p>\n\n<h4 id=\"rotation\">Rotation<\/h4>\n\n<p>Near the center of the stroke (\\(\\theta = 0\\)), a Taylor expansion gives:<\/p>\n\n\\[\\psi(\\theta)\n\\approx\n\\theta\\,\\cos\\phi\\]\n\n<p>(small-\\(\\theta\\) approximation)<\/p>\n\n<p>This approximation is surprisingly good up to \u00b115\u201320\u00b0.<\/p>\n\n<p>For a typical lie angle \\(\\phi = 70\u00b0\\):<\/p>\n\n\\[\\cos\\phi \\approx 0.34\\]\n\n<p>So for a modest stroke of \u00b120\u00b0:<\/p>\n\n\\[\\Delta\\psi \\approx 20\u00b0 \\times 0.34 \\approx 6.8\u00b0\\]\n\n<h4 id=\"interpretation\">Interpretation<\/h4>\n\n<p>Even in a perfectly on-plane, mechanically ideal stroke:<\/p>\n\n<ul>\n  <li>the putter face must open ~6\u20137\u00b0 on the backswing, and<\/li>\n  <li>must close the same amount on the follow-through<\/li>\n<\/ul>\n\n<p>to stay square to the arc.<\/p>\n\n<p>This arc is not a flaw. It is the natural outcome of swinging a putter on an inclined plane.<\/p>\n\n<p>The design question becomes: does your putter fight this natural rotation or cooperate with it?<\/p>\n\n<hr \/>\n\n<h3 id=\"torque-components\">Torque Components<\/h3>\n\n<p>Two perpendicular COM offsets create torque about the shaft:<\/p>\n\n<p><img src=\"\/assets\/images\/putter_com_offset.png\" alt=\"Putter COM Offset Components\" width=\"500\" \/><\/p>\n\n<p>The total force acting on the putter head is:<\/p>\n\n\\[\\mathbf{F} = m\\mathbf{a} + m\\mathbf{g}\\]\n\n<p>where \\(m\\) is the head mass, \\(\\mathbf{a}\\) is the translational acceleration, and \\(\\mathbf{g}\\) is gravity. This creates two independent torque contributions about the shaft:<\/p>\n\n<p><strong>1. Gravitational torque<\/strong><\/p>\n\n\\[\\tau_g = m g b_g\\]\n\n<p>This term is present even when the putter is held still. It depends on the front\/back offset \\(b_g\\) \u2014 how far the COM \u201changs\u201d away from the shaft line.<\/p>\n\n<ul>\n  <li>Positive \\(b_g\\) (forward) = face opens<\/li>\n  <li>Negative \\(b_g\\) (onset) = face closes<\/li>\n  <li>Always present, constant throughout stroke<\/li>\n<\/ul>\n\n<p><strong>2. Inertial torque<\/strong><\/p>\n\n\\[\\tau_{in} = m a b_a\\]\n\n<p>This term depends on how hard you accelerate the putter. It depends on the heel\/toe offset \\(b_a\\) \u2014 the perpendicular distance from the acceleration force line to the shaft.<\/p>\n\n<ul>\n  <li>Positive \\(b_a\\) (toe bias) = face opens during backswing<\/li>\n  <li>Negative \\(b_a\\) (heel bias) = face closes during backswing<\/li>\n  <li>Scales with acceleration, reverses on forward swing<\/li>\n<\/ul>\n\n<p><strong>Total torque and angular acceleration:<\/strong><\/p>\n\n\\[\\alpha = \\frac{\\tau_s}{I_s} = \\frac{\\tau_{in} + \\tau_g}{I_s}\\]\n\n<p>where \\(I_s\\) is the moment of inertia about the shaft axis.<\/p>\n\n<p>The key insight: \\(b_g\\) and \\(b_a\\) are independent geometric parameters. Different putter designs have radically different ratios, leading to very different torque profiles during the stroke.<\/p>\n\n<hr \/>\n\n<h3 id=\"lie-angle-balance\">Lie Angle Balance<\/h3>\n\n<p>A putter is <em>lie-angle balanced<\/em> when the shaft axis passes almost exactly through the putter head\u2019s 3D center of mass (COM) when held at the actual lie angle. In that orientation:<\/p>\n\n<ul>\n  <li>the gravitational force acts almost directly through the shaft, and<\/li>\n  <li>the inertial force from accelerating the putter also acts almost through the shaft<\/li>\n<\/ul>\n\n<p>so both produce near-zero torque about the shaft.<\/p>\n\n<p>Torque about the shaft is:<\/p>\n\n\\[\\tau_s = (\\mathbf{r}_{COM} \\times \\mathbf{F}) \\cdot \\hat{\\mathbf{s}}\\]\n\n<p>and lie-angle balance essentially makes \\(\\mathbf{r}_{COM} \\approx 0\\) in the relevant plane. This leads to a neutral feel where the putter does not want to open or close on its own during the stroke.<\/p>\n\n<hr \/>\n\n<h2 id=\"estimates\">Estimates<\/h2>\n\n<h3 id=\"methodology\">Methodology<\/h3>\n\n<p>I focus on the first 50ms (1\/20th second) of the backswing when acceleration begins and initial forces (potentially) try to rotate the face.<\/p>\n\n<p>Why analyze only the initial 50ms? This \u201cinitial conditions\u201d approach isolates what the putter naturally wants to do before compensatory hand forces take over. A full dynamic analysis of the putting stroke would require modeling the golfer\u2019s counter-torques throughout the stroke. Without these, the putter would simply oscillate to a gravitational equilibrium with the COM hanging below the pivot point of the shaft. This doesn\u2019t teach us anything about actual putting mechanics. By examining this initial impulse, we identify what forces the golfer must immediately counter with - revealing each design\u2019s inherent tendency at stroke initiation. We can easily use the same approach, but in reverse, for the start of the downswing.<\/p>\n\n<p>The analysis uses an impulse-based approximation:<\/p>\n\n<p><strong>Given torque and MOI, find rotation:<\/strong><\/p>\n\n\\[\\tau = I_s \\alpha \\quad \\Rightarrow \\quad \\alpha = \\frac{\\tau}{I_s}\\]\n\n<p>For constant acceleration over time \\(\\Delta t\\):<\/p>\n\n\\[\\Delta \\theta = \\frac{1}{2} \\alpha (\\Delta t)^2\\]\n\n<p>The total torque is the sum of gravitational and inertial components:<\/p>\n\n\\[\\tau_{total} = \\tau_g + \\tau_{in} = m g b_g + m a b_a\\]\n\n<p><strong>Parameters:<\/strong><\/p>\n<ul>\n  <li>Head mass: \\(m = 350\\) g<\/li>\n  <li>Gravity: \\(g = 9.8\\) m\/s\u00b2<\/li>\n  <li>Acceleration range: \\(a = 6\\)\u2013\\(12\\) m\/s\u00b2 (smooth to aggressive backswing)<\/li>\n  <li>Impulse duration: \\(\\Delta t = 50\\) ms<\/li>\n<\/ul>\n\n<p>For each putter design, we calculate the face rotation during this critical window using the geometry (\\(b_g\\), \\(b_a\\)) and resistance to rotation (\\(I_s\\)).<\/p>\n\n<h3 id=\"results\">Results<\/h3>\n\n<table>\n  <thead>\n    <tr>\n      <th>Design<\/th>\n      <th>\\(b_g\\)<\/th>\n      <th>\\(b_a\\)<\/th>\n      <th>\\(I_s\\)<\/th>\n      <th>Torque<\/th>\n      <th>Rotation (50ms)<\/th>\n      <th>Character<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td><strong>Toe-Hang Blade<\/strong><\/td>\n      <td>+19 mm<\/td>\n      <td>-51 mm<\/td>\n      <td>12,000 g\u00b7cm\u00b2<\/td>\n      <td>0.04\u20130.15 ft-lb<\/td>\n      <td><strong>-2.5\u00b0 to -8.8\u00b0<\/strong> (closes)<\/td>\n      <td>Inertial dominates 2-3\u00d7, fights arc<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>Face-Balanced Mallet<\/strong><\/td>\n      <td>+51 mm<\/td>\n      <td>-1 mm<\/td>\n      <td>11,000 g\u00b7cm\u00b2<\/td>\n      <td>0.17\u20130.18 ft-lb<\/td>\n      <td><strong>+11.3\u00b0 to +11.1\u00b0<\/strong> (opens)<\/td>\n      <td>Gravitational dominates 50-80\u00d7, largest torque<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>L.A.B.<\/strong><\/td>\n      <td>-1 mm<\/td>\n      <td>+1 mm<\/td>\n      <td>2,500 g\u00b7cm\u00b2<\/td>\n      <td>0.001\u20130.006 ft-lb<\/td>\n      <td><strong>-0.4\u00b0 to +0.2\u00b0<\/strong> (neutral)<\/td>\n      <td>Torques cancel, 50\u00d7 smaller than face-balanced<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>Auto-Correcting<\/strong><\/td>\n      <td>0 mm<\/td>\n      <td>+2 mm<\/td>\n      <td>2,500 g\u00b7cm\u00b2<\/td>\n      <td>0.003\u20130.006 ft-lb<\/td>\n      <td><strong>+1.2\u00b0 to +2.4\u00b0<\/strong> (opens)<\/td>\n      <td>Purely inertial, gentle arc assist<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>Note that values for \\(b_a\\) and \\(b_g\\) are representative. In particular, for the LAB example, I intentionally added a small tolerance that seems reasonable to assume as manufacturing tolerance. In this sense, we can read the LAB numbers as a worst case scenario.<\/p>\n\n<p><strong>Key observations:<\/strong><\/p>\n<ul>\n  <li>Face-balanced putters, surprisingly, have the largest torque, creating an immediate +11\u00b0 opening bias<\/li>\n  <li>Toe-hang putters close the face -2.5\u00b0 to -8.8\u00b0, fighting the required ~7\u00b0 opening for arc geometry<\/li>\n  <li>L.A.B. putters achieve near-zero rotation (\u00b10.3\u00b0) by using opposite-signed offsets that cancel<\/li>\n  <li>Auto-correcting putters gently assist the natural arc with +1.2\u00b0 to +2.4\u00b0 opening<\/li>\n<\/ul>\n\n<hr \/>\n\n<h2 id=\"implication\">Implication<\/h2>\n\n<p>Face angle tolerance is \u00b10.7\u00b0 on a 12-footer. The first 50ms of the backswing sets up the entire stroke:<\/p>\n\n<ul>\n  <li><strong>Face-balanced<\/strong>: Opens +11\u00b0 immediately - you must fight this throughout the stroke<\/li>\n  <li><strong>Toe-hang<\/strong>: Closes -2.5\u00b0 to -8.8\u00b0 - fighting the natural 7\u00b0 arc requirement<\/li>\n  <li><strong>L.A.B.<\/strong>: \u00b10.3\u00b0 - essentially neutral, you control everything<\/li>\n  <li><strong>Auto-correcting<\/strong>: +1.2\u00b0 to +2.4\u00b0 - gently assists the required 7\u00b0 opening<\/li>\n<\/ul>\n\n<p><strong>On the forward swing<\/strong>, the inertial torque reverses direction (acceleration flips sign), while gravitational torque remains constant:<\/p>\n\n<ul>\n  <li><strong>Face-balanced<\/strong>: Still opens (+11\u00b0) - constant gravitational bias in both directions<\/li>\n  <li><strong>Toe-hang<\/strong>: Now opens (reversal) - inertial torque flips, potentially helping close the required 7\u00b0<\/li>\n  <li><strong>L.A.B.<\/strong>: Still neutral (\u00b10.3\u00b0) - torques still cancel<\/li>\n  <li><strong>Auto-correcting<\/strong>: Now closes (reversal) - gently assists the required 7\u00b0 closing to square the face<\/li>\n<\/ul>\n\n<p>The torque magnitude matters less than whether it helps or fights your natural stroke mechanics at each phase.<\/p>\n\n<hr \/>\n\n<h2 id=\"moi\">MOI<\/h2>\n\n<p>Higher MOI (\\(I_s\\)) reduces angular acceleration for the same torque:<\/p>\n\n\\[\\alpha = \\frac{\\tau}{I_s}\\]\n\n<p><strong>Implications<\/strong>:<\/p>\n<ul>\n  <li>Resists unexpected twitches or \u201cjerky\u201d strokes.<\/li>\n  <li>Requires more force to actually counteract the natural torques described above.<\/li>\n<\/ul>\n\n<p>This is why high-MOI face-balanced mallets can feel \u201csticky\u201d. The large gravitational torque tries to open the face, but large MOI makes it harder to resist that rotation.<\/p>\n\n<hr \/>\n\n<h2 id=\"comparison\">Comparison<\/h2>\n\n<table>\n  <thead>\n    <tr>\n      <th>Design<\/th>\n      <th>Torque Magnitude<\/th>\n      <th>Initial Rotation (50ms)<\/th>\n      <th>Character<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td><strong>Face-Balanced<\/strong><\/td>\n      <td>0.17-0.18 ft-lb<\/td>\n      <td>+11\u00b0 (opens)<\/td>\n      <td>Constant bias, largest torque<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>Toe-Hang<\/strong><\/td>\n      <td>0.04-0.15 ft-lb<\/td>\n      <td>-2.5\u00b0 to -8.8\u00b0 (closes)<\/td>\n      <td>Fighting arc, acceleration-dependent<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>L.A.B.<\/strong><\/td>\n      <td>0.001-0.006 ft-lb<\/td>\n      <td>\u00b10.3\u00b0 (neutral)<\/td>\n      <td>Minimal, near-zero<\/td>\n    <\/tr>\n    <tr>\n      <td><strong>Auto-Correcting<\/strong><\/td>\n      <td>0.003-0.006 ft-lb<\/td>\n      <td>+1.2\u00b0 to +2.4\u00b0 (opens)<\/td>\n      <td>Gentle arc assist, scales with acceleration<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<hr \/>\n\n<h2 id=\"summary\">Summary<\/h2>\n\n<p><strong>Stroke geometry:<\/strong> Even in a perfect on-plane stroke, the face must rotate ~7\u00b0 (open during backswing, close during forward swing) to stay square to the elliptical path created by the lie angle. This is the \u201cneutral\u201d path.<\/p>\n\n<p><strong>Torque sources:<\/strong> The location where the shaft points relative to the Center of Mass (COM) can create independent torques:<\/p>\n<ul>\n  <li>Gravitational: \\(\\tau_g = mgb_g\\)<\/li>\n  <li>Inertial: \\(\\tau_{in} = mab_a\\) (scales with acceleration, reverses on forward swing)<\/li>\n<\/ul>\n\n<p><strong>Peak Acceleration:<\/strong> I analyze the first 50ms of the backswing, when acceleration peaks, to estimate the behavior of these different designs when first put in motion. In reality, modeling the full dynamic system requires recognizing that the values \\(b_a\\) and \\(b_g\\) change as the face rotates, which requires that we assume counter-torque values that the hands must apply. What we care about in this analyis is only what initial forces the hands must apply to keep the putter face square when you start your putting stroke. It is straighforward to extend this to the moment of transition from the backswing to the downswing .<\/p>\n\n<p><strong>Design comparisons:<\/strong><\/p>\n\n<ul>\n  <li><em>Face-balanced<\/em>: Largest magnitude rotation under our assumptions, opening +11\u00b0 immediately. This is driven by constant gravitational bias you must fight throughout the stroke, including on the downswing, when the putter will still want to open.<\/li>\n  <li><em>Toe-hang<\/em>: Closes -2.5\u00b0 to -8.8\u00b0 on backswing, should open about the same amount at the start of the downswing. Possible that with some of the larger toe-hang mallets, gravitational torque and inertial torque get close to canceling each other out? Larger gravitational torque balances with a similarly large (and opposite) inertial torque? Maybe work for a future post.<\/li>\n  <li><em>L.A.B.<\/em>: Near-zero torque even if we assume the worst with manufacturing tolerance (\u00b10.3\u00b0).<\/li>\n  <li><em>Auto-correcting<\/em>: Gently assists arc geometry (+1.2\u00b0 to +2.4\u00b0 opening on backswing, reverses to help close on forward swing). My personal favorite idea wise.<\/li>\n<\/ul>\n\n<p><strong>For your golf:<\/strong><\/p>\n\n<ol>\n  <li>Have fun and pick a putter that makes you enjoy putting.<\/li>\n  <li>If you identify that you\u2019re struggling to hit your line consistently, realize it\u2019s most likely a face control problem, not a path problem.<\/li>\n  <li>Try a \u201czero-torque\u201d putter with a few caveats:\n    <ul>\n      <li>You still need to aim it well. The onset can take some getting used to.<\/li>\n      <li>When you putt, you may need to resist the urge to \u201chelp\u201d keep the face square.<\/li>\n      <li>Make a practice stroke without a golf club: this is the right mental approach as you really only have to focus on distance now, and not rotation.<\/li>\n    <\/ul>\n  <\/li>\n  <li>If that doesn\u2019t work for you, try a toe-hang mallet. In this case, two wrongs might actually make a right?<\/li>\n<\/ol>\n\n<div class=\"footnotes\" role=\"doc-endnotes\">\n  <ol>\n    <li id=\"fn:1\" role=\"doc-endnote\">\n      <p>MacKenzie, S. Putting research presented at Andrew Rice Golf Coach Camp (2023). Study of 12-foot putts showing face angle tolerance of \u00b10.7\u00b0, path tolerance of \u00b13.5\u00b0, and contact tolerance of \u00b111mm.\u00a0<a href=\"#fnref:1\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<\/a>\u00a0<a href=\"#fnref:1:1\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<sup>2<\/sup><\/a><\/p>\n    <\/li>\n    <li id=\"fn:2\" role=\"doc-endnote\">\n      <p>MacKenzie, S., &amp; MacInnis, K. (2017). \u201cEvaluation of Near Versus Far Target Visual Focus Strategies with Breaking Putts.\u201d Study of 27 golfers on breaking putts from 6-14 feet showed far-focus strategy improved make rate from 37% to 40% through better distance control.\u00a0<a href=\"#fnref:2\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<\/a><\/p>\n    <\/li>\n  <\/ol>\n<\/div>","author":{"name":"Stephen Lee"},"category":[{"@attributes":{"term":"physics"}},{"@attributes":{"term":"golf"}},{"@attributes":{"term":"golf"}},{"@attributes":{"term":"physics"}},{"@attributes":{"term":"putters"}},{"@attributes":{"term":"torque"}}],"summary":"Introduction"},{"title":"Effective Distance on Sloped Greens","link":{"@attributes":{"href":"https:\/\/stephenlee.info\/golf\/physics\/2025\/11\/18\/distance-adjustments-sloped-putts.html","rel":"alternate","type":"text\/html","title":"Effective Distance on Sloped Greens"}},"published":"2025-11-18T00:00:00-06:00","updated":"2025-11-18T00:00:00-06:00","id":"https:\/\/stephenlee.info\/golf\/physics\/2025\/11\/18\/distance-adjustments-sloped-putts","content":"<h2 id=\"the-problem\">The Problem<\/h2>\n\n<p>You face a 20-foot putt that\u2019s 2% downhill on 10-stimp greens. How hard should you hit it?<\/p>\n\n<p>Instead of thinking \u201chit it softer than a flat 20-footer,\u201d what if we could translate this into an equivalent flat distance? Your body already knows how to hit a 15-footer\u2014that muscle memory is far more reliable than abstract \u201csofter\u201d adjustments.<\/p>\n\n<h2 id=\"derivation\">Derivation<\/h2>\n\n<p>From <a href=\"\/golf\/physics\/2025\/11\/16\/rederiving-aimpoint.html\">previous posts<\/a>, we know that for a putt with total rollout \\(L = D + R\\), the required initial velocity is:<\/p>\n\n\\[v_0^2 = 2 a_{\\text{eff}} L\\]\n\n<p>where \\(a_{\\text{eff}}\\) is the effective deceleration accounting for both friction and slope.<\/p>\n\n<p><strong>Deceleration from Friction<\/strong><\/p>\n\n<p>On flat greens at Stimp \\(S\\):<\/p>\n\n\\[a_f = -\\frac{v_s^2}{2S} \\approx -\\frac{19.7}{S}\\]\n\n<p>where \\(v_s \\approx 6.27\\ \\text{ft\/s}\\) is the Stimp meter release velocity.<\/p>\n\n<p><strong>Acceleration from Gravity<\/strong><\/p>\n\n<p>On a slope with forward grade \\(X\\) (positive uphill, negative downhill), gravity adds:<\/p>\n\n\\[a_g = \\frac{5}{7} g X \\approx 23 X\\]\n\n<p>The effective deceleration becomes:<\/p>\n\n\\[a_{\\text{eff}} = a_f + a_g \\approx -\\frac{19.7}{S} - 23X\\]\n\n<p><strong>Distance Adjustment<\/strong><\/p>\n\n<p>To find the equivalent flat distance, we set initial velocities equal:<\/p>\n\n\\[-\\frac{19.7}{S} \\cdot 2 L_{\\text{flat}} = -\\left(\\frac{19.7}{S} + 23X\\right) \\cdot 2 L_{\\text{slope}}\\]\n\n<p>Solving for \\(L_{\\text{flat}}\\):<\/p>\n\n\\[L_{\\text{flat}} = \\left(1 + \\frac{23SX}{19.7}\\right) L_{\\text{slope}}\\]\n\n<p>Using \\(\\frac{23}{19.7} \\approx 1.17\\):<\/p>\n\n\\[\\frac{L_{\\text{flat}}}{L_{\\text{slope}}} =  1 + 1.17 \\, S \\, X\\]\n\n<p>This is our distance adjustment formula.<\/p>\n\n<h2 id=\"the-tables\">The Tables<\/h2>\n\n<h3 id=\"effective-distance\">Effective Distance<\/h3>\n\n<p>Multiply your actual distance by these percentages:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Forward Slope<\/th>\n      <th>Stimp 8<\/th>\n      <th>Stimp 9<\/th>\n      <th>Stimp 10<\/th>\n      <th>Stimp 11<\/th>\n      <th>Stimp 12<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>+3% (steep uphill)<\/td>\n      <td>128%<\/td>\n      <td>132%<\/td>\n      <td>135%<\/td>\n      <td>139%<\/td>\n      <td>142%<\/td>\n    <\/tr>\n    <tr>\n      <td>+2% (uphill)<\/td>\n      <td>119%<\/td>\n      <td>121%<\/td>\n      <td>123%<\/td>\n      <td>126%<\/td>\n      <td>128%<\/td>\n    <\/tr>\n    <tr>\n      <td>+1% (slight uphill)<\/td>\n      <td>109%<\/td>\n      <td>111%<\/td>\n      <td>112%<\/td>\n      <td>113%<\/td>\n      <td>114%<\/td>\n    <\/tr>\n    <tr>\n      <td>0% (flat)<\/td>\n      <td>100%<\/td>\n      <td>100%<\/td>\n      <td>100%<\/td>\n      <td>100%<\/td>\n      <td>100%<\/td>\n    <\/tr>\n    <tr>\n      <td>-1% (slight downhill)<\/td>\n      <td>91%<\/td>\n      <td>89%<\/td>\n      <td>88%<\/td>\n      <td>87%<\/td>\n      <td>86%<\/td>\n    <\/tr>\n    <tr>\n      <td>-2% (downhill)<\/td>\n      <td>81%<\/td>\n      <td>79%<\/td>\n      <td>77%<\/td>\n      <td>74%<\/td>\n      <td>72%<\/td>\n    <\/tr>\n    <tr>\n      <td>-3% (steep downhill)<\/td>\n      <td>72%<\/td>\n      <td>68%<\/td>\n      <td>65%<\/td>\n      <td>61%<\/td>\n      <td>58%<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p><strong>Example:<\/strong> 20-foot putt, 2% downhill, 10 stimp \u2192 \\(20 \\times 0.77 = 15.4\\) feet<\/p>\n\n<h3 id=\"10-foot-putt\">10-Foot Putt<\/h3>\n\n<table>\n  <thead>\n    <tr>\n      <th>Forward Slope<\/th>\n      <th>Stimp 8<\/th>\n      <th>Stimp 10<\/th>\n      <th>Stimp 12<\/th>\n      <th>Stimp 14<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>+3% (steep uphill)<\/td>\n      <td>12.8 ft<\/td>\n      <td>13.5 ft<\/td>\n      <td>14.2 ft<\/td>\n      <td>14.9 ft<\/td>\n    <\/tr>\n    <tr>\n      <td>+2% (uphill)<\/td>\n      <td>11.9 ft<\/td>\n      <td>12.3 ft<\/td>\n      <td>12.8 ft<\/td>\n      <td>13.3 ft<\/td>\n    <\/tr>\n    <tr>\n      <td>+1% (slight uphill)<\/td>\n      <td>10.9 ft<\/td>\n      <td>11.2 ft<\/td>\n      <td>11.4 ft<\/td>\n      <td>11.6 ft<\/td>\n    <\/tr>\n    <tr>\n      <td>0% (flat)<\/td>\n      <td>10.0 ft<\/td>\n      <td>10.0 ft<\/td>\n      <td>10.0 ft<\/td>\n      <td>10.0 ft<\/td>\n    <\/tr>\n    <tr>\n      <td>-1% (slight downhill)<\/td>\n      <td>9.1 ft<\/td>\n      <td>8.8 ft<\/td>\n      <td>8.6 ft<\/td>\n      <td>8.4 ft<\/td>\n    <\/tr>\n    <tr>\n      <td>-2% (downhill)<\/td>\n      <td>8.1 ft<\/td>\n      <td>7.7 ft<\/td>\n      <td>7.2 ft<\/td>\n      <td>6.7 ft<\/td>\n    <\/tr>\n    <tr>\n      <td>-3% (steep downhill)<\/td>\n      <td>7.2 ft<\/td>\n      <td>6.5 ft<\/td>\n      <td>5.8 ft<\/td>\n      <td>5.1 ft<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<h2 id=\"how-to-use-this\">How to Use This<\/h2>\n\n<p>These distances provide a good guide for thinking about speed:<\/p>\n\n<ol>\n  <li>Read your slope (e.g., 2% uphill)<\/li>\n  <li>Know the green speed (e.g., 10 stimp)<\/li>\n  <li>Look up the adjustment (e.g., 123%)<\/li>\n  <li>Hit it like the adjusted distance (e.g., 20 \u00d7 1.23 = 24.6 feet)<\/li>\n<\/ol>\n\n<p>On the practice green, verify the table matches your feel. Hit 10-footers at different slopes and see if the adjustments work. Once calibrated, you\u2019ll have a more reliable guide for speed control that compliments the broader Aimpoint Express system.<\/p>\n\n<hr \/>","author":{"name":"Stephen Lee"},"category":[{"@attributes":{"term":"golf"}},{"@attributes":{"term":"physics"}},{"@attributes":{"term":"golf"}},{"@attributes":{"term":"physics"}},{"@attributes":{"term":"putting"}},{"@attributes":{"term":"aimpoint"}}],"summary":"The Problem"},{"title":"Calibrating Aimpoint Express","link":{"@attributes":{"href":"https:\/\/stephenlee.info\/golf\/physics\/2025\/11\/17\/calibrating-aimpoint-express.html","rel":"alternate","type":"text\/html","title":"Calibrating Aimpoint Express"}},"published":"2025-11-17T00:00:00-06:00","updated":"2025-11-17T00:00:00-06:00","id":"https:\/\/stephenlee.info\/golf\/physics\/2025\/11\/17\/calibrating-aimpoint-express","content":"<h2 id=\"introduction\">Introduction<\/h2>\n\n<p>In my <a href=\"\/golf\/physics\/2025\/11\/16\/rederiving-aimpoint.html\">previous post<\/a>, I derived a simple physical model to estimate how many inches a putt breaks on sloped greens. Next, we\u2019re going to derive some calibration rules behind the famous (infamous?) Aimpoint Express finger-reading system.<\/p>\n\n<p>The Express method is elegant and simple:<\/p>\n\n<ol>\n  <li>Stand just above\/behind the ball,<\/li>\n  <li>Hold up X fingers for X% side slope (one per percent of side slope),<\/li>\n  <li>Close your non-dominant eye,<\/li>\n  <li>Align one side of your finger with the center of the hole such that the rest of the finger(s) covers the edge of \n the cup in the direction you\u2019d need to start your putt.<\/li>\n  <li>Observe the location where you can first see grass that is parallel with the center of the hole.<\/li>\n<\/ol>\n\n<p>This spot becomes your \u201caim point\u201d, and you then just pretend to hit a dead straight putt at that point.<\/p>\n\n<h2 id=\"problem\">Problem<\/h2>\n\n<p>The magic of this system is in the calibration: how far should you hold your hand from your face?<\/p>\n\n<p>It turns out the answer involves elegant geometry and depends critically on both green speed and the slope uphill or downhill.<\/p>\n\n<h2 id=\"the-triangle-geometry\">The Triangle Geometry<\/h2>\n\n<p>The Aimpoint Express system works through similar triangles:<\/p>\n\n\\[\\frac{\\text{Finger Width } (w)}{\\text{Viewing Distance } (L)} = \\frac{\\text{Break at Hole } (B)}{\\text{Distance to Hole } (D)}\\]\n\n<p>Rearranging:<\/p>\n\n\\[B = \\frac{w \\cdot D}{L}\\]\n\n<p>The key insight: if break is linear in distance, then we can choose a fixed viewing distance \\(L\\) inches away from our face that works for all putt lengths.<\/p>\n\n<h2 id=\"why-this-works\">Why This Works<\/h2>\n\n<p>From the <a href=\"\/golf\/physics\/2025\/11\/16\/rederiving-aimpoint.html\">previous derivation<\/a>, the physics model gives break as a function of distance with a \\((\\sqrt{D+R} - \\sqrt{R})^2\\) term, where \\(D\\) is the distance to the hole and \\(R\\) is the additional roll out distance the ball would travel if you didn\u2019t make the putt.<\/p>\n\n<p>For practical estimates with small roll out distance (e.g. you hit a 10 footer with enough speed to go 11ft), this break is very nearly linear in distance to the hole.<\/p>\n\n<p>To verify this, I fit a simple linear model:<\/p>\n\n\\[B \\approx \\alpha \\cdot D\\]\n\n<p>where the value of \\(\\alpha\\) depends on:<\/p>\n<ul>\n  <li>Green speed (Stimp reading)<\/li>\n  <li>Side slope percentage<\/li>\n  <li>Forward slope percentage<\/li>\n<\/ul>\n\n<p>We will see that this simple linear approximation fits extremely well with our model from the previous post (\\(R^2 &gt; 0.99\\)), which means for a given putt (fixed green speed and slopes), we can treat \\(\\alpha\\) as constant.<\/p>\n\n<p>Therefore:<\/p>\n\n\\[\\frac{w}{L} = \\alpha \\quad \\Rightarrow \\quad L = \\frac{w}{\\alpha}\\]\n\n<p>This means the viewing distance away from your face \\(L\\) is constant for any given green speed, side slope, and forward slope combination. You don\u2019t need to adjust for putt distance - the similar geometry scales it automatically!<\/p>\n\n<h2 id=\"n-fingers\">\u201cN\u201d Fingers<\/h2>\n\n<p>Here\u2019s another elegant consequence: if side slope doubles (say, 1% \u2192 2%), the break doubles:<\/p>\n\n\\[B_{2\\%} = 2 \\times B_{1\\%}\\]\n\n<p>So for 2% slope, you hold up two fingers with the same width \\(2w\\):<\/p>\n\n\\[\\frac{2w}{L} = 2\\alpha\\]\n\n<p>The viewing distance stays exactly the same. This is why the Express system scales so well. You just use more fingers for steeper side slopes and keep your hand at the same calibrated distance.<\/p>\n\n<h2 id=\"calibration\">Calibration<\/h2>\n\n<p>The approach is straightforward but elegant. For each combination of green speed and slope conditions, I need to find the coefficient \\(\\alpha\\) that describes how break scales with distance. Then \\(L = w \/ \\alpha\\) gives the viewing distance you need to hold your fingers from your face.<\/p>\n\n<p>Here\u2019s the process:<\/p>\n\n<p><strong>Step 1: Generate data<\/strong><\/p>\n\n<p>I used the dampened break model from the previous post to calculate expected break for:<\/p>\n<ul>\n  <li>Stimp values: 8, 10, 12, 14<\/li>\n  <li>Forward slopes: -3%, -2%, -1%, 0%, +1%, +2%, +3%<\/li>\n  <li>Side slope: 1% (other slopes scale proportionally)<\/li>\n  <li>Distances: 3-30 feet (in 1-foot increments)<\/li>\n  <li>Rollout: 1.5 feet past the hole<\/li>\n<\/ul>\n\n<p>This creates 756 observations (4 Stimp \u00d7 7 forward slopes \u00d7 27 distances).<\/p>\n\n<p><strong>Step 2: Fit linear models<\/strong><\/p>\n\n<p>For each Stimp value, I estimate a regression model with separate slope coefficients for each forward slope condition (since the uphill\/downhill changes the speed, and consequently, the break). Using indicator variables \\(\\mathbb{1}_{j}\\) for each of the \\(j=1,...,7\\) forward slope categories:<\/p>\n\n\\[B_ij = \\sum_{j=1}^{7} \\alpha_j \\cdot \\mathbb{1}_{j} \\cdot D_i + \\epsilon_i\\]\n\n<p>where:<\/p>\n<ul>\n  <li>\\(B_ij\\) is the specific putt\u2019s break in inches.<\/li>\n  <li>\\(D_i\\) is the putt\u2019s distance to the hole in feet.<\/li>\n  <li>\\(\\alpha_j\\) is the coefficient (inches of break per foot) for a given slope uphill or downhill.<\/li>\n  <li>\\(\\epsilon_i\\) is the error term that our linear model doesn\u2019t capture.<\/li>\n<\/ul>\n\n<p>This gives us 7 coefficients per Stimp value (one for each forward slope).<\/p>\n\n<p><strong>Step 3: Extract viewing distances<\/strong><\/p>\n\n<p>From the regression coefficients, we use our fitted parameters to reverse engineer what viewing distance from your face you should hold your fingers:<\/p>\n\n\\[L = \\frac{w}{\\alpha}\\]\n\n<p>where \\(w\\) is your finger width (e.g. mine is about 0.75 inch).<\/p>\n\n<h2 id=\"results\">Results<\/h2>\n\n<p>Here are the viewing distances (the number of inches you should hold your fingers from your face):<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Forward Slope<\/th>\n      <th>Stimp 8<\/th>\n      <th>Stimp 10<\/th>\n      <th>Stimp 12<\/th>\n      <th>Stimp 14<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>-3% (steep downhill)<\/td>\n      <td>10\u201d<\/td>\n      <td>7\u201d<\/td>\n      <td>5\u201d<\/td>\n      <td>4\u201d<\/td>\n    <\/tr>\n    <tr>\n      <td>-2% (downhill)<\/td>\n      <td>11\u201d<\/td>\n      <td>8\u201d<\/td>\n      <td>7\u201d<\/td>\n      <td>5\u201d<\/td>\n    <\/tr>\n    <tr>\n      <td>-1% (slight downhill)<\/td>\n      <td>12\u201d<\/td>\n      <td>10\u201d<\/td>\n      <td>8\u201d<\/td>\n      <td>7\u201d<\/td>\n    <\/tr>\n    <tr>\n      <td>0% (flat)<\/td>\n      <td>14\u201d<\/td>\n      <td>11\u201d<\/td>\n      <td>9\u201d<\/td>\n      <td>8\u201d<\/td>\n    <\/tr>\n    <tr>\n      <td>+1% (slight uphill)<\/td>\n      <td>15\u201d<\/td>\n      <td>12\u201d<\/td>\n      <td>10\u201d<\/td>\n      <td>9\u201d<\/td>\n    <\/tr>\n    <tr>\n      <td>+2% (uphill)<\/td>\n      <td>16\u201d<\/td>\n      <td>13\u201d<\/td>\n      <td>12\u201d<\/td>\n      <td>10\u201d<\/td>\n    <\/tr>\n    <tr>\n      <td>+3% (steep uphill)<\/td>\n      <td>17\u201d<\/td>\n      <td>15\u201d<\/td>\n      <td>13\u201d<\/td>\n      <td>12\u201d<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>The regression fits are excellent (\\(R^2 = 0.992\\)), confirming that break really is linear in distance.<\/p>\n\n<h2 id=\"key-insights\">Key Insights<\/h2>\n\n<ol>\n  <li>\n    <p><strong>Uphill\/Downhill Slope Requires Adjustment<\/strong><\/p>\n\n    <p>This was actually my initial motivation for the analysis as the videos I saw online didn\u2019t really talk much about how to adjust the Express system for uphill\/downhill slopes. I guess that\u2019s the paywalled version!<\/p>\n\n    <p>What I find is that the viewing distance changes nearly 1 inch per percent of forward slope:<\/p>\n    <ul>\n      <li>Downhill: hold fingers closer (more break)<\/li>\n      <li>Uphill: hold fingers farther (less break)<\/li>\n    <\/ul>\n\n    <p>On its own, not a huge deal, but when you compare a 10 footer with 2% side slope that is 2% uphill vs. 2% downhill, my estimates show about 7 inches of total break difference! If you\u2019re not even trying to move your fingers closer\/farther from your face, you will miss.<\/p>\n  <\/li>\n  <li>\n    <p><strong>The Express System is Excellent<\/strong><\/p>\n\n    <p>All of the physics here validates that the simple fingers approach truly provides a consistent and useful heuristic for estimating total break.<\/p>\n\n    <p>The massive caveat (and reason for all this work), is that calibrating the distance to hold your fingers is really important, and adjusting for uphill\/downhill can make or break you.<\/p>\n  <\/li>\n<\/ol>\n\n<h2 id=\"application\">Application<\/h2>\n\n<p>To use this on the course:<\/p>\n\n<ol>\n  <li>Assess green speed. Ask the pro shop for the Stimp reading, or estimate based on course conditions<\/li>\n  <li>Read the forward slope. Is your putt uphill, downhill, or flat?<\/li>\n  <li>Read the side slope.<\/li>\n  <li>Find your viewing distance. Use the table above for a starting point.<\/li>\n  <li>Hold up fingers. One per percent, at the correct viewing distance.<\/li>\n  <li>Find your aim point.<\/li>\n<\/ol>\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n\n<p>The Aimpoint Express finger-reading system embodies elegant applied physics. The similar-triangle geometry, combined with the linear break-distance relationship, creates a practical tool that scales naturally with slope percentage.<\/p>\n\n<p>The calibration table reveals why green-reading feels so different across course conditions: on fast greens with downhill putts, you need to hold your hand quite close to see the correct break angle. On slower, uphill putts, extend your arm farther.<\/p>\n\n<p>Next time you\u2019re on the practice green, find the Stimp reading and test these viewing distances. I suspect you\u2019ll find they provide an excellent baseline for the Express system\u2014and a deeper appreciation for the physics happening beneath your feet.<\/p>\n\n<hr \/>","author":{"name":"Stephen Lee"},"category":[{"@attributes":{"term":"golf"}},{"@attributes":{"term":"physics"}},{"@attributes":{"term":"golf"}},{"@attributes":{"term":"physics"}},{"@attributes":{"term":"putting"}},{"@attributes":{"term":"aimpoint"}},{"@attributes":{"term":"geometry"}}],"summary":"Introduction"},{"title":"Modeling Aimpoint for Green Reading","link":{"@attributes":{"href":"https:\/\/stephenlee.info\/golf\/physics\/2025\/11\/16\/rederiving-aimpoint.html","rel":"alternate","type":"text\/html","title":"Modeling Aimpoint for Green Reading"}},"published":"2025-11-16T00:00:00-06:00","updated":"2025-11-16T00:00:00-06:00","id":"https:\/\/stephenlee.info\/golf\/physics\/2025\/11\/16\/rederiving-aimpoint","content":"<h1 id=\"the-physics-of-putting\">The Physics of Putting<\/h1>\n\n<h2 id=\"problem\">Problem<\/h2>\n\n<p>Aimpoint Express is a common system for calibrating your feet and fingers to estimate the break of a putt. Tune in to a professional golf tournament and you\u2019re likely to see players doing funny things with their fingers, and awkwardly straddling their line.<\/p>\n\n<p>I played competitive golf for many years, but tended to hit it better tee to green than I could consistently putt. This post is an attempt to better understand the physics of how putts break, and perhaps more importantly, how green speed and uphill\/downhill slopes impact that break.<\/p>\n\n<p>This first part lays out the foundation for a simple model that estimates how far a ball rolls and how much it breaks. The goal isn\u2019t to produce a full dynamics treatment or handle every edge case. Instead, we want something accurate in the practical range where golfers actually need precision: putts of about 5\u201320 feet on slopes of roughly 0\u20133%.<\/p>\n\n<p>We\u2019ll start by recalling a few Newtonian relationships, connect them to the Stimp reading, and show how slope influences both speed and break.<\/p>\n\n<h2 id=\"newtons-laws\">Newton\u2019s Laws<\/h2>\n\n<p>A rolling ball on a green slows down at a roughly constant rate due to rolling friction. Because the speeds and slopes involved are small, this constant-acceleration approximation works well for short putts.<\/p>\n\n<p>Under constant acceleration, there are three relationships we\u2019ll use:<sup id=\"fnref:1\" role=\"doc-noteref\"><a href=\"#fn:1\" class=\"footnote\">1<\/a><\/sup><\/p>\n\n<ol>\n  <li>\n\\[v(t) = v_0 + a t\\]\n  <\/li>\n  <li>\n\\[s(t) = v_0 t + \\frac{1}{2} a t^2\\]\n  <\/li>\n  <li>\n\\[v^2 = v_0^2 + 2 a s\\]\n  <\/li>\n<\/ol>\n\n<p>For putting, the third equation is especially convenient because the ball always ends with \\(v = 0\\). That gives a direct link between the initial speed, the deceleration, and the stopping distance.<\/p>\n\n<hr \/>\n\n<h2 id=\"stimpmeters\">Stimpmeters<\/h2>\n\n<p>A Stimp reading \\(S\\) is the distance (in feet) that a golf ball rolls on a level green after being released from a standard Stimp meter. The USGA-specified Stimp meter is a 30-inch long aluminum bar with a V-groove. A ball is placed in a notch and the bar is slowly raised until the ball releases when the angle reaches approximately 20 degrees.<\/p>\n\n<h3 id=\"exit-velocity\">Exit Velocity<\/h3>\n\n<p>When a golf ball rolls down the Stimp meter ramp without slipping, its acceleration is reduced by rotational inertia. A sliding object on an incline accelerates at \\(g\\sin\\theta\\), but a rolling sphere must also spin up, which \u201ccosts\u201d kinetic energy. For a solid sphere with moment of inertia \\(I = \\frac{2}{5}mR^2\\), this reduces the acceleration by a factor of \\(\\frac{7}{5}\\):<sup id=\"fnref:2\" role=\"doc-noteref\"><a href=\"#fn:2\" class=\"footnote\">2<\/a><\/sup><\/p>\n\n\\[a = \\frac{5g\\sin\\theta}{7}\\]\n\n<p>For the USGA Stimp meter with \\(\\theta = 20\u00b0\\) and \\(g = 32.17\\ \\text{ft\/s}^2\\):<\/p>\n\n\\[a = \\frac{5 \\times 32.17 \\times \\sin(20\u00b0)}{7} \\approx 7.87\\ \\text{ft\/s}^2\\]\n\n<p>The ball rolls down \\(L = 30\\ \\text{in} = 2.5\\ \\text{ft}\\) starting from rest. Using \\(v^2 = v_0^2 + 2as\\) with \\(v_0 = 0\\):<\/p>\n\n\\[v_s = \\sqrt{2aL} = \\sqrt{2 \\times 7.87 \\times 2.5} \\approx 6.27\\ \\text{ft\/s}\\]\n\n<p>This exit velocity is the key to connecting the Stimp reading to green speed.<\/p>\n\n<h3 id=\"frictional-deceleration\">Frictional Deceleration<\/h3>\n\n<p>Using the velocity\u2013position relation with \\(v = 0\\):<\/p>\n\n\\[0 = v_s^2 + 2 a_f S\\]\n\n<p>Solving for the frictional deceleration \\(a_f\\):<sup id=\"fnref:3\" role=\"doc-noteref\"><a href=\"#fn:3\" class=\"footnote\">3<\/a><\/sup><\/p>\n\n\\[a_f = -\\frac{v_s^2}{2 S}\\]\n\n<p>This tells us:<\/p>\n\n<ul>\n  <li>Faster greens (larger Stimp numbers) have <strong>smaller magnitude deceleration<\/strong>.<\/li>\n  <li>Slower greens have <strong>larger deceleration<\/strong>.<\/li>\n<\/ul>\n\n<p>Everything else in this model builds off that simple relationship.<\/p>\n\n<p>For example, on greens that stimp 10, we find that the greens slow the ball down:<\/p>\n\n\\[a_f \\approx -\\frac{6.27^2}{2 \\cdot 10} = -1.97 \\frac{ft}{s^2}\\]\n\n<hr \/>\n\n<h2 id=\"slope-and-speed\">Slope and Speed<\/h2>\n\n<p>Now consider an uphill or downhill slope. On a slope with rise\/run ratio \\(X\\), the component of gravity along the slope direction is \\(g\\sin\\theta\\). For small angles (typical on greens), \\(\\sin\\theta \\approx \\tan\\theta = X\\).<\/p>\n\n<p>Just as with the Stimp meter ramp, rotational inertia reduces the gravitational acceleration by a factor of \\(\\frac{5}{7}\\) for a rolling sphere, giving:<\/p>\n\n\\[a_g \\approx \\frac{5}{7} g X\\]\n\n<p>where:<\/p>\n\n<ul>\n  <li>\\(X\\) is slope expressed as a decimal (e.g., 2% = 0.02, positive for uphill, negative for downhill)<\/li>\n  <li>\n\\[g = -32.17\\ \\mathrm{ft\/s^2}\\]\n  <\/li>\n<\/ul>\n\n<p>Since friction \\(a_f\\) is negative (opposing motion), the total acceleration becomes:<\/p>\n\n\\[a_\\text{eff} = a_f + a_g &lt; 0\\]\n\n<p>More explicitly:<\/p>\n\n<ul>\n  <li>Downhill: \\(X &lt; 0, \\text{which implies } a_g &gt; 0\\). Negative slope causes the ball to lose speed slower i.e. it decreases the magnitude of deceleration.<\/li>\n  <li>Uphill: \\(X &gt; 0, \\text{which implies } a_g &lt; 0\\). Positive slope causes the ball to lose speed faster i.e. it increases the magnitude of deceleration.<\/li>\n<\/ul>\n\n<p>Golfers often describe a slope as \u201cmaking the putt faster or slower.\u201d Mathematically, this is the same as saying that the ball behaves as if the Stimp number changed.<\/p>\n\n<p>Define \\(S_{\\text{eff}}\\) as the \u201ceffective Stimp\u201d on the slope. Since \\(S = -\\frac{v_s^2}{2a_f}\\), the stopping distance is inversely proportional to the magnitude of deceleration:<\/p>\n\n\\[\\frac{S_{\\text{eff}}}{S} = \\frac{a_f}{a_\\text{eff}}\\]\n\n<p>After inserting constants and simplifying, we get a useful approximation:<sup id=\"fnref:4\" role=\"doc-noteref\"><a href=\"#fn:4\" class=\"footnote\">4<\/a><\/sup><\/p>\n\n\\[S_{\\text{eff}} \\approx \\frac{S}{1 + 1.17 X S}\\]\n\n<p>where the coefficient 1.17 comes from \\(\\frac{5}{7} \\cdot \\frac{2g}{v_s^2}\\) with \\(g = 32.17\\ \\text{ft\/s}^2\\) and \\(v_s \\approx 6.27\\ \\text{ft\/s}\\) (the exit velocity from a USGA Stimp meter). The \\(\\frac{5}{7}\\) factor accounts for rotational inertia.<\/p>\n\n<hr \/>\n\n<h2 id=\"slope-and-break\">Slope and Break<\/h2>\n\n<p>The same slope that changes speed can also produce lateral acceleration when the slope tilts sideways relative to the target line.<\/p>\n\n<p>Let \\(X_s\\) be the side-slope (in decimal form). The lateral component of gravitational acceleration is:<\/p>\n\n<p><strong>Note:<\/strong> For now, we ignore the effect of friction on lateral motion. This model treats lateral and forward motion independently\u2014gravity accelerates the ball laterally while friction only decelerates it forward. We\u2019ll address this simplification later.<\/p>\n\n\\[a_\\text{lat} = g X_s\\]\n\n<p><strong>Important:<\/strong> We want to calculate the lateral displacement <strong>at the hole<\/strong> (distance \\(D\\)), not at the final stopping point. The golfer needs to know how much the ball breaks by the time it reaches the cup, even though it has enough speed to roll past.<\/p>\n\n<h3 id=\"break-at-the-hole\">Break at the Hole<\/h3>\n\n<p>To compute the break at distance \\(D\\), we need to find how long it takes the ball to reach the hole when it has enough speed to roll out a total distance \\(L = D + R\\), where:<\/p>\n\n<ul>\n  <li>\\(D\\) = distance to the hole<\/li>\n  <li>\\(R\\) = desired rollout past the hole (e.g. 1 foot or so)<\/li>\n<\/ul>\n\n<p><strong>Step 1:<\/strong> The initial speed needed to roll total distance \\(L = D + R\\) is:<\/p>\n\n\\[v_0 = \\sqrt{2 a_\\text{eff} (D+R)}\\]\n\n<p><strong>Step 2:<\/strong> The time to reach the hole at distance \\(D\\) (not the stopping time!) satisfies:<\/p>\n\n\\[D = v_0 t_D - \\frac{1}{2}a_\\text{eff} t_D^2\\]\n\n<p>Solving this quadratic gives:<\/p>\n\n\\[t_D = \\frac{v_0 - \\sqrt{v_0^2 - 2 a_\\text{eff} D}}{a_\\text{eff}}\\]\n\n<p>Substituting \\(v_0^2 = 2  a_\\text{eff} (D+R)\\):<\/p>\n\n\\[t_D = \\frac{\\sqrt{2a_\\text{eff}(D+R)} - \\sqrt{2a_\\text{eff} R}}{a_\\text{eff}}\n    = \\sqrt{\\frac{2}{a_\\text{eff}}}\\left(\\sqrt{D+R} - \\sqrt{R}\\right)\\]\n\n<p><strong>Step 3:<\/strong> Lateral displacement at the hole becomes:<\/p>\n\n\\[x_\\text{break} = \\frac{1}{2} a_\\text{lat} t_D^2\n               = \\frac{g X_s}{a_\\text{eff}}\\left(\\sqrt{D+R} - \\sqrt{R}\\right)^2\\]\n\n<p>Now substitute the physical relationship for effective deceleration. The ball experiences both friction and gravity along the forward direction:<\/p>\n\n\\[a_\\text{eff} = a_f + a_g \\approx -( \\frac{19.7}{S} + 23X)\\]\n\n<p>where \\(X\\) is the forward slope (positive uphill, negative downhill).<\/p>\n\n<p>Substituting everything in:<\/p>\n\n\\[x_\\text{break} \\approx \\frac{g X_s S}{19.7 + 23 S X}\\left(\\sqrt{D+R} - \\sqrt{R}\\right)^2\\]\n\n<p>This is now the break in feet. We simply multiply by 12 to get break in inches:<\/p>\n\n\\[x_\\text{break} \\approx \\frac{12 g X_s S}{19.7 + 23 S X}\\left(\\sqrt{D+R} - \\sqrt{R}\\right)^2\\]\n\n<p>This makes the dependence on base Stimp and forward slope explicit without needing to first calculate effective Stimp.<\/p>\n\n<h3 id=\"friction-damping-of-break\">Friction Damping of Break<\/h3>\n\n<p>This model treats lateral and forward motion independently\u2014gravity accelerates the ball laterally while friction only decelerates it forward. In reality, friction opposes the <em>total<\/em> velocity vector (the vector sum of forward and lateral components), which reduces lateral deflection somewhat. In other words, the problem really needs to be modeled with velocity as a 3D vector that changes over time, and friction would produce an acceleration that opposes that motion.<\/p>\n\n<p>But our goal is a useful model that generates accurate heuristics for players on the course. A simple correction is to multiply the break by some damping factor. We\u2019ll use \\(f_\\text{damp} \\approx \\frac{5}{7}\\), analogous to how rotational inertia reduces forward acceleration. While not rigorously derived from the coupled dynamics, this heuristic gives a practical first-order correction:<\/p>\n\n\\[x_\\text{break,damped} \\approx \\frac{5}{7} \\left(\\frac{12 g X_s S}{19.7 + 23 S X} \\right) \\left(\\sqrt{D+R} - \\sqrt{R}\\right)^2\\]\n\n<p>This captures the essential behavior of a breaking putt under the assumptions of constant friction and small slopes.<\/p>\n\n<h2 id=\"results\">Results<\/h2>\n\n<p>How does this model perform?<\/p>\n\n<h3 id=\"effective-stimp\">Effective Stimp<\/h3>\n\n<p>First, we\u2019ll analyze a table of effective Stimps on different slopes:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th style=\"text-align: center\">Forward Slope (%)<\/th>\n      <th style=\"text-align: center\">S = 8<\/th>\n      <th style=\"text-align: center\">S = 9<\/th>\n      <th style=\"text-align: center\">S = 10<\/th>\n      <th style=\"text-align: center\">S = 11<\/th>\n      <th style=\"text-align: center\">S = 12<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td style=\"text-align: center\">+3<\/td>\n      <td style=\"text-align: center\">6.2<\/td>\n      <td style=\"text-align: center\">6.8<\/td>\n      <td style=\"text-align: center\">7.4<\/td>\n      <td style=\"text-align: center\">7.9<\/td>\n      <td style=\"text-align: center\">8.4<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">+2<\/td>\n      <td style=\"text-align: center\">6.7<\/td>\n      <td style=\"text-align: center\">7.4<\/td>\n      <td style=\"text-align: center\">8.1<\/td>\n      <td style=\"text-align: center\">8.7<\/td>\n      <td style=\"text-align: center\">9.4<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">+1<\/td>\n      <td style=\"text-align: center\">7.3<\/td>\n      <td style=\"text-align: center\">8.1<\/td>\n      <td style=\"text-align: center\">9.0<\/td>\n      <td style=\"text-align: center\">9.7<\/td>\n      <td style=\"text-align: center\">10.5<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">0<\/td>\n      <td style=\"text-align: center\">8.0<\/td>\n      <td style=\"text-align: center\">9.0<\/td>\n      <td style=\"text-align: center\">10.0<\/td>\n      <td style=\"text-align: center\">11.0<\/td>\n      <td style=\"text-align: center\">12.0<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-1<\/td>\n      <td style=\"text-align: center\">8.8<\/td>\n      <td style=\"text-align: center\">10.1<\/td>\n      <td style=\"text-align: center\">11.3<\/td>\n      <td style=\"text-align: center\">12.6<\/td>\n      <td style=\"text-align: center\">14.0<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-2<\/td>\n      <td style=\"text-align: center\">9.8<\/td>\n      <td style=\"text-align: center\">11.4<\/td>\n      <td style=\"text-align: center\">13.1<\/td>\n      <td style=\"text-align: center\">14.8<\/td>\n      <td style=\"text-align: center\">16.7<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-3<\/td>\n      <td style=\"text-align: center\">11.1<\/td>\n      <td style=\"text-align: center\">13.2<\/td>\n      <td style=\"text-align: center\">15.4<\/td>\n      <td style=\"text-align: center\">17.9<\/td>\n      <td style=\"text-align: center\">20.7<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>This is very much in line with what old Aimpoint charts presented. You can still find those floating around online if you look.<\/p>\n\n<h3 id=\"1-side-slope\">1% side slope<\/h3>\n\n<p>To evaluate the total break, we need to pick a green speed and a side slope. For greens that run 10 on the Stimp, this model produces the following estimates for total break.<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th style=\"text-align: center\">Forward Slope (%)<\/th>\n      <th style=\"text-align: center\">D = 3<\/th>\n      <th style=\"text-align: center\">D = 5<\/th>\n      <th style=\"text-align: center\">D = 10<\/th>\n      <th style=\"text-align: center\">D = 15<\/th>\n      <th style=\"text-align: center\">D = 20<\/th>\n      <th style=\"text-align: center\">D = 30<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td style=\"text-align: center\">+3<\/td>\n      <td style=\"text-align: center\">1.0<\/td>\n      <td style=\"text-align: center\">2.2<\/td>\n      <td style=\"text-align: center\">5.6<\/td>\n      <td style=\"text-align: center\">9.3<\/td>\n      <td style=\"text-align: center\">13.3<\/td>\n      <td style=\"text-align: center\">21.6<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">+2<\/td>\n      <td style=\"text-align: center\">1.1<\/td>\n      <td style=\"text-align: center\">2.4<\/td>\n      <td style=\"text-align: center\">6.1<\/td>\n      <td style=\"text-align: center\">10.2<\/td>\n      <td style=\"text-align: center\">14.6<\/td>\n      <td style=\"text-align: center\">23.7<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">+1<\/td>\n      <td style=\"text-align: center\">1.3<\/td>\n      <td style=\"text-align: center\">2.6<\/td>\n      <td style=\"text-align: center\">6.7<\/td>\n      <td style=\"text-align: center\">11.3<\/td>\n      <td style=\"text-align: center\">16.1<\/td>\n      <td style=\"text-align: center\">26.2<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">0<\/td>\n      <td style=\"text-align: center\">1.4<\/td>\n      <td style=\"text-align: center\">2.9<\/td>\n      <td style=\"text-align: center\">7.5<\/td>\n      <td style=\"text-align: center\">12.6<\/td>\n      <td style=\"text-align: center\">18.0<\/td>\n      <td style=\"text-align: center\">29.2<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-1<\/td>\n      <td style=\"text-align: center\">1.6<\/td>\n      <td style=\"text-align: center\">3.3<\/td>\n      <td style=\"text-align: center\">8.5<\/td>\n      <td style=\"text-align: center\">14.3<\/td>\n      <td style=\"text-align: center\">20.3<\/td>\n      <td style=\"text-align: center\">33.1<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-2<\/td>\n      <td style=\"text-align: center\">1.8<\/td>\n      <td style=\"text-align: center\">3.8<\/td>\n      <td style=\"text-align: center\">9.8<\/td>\n      <td style=\"text-align: center\">16.4<\/td>\n      <td style=\"text-align: center\">23.4<\/td>\n      <td style=\"text-align: center\">38.1<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-3<\/td>\n      <td style=\"text-align: center\">2.2<\/td>\n      <td style=\"text-align: center\">4.5<\/td>\n      <td style=\"text-align: center\">11.6<\/td>\n      <td style=\"text-align: center\">19.4<\/td>\n      <td style=\"text-align: center\">27.6<\/td>\n      <td style=\"text-align: center\">44.9<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p><strong>Note<\/strong>, these values can be interpreted as total break. But remember, since the cup is just over 4 inches in diameter, the breaks of 1 that you see will still be played inside the edge of the cup.<\/p>\n\n<h3 id=\"2-side-slope\">2% side slope<\/h3>\n\n<table>\n  <thead>\n    <tr>\n      <th style=\"text-align: center\">Forward Slope (%)<\/th>\n      <th style=\"text-align: center\">D = 3<\/th>\n      <th style=\"text-align: center\">D = 5<\/th>\n      <th style=\"text-align: center\">D = 10<\/th>\n      <th style=\"text-align: center\">D = 15<\/th>\n      <th style=\"text-align: center\">D = 20<\/th>\n      <th style=\"text-align: center\">D = 30<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td style=\"text-align: center\">+3<\/td>\n      <td style=\"text-align: center\">2.1<\/td>\n      <td style=\"text-align: center\">4.4<\/td>\n      <td style=\"text-align: center\">11.1<\/td>\n      <td style=\"text-align: center\">18.7<\/td>\n      <td style=\"text-align: center\">26.6<\/td>\n      <td style=\"text-align: center\">43.3<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">+2<\/td>\n      <td style=\"text-align: center\">2.3<\/td>\n      <td style=\"text-align: center\">4.8<\/td>\n      <td style=\"text-align: center\">12.2<\/td>\n      <td style=\"text-align: center\">20.4<\/td>\n      <td style=\"text-align: center\">29.1<\/td>\n      <td style=\"text-align: center\">47.4<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">+1<\/td>\n      <td style=\"text-align: center\">2.5<\/td>\n      <td style=\"text-align: center\">5.3<\/td>\n      <td style=\"text-align: center\">13.5<\/td>\n      <td style=\"text-align: center\">22.6<\/td>\n      <td style=\"text-align: center\">32.2<\/td>\n      <td style=\"text-align: center\">52.3<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">0<\/td>\n      <td style=\"text-align: center\">2.8<\/td>\n      <td style=\"text-align: center\">5.9<\/td>\n      <td style=\"text-align: center\">15.0<\/td>\n      <td style=\"text-align: center\">25.2<\/td>\n      <td style=\"text-align: center\">35.9<\/td>\n      <td style=\"text-align: center\">58.4<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-1<\/td>\n      <td style=\"text-align: center\">3.2<\/td>\n      <td style=\"text-align: center\">6.7<\/td>\n      <td style=\"text-align: center\">17.0<\/td>\n      <td style=\"text-align: center\">28.5<\/td>\n      <td style=\"text-align: center\">40.7<\/td>\n      <td style=\"text-align: center\">66.1<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-2<\/td>\n      <td style=\"text-align: center\">3.7<\/td>\n      <td style=\"text-align: center\">7.7<\/td>\n      <td style=\"text-align: center\">19.6<\/td>\n      <td style=\"text-align: center\">32.9<\/td>\n      <td style=\"text-align: center\">46.9<\/td>\n      <td style=\"text-align: center\">76.2<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-3<\/td>\n      <td style=\"text-align: center\">4.3<\/td>\n      <td style=\"text-align: center\">9.1<\/td>\n      <td style=\"text-align: center\">23.1<\/td>\n      <td style=\"text-align: center\">38.8<\/td>\n      <td style=\"text-align: center\">55.3<\/td>\n      <td style=\"text-align: center\">89.9<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<h3 id=\"3-side-slope\">3% side slope<\/h3>\n\n<table>\n  <thead>\n    <tr>\n      <th style=\"text-align: center\">Forward Slope (%)<\/th>\n      <th style=\"text-align: center\">D = 3<\/th>\n      <th style=\"text-align: center\">D = 5<\/th>\n      <th style=\"text-align: center\">D = 10<\/th>\n      <th style=\"text-align: center\">D = 15<\/th>\n      <th style=\"text-align: center\">D = 20<\/th>\n      <th style=\"text-align: center\">D = 30<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td style=\"text-align: center\">+3<\/td>\n      <td style=\"text-align: center\">3.1<\/td>\n      <td style=\"text-align: center\">6.5<\/td>\n      <td style=\"text-align: center\">16.7<\/td>\n      <td style=\"text-align: center\">28.0<\/td>\n      <td style=\"text-align: center\">39.9<\/td>\n      <td style=\"text-align: center\">64.9<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">+2<\/td>\n      <td style=\"text-align: center\">3.4<\/td>\n      <td style=\"text-align: center\">7.2<\/td>\n      <td style=\"text-align: center\">18.3<\/td>\n      <td style=\"text-align: center\">30.6<\/td>\n      <td style=\"text-align: center\">43.7<\/td>\n      <td style=\"text-align: center\">71.0<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">+1<\/td>\n      <td style=\"text-align: center\">3.8<\/td>\n      <td style=\"text-align: center\">7.9<\/td>\n      <td style=\"text-align: center\">20.2<\/td>\n      <td style=\"text-align: center\">33.8<\/td>\n      <td style=\"text-align: center\">48.3<\/td>\n      <td style=\"text-align: center\">78.5<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">0<\/td>\n      <td style=\"text-align: center\">4.2<\/td>\n      <td style=\"text-align: center\">8.8<\/td>\n      <td style=\"text-align: center\">22.5<\/td>\n      <td style=\"text-align: center\">37.8<\/td>\n      <td style=\"text-align: center\">53.9<\/td>\n      <td style=\"text-align: center\">87.6<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-1<\/td>\n      <td style=\"text-align: center\">4.8<\/td>\n      <td style=\"text-align: center\">10.0<\/td>\n      <td style=\"text-align: center\">25.5<\/td>\n      <td style=\"text-align: center\">42.8<\/td>\n      <td style=\"text-align: center\">61.0<\/td>\n      <td style=\"text-align: center\">99.2<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-2<\/td>\n      <td style=\"text-align: center\">5.5<\/td>\n      <td style=\"text-align: center\">11.5<\/td>\n      <td style=\"text-align: center\">29.4<\/td>\n      <td style=\"text-align: center\">49.3<\/td>\n      <td style=\"text-align: center\">70.3<\/td>\n      <td style=\"text-align: center\">114.3<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: center\">-3<\/td>\n      <td style=\"text-align: center\">6.5<\/td>\n      <td style=\"text-align: center\">13.6<\/td>\n      <td style=\"text-align: center\">34.7<\/td>\n      <td style=\"text-align: center\">58.2<\/td>\n      <td style=\"text-align: center\">82.9<\/td>\n      <td style=\"text-align: center\">134.8<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<hr \/>\n\n<h2 id=\"summary\">Summary<\/h2>\n\n<p>These values are very much in line with what official aimport charts, and newer Aimpoint Express generate.<\/p>\n\n<p>While I don\u2019t personally plan to, or even recommend, using charts like this on the course, the excerise of modeling this out was instructive to conclude:<\/p>\n\n<ol>\n  <li>\n    <p><strong>Faster greens are much more demanding on speed control<\/strong>. Uphill putts are relatively slower, and downhill putts much faster than the same grade slope on slower greens. In other words, the faster the greens, the smaller margin of error you have in every way speed wise. I didn\u2019t show the calculation, but if you examine the relative increase\/decrease in effective Stimp compared to true Stimp, the faster greens are more extreme percent changes both up and down hill.<\/p>\n  <\/li>\n  <li>\n    <p><strong>Break increases (or decreases) porportional to the increase (or decrease) in speed<\/strong>. If you have a fast downhill putt, it may act like a green that is nearly 2x as fast! But importantly, it will break 2x as much as your read would tell you if you only look at side slope. The reverse is true with uphill putts.<\/p>\n  <\/li>\n  <li>\n    <p><strong>Aimpoint Express is really a great system<\/strong>. But spend the time to calibrate your feelings with your feet, and give as much attention to the uphill\/downhill slope as you do the side slope.<\/p>\n  <\/li>\n<\/ol>\n\n<h2 id=\"appendix\">Appendix<\/h2>\n\n<p>This appendix provides step-by-step derivations for the key equations used in the main text.<\/p>\n\n<h3 id=\"appendix-kinematics\">A0. Newton\u2019s Laws<\/h3>\n\n<p>We start with the fundamental definitions of velocity and acceleration as derivatives:<\/p>\n\n\\[v(t) = \\frac{ds}{dt} \\quad \\text{and} \\quad a(t) = \\frac{dv}{dt}\\]\n\n<p>For constant acceleration, \\(a(t) = a\\) (a constant value).<\/p>\n\n<p><strong>Equation 1: \\(v(t) = v_0 + at\\)<\/strong><\/p>\n\n<p>Starting with the definition of acceleration:<\/p>\n\n\\[\\frac{dv}{dt} = a\\]\n\n<p>Integrate both sides with respect to time:<\/p>\n\n\\[\\int dv = \\int a \\, dt\\]\n\n\\[v = at + C\\]\n\n<p>Using the initial condition \\(v(0) = v_0\\), we find \\(C = v_0\\):<\/p>\n\n\\[v(t) = v_0 + at\\]\n\n<p><strong>Equation 2: \\(s(t) = v_0 t + \\frac{1}{2}at^2\\)<\/strong><\/p>\n\n<p>Starting with the definition of velocity and substituting our result from Equation 1:<\/p>\n\n\\[\\frac{ds}{dt} = v(t) = v_0 + at\\]\n\n<p>Integrate both sides with respect to time:<\/p>\n\n\\[\\int ds = \\int (v_0 + at) \\, dt\\]\n\n\\[s = v_0 t + \\frac{1}{2}at^2 + C\\]\n\n<p>Using the initial condition \\(s(0) = 0\\) (measuring position from the starting point), we find \\(C = 0\\):<\/p>\n\n\\[s(t) = v_0 t + \\frac{1}{2}at^2\\]\n\n<p><strong>Equation 3: \\(v^2 = v_0^2 + 2as\\)<\/strong><\/p>\n\n<p>We can derive this by eliminating time from Equations 1 and 2.<\/p>\n\n<p>From Equation 1, solve for \\(t\\):<\/p>\n\n\\[t = \\frac{v - v_0}{a}\\]\n\n<p>Substitute into Equation 2:<\/p>\n\n\\[s = v_0 \\left(\\frac{v - v_0}{a}\\right) + \\frac{1}{2}a\\left(\\frac{v - v_0}{a}\\right)^2\\]\n\n\\[s = \\frac{v_0(v - v_0)}{a} + \\frac{1}{2a}(v - v_0)^2\\]\n\n\\[s = \\frac{v_0 v - v_0^2}{a} + \\frac{v^2 - 2vv_0 + v_0^2}{2a}\\]\n\n<p>Multiply through by \\(2a\\):<\/p>\n\n\\[2as = 2v_0 v - 2v_0^2 + v^2 - 2vv_0 + v_0^2\\]\n\n\\[2as = v^2 - v_0^2\\]\n\n<p>Rearranging:<\/p>\n\n\\[v^2 = v_0^2 + 2as\\]\n\n<p><strong>Alternative derivation using the chain rule:<\/strong><\/p>\n\n<p>We can also derive Equation 3 more directly using the chain rule. Starting with:<\/p>\n\n\\[a = \\frac{dv}{dt} = \\frac{dv}{ds} \\cdot \\frac{ds}{dt} = v \\frac{dv}{ds}\\]\n\n<p>Rearrange and integrate:<\/p>\n\n\\[a \\, ds = v \\, dv\\]\n\n\\[\\int_0^s a \\, ds = \\int_{v_0}^v v \\, dv\\]\n\n<p>For constant \\(a\\):<\/p>\n\n\\[as = \\frac{1}{2}v^2 - \\frac{1}{2}v_0^2\\]\n\n\\[v^2 = v_0^2 + 2as\\]\n\n<h3 id=\"appendix-stimp\">A1. Stimpmeter Exit Velocity<\/h3>\n\n<p>The USGA Stimp meter is designed as a 30-inch (2.5 ft) inclined ramp with a V-groove. The ball is released from a notch when the angle reaches \\(\\theta \\approx 20\u00b0\\).<\/p>\n\n<p>When a ball rolls down an incline without slipping, it experiences:<\/p>\n<ul>\n  <li>Gravitational component along the slope: \\(g\\sin\\theta\\)<\/li>\n  <li>Rotational inertia effects that reduce the effective acceleration<\/li>\n<\/ul>\n\n<p>For a sphere rolling without slipping down an incline, the acceleration is:<\/p>\n\n\\[a = \\frac{g\\sin\\theta}{1 + \\frac{I}{mR^2}}\\]\n\n<p>where \\(I = \\frac{2}{5}mR^2\\) for a solid sphere. This gives:<\/p>\n\n\\[a = \\frac{g\\sin\\theta}{1 + \\frac{2}{5}} = \\frac{5g\\sin\\theta}{7}\\]\n\n<p>For \\(\\theta = 20\u00b0\\) and \\(g = 32.17\\ \\text{ft\/s}^2\\):<\/p>\n\n\\[a = \\frac{5 \\times 32.17 \\times \\sin(20\u00b0)}{7} \\approx \\frac{5 \\times 32.17 \\times 0.342}{7} \\approx 7.87\\ \\text{ft\/s}^2\\]\n\n<p>The ball rolls down a distance \\(L = 2.5\\ \\text{ft}\\) (30 inches), starting from rest. Using \\(v^2 = v_0^2 + 2as\\) with \\(v_0 = 0\\):<\/p>\n\n\\[v_s^2 = 2 \\times 7.87 \\times 2.5 \\approx 39.35\\]\n\n\\[v_s \\approx 6.27\\ \\text{ft\/s}\\]\n\n<p>In practice, the exact release velocity depends on:<\/p>\n<ul>\n  <li>The precise release angle (which varies slightly with operator technique)<\/li>\n  <li>Any sliding that occurs before pure rolling begins<\/li>\n  <li>The coefficient of friction in the V-groove<\/li>\n<\/ul>\n\n<p>For most calculations, \\(v_s \\approx 6.0\\ \\text{ft\/s}\\) is commonly used as a round approximation.<\/p>\n\n<h3 id=\"appendix-friction\">A2. Frictional Deceleration<\/h3>\n\n<p>Starting with the kinematic equation relating velocity, acceleration, and distance:<\/p>\n\n\\[v^2 = v_0^2 + 2as\\]\n\n<p>For a ball released from a Stimp meter:<\/p>\n<ul>\n  <li>Initial velocity: \\(v_0 = v_s\\) (the known Stimp meter release velocity)<\/li>\n  <li>Final velocity: \\(v = 0\\) (ball comes to rest)<\/li>\n  <li>Distance traveled: \\(s = S\\) (the Stimp reading)<\/li>\n  <li>Acceleration: \\(a = a_f\\) (the frictional deceleration we want to find)<\/li>\n<\/ul>\n\n<p>Substituting these values:<\/p>\n\n\\[0^2 = v_s^2 + 2 a_f S\\]\n\n\\[0 = v_s^2 + 2 a_f S\\]\n\n<p>Solving for \\(a_f\\):<\/p>\n\n\\[-2 a_f S = v_s^2\\]\n\n\\[a_f = -\\frac{v_s^2}{2S}\\]\n\n<p>The negative sign indicates deceleration (acceleration opposite to the direction of motion).<\/p>\n\n<h3 id=\"appendix-effective-stimp\">A3. Effective Stimp<\/h3>\n\n<p>When the green has a slope \\(X\\) (expressed as a decimal), gravity contributes an additional acceleration component. Just as with the Stimp meter ramp, rotational inertia reduces this gravitational component by \\(\\frac{5}{7}\\):<\/p>\n\n\\[a_g \\approx \\frac{5}{7} g X\\]\n\n<p>where \\(g = 32.17\\ \\text{ft\/s}^2\\) is gravitational acceleration.<\/p>\n\n<p>The effective acceleration becomes:<\/p>\n\n\\[a_{\\text{eff}} = a_f + a_g\\]\n\n<p>where \\(a_f &lt; 0\\) (friction opposes motion) and \\(a_g = \\frac{5}{7}gX\\) (positive for downhill, negative for uphill).<\/p>\n\n<p>The effective Stimp reading \\(S_{\\text{eff}}\\) is the distance a ball would roll with this modified acceleration. Using the same kinematic relationship:<\/p>\n\n\\[0 = v_s^2 + 2 a_{\\text{eff}} S_{\\text{eff}}\\]\n\n\\[S_{\\text{eff}} = -\\frac{v_s^2}{2 a_{\\text{eff}}}\\]\n\n<p>Taking the ratio with the level-green Stimp:<\/p>\n\n\\[\\frac{S_{\\text{eff}}}{S} = \\frac{-\\frac{v_s^2}{2 a_{\\text{eff}}}}{-\\frac{v_s^2}{2 a_f}} = \\frac{a_f}{a_{\\text{eff}}} = \\frac{a_f}{a_f + \\frac{5}{7}gX}\\]\n\n<p>For a standard Stimp meter (as derived in Appendix A1), the release velocity is \\(v_s \\approx 6.27\\ \\text{ft\/s}\\) and we can express \\(a_f \\approx -\\frac{19.7}{S}\\)<\/p>\n\n\\[\\frac{S_{\\text{eff}}}{S} = \\frac{a_f}{a_f + \\frac{5}{7}gX} = \\frac{1}{1 + \\frac{5}{7} \\cdot 1.64 X S} = \\frac{1}{1 + 1.17 X S}\\]\n\n<p>Therefore:<\/p>\n\n\\[S_{\\text{eff}} \\approx \\frac{S}{1 + 1.17 X S}\\]\n\n<hr \/>\n<div class=\"footnotes\" role=\"doc-endnotes\">\n  <ol>\n    <li id=\"fn:1\" role=\"doc-endnote\">\n      <p>See <a href=\"#appendix-kinematics\">Appendix A0<\/a> for the full derivation from calculus.\u00a0<a href=\"#fnref:1\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<\/a><\/p>\n    <\/li>\n    <li id=\"fn:2\" role=\"doc-endnote\">\n      <p>See <a href=\"#appendix-stimp\">Appendix A1<\/a> for the calculation from USGA Stimp meter geometry.\u00a0<a href=\"#fnref:2\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<\/a><\/p>\n    <\/li>\n    <li id=\"fn:3\" role=\"doc-endnote\">\n      <p>See <a href=\"#appendix-friction\">Appendix A2<\/a> for the full derivation.\u00a0<a href=\"#fnref:3\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<\/a><\/p>\n    <\/li>\n    <li id=\"fn:4\" role=\"doc-endnote\">\n      <p>See <a href=\"#appendix-effective-stimp\">Appendix A3<\/a> for the full derivation.\u00a0<a href=\"#fnref:4\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<\/a><\/p>\n    <\/li>\n  <\/ol>\n<\/div>","author":{"name":"Stephen Lee"},"category":[{"@attributes":{"term":"golf"}},{"@attributes":{"term":"physics"}},{"@attributes":{"term":"golf"}},{"@attributes":{"term":"physics"}}],"summary":"The Physics of Putting"},{"title":"Networks (Part II) - Navigation","link":{"@attributes":{"href":"https:\/\/stephenlee.info\/networks\/2021\/08\/02\/networks-navigation.html","rel":"alternate","type":"text\/html","title":"Networks (Part II) - Navigation"}},"published":"2021-08-02T00:00:00-05:00","updated":"2021-08-02T00:00:00-05:00","id":"https:\/\/stephenlee.info\/networks\/2021\/08\/02\/networks-navigation","content":"<p>Note, this is a cross post from an older blog, Sparking Correlation, which I no longer use.<\/p>\n\n<h2 id=\"audience\">Audience<\/h2>\n\n<p>This is part II in a series about making economic inferences on network structures. The notation is covered in <a href=\"\/networks\/2021\/07\/14\/networks-notation.html\">part I<\/a>.<\/p>\n\n<h2 id=\"overview\">Overview<\/h2>\n\n<p>In the previous post I described the basic notations for representing network graphs. Here, I will introduce some definitions that relate to navigating in a graph. This is a key building block for more complicated analyses in a network.<\/p>\n\n<h2 id=\"definitions\">Definitions<\/h2>\n\n<p>Consider the following network graph.<\/p>\n\n<p><img src=\"\/assets\/images\/networks\/network-simple.svg\" alt=\"scatter\" width=\"150\" \/><\/p>\n\n<p>The figure above shows an undirected network graph with four (4) nodes and three unweighted edges. We can represent this graph, \\(g\\), in matrix form as follows:<\/p>\n\n\\[g = \\begin{bmatrix}\n0 &amp; 1 &amp; 0 &amp; 1 \\\\\n1 &amp; 0 &amp; 1 &amp; 0 \\\\\n0 &amp; 1 &amp; 0 &amp; 0 \\\\ \n1 &amp; 0 &amp; 0 &amp; 0\n\\end{bmatrix}\\]\n\n<p>Note, this is illustrative to provide a concrete example to reference. All the definitions below apply to both weighted and unweighted, directed and undirected graphs.<\/p>\n\n<h3 id=\"paths\">Paths<\/h3>\n\n<p>A path from node \\(i\\) to node \\(j\\) in graph \\(g\\) is a sequence that begins at node \\(i\\) and follows available edges until arriving at node \\(j\\).<\/p>\n\n<p>Formally, a <strong>path<\/strong> in network \\(g\\) between nodes \\(i\\) and \\(j\\) is a sequence of edges \\((n_1, n_2) \\rightarrow (n_2, n_3) \\rightarrow ... \\rightarrow (n_{K-1}, n_K)\\) where each edge \\((n_{k-1}, n_k) \\in g\\), \\(n_1 = i\\) and \\(n_K = j\\), and each node \\(n_1, ..., n_K\\) are distinct. Note that the destination node along one edge becomes the starting node for the next edge.<\/p>\n\n<p>Using the graph in the figure above, there is only one possible path from node \\(1\\) to node \\(3\\), namely \\(\\{(1, 2) \\rightarrow (2, 3)\\}\\).<\/p>\n\n<h3 id=\"walk\">Walk<\/h3>\n\n<p>A <strong>walk<\/strong> is a path that doesn\u2019t require distinct nodes i.e. an edge can lead to a node that has already been visited. In this sense, a walk will, in general, be less restrictive.<\/p>\n\n<h3 id=\"cycles\">Cycles<\/h3>\n\n<p>A <strong>cycle<\/strong> is a walk that starts and ends at the same node without visiting any other node more than once. In the definition of path above, we simply let \\(n_1 = n_K = i = j\\).<\/p>\n\n<h3 id=\"geodesic\">Geodesic<\/h3>\n\n<p>A <strong>geodesic<\/strong> between nodes \\(i\\) and \\(j\\) is the shortest path between those nodes.<\/p>\n\n<h3 id=\"degree\">Degree<\/h3>\n\n<p>The <strong>degree<\/strong> of a node is the number of links that involve the node. For directed graphs, this can be referenced as an in-degree and an out-degree, depending on if the edge ends with or starts from that node.<\/p>\n\n<p>In our example above, nodes \\(1\\) and \\(2\\) both have degree two (2), while nodes \\(3\\) and \\(4\\) have degree one (1).<\/p>\n\n<h3 id=\"component\">Component<\/h3>\n\n<p>Finally, what if there is a node \\(j\\) that cannot be reached after starting from some other node \\(i\\)? In this case, we say that those nodes are in separate components.<\/p>\n\n<p>More formally, a given network \\(g\\) is <strong>connected<\/strong> if there exists a path between any two nodes i.e. you can start at any node in the network and find a path to reach any other node in the network.<\/p>\n\n<p>Similarly, a <strong>component<\/strong> of a network \\(g\\) is a subnetwork \\(g' \\subseteq g\\) where 1) \\(g'\\) is connected and 2) if a node \\(i\\) is in \\(g'\\) and the edge \\((i, j) \\in g\\) (i.e. the edge exists in the larger graph) then the node \\(j\\) and edge \\((i, j)\\) must both also be in \\(g'\\). In other words, a component is a maximally connected subgraph. The graph below shows a network with two connected components.<\/p>\n\n<p><img src=\"\/assets\/images\/networks\/network-component.svg\" alt=\"scatter\" width=\"150\" \/><\/p>\n\n<h3 id=\"conclusion\">Conclusion<\/h3>\n\n<p>This post focused on definitions that relate to navigating in a network i.e. how to think about moving from one node to another.<\/p>\n\n<p>One very natural extension are algorithms for actually navigating these graphs. This includes things like depth-first and breadth-first searches, among other. I suspect I\u2019ll make a post about these at some point, but until then, I very much recommend <a href=\"http:\/\/algorithmics.lsi.upc.edu\/docs\/Dasgupta-Papadimitriou-Vazirani.pdf\">this textbook<\/a>, which is currently available for free as a PDF online.<\/p>\n\n<h2 id=\"resources\">Resources<\/h2>\n<ul>\n  <li>\u201cSocial and Economic Networks\u201d by M. O. Jackson<\/li>\n  <li>\u201cAlgorithms\u201d by S. Dasgupta, C. H. Papadimitriou, and U. V. Vazirani<\/li>\n<\/ul>","author":{"name":"Stephen Lee"},"category":[{"@attributes":{"term":"Networks"}},{"@attributes":{"term":"Networks"}}],"summary":"Note, this is a cross post from an older blog, Sparking Correlation, which I no longer use."},{"title":"Networks (Part I) - Notation","link":{"@attributes":{"href":"https:\/\/stephenlee.info\/networks\/2021\/07\/14\/networks-notation.html","rel":"alternate","type":"text\/html","title":"Networks (Part I) - Notation"}},"published":"2021-07-14T00:00:00-05:00","updated":"2021-07-14T00:00:00-05:00","id":"https:\/\/stephenlee.info\/networks\/2021\/07\/14\/networks-notation","content":"<p>Note, this is a cross post from an older blog, Sparking Correlation, which I no longer use.<\/p>\n\n<h2 id=\"audience\">Audience<\/h2>\n\n<p>I assume you know what a network is, some areas where they appear (e.g. social media connection graphs, airline routes, supply chain logistics, etc.), and are familiar with or curious about formalizing these relationships mathematically.<\/p>\n\n<p>Consider this post more of a \u201ccheatsheet\u201d rather than a tutorial. This draws heavily from the textbook \u201cSocial and Economic Networks\u201d by Matthew O. Jackson, although the notation is fairly standard and similar to what you\u2019d see in a book on algorithms.<\/p>\n\n<h2 id=\"overview\">Overview<\/h2>\n\n<p>Causal inference on network structures is notoriously difficult. This is due (at least in part) to the complicated web of interactions, and the resulting spillovers (i.e. externalities) violate assumptions for the \u201cpotential outcomes\u201d approach to inference (<a href=\"\/potential%20outcomes\/2021\/07\/13\/what-is-potential-outcomes.html\">click for more<\/a>). For example, suppose you are studying a supply chain fulfilment network, and are wondering which facility or facilities, if upgraded, would improve the network\u2019s capacity the most. Because of the interconnected routing decisions, the answer is not at all obvious.<\/p>\n\n<p>This post will (hopefully) kick off a series of posts that explore how to measure and analyze network structures.<\/p>\n\n<h2 id=\"setup-and-definitions\">Setup and Definitions<\/h2>\n\n<p>Consider the following network graph.<\/p>\n\n<p><img src=\"\/assets\/images\/networks\/network-simple.svg\" alt=\"scatter\" width=\"150\" \/><\/p>\n\n<h3 id=\"nodes\">Nodes<\/h3>\n\n<p>Let \\(N = \\{1, ..., n\\}\\) be a set of <strong>nodes<\/strong> in a network. These nodes (also called vertices) could be individuals, companies, fulfilment centers, or nearly any other object. A node is the basic unit of analysis, and the main focus is on the relationships between these nodes.<\/p>\n\n<h3 id=\"edges\">Edges<\/h3>\n\n<p>Nodes are connected by <strong>edges<\/strong>. Edges can represent a friendship between two people, a link between webpages, and so on. Importantly, edges can be either <strong>directed<\/strong> or <strong>undirected<\/strong>. In a directed network, the order matters, and relationships are not necessarily reciprocal - so some webpage A can link to webpage B, but webpage B might not link to webpage A. By contrast, in an undirected network these relationships are symmetric.<\/p>\n\n<p>Additionally, edges may be <strong>weighted<\/strong> or <strong>unweighted<\/strong>. An unweighted edge represents a simple binary connection, whereas a weighted edge may represent some magnitude of the relationship, for example, the amount of money traded between two banks.<\/p>\n\n<h3 id=\"network-graphs\">Network Graphs<\/h3>\n\n<p>Given a network, there are multiple ways to express it, and which one you choose depends on your use case. For most of what follows, I will focus on the matrix representation, as it naturally lends itself to matrix algebra, which will be useful later on. However, where there are very few edges relative to the number of nodes (i.e. the network is <em>sparce<\/em>), a matrix will likely not be a very efficient way of storing or processing the information.<\/p>\n\n<h4 id=\"matrix-notation\">Matrix Notation<\/h4>\n\n<p>The figure above shows an undirected network graph with four (4) nodes and three unweighted edges. We can represent this graph, \\(g\\), in matrix form as follows:<\/p>\n\n\\[g = \\begin{bmatrix}\n0 &amp; 1 &amp; 0 &amp; 1 \\\\\n1 &amp; 0 &amp; 1 &amp; 0 \\\\\n0 &amp; 1 &amp; 0 &amp; 0 \\\\ \n1 &amp; 0 &amp; 0 &amp; 0\n\\end{bmatrix}\\]\n\n<p>By convention, the edge connecting node 1 to node 4 is represented by a \u201c1\u201d in the first row, fourth column. Similarly, the edge representing the connection from node 4 back to node 1 is captured by a \u201c1\u201d in the fourth row, first column. Note also that in this case, \u201cself-edges\u201d are denoted as \u201c0\u201d i.e. we don\u2019t count an edge from a node back to itself. This choice is unimportant for this example, but may matter depending on your specific use case.<\/p>\n\n<p>The figure below shows a directed network with weighted eges. For example, we can imagine this as a group of friends settling a bet.<\/p>\n\n<p><img src=\"\/assets\/images\/networks\/network-weighted-directed.svg\" alt=\"scatter\" width=\"150\" \/><\/p>\n\n<p>Similar to the first graph, we can represent this in matrix form as follows.<\/p>\n\n\\[g = \\begin{bmatrix}\n    0 &amp; 0 &amp; 0 &amp; 9 \\\\\n    8 &amp; 0 &amp; 7 &amp; 0 \\\\\n    0 &amp; 0 &amp; 0 &amp; 0 \\\\ \n    0 &amp; 0 &amp; 0 &amp; 0\n\\end{bmatrix}\\]\n\n<h4 id=\"other-notation\">Other Notation<\/h4>\n\n<p>The following notations are often used in computational settings when implementing algorithms on graphs (e.g. depth-first search). Since that falls outside the scope of this post, I will only briefly mention their representations for my own future reference.<\/p>\n\n<h5 id=\"adjacency-list\">Adjacency List<\/h5>\n\n<p>One popular form of describing graphs for computation problems is via \u201cadjacency lists\u201d. Here we represent each edge from node \\(i\\) to node \\(j\\) as a list (oftentime a linked list) that stems from the source node. For example, our original unweighted and undirected graph could have the following form:<\/p>\n\n<div class=\"language-python highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"c1\"># example with Python3 syntax\n<\/span><span class=\"n\">graph<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span>\n    <span class=\"mi\">1<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">4<\/span><span class=\"p\">],<\/span> \n    <span class=\"mi\">2<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">3<\/span><span class=\"p\">],<\/span> \n    <span class=\"mi\">3<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"mi\">2<\/span><span class=\"p\">],<\/span> \n    <span class=\"mi\">4<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<h5 id=\"list-of-edges\">List of Edges<\/h5>\n\n<p>Similar to the adjacency list, another way of describing a network is simply as a list of edges, so to again use the first network above, this representation would be:<\/p>\n\n<div class=\"language-python highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"c1\"># note Python uses an exclusive stop value\n# in the \"range\" function\n<\/span><span class=\"n\">nodes<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">list<\/span><span class=\"p\">(<\/span><span class=\"nb\">range<\/span><span class=\"p\">(<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">5<\/span><span class=\"p\">))<\/span> \n<span class=\"n\">edges<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[<\/span>\n    <span class=\"p\">(<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">2<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">4<\/span><span class=\"p\">),<\/span> \n    <span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">3<\/span><span class=\"p\">),<\/span> \n    <span class=\"p\">(<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">2<\/span><span class=\"p\">),<\/span> \n    <span class=\"p\">(<\/span><span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n<span class=\"p\">]<\/span>\n\n<span class=\"n\">graph<\/span> <span class=\"o\">=<\/span> <span class=\"p\">(<\/span><span class=\"n\">nodes<\/span><span class=\"p\">,<\/span> <span class=\"n\">edges<\/span><span class=\"p\">)<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n\n<p>I plan to use these definitions and notation in future posts.<\/p>","author":{"name":"Stephen Lee"},"category":[{"@attributes":{"term":"Networks"}},{"@attributes":{"term":"Networks"}}],"summary":"Note, this is a cross post from an older blog, Sparking Correlation, which I no longer use."},{"title":"What is the \u201cPotential Outcomes\u201d Framework","link":{"@attributes":{"href":"https:\/\/stephenlee.info\/potential%20outcomes\/2021\/07\/13\/what-is-potential-outcomes.html","rel":"alternate","type":"text\/html","title":"What is the \u201cPotential Outcomes\u201d Framework"}},"published":"2021-07-13T00:00:00-05:00","updated":"2021-07-13T00:00:00-05:00","id":"https:\/\/stephenlee.info\/potential%20outcomes\/2021\/07\/13\/what-is-potential-outcomes","content":"<p>Note, this is a cross post from an older blog, Sparking Correlation, which I no longer use.<\/p>\n\n<h2 id=\"overview\">Overview<\/h2>\n<p>Potential outcomes is a set of techniques and tools for estimating the likely results of a particular action. More specifically, potential outcomes provides a methodology for assessing the effect of a treatment (aka intervention) when certain assumptions are believed to be true. Notably, this approach is often applied to observational data in fields like economics, epidemiology, or sociology, where many experiments would be prohibitedly expensive or unethical.<\/p>\n\n<p>While the randomized control trial is often considered a benchmark for causal inference,<sup id=\"fnref:1\" role=\"doc-noteref\"><a href=\"#fn:1\" class=\"footnote\">1<\/a><\/sup> practitioners of potential outcomes argue that these methods can be naturally applied to other settings as well. Intuitively, the belief is that since we humans seem able to draw useful inference about the world without rigorous experiment (e.g. taking an asprine will help my headache because it helped last time), formalizing the process of observational based inference can yield valuable insight.<\/p>\n\n<h2 id=\"philosophy\">Philosophy<\/h2>\n<p>One way to think about cause and effect is as a comparison between outcomes: what would be the difference in my outcome if I receive the treatment, compared to if I do not receive the treatment? In other words, what is the difference between the <em>potential outcomes<\/em>? Central to this is the missing data problem, also referred to as the fundamental problem of causal inference. In short, (for a given unit):<\/p>\n\n<blockquote>\n  <p>You can only either observe the outcome after treatment, or after no-treatment.<\/p>\n\n  <p>Since we cannot go back in time, we cannot observe both, and hence, we cannot measure true effects at an individual level of analysis.<\/p>\n<\/blockquote>\n\n<p>The workaround for potential outcomes is to focus on treatment groups to estimate aggregated effects, as opposed to individual level effects. For example, we may measure the average treatment effect (ATE) or the 25th percentile treatement effect, but we cannot measure Bob or Ann\u2019s specific treatment effect.<\/p>\n\n<p>Note, there is another popular approach to thinking through causal inference problems often referred to as structural modeling. For example, the Structural Causal Model (SCM) popularized by Judea Pearl requires statement of all relevant variables, and their potential interactions. In his words, one must specify, \u201cwho talks to whom\u201d. With this, one can then utilize graphical abstractions of these relationships in the form of directed acyclic graphs (DAGs), and follow certain proceedural rules to discover if your causal question can be estimated with the data you have i.e. are you missing observation of any variables that are critical to the estimation. Beyond this, there is a long tradition of structural economic modeling, and in particular with simultaneously determined relationships like supply and demand. This will likely become a separate blog post, but for now, this is outside the scope of this post.<\/p>\n\n<h2 id=\"assumptions\">Assumptions<\/h2>\n\n<blockquote>\n  <p>Causal conclusions are only as valid as the causal assumptions upon which they rest.<\/p>\n\n  <p>\u2013 Judea Pearl<\/p>\n<\/blockquote>\n\n<p>What makes assumptions so tricky is that in many cases you cannot test them for validity. For an analysis of potential outcomes, two main categories of assumptions are needed:<\/p>\n\n<h3 id=\"1-stable-unit-treatment-value-assumption-sutva\">(1) Stable Unit Treatment Value Assumption (SUTVA)<\/h3>\n<p>According to Donald Rubin (who is largely credited with shaping this literature), this assumption requires:<\/p>\n<ol>\n  <li>There are no individual spillovers (i.e. no externalities).<\/li>\n  <li>There is no hidden variation in the treatment e.g. strength or adherence.<\/li>\n<\/ol>\n\n<p>For example, if studying the effect of graded homework on student performance at a university, there could likely be spillovers in the form of peer effects: a \u201ctreatment\u201d classroom may impact student performance in a \u201ccontrol\u201d classroom if friends from both groups study together.<\/p>\n\n<p>Further, this assumption also requires only one \u201cstrength\u201d of treatment. To extend the same example, if the treatment is to assign graded homeworks, compared to a control where students do not have their homework assignments graded, each classroom in the treatment group must grade homework assignments with the same frequency. In other words, if one teacher in the treatment group returns graded assignments every week, while another teacher in the treatment group only returns graded assignments once a month, the final causal inference would likely be conflated.<\/p>\n\n<p>When these conditions are met, the causal analysis is greatly simplified. Unfortunately however, these are rather strong assumptions and often may not be plausible. Fortunately, there is a growing body of research to best handle estimation when these assumptions are relaxed.<\/p>\n\n<h3 id=\"2-assignment-mechanism\">(2) Assignment Mechanism<\/h3>\n<p>When comparing a group that received treatment to a group that didn\u2019t receive treatment, we need to know (or make an assumption) about why certain individuals were assigned to the treatment group, while others were not.<\/p>\n\n<p>In the simplest case, this assignment is random (as in a clinical trial) and unconfounded insofar as assignment does not depend on the potential outcomes. In other words, if all of the individuals that received treatment were given it precicely because they had the most to benefit, a straight forward comparison between the outcomes of the treatment and control groups woudl not represent a causal effect of the treatment.<\/p>\n\n<p>For example, one may wonder what is the causal effect of attending and graduating from a university. Since it would be unethical, costly, and infeasible in a reasonable timeline, we do not perform this experiment. Thus, we may try to use observational data on students that graduated from university and compare their outcomes to students that didn\u2019t attend. In this case, the causal inference is complicated by the fact that the decision to attend or not attend college is likely incluenced by the perceived benefit of attending. Thus, the treatment (attend college) may depend on the potential outcome (do you expect to be better or worse off if you attend?).<\/p>\n\n<p>Various tools have been developed to handle cases where the assignment is not random or the distribution of the assignment is unknown. For these, techniques rapidly become more and more sophisticated, and assumptions become more and more layered. Overall, estimation can still occur, but it\u2019s much more difficult.<\/p>\n\n<h2 id=\"resources\">Resources<\/h2>\n<ul>\n  <li><em>Causal Inference for Statistics, Social, and Biomedical Sciences<\/em>. Imbens G. and Rubin D.<\/li>\n  <li><em>Causal Inference: The Mixtape<\/em>. Cunningham S.<\/li>\n<\/ul>\n\n<h2 id=\"footnotes\">Footnotes<\/h2>\n\n<div class=\"footnotes\" role=\"doc-endnotes\">\n  <ol>\n    <li id=\"fn:1\" role=\"doc-endnote\">\n      <p>Consider, as evidence, that this is the requirement for a drug to pass FDA inspection.\u00a0<a href=\"#fnref:1\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;<\/a><\/p>\n    <\/li>\n  <\/ol>\n<\/div>","author":{"name":"Stephen Lee"},"category":[{"@attributes":{"term":"Potential Outcomes"}},{"@attributes":{"term":"Potential Outcomes"}}],"summary":"Note, this is a cross post from an older blog, Sparking Correlation, which I no longer use."},{"title":"SEM Estimation by 2SLS","link":{"@attributes":{"href":"https:\/\/stephenlee.info\/instrumental%20variables\/2021\/07\/12\/sem-iv.html","rel":"alternate","type":"text\/html","title":"SEM Estimation by 2SLS"}},"published":"2021-07-12T00:00:00-05:00","updated":"2021-07-12T00:00:00-05:00","id":"https:\/\/stephenlee.info\/instrumental%20variables\/2021\/07\/12\/sem-iv","content":"<p>Note, this is a cross post from an older blog, Sparking Correlation, which I no longer use.<\/p>\n\n<h2 id=\"overview\">Overview<\/h2>\n\n<p>The goal is to:<\/p>\n\n<ol>\n  <li>Determine the correct setup for the first stage regression, and<\/li>\n  <li>Provide intuition for why that is the case.<\/li>\n<\/ol>\n\n<h2 id=\"microeconomic-theory\">Microeconomic Theory<\/h2>\n<p>Suppose the true supply function for some product is given by price, and one (or more) exogenous supply shifers \\(Z_{supply}\\). To make this concrete, consider the beef and steak products, where exogenous supply shifters would be inputs like the price of land, cattle feed, and so on.<\/p>\n\n\\[\\begin{aligned}\n    Q_{supply} &amp;= f(P_{supply}, \\, Z_{supply})\n\\end{aligned}\\]\n\n<p>and similarly, demand is given by:<\/p>\n\n\\[\\begin{aligned}\n    Q_{demand} &amp;= f(P_{demand}, \\, Z_{demand}) \n\\end{aligned}\\]\n\n<p>If we observe transaction data in a competitive market, we will assume that prices and quantities are in equilibrium, thus implying:<\/p>\n\n\\[P_{supply} = P_{demand} = P^*\\]\n\n<p>and<\/p>\n\n\\[Q_{supply} = Q_{demand} = Q^*\\]\n\n<p>Together, we can find the reduced form equation for the equilibrium values:<\/p>\n\n\\[\\begin{aligned}\n    Q_{demand} &amp;= Q_{supply} \\\\\n    f(P^*, \\, Z_{demand}) &amp;= f(P^*, \\, Z_{supply}) \\\\ \\\\\n    P^* &amp;= f(Z_{demand}, Z_{supply}) \n\\end{aligned}\\]\n\n<p>Similarly, we can solve equilibrium quantity as:<\/p>\n\n\\[\\begin{aligned}\n    f(Q^*, \\, Z_{demand}) &amp;= f(Q^*, \\, Z_{supply}) \\\\ \\\\\n    Q^* &amp;= f(Z_{demand}, Z_{supply}) \n\\end{aligned}\\]\n\n<p><br \/>\n\\(\\textcolor{red}{NOTE}\\): In equilibrium, price and quantity only depend on the exogenous supply and demand shifters.<\/p>\n\n<h2 id=\"simulation\">Simulation<\/h2>\n\n<p>Using this theory as a guide, we can build a simulation dataset with the following linear functional forms:<\/p>\n\n<h3 id=\"setup\">Setup<\/h3>\n\n\\[\\begin{aligned}\n    P_{supply} &amp;= Q_{supply} + 2Z_{supply} + u_{supply}\n\\end{aligned}\\]\n\n<p>and similarly, demand is given by:<\/p>\n\n\\[\\begin{aligned}\n    P_{demand} &amp;= 100 - Q_{demand} + 2Z_{demand} + u_{demand}\n\\end{aligned}\\]\n\n<p>Which gives us the reduced form relationships:<\/p>\n\n\\[\\begin{aligned}\n    P^* = 50 + Z_{supply} + Z_{demand} + v \n\\end{aligned}\\]\n\n<p>Where \\(v = \\frac{u_{demand} - u_{supply}}{2}\\) contains the errors for both supply and demand.<\/p>\n\n<h3 id=\"build-dataset\">Build Dataset<\/h3>\n<p>Using this relationship, we can create a simulation dataset as follows:<\/p>\n\n<ol>\n  <li>Generate random values for \\(u_{demand}\\), \\(u_{supply}\\), \\(Z_{demand}\\), and \\(Z_{supply}\\).<\/li>\n  <li>Use these to find equilibrium prices.<\/li>\n  <li>Back out equilibrium quantities from the supply or demand equation (and verify that they are in fact the same).<\/li>\n  <li>Finally, we only keep positive values for price and quantity since a firm would simply shut down if that were the case.<\/li>\n<\/ol>\n\n<div class=\"language-r highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"c1\"># number of observations to generate<\/span><span class=\"w\">\n<\/span><span class=\"n\">N<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"m\">100<\/span><span class=\"w\">\n\n<\/span><span class=\"c1\"># ud and us are exogenous ~ N(0, 1)<\/span><span class=\"w\">\n<\/span><span class=\"n\">ud<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">rnorm<\/span><span class=\"p\">(<\/span><span class=\"n\">N<\/span><span class=\"p\">)<\/span><span class=\"w\"> \n<\/span><span class=\"n\">us<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">rnorm<\/span><span class=\"p\">(<\/span><span class=\"n\">N<\/span><span class=\"p\">)<\/span><span class=\"w\"> \n<\/span><span class=\"n\">v<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span><span class=\"n\">ud<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"w\"> <\/span><span class=\"n\">us<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">\/<\/span><span class=\"w\"> <\/span><span class=\"m\">2<\/span><span class=\"w\">\n\n<\/span><span class=\"c1\"># supply and demand shifters are exogenous normal<\/span><span class=\"w\">\n<\/span><span class=\"c1\"># although I believe the distributional assumptions <\/span><span class=\"w\">\n<\/span><span class=\"c1\"># can be relaxed<\/span><span class=\"w\">\n<\/span><span class=\"n\">z1<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">rnorm<\/span><span class=\"p\">(<\/span><span class=\"n\">N<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">*<\/span><span class=\"w\"> <\/span><span class=\"m\">2<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"m\">2<\/span><span class=\"w\">  <\/span><span class=\"c1\"># ~N(2, 2)<\/span><span class=\"w\">\n<\/span><span class=\"n\">z2<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">rnorm<\/span><span class=\"p\">(<\/span><span class=\"n\">N<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"m\">3<\/span><span class=\"w\">      <\/span><span class=\"c1\"># ~N(3, 0)<\/span><span class=\"w\">\n\n<\/span><span class=\"c1\"># price in equilibrium using reduced form equation<\/span><span class=\"w\">\n<\/span><span class=\"n\">p<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"m\">50<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"n\">z1<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"n\">z2<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"n\">v<\/span><span class=\"w\"> \n\n<\/span><span class=\"c1\"># verify quantities are the same in equilibrium!<\/span><span class=\"w\">\n<\/span><span class=\"n\">qd<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"m\">100<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"w\"> <\/span><span class=\"n\">p<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"m\">2<\/span><span class=\"o\">*<\/span><span class=\"n\">z2<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"n\">ud<\/span><span class=\"w\">\n<\/span><span class=\"n\">qs<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">p<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"w\"> <\/span><span class=\"m\">2<\/span><span class=\"o\">*<\/span><span class=\"n\">z1<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"n\">us<\/span><span class=\"w\">\n<\/span><span class=\"n\">q<\/span><span class=\"w\">  <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">qd<\/span><span class=\"w\">\n\n<\/span><span class=\"k\">if<\/span><span class=\"w\"> <\/span><span class=\"p\">(<\/span><span class=\"nf\">sum<\/span><span class=\"p\">(<\/span><span class=\"n\">qd<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"w\"> <\/span><span class=\"n\">qs<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"m\">1e10<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"p\">{<\/span><span class=\"w\">\n    <\/span><span class=\"n\">cat<\/span><span class=\"p\">(<\/span><span class=\"s2\">\"ERROR: Supply and demand not in equilibrium\"<\/span><span class=\"p\">)<\/span><span class=\"w\">\n<\/span><span class=\"p\">}<\/span><span class=\"w\">\n\n<\/span><span class=\"c1\"># make dataset <\/span><span class=\"w\">\n<\/span><span class=\"c1\"># we only keep values where quantiy and price <\/span><span class=\"w\">\n<\/span><span class=\"c1\"># are greater than zero. Our simulated datset may <\/span><span class=\"w\">\n<\/span><span class=\"c1\"># contain negative values since non-zero conditions <\/span><span class=\"w\">\n<\/span><span class=\"c1\"># are economic assumptions. <\/span><span class=\"w\">\n<\/span><span class=\"n\">data<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">tibble<\/span><span class=\"p\">(<\/span><span class=\"w\">\n        <\/span><span class=\"s2\">\"Q\"<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"n\">q<\/span><span class=\"p\">,<\/span><span class=\"w\"> \n        <\/span><span class=\"s2\">\"P\"<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"n\">p<\/span><span class=\"p\">,<\/span><span class=\"w\"> \n        <\/span><span class=\"s2\">\"Z_Supply\"<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"n\">z1<\/span><span class=\"p\">,<\/span><span class=\"w\"> \n        <\/span><span class=\"s2\">\"Z_Demand\"<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"n\">z2<\/span><span class=\"w\">\n    <\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">%&gt;%<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">filter<\/span><span class=\"p\">(<\/span><span class=\"w\">\n        <\/span><span class=\"n\">Q<\/span><span class=\"w\"> <\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"m\">0<\/span><span class=\"w\"> <\/span><span class=\"o\">&amp;&amp;<\/span><span class=\"w\"> <\/span><span class=\"n\">P<\/span><span class=\"w\"> <\/span><span class=\"o\">&gt;<\/span><span class=\"w\"> <\/span><span class=\"m\">0<\/span><span class=\"w\">\n    <\/span><span class=\"p\">)<\/span><span class=\"w\">\n<\/span><\/code><\/pre><\/div><\/div>\n\n<h3 id=\"graph\">Graph<\/h3>\n\n<p>After generating a dataset according to those rules, we can view market prices and quantities in a scatter plot:<\/p>\n\n<div class=\"language-r highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"n\">ymin<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"nf\">min<\/span><span class=\"p\">(<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">P<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"w\"> <\/span><span class=\"m\">5<\/span><span class=\"w\">\n<\/span><span class=\"n\">ymax<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"nf\">max<\/span><span class=\"p\">(<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">P<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"m\">5<\/span><span class=\"w\">\n<\/span><span class=\"n\">data<\/span><span class=\"w\"> <\/span><span class=\"o\">%&gt;%<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">ggplot<\/span><span class=\"p\">(<\/span><span class=\"n\">aes<\/span><span class=\"p\">(<\/span><span class=\"n\">Q<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">P<\/span><span class=\"p\">))<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">geom_point<\/span><span class=\"p\">()<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">ylim<\/span><span class=\"p\">(<\/span><span class=\"n\">ymin<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">ymax<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">theme_wsj<\/span><span class=\"p\">()<\/span><span class=\"w\"> \n<\/span><\/code><\/pre><\/div><\/div>\n\n<p><img src=\"\/assets\/images\/sem\/sem-scatter.png\" alt=\"scatter\" width=\"500\" \/><\/p>\n\n<p>If we lock in some value of \\(Z_{demand}\\) and \\(Z_{supply}\\), we can easily see how supply and demand intersect.<\/p>\n\n<div class=\"language-r highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"n\">z1_fixed1<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Z_Supply<\/span><span class=\"p\">[<\/span><span class=\"m\">1<\/span><span class=\"p\">]<\/span><span class=\"w\">\n<\/span><span class=\"n\">z1_fixed2<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Z_Supply<\/span><span class=\"p\">[<\/span><span class=\"m\">2<\/span><span class=\"p\">]<\/span><span class=\"w\">\n<\/span><span class=\"n\">z1_fixed3<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Z_Supply<\/span><span class=\"p\">[<\/span><span class=\"m\">3<\/span><span class=\"p\">]<\/span><span class=\"w\">\n\n<\/span><span class=\"n\">z2_fixed1<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Z_Demand<\/span><span class=\"p\">[<\/span><span class=\"m\">1<\/span><span class=\"p\">]<\/span><span class=\"w\">\n<\/span><span class=\"n\">z2_fixed2<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Z_Demand<\/span><span class=\"p\">[<\/span><span class=\"m\">2<\/span><span class=\"p\">]<\/span><span class=\"w\">\n<\/span><span class=\"n\">z2_fixed3<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Z_Demand<\/span><span class=\"p\">[<\/span><span class=\"m\">3<\/span><span class=\"p\">]<\/span><span class=\"w\">\n\n<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Qs<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"m\">1<\/span><span class=\"o\">:<\/span><span class=\"nf\">dim<\/span><span class=\"p\">(<\/span><span class=\"n\">data<\/span><span class=\"p\">)[<\/span><span class=\"m\">1<\/span><span class=\"p\">]<\/span><span class=\"w\">\n<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Ps1<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Qs<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"m\">2<\/span><span class=\"w\"> <\/span><span class=\"o\">*<\/span><span class=\"w\"> <\/span><span class=\"n\">z1_fixed1<\/span><span class=\"w\">\n<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Ps2<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Qs<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"m\">2<\/span><span class=\"w\"> <\/span><span class=\"o\">*<\/span><span class=\"w\"> <\/span><span class=\"n\">z1_fixed2<\/span><span class=\"w\">\n<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Ps3<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Qs<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"m\">2<\/span><span class=\"w\"> <\/span><span class=\"o\">*<\/span><span class=\"w\"> <\/span><span class=\"n\">z1_fixed3<\/span><span class=\"w\">\n\n<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Qd<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Qs<\/span><span class=\"w\">\n<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Pd1<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"m\">100<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Qd<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"m\">2<\/span><span class=\"w\"> <\/span><span class=\"o\">*<\/span><span class=\"w\"> <\/span><span class=\"n\">z2_fixed1<\/span><span class=\"w\">\n<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Pd2<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"m\">100<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Qd<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"m\">2<\/span><span class=\"w\"> <\/span><span class=\"o\">*<\/span><span class=\"w\"> <\/span><span class=\"n\">z2_fixed2<\/span><span class=\"w\">\n<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Pd3<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"m\">100<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"w\"> <\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Qd<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"m\">2<\/span><span class=\"w\"> <\/span><span class=\"o\">*<\/span><span class=\"w\"> <\/span><span class=\"n\">z2_fixed3<\/span><span class=\"w\">\n\n<\/span><span class=\"n\">xmin<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"nf\">min<\/span><span class=\"p\">(<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Q<\/span><span class=\"p\">)<\/span><span class=\"w\">\n<\/span><span class=\"n\">xmax<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"nf\">max<\/span><span class=\"p\">(<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">Q<\/span><span class=\"p\">)<\/span><span class=\"w\">\n<\/span><span class=\"n\">ymin<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"nf\">min<\/span><span class=\"p\">(<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">P<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">-<\/span><span class=\"w\"> <\/span><span class=\"m\">5<\/span><span class=\"w\">\n<\/span><span class=\"n\">ymax<\/span><span class=\"w\"> <\/span><span class=\"o\">&lt;-<\/span><span class=\"w\"> <\/span><span class=\"nf\">max<\/span><span class=\"p\">(<\/span><span class=\"n\">data<\/span><span class=\"o\">$<\/span><span class=\"n\">P<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> <\/span><span class=\"m\">5<\/span><span class=\"w\">\n<\/span><span class=\"n\">data<\/span><span class=\"w\"> <\/span><span class=\"o\">%&gt;%<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">ggplot<\/span><span class=\"p\">(<\/span><span class=\"n\">aes<\/span><span class=\"p\">(<\/span><span class=\"n\">Q<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">P<\/span><span class=\"p\">))<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">geom_point<\/span><span class=\"p\">()<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">geom_line<\/span><span class=\"p\">(<\/span><span class=\"n\">aes<\/span><span class=\"p\">(<\/span><span class=\"n\">Qs<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">Ps1<\/span><span class=\"p\">),<\/span><span class=\"w\"> <\/span><span class=\"n\">color<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"red\"<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">geom_line<\/span><span class=\"p\">(<\/span><span class=\"n\">aes<\/span><span class=\"p\">(<\/span><span class=\"n\">Qd<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">Pd1<\/span><span class=\"p\">),<\/span><span class=\"w\"> <\/span><span class=\"n\">color<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"blue\"<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">xlim<\/span><span class=\"p\">(<\/span><span class=\"n\">xmin<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">xmax<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">ylim<\/span><span class=\"p\">(<\/span><span class=\"n\">ymin<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">ymax<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">theme_wsj<\/span><span class=\"p\">()<\/span><span class=\"w\">\n<\/span><\/code><\/pre><\/div><\/div>\n\n<p><img src=\"\/assets\/images\/sem\/sem-scatter-line.png\" alt=\"lines\" width=\"500\" \/><\/p>\n\n<h3 id=\"intuition-for-first-stage\">Intuition for First Stage<\/h3>\n\n<p>If we are trying to estimate demand elasticity by 2SLS, the naive regression of<\/p>\n\n\\[P = \\beta_1 Q + \\beta_2 Z_{demand}\\]\n\n<p>We will get a biased estimate for \\(\\beta_1\\). Intuitively, this is because price and quantity were determined in equilibrium. In other words, conditional on the exogenous supply and demand shifters (\\(Z_{demand}\\) and \\(Z_{supply}\\)), there is no variation in price or quantity.<\/p>\n\n<p>Instead, we will rely on exogenous variation that only impacts quantity through supply, in this case the supply shifters \\(Z_{supply}\\). We can think of this as using exogenous shifts in the \\(\\textcolor{red}{red}\\) line to help determine the slope of the \\(\\textcolor{blue}{blue}\\) line.<\/p>\n\n<div class=\"language-r highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"n\">data<\/span><span class=\"w\"> <\/span><span class=\"o\">%&gt;%<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">ggplot<\/span><span class=\"p\">(<\/span><span class=\"n\">aes<\/span><span class=\"p\">(<\/span><span class=\"n\">Q<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">P<\/span><span class=\"p\">))<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">geom_point<\/span><span class=\"p\">()<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">geom_line<\/span><span class=\"p\">(<\/span><span class=\"n\">aes<\/span><span class=\"p\">(<\/span><span class=\"n\">Qs<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">Ps1<\/span><span class=\"p\">),<\/span><span class=\"w\"> <\/span><span class=\"n\">color<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"red\"<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">geom_line<\/span><span class=\"p\">(<\/span><span class=\"n\">aes<\/span><span class=\"p\">(<\/span><span class=\"n\">Qs<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">Ps2<\/span><span class=\"p\">),<\/span><span class=\"w\"> <\/span><span class=\"n\">color<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"red\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">linetype<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"dashed\"<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">geom_line<\/span><span class=\"p\">(<\/span><span class=\"n\">aes<\/span><span class=\"p\">(<\/span><span class=\"n\">Qs<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">Ps3<\/span><span class=\"p\">),<\/span><span class=\"w\"> <\/span><span class=\"n\">color<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"red\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">linetype<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"dashed\"<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">geom_line<\/span><span class=\"p\">(<\/span><span class=\"n\">aes<\/span><span class=\"p\">(<\/span><span class=\"n\">Qd<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">Pd1<\/span><span class=\"p\">),<\/span><span class=\"w\"> <\/span><span class=\"n\">color<\/span><span class=\"w\"> <\/span><span class=\"o\">=<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"blue\"<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">xlim<\/span><span class=\"p\">(<\/span><span class=\"n\">xmin<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">xmax<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\"> \n    <\/span><span class=\"n\">ylim<\/span><span class=\"p\">(<\/span><span class=\"n\">ymin<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"n\">ymax<\/span><span class=\"p\">)<\/span><span class=\"w\"> <\/span><span class=\"o\">+<\/span><span class=\"w\">\n    <\/span><span class=\"n\">theme_wsj<\/span><span class=\"p\">()<\/span><span class=\"w\"> \n<\/span><\/code><\/pre><\/div><\/div>\n\n<p><img src=\"\/assets\/images\/sem\/sem-scatter-shifters.png\" alt=\"lines\" width=\"500\" \/><\/p>\n\n<p>Finally, why is that that we include the demand shifters in the first equation? Intuitively, this helps to isolate which level of the curves we are looking at. For example, for a given supply curve, we still need to include demand factors to let us pinpoint where we expect the levels to intersect. In other words, we need to know the external factors that are affecting the \\(\\textcolor{red}{red}\\) and \\(\\textcolor{blue}{blue}\\) lines. As shown above, in equilibrium, those are the only factors for price and quantity.<\/p>\n\n<h3 id=\"regression-results\">Regression Results<\/h3>\n\n<p>Finally, we test these ideas directly to see if we can recover our original \u201ctrue\u201d demand parameters.<\/p>\n\n<p>Recall, we are looking to retrieve the \u201ctrue\u201d values from the simulation setup,<\/p>\n\n\\[\\begin{aligned}\n    P_{demand} &amp;= 100 - Q_{demand} + 2Z_{demand} + u_{demand}\n\\end{aligned}\\]\n\n<h4 id=\"only-supply-shifters-in-first-stage\">Only Supply Shifters in First Stage<\/h4>\n\n<p>If we only include supply shifters in the first stage regression, i.e.<\/p>\n\n\\[Q = \\alpha_1 Z_{supply} + u\\]\n\n<p>And use the predicted values, \\(\\hat{Q}\\) in the second stage regression:<\/p>\n\n\\[P = \\beta_1 \\hat{Q} + \\beta_2 Z_{demand} + e\\]\n\n<p>Then we obtain baised and inconsistent estimates. We can see the result of this estimation below:<\/p>\n\n<pre><code class=\"language-{r}\"># first stage \nfirst_stage_bias_fit &lt;- lm(Q ~ Z_Supply, data = data)\ndata$`Q Predicted (only supply)` &lt;- predict(first_stage_bias_fit)\n\n# second stage \nfit_bias &lt;- lm(P ~ `Q Predicted (only supply)` + Z_Demand, data = data)\n<\/code><\/pre>\n\n<p>We see here that these estimates are incorrect based on what we know to be true.<\/p>\n\n<p><img src=\"\/assets\/images\/sem\/biased-sem.png\" alt=\"scatter\" width=\"500\" \/><\/p>\n\n<h4 id=\"all-exogenous-variables-in-first-stage\">All Exogenous Variables in First Stage<\/h4>\n\n<p>If we now include all exogenous variables in the first stage regression, i.e.<\/p>\n\n\\[Q = \\alpha_1 Z_{supply} + \\alpha_2 Z_{demand} + u\\]\n\n<p>And use these new predicted values, \\(\\widetilde{Q}\\) in the second stage regression:<\/p>\n\n\\[P = \\beta_1 \\widetilde{Q} + \\beta_2 Z_{demand} + e\\]\n\n<p>We can retrieve the known true paramater values.<\/p>\n\n<pre><code class=\"language-{r}\"># first stage \nfirst_stage_fit &lt;- lm(Q ~ Z_Supply + Z_Demand, data = data)\ndata$`Q Predicted (all exogenous)` &lt;- predict(first_stage_fit)\n\n# second stage \nfit &lt;- lm(P ~ `Q Predicted (all exogenous)` + Z_Demand, data = data)\n<\/code><\/pre>\n\n<p><img src=\"\/assets\/images\/sem\/true-sem.png\" alt=\"scatter\" width=\"500\" \/><\/p>\n\n<p>In this case, using all exogenous variables in the first stage allows us to recover the \u201ctrue\u201d demand parameters on quantity and the demand shifter.<\/p>","author":{"name":"Stephen Lee"},"category":[{"@attributes":{"term":"Instrumental Variables"}},{"@attributes":{"term":"Instrumental Variables"}},{"@attributes":{"term":"R"}}],"summary":"Note, this is a cross post from an older blog, Sparking Correlation, which I no longer use."}]}