You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 01-Introduction-To-Causality.html
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -618,7 +618,7 @@ <h2>Answering a Different Kind of Question<a class="headerlink" href="#answering
618
618
</section>
619
619
<sectionid="when-association-is-causation">
620
620
<h2>When Association IS Causation<aclass="headerlink" href="#when-association-is-causation" title="Permalink to this headline">#</a></h2>
621
-
<p>Intuitively, we kind of know why the association is not causation. If someone tells you that schools that give tablets to their students perform better than those that don’t, you can quickly point out that it is probably the case that those schools with the tablets are wealthier. As such, they would do better than average even without the tablets. Because of this, we can’t conclude that giving tablets to kids during classes will cause an increase in their academic performance. We can only say that tablets in school are associated with high academic performance.</p>
621
+
<p>Intuitively, we kind of know why the association is not causation. If someone tells you that schools that give tablets to their students perform better than those that don’t, you can quickly point out that it is probably the case that those schools with the tablets are wealthier. As such, they would do better than average even without the tablets. Because of this, we can’t conclude that giving tablets to kids during classes will cause an increase in their academic performance. We can only say that tablets in school are associated with high academic performance, as measured by ENEM (sort of the SAT in Brazil, which stands for National High School Exam):</p>
<h1>03 - Stats Review: The Most Dangerous Equation<aclass="headerlink" href="#stats-review-the-most-dangerous-equation" title="Permalink to this headline">#</a></h1>
580
580
<p>In his famous article of 2007, Howard Wainer writes about very dangerous equations:</p>
581
-
<p>“Some equations are dangerous if you know them, and others are dangerous if you do not. The first category may pose danger because the secrets within its bounds open doors behind which lies terrible peril. The obvious winner in this is Einstein’s iconic equation <spanclass="math notranslate nohighlight">\(E = MC^2\)</span>, for it provides a measure of the enormous energy hidden within ordinary matter. […] Instead I am interested in equations that unleash their danger not when we know about them, but rather when we do not. Kept close at hand, these equations allow us to understand things clearly, but their absence leaves us dangerously ignorant.”</p>
581
+
<p>“Some equations are dangerous if you know them, and others are dangerous if you do not. The first category may pose danger because the secrets within its bounds open doors behind which lies terrible peril. The obvious winner in this is Einstein’s iconic equation <spanclass="math notranslate nohighlight">\(E = mc^2\)</span>, for it provides a measure of the enormous energy hidden within ordinary matter. […] Instead I am interested in equations that unleash their danger not when we know about them, but rather when we do not. Kept close at hand, these equations allow us to understand things clearly, but their absence leaves us dangerously ignorant.”</p>
582
582
<p>The equation he talks about is Moivre’s equation:</p>
583
583
<p><spanclass="math notranslate nohighlight">\(
584
584
SE = \dfrac{\sigma}{\sqrt{n}}
@@ -857,7 +857,7 @@ <h2>Confidence Intervals<a class="headerlink" href="#confidence-intervals" title
857
857
</div>
858
858
</div>
859
859
<p>Of course, we don’t need to restrict ourselves to the 95% confidence interval. We could generate the 99% interval by finding what we need to multiply the standard deviation by so the interval contains 99% of the mass of a normal distribution.</p>
860
-
<p>The function <codeclass="docutils literal notranslate"><spanclass="pre">ppf</span></code> in python gives us the inverse of the CDF. Instead of multiplying the standard error by 2 like we did to find the 95% CI, we will multiply it by <codeclass="docutils literal notranslate"><spanclass="pre">z</span></code>, which will result in the 99% CI. So, <codeclass="docutils literal notranslate"><spanclass="pre">ppf(0.5)</span></code> will return 0.0, saying that 50% of the mass of the standard normal distribution is below 0.0. By the same token, if we plug 99.5%, we will have the value <codeclass="docutils literal notranslate"><spanclass="pre">z</span></code>, such that 99.5% of the distribution mass falls below this value. In other words, 0.5% of the mass falls above this value.</p>
860
+
<p>The function <codeclass="docutils literal notranslate"><spanclass="pre">ppf</span></code> in python gives us the inverse of the CDF. Instead of multiplying the standard error by 2 like we did to find the 95% CI, we will multiply it by <codeclass="docutils literal notranslate"><spanclass="pre">z</span></code>, which will result in the 99% CI. So, <codeclass="docutils literal notranslate"><spanclass="pre">ppf(0.5)</span></code> will return 0.0, saying that 50% of the mass of the standard normal distribution (mean 0 and 1 standard deviation) is below 0.0. By the same token, if we plug 99.5%, we will have the value <codeclass="docutils literal notranslate"><spanclass="pre">z</span></code>, such that 99.5% of the distribution mass falls below this value. In other words, 0.5% of the mass falls above this value.</p>
<p>Let’s return to our classroom example. We will construct this distribution of the difference. Of course, once we have it, building the 95% CI is straightforward.</p>
<p>Imagine that investments and education take only 2 values to demonstrate why this is the case. Whether people invest or not. They are either educated or not. Initially, when we don’t control for investments, the bias term is zero: <spanclass="math notranslate nohighlight">\(E[Y_0|T=1] - E[Y_0|T=0] = 0\)</span> because the education was randomised. This means that the wage people would have if they didn’t receive education <spanclass="math notranslate nohighlight">\(Wage_0\)</span> is the same if they do or don’t receive the education treatment. But what happens if we condition on investments?</p>
865
-
<p>Looking at those that invest, we probably have the case that <spanclass="math notranslate nohighlight">\(E[Y_0|T=0, I=1] > E[Y_0|T=1, I=1]\)</span>. In words, among those that invest, those that manage to do so even without education are more independent of education to achieve high earnings. For this reason, the wage those people have, <spanclass="math notranslate nohighlight">\(Wage_0|T=0\)</span>, is probably higher than the wage the educated group would have if they didn’t have education, <spanclass="math notranslate nohighlight">\(Wage_0|T=1\)</span>. A similar reasoning can be applied to those that don’t invest, where we also probably have <spanclass="math notranslate nohighlight">\(E[Y_0|T=0, I=0] > E[Y_0|T=1, I=0]\)</span>. Those who don’t invest even with education probably would have a lower wage, had they not got the education, than those who didn’t invest but didn’t have an education.</p>
865
+
<p>Looking at those who invest, we probably have the case that <spanclass="math notranslate nohighlight">\(E[Y_0|T=0, I=1] > E[Y_0|T=1, I=1]\)</span>. In words, among those who invest, the ones who manage to do so even without education are more likely to achieve high earnings, regardless of their education level. For this reason, the wage those people have, <spanclass="math notranslate nohighlight">\(Wage_0|T=0\)</span>, is probably higher than the wage the educated group would have if they didn’t have education, <spanclass="math notranslate nohighlight">\(Wage_0|T=1\)</span>. A similar reasoning can be applied to those who don’t invest, where we also probably have <spanclass="math notranslate nohighlight">\(E[Y_0|T=0, I=0] > E[Y_0|T=1, I=0]\)</span>. Those who don’t invest even with education probably would have a lower wage, had they not got the education, than those who didn’t invest but didn’t have an education.</p>
866
866
<p>To use a purely graphical argument, if someone invests, knowing that they have high education explains away the second cause, which is wage. Conditioned on investing, higher education is associated with low wages and we have a negative bias <spanclass="math notranslate nohighlight">\(E[Y_0|T=0, I=i] > E[Y_0|T=1, I=i]\)</span>.</p>
867
867
<p>As a side note, all of this we’ve discussed is true if we condition on any descendent of a common effect.</p>
0 commit comments