public static double binomialStandardError(double p,int n){
  if (n == 0) {
    return 0;
  }
  return Math.sqrt((p * (1 - p)) / (double)n);
}

public static double binomialStandardError ( double p , int n ) { if ( n == 0 ) { return 0 ; } return Math . sqrt ( ( p * ( 1 - p ) ) / ( double ) n ) ; }
computes standard error for observed values of a binomial random variable .
