WNChygepdf returns Wallenius' non-central hypergeometric probability density values.

`Wpdf=WNChygepdf(X,N,K,M,W)`

example

This function is taken from the toolbox "Generation of Random Variates" (function wallen_pdf.m) created by Jim Huntley, that can be found at the Mathworks page:

https://it.mathworks.com/matlabcentral/fileexchange/35008-generation-of-random-variates).

FSDA uses the function only to demonstrate the coherence of the non-central hypergeometric distribution probability density values with samples extracted with FSDA function randsampleFS using option for weighted sampling without replacement.

To illustrate the meaning of Wallenius' function parameters, let's use the classical urn example, with $m_{1}$ red balls and $m_{2}$ white balls, totalling $M = m_{1}+m_{2}$ balls. $N$ balls are drawn at random from the urn one by one without replacement. Each red ball has the weight $\omega_{1}$, and each white ball has the weight $\omega_{2}$; the probability ratio of red over white balls is then given by $W = \omega_{1} / \omega_{2}$.

A. Fog (2008). Calculation Methods for Wallenius' Noncentral Hypergeometric Distribution. Communications in Statistics - Simulation and Computation Volume 37, 2008 - Issue 2.