lib/rubystats/binomial_distribution.rb
# Wrapper for binomial RNG function (equivalent to R rbinom function).
# returns random deviate given trials and p
Wrapper for binomial RNG function (equivalent to R rbinom function).
returns random deviate given trials and p
Wrapper for binomial RNG function ( equivalent to R rbinom function ) . returns random deviate given trials and p
def rng(num_vals = 1)
      if num_vals < 1
        raise "Error num_vals must be greater than or equal to 1"
      end
      if num_vals == 1
        return get_rng
      else
        rand_vals = []
        for i in (0 ...num_vals)
          rand_vals[i] = get_rng
        end
        return rand_vals
      end
    end
def rng ( num_vals = 1 ) if num_vals < 1 raise "Error num_vals must be greater than or equal to 1" end if num_vals == 1 return get_rng else rand_vals = [ ] for i in ( 0 ... num_vals ) rand_vals [ i ] = get_rng end return rand_vals end end
Wrapper for binomial RNG function (equivalent to R rbinom function).
Wrapper for binomial RNG function ( equivalent to R rbinom function ) .
num_vals
<not_specific>