title: Calculation p-values of a f-statistic with R
body: <p>I'm trying to calculate p-values of a f-statistic with R.
  The formula R uses in the lm() function is equal to (e.g. assume 
  x=100, df1=2, df2=40):</p>
  
  <pre><code>pf(100, 2, 40, lower.tail=F)
  [1] 2.735111e-16
  </code></pre>
  
  <p>which should be equal to</p>
  
  <pre><code>1-pf(100, 2, 40)
  [1] 2.220446e-16
  </code></pre>
  
  <p>It is not the same! There s no BIG difference, but where does it come from?
  If I calculate (x=5, df1=2, df2=40):</p>
  
  <pre><code>pf(5, 2, 40, lower.tail=F)
  [1] 0.01152922
  
  1-pf(5, 2, 40)
  [1] 0.01152922
  </code></pre>
  
  <p>it is exactly the same. Question is...what is happening here? Have I missed something?</p>