MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to simplify hypergeometrics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128424] Re: How to simplify hypergeometrics
  • From: Roland Franzius <roland.franzius at uos.de>
  • Date: Sun, 14 Oct 2012 23:42:21 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <k55o3n$e7q$1@smc.vnet.net> <k586hh$is3$1@smc.vnet.net> <k5ast0$nos$1@smc.vnet.net>

Am 13.10.2012 07:06, schrieb Dr. Wolfgang Hintze:
> On 12 Okt., 06:34, Roland Franzius <roland.franz... at uos.de> wrote:
>> Am 11.10.2012 08:14, schrieb Dr. Wolfgang Hintze:
>>
>>
>>
>>
>>
>>> Consider the probability function
>>
>>> p[n_, a_, b_, k_] :=
>>>    Binomial[k - 1, a - 1]*(Binomial[n - k, b - a]/Binomial[n, b]) /; {0
>>> <= a <=
>>>       b, n >= a}

Conditional definitions are counterproductive for algebraic evaluations.

>>> In[68]:= p[n, a, b, k]
>>
>>> Out[68]= (Binomial[-1 + k, -1 + a]*Binomial[-k + n, -a + b])/
>>> Binomial[n, b]
>>
>>> Now let's look for the zeroeth moment k^0 (for the higher ones the
>>> situation is similar)
>>
>>> In[69]:= k0 = Sum[p[n, a, b, k], {k, 1, n}]

Ok, I see, the k-spectrum is Range[1,n]

>>> Out[69]= ((-Binomial[-1, -a + b])*Binomial[n, -1 + a]*
>>>       Hypergeometric2F1[1 - a + b, 1 + n, 2 - a + n, 1] +
>>>      Binomial[0, -1 + a]*Binomial[-1 + n, -a + b]*
>>>       HypergeometricPFQ[{1, 1, 1 - a + b - n}, {2 - a, 1 - n}, 1])/
>>>    Binomial[n, b]
>>
>>> This should give 1, but it looks clumsy.
>>
>> All general expression with HypergeometricPFQ generally will be wrong
>> for integer parameters in the numerator parameters.
>>
>> One has to regularize by extracting and cancelling infinite Gamma
>> factors at negative integers but that means to have control of the
>> evaluation by understanding the limit formulas.
>>
>> Contrary to your assumption of a normalized ditribution the direct
>> conversion
>>
>> Binomial[n_,k_]:> Pochhammer[n-k+1,k]/k! leaves you with the expression
>>
>>    p[n_, a_, b_, k_]:=(b! Pochhammer[1 - a + k, -1 + a] Pochhammer[
>>     1 + a - b - k + n, -a + b])/((-1 + a)! (-a + b)! Pochhammer[
>>     1 - b + n, b])
>>
>> Simplify[Sum[p[6, a, b, k], {k, 0, n}]] /. {n->6 ,a -> 1, b -> 3}
>>
>> is not independent of a,b,n
>>
>> Perhaps a normalization constant is missing? In any binomial
>> distribution the normalized distribution has to contain n-th powers of
>> the parameters

> Hello Roland,
>
> thank you for your reply.
>
> 1) I extract your idea to use Pochhammer to convert the original
> distribution (which IS normalized, contrary to your statement)

You did not state explicitely that k>=1 and {a,b}\in N.

But even for Sum[...,{k,1,n}] the sum is not giving 1 in general.

So in general, the norm-1 is a complicated rational in a,b with 
(n-1)(n-2) zeros at integer values.

One had to know, from which type of problems this distribution comes 
from. But even with generating functions I don't get any clue.

>
> p[n_, a_, b_, k_] :=
>   Binomial[k - 1, a - 1]*(Binomial[n - k, b - a]/Binomial[n, b])
>
> to this form
>
> pp[n_, a_, b_,
>    k_] := (b!*Pochhammer[1 - a + k, -1 + a]*
>      Pochhammer[1 + a - b - k + n, -a + b])/
>       ((-1 + a)!*(-a + b)!*Pochhammer[1 - b + n, b])

Probably, there is na way to simplify beyond the formulas

ptable[n_,a_,b_]:=
Table[ ( (k-1)*!(n-k!)  )/(  (k-a)!*(n - k- (b-a) )!   ){k,1,n}]/
norm[n_,a_,b_]

norm[n_,a_,b_]:=( (-1 + a)!*(-a + b)!*Binomial[n,b] )

ptablenorm[n_, a_, b_] :=
  Sum[((k - 1)!*(n - k)!)/((k - a)!*(n - k - (b - a))!), {k, 1, n}]


The norm is a rational function in {a,b} with values {1, a<=b}, {0,a>b} 
at integer {a,b}

Plot[ptablenorm[12, a, 6]/norm[12,a,6] - 1, {a, 1,12}, PlotRange -> {-2, 2}]



>
> Comparing the two expressions for concrete values, also checking the
> nomalization:
>
> Table[p[10, 3, 4, k], {k, 1, 10}]
> Plus @@ %
>
> {0, 0, 1/30, 3/35, 1/7, 4/21, 3/14, 1/5, 2/15, 0}
>
> 1
>
> Table[pp[10, 3, 4, k], {k, 1, 10}]
> Plus @@ %
>
> {0, 0, 1/30, 3/35, 1/7, 4/21, 3/14, 1/5, 2/15, 0}
>
> 1
>
> 2a) Ok, so now we calculate again the zeroeth moment of k (which
> should give 1, of course).
> But, the result does not contain 2F1 anymore but is something
> (DifferenceRoot) which I have never seen before, and is not easily
> recognized as being = 1
>
> k0 = Sum[pp[n, a, b, k], {k, 1, n}]
>
> (1/(Gamma[a]*Gamma[1 - a + b]*Gamma[1 + n]))*(Gamma[1 + b]*Gamma[1 - b
> + n]*
>        DifferenceRoot[
>       Function[{\[FormalY], \[FormalN]}, {(-\[FormalN])*(-\[FormalN] +
> a - b +
>              n)*\[FormalY][\[FormalN]] + (-\[FormalN] - 2*\[FormalN]^2
> +
>              2*\[FormalN]*a - \[FormalN]*b + n + 2*\[FormalN]*n - a*n)*
>                      \[FormalY][
>             1 + \[FormalN]] + (-1 - \[FormalN] + a)*(-\[FormalN] +
>              n)*\[FormalY][2 + \[FormalN]] == 0, \[FormalY][1] == 0,
>                \[FormalY][2] == Gamma[n]/(Gamma[2 - a]*Gamma[a - b +
> n])}]][
>      1 + n])
>
> 2b) Trying now to simplify with all information about the parameters
> gives ...
>
> FullSimplify[k0, {Element[{n, a, b}, Integers],
>    Inequality[0, Less, a, LessEqual, b], n >= a}]
>
> FullSimplify::infd:Expression Gamma[1+b] Gamma[1-b+n]
> DifferenceRoot[Function[{\[FormalY],\[FormalN]},{-\[FormalN]
> Plus[<<4>>] \[FormalY][<<1>>]+Plus[<<7>>] \[FormalY][<<1>>]
> +Plus[<<3>>] Plus[<<2>>] \[FormalY][<<1>>]==0,\[FormalY][1]==0,\
> [FormalY][2]==Gamma[n]/(Gamma[<<1>>] Gamma[<<1>>])}]][1+n] simplified
> to Indeterminate. >>
>
> FullSimplify::infd:Expression (1/(Gamma[a] Gamma[1-a+b]
> Gamma[1+n]))Gamma[1+b] Gamma[1-b+n] DifferenceRoot[Function[{\
> [FormalY],\[FormalN]},{-\[FormalN] Plus[<<4>>] \[FormalY][<<1>>]
> +Plus[<<7>>] \[FormalY][<<1>>]+Plus[<<3>>] Plus[<<2>>] \[FormalY]
> [<<1>>]==0,\[FormalY][1]==0,\[FormalY][2]==Gamma[n]/(Gamma[<<1>>]
> Gamma[<<1>>])}]][1+n] simplified to Indeterminate. >>
>
> Indeterminate
>
> 3a) So telling Mathematica in advance everything known about the
> parameters, gives no evaluation at all
>
> Assuming[{Element[{n, a, b, k}, Integers],
>    Inequality[0, Less, a, LessEqual, b], n >= a, 1 <= k <= n},
>     k0 = Sum[pp[n, a, b, k], {k, 1, n}]]
>
> Sum[(b!*Pochhammer[1 - a + k, -1 + a]*
>      Pochhammer[1 + a - b - k + n, -a + b])/((-1 + a)!*(-a + b)!*
>      Pochhammer[1 - b + n, b]), {k, 1, n}]
>
> 3b) Putting Assuming under the sum
>
> k0 = Sum[Assuming[{Element[{n, a, b, k}, Integers],
>      Inequality[0, Less, a, LessEqual, b], n >= a, 1 <= k <= n},
>     pp[n, a, b, k]],
>       {k, 1, n}]
>
> (1/(Gamma[a]*Gamma[1 - a + b]*Gamma[1 + n]))*(Gamma[1 + b]*Gamma[1 - b
> + n]*
>        DifferenceRoot[
>       Function[{\[FormalY], \[FormalN]}, {(-\[FormalN])*(-\[FormalN] +
> a - b +
>              n)*\[FormalY][\[FormalN]] + (-\[FormalN] - 2*\[FormalN]^2
> +
>              2*\[FormalN]*a - \[FormalN]*b + n + 2*\[FormalN]*n - a*n)*
>                      \[FormalY][
>             1 + \[FormalN]] + (-1 - \[FormalN] + a)*(-\[FormalN] +
>              n)*\[FormalY][2 + \[FormalN]] == 0, \[FormalY][1] == 0,
>                \[FormalY][2] == Gamma[n]/(Gamma[2 - a]*Gamma[a - b +
> n])}]][
>      1 + n])
>
> gives us back the expression of attempt 2a).
>
> 4) Fixing n in advance results in a funny thing like this one
>
> FullSimplify[
>   With[{n = 10},
>    Assuming[{Element[{n, a, b, k}, Integers],
>      Inequality[0, Less, a, LessEqual, b], n >= a, 1 <= k <= n},
>         k0 = Sum[pp[n, a, b, k], {k, 1, n}]]]]
>
> (1440*b!*((28*(19 + 8*a - 9*b))/(Gamma[11 - a]*Gamma[2 + a - b]) +
> (214 +
>          3*a^2 + a*(5 - 4*b) + b*(-41 + 3*b))/
>             (Gamma[8 - a]*
>          Gamma[6 + a -
>            b]) + (7/((-8 + a)*(-7 + a)*(-6 + a)*(-5 + a)*Gamma[3 + a -
> b]) +
>                (12600 + a*(-7435 + (2305 - 228*a)*a) - 1385*b -
>             23*(-5 + a)*a*b + 2*(50 + a)*b^2 - 3*b^3)/Gamma[10 + a -
> b])/
>        Gamma[5 - a]))/
>     ((-a + b)!*Gamma[a]*Pochhammer[11 - b, b])
>
> In summary:
> I didn't get the desired result and need more help.


Help for what? Do you have a result from literature you try to verify?

-- 

Roland Franzius



  • Prev by Date: Re: Solve
  • Next by Date: Re: Ordinary Differential Equation: Mathematica
  • Previous by thread: Re: How to simplify hypergeometrics
  • Next by thread: Re: How to simplify hypergeometrics