code: function pbinom(size, p, lowerTail, logp) {
        var goodParams;
  
        logp = logp === true;
        lowerTail = lowerTail !== false;
  
        goodParams = size >= 0 && size < Infinity && size === Math.floor(size) &&
                     p >= 0 && p <= 1;
        if (!goodParams) { return function(x) { return NaN; }; }
        return function(x) {
           var res;
  
           if (isNaN(x)) { return NaN; }
           res = lowerTail === x < 0 ? -Infinity : 0;
           x = Math.floor(x);
           if (x >= 0 && x < size) {
              res = pbeta(x + 1, size - x, !lowerTail, true)(p);
           }
  
           return logp ? res : Math.exp(res);
        };
     }
docs: Evaluates the Binomial cumulative distribution
  function at `x` (lower tail probability):
  $$\textrm{pbinom}(\textrm{size}, p)(x) = \sum_{k \leq x} \binom{\textrm{size}}{p}p^{k}(1-p)^{(\textrm{size}-k)}$$
  
  `size` is a positive integer (number of trials) and $0 \leq p \leq 1$
  (the probability of success on a single trial).
  
  `lowerTail` defaults to `true`; if `lowerTail` is `false`, returns
  the upper tail probability instead:
  $$\textrm{pbinom}(\textrm{size}, p, \textrm{false})(x) = \sum_{k>x} \binom{\textrm{size}}{p}p^{k}(1-p)^{(\textrm{size}-k)}$$
  
  `logp` defaults to `false`; if `logp` is `true`, returns the logarithm
  of the result.
  
  @fullName pbinom(size, p, lowerTail, logp)(x)
  @memberof binomial