Beta distribution probability density function (PDF) for JavaScript