title: Extract approximate probability density function (pdf) in R from random sampling
body: <p>I have got <code>n&gt;2</code> independent continuous <code>Random Variables(RV)</code>. For example say I have <code>4 Uniform RVs</code> with different set of <code>Upper and lowers</code>. </p>
  
  <pre><code>W~U[-1,5], X~U[0,1], Y~[0,2], Z~[0.5,2]
  </code></pre>
  
  <p>I am trying to find out the approximate PDF for the sum of these RVs i.e. for <code>T=W+X+Y+Z</code>. As I don't need any closed form solution, I have sampled <code>1 million points</code> for each of them to get <code>1 million samples for T</code>. Is it possible in R to get the approximate PDF function or a way to get approximate probability of <code>P(t&lt;T)</code>from this samples I have drawn. For example is there a easy way I can calculate <code>P(0.5&lt;T)</code> in R. My priority here is to get probability first even if getting the density function is not possible.
  Thanks</p>