public double pdf(int k){
  if (k < 0)   throw new IllegalArgumentException();
  int r=this.n - k;
  return Math.exp(this.log_n - Arithmetic.logFactorial(k) - Arithmetic.logFactorial(r) + this.log_p * k + this.log_q * r);
}

public double pdf ( int k ) { if ( k < 0 ) throw new IllegalArgumentException ( ) ; int r = this . n - k ; return Math . exp ( this . log_n - Arithmetic . logFactorial ( k ) - Arithmetic . logFactorial ( r ) + this . log_p * k + this . log_q * r ) ; }
returns the probability distribution function .
