function Binomial() {
	var n;
	var p;
	if ( !(this instanceof Binomial) ) {
		if ( arguments.length === 0 ) {
			return new Binomial();
		}
		return new Binomial( arguments[ 0 ], arguments[ 1 ] );
	}
	if ( arguments.length ) {
		n = arguments[ 0 ];
		p = arguments[ 1 ];
		if ( !isPositiveInteger( n ) ) {
			throw new TypeError( format( 'invalid argument. Number of trials must be a positive integer. Value: `%s`.', n ) );
		}
		if ( !isProbability( p ) ) {
			throw new TypeError( format( 'invalid argument. Success probability must be a number between 0 and 1. Value: `%s`.', p ) );
		}
	} else {
		n = 1;
		p = 0.5;
	}
	defineProperty( this, 'n', {
		'configurable': false,
		'enumerable': true,
		'get': function get() {
			return n;
		},
		'set': function set( value ) {
			if ( !isPositiveInteger( value ) ) {
				throw new TypeError( format( 'invalid assignment. Must be a positive integer. Value: `%s`.', value ) );
			}
			n = value;
		}
	});
	defineProperty( this, 'p', {
		'configurable': false,
		'enumerable': true,
		'get': function get() {
			return p;
		},
		'set': function set( value ) {
			if ( !isProbability( value ) ) {
				throw new TypeError( format( 'invalid assignment. Must be a number on the interval: [0, 1]. Value: `%s`.', value ) );
			}
			p = value;
		}
	});
	return this;
}
Binomial distribution constructor.

@constructor
@param {PositiveInteger} [n=1] - number of trials
@param {Probability} [p=0.5] - success probability
@throws {TypeError} `n` must be a positive integer
@throws {TypeError} `p` must be a number between 0 and 1
@returns {Binomial} distribution instance

@example
var binomial = new Binomial( 5, 0.1 );

var y = binomial.cdf( 0.8 );
// returns ~0.59

var v = binomial.mode;
// returns 0.0