## Not Seeing the Triangles for the Squares

I could take solace in very active illness. However, it never ceases to amaze me how my stupidity and laziness can contrive an answer and miss the beauty and simplicity that a little thought could provide.

This post is a penance for an MSE question which sought (analytical) probability that 2 points within unit square will greater than 1 apart.

In the following there is a derivation of difference of independent uniformly distributed random variables. The points in top plot are sampled from triangular distribution {-1,1}.

Using (the answer evaluates quickly with w=1):

pd = ProductDistribution[{TriangularDistribution[{-1, 1}], 2}]

Probability[a^2 + b^2 > w, {a, b} \[Distributed] pd]

Advertisements

Categories: Mathematica, Mathematics

Comments (0)
Trackbacks (0)
Leave a comment
Trackback