title: Density plot of the F-distribution (df1=1). Theoretical or simulated?
body: <p>I am plotting the density of F(1,49) in <strong>R</strong>. It seems that the simulated plot does <strong>not</strong> match the theoretical plot when values approach the zero. <a href="https://i.stack.imgur.com/3fTbc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3fTbc.png" alt="enter image description here" /></a></p>
  <pre><code>set.seed(123)
  val &lt;- rf(1000, df1=1, df2=49)
  plot(density(val), yaxt=&quot;n&quot;,ylab=&quot;&quot;,xlab=&quot;Observation&quot;,
       main=expression(paste(&quot;Density plot (&quot;,italic(n),&quot;=1000, &quot;,italic(df)[1],&quot;=1, &quot;,italic(df)[2],&quot;=49)&quot;)),
       lwd=2)
  curve(df(x, df1=1, df2=49), from=0, to=10, add=T, col=&quot;red&quot;,lwd=2,lty=2)
  legend(&quot;topright&quot;,c(&quot;Theoretical&quot;,&quot;Simulated&quot;),
         col=c(&quot;red&quot;,&quot;black&quot;),lty=c(2,1),bty=&quot;n&quot;)
  </code></pre>