Driver code
$ n = 10 ; $ k = 5 ; $ p = 1.0 / 3 ; $ probability = binomialProbability ( $ n , $ k , $ p ) ; echo " Probability ▁ of ▁ " . $ k ; echo " ▁ heads ▁ when ▁ a ▁ coin ▁ is ▁ tossed ▁ " . $ n ; echo " ▁ times ▁ where ▁ probability ▁ of ▁ " . " each ▁ head ▁ is ▁ " . $ p ; echo " is = " ? >