If you don't have the stats package and can't install it, I have found this to work:
<?php
if (!function_exists('stats_dens_normal')) {
function stats_dens_normal(float $x, float $ave, float $stdev): float
{
$A = $stdev * sqrt(2 * M_PI);
$B = -pow($x - $ave, 2);
$C = 2 * pow($stdev, 2);
return (1 / $A) * pow(M_E, $B / $C);
}
}
?>