content_image/338962.jpg content_image/338961.jpg content_image/338963.jpg content_image/338964.jpg
Given q and a coefficient ratio r at coefficient k we can now find the correct p through a simple iteration scheme: If 

then p > q > 0 and we use 

which is obtained from setting (30) to r . As start value of p we may use a number slightly larger than q . If 

then 0 < p < q and we use 

<img src='content_image/338962.jpg'>

<img src='content_image/338961.jpg'>

<img src='content_image/338963.jpg'>

<img src='content_image/338964.jpg'>

and use 0 as the starting value for p . To prove that these iteration schemes actually converge one would have to show that their derivatives with respect to p is at most 1 using the start value. Since we have no such proof we will leave it at that and just claim that they are practical. 

Given a p, q -binomial distribution, or a distribution that we wish to approximate by a p, q -binomial distribution, can we find the pair p, q > 0 that generated it such that the distribution of p, q -binomial coefficients have the correct probability and ratio r at coefficient k ? An iteration method again solves this problem practically under the assumption p > q . Suppose this input distribution has the probabilitites P (0) , P (1) . . . , P ( n ). Let k , P ( k ), r = P ( k − 1) / P ( k ) and an ϵ be given as input parameters. 

Algorithm p, q -Find 

1. Assign q$_{min}$ ← 0 and q$_{max}$ ← ( k r ( $^{n}$−k +1) ) 1 n − 2 k $^{+1}$. 

2. q ← ( q$_{min}$ + q$_{max}$ ) / 2 

3. Compute the corresponding p as in the method above. 

4. If P$_{p,q}$ ( n, k ) < P ( k ) then q$_{min}$ ← q , otherwise q$_{max}$ ← q . 

5. If q$_{max}$ − q$_{min}$ < ϵ then exit loop, otherwise jump to step 2. 

