private double PStar(double x,double scale){
  return scale * Math.exp(-2.0 * x * scale);
}

private double PStar ( double x , double scale ) { return scale * Math . exp ( - 2.0 * x * scale ) ; }
calculates the value of p for a given value x using the expression : p ( x ) = scale * exp ( - 2 . 0 * x * scale )
