function factory( n ) {
	var mlim;
	if ( !isPositiveInteger( n ) || !isfinite( n ) ) {
		return constantFunction( NaN );
	}
	mlim = n * ( n + 1 ) / 2;
	return pdf;

	/**
	* Evaluates the probability density function (PDF) for the distribution of the Wilcoxon signed rank test statistic.
	*
	* @private
	* @param {number} x - input value
	* @returns {Probability} evaluated PDF
	*
	* @example
	* var y = pdf( 2 );
	* // returns <number>
	*/
	function pdf( x ) {
		if ( isnan( x ) ) {
			return NaN;
		}
		if ( !isInteger( x ) ) {
			return 0.0;
		}
		if ( x < 0.0 || x > mlim ) {
			return 0.0;
		}
		return exp( ln( weights( x, n ) ) - ( n * LN2 ) );
	}
}
Returns a function for evaluating the probability density function (PDF) for the distribution of the Wilcoxon signed rank test statistic with `n` observations.

@param {PositiveInteger} n - number of observations
@returns {Function} PDF

@example
var pdf = factory( 8 );
var y = pdf( 4.0 );
// returns ~0.008

y = pdf( 17.0 );
// returns ~0.051