RE: Re: Re: approximation for partitial binomial sum
- To: mathgroup at smc.vnet.net
- Subject: [mg36415] RE: [mg36403] Re: [mg36381] Re: [mg36239] approximation for partitial binomial sum
- From: "DrBob" <drbob at bigfoot.com>
- Date: Fri, 6 Sep 2002 03:16:44 -0400 (EDT)
- Reply-to: <drbob at bigfoot.com>
- Sender: owner-wri-mathgroup at wolfram.com
Borrowing liberally from Daniel, I like the following:
ClearAll[sumBin, sumBinOdd, sumBinEven, index]
sumBinOdd = Sum[Binomial[2index + 1, k]*p^(2index + 1 - k)*(1 - p)^k, {
k, 0, index - 1}];
sumBinEven = Sum[Binomial[2index, k]*
p^(2index - k)*(1 - p)^k, {k, 0, index - 1}];
sumBin[n_, Odd] = sumBinOdd /. {index -> (n - 1)/2};
sumBin[n_, Even] = sumBinEven /. {index -> n/2};
sumBin[n_?EvenQ] = sumBin[n, Even];
sumBin[n_?OddQ] = sumBin[n, Odd];
It allows you to see the solution symbolically for both odd and even n,
and also to calculate it when n is a known integer. We also have the
opportunity, for instance, to assume that 3x is even and calculate
sumBin[3x, Even]
p^(3*x)*((1/p)^(3*x) - ((-4 + 4/p)^((3*x)/2)*
Gamma[1/2 + (3*x)/2]*Hypergeometric2F1[1,
-((3*x)/2), 1 + (3*x)/2, (-1 + p)/p])/(Sqrt[Pi]*Gamma[1 +
(3*x)/2]))
or assume 3x is odd and calculate
sumBin[3*x, Odd]
p^(3*x)*((1/p)^(3*x) - (2^(3*x)*(-1 + 1/p)^((1/2)*(-1 + 3*x))*
Gamma[3/2 + (1/2)*(-1 + 3*x)]*Hypergeometric2F1[1,
-1 + (1/2)*(1 - 3*x), 1 + (1/2)*(-1 + 3*x), (-1 +
p)/p])/(Sqrt[Pi]*
Gamma[2 + (1/2)*(-1 + 3*x)]))
Bobby Treat
-----Original Message-----
From: Daniel Lichtblau [mailto:danl at wolfram.com]
To: mathgroup at smc.vnet.net
Subject: [mg36415] [mg36403] Re: [mg36381] Re: [mg36239] approximation for
partitial binomial sum
Constantine wrote:
>
> Hi.
> I want to get some F and R such that:
>
> F[n,p] + R[n,p] = Sum[Binomial[n,k] p^(n-k) (1-p)^k, {k, 0,
Floor[n/2] - 1}],
> when F[n,p] is an approximation to the sum and the R is the remaining
error.
>
> Thanks in advance for any hint.
> Constantine.
>
> At 06:34 AM 8/28/2002 -0400, you wrote:
>
> >In a message dated 8/28/02 4:44:13 AM, celster at cs.technion.ac.il
writes:
> >
> >
> >>I'm looking for a way of finding the approximation for partitial
binomial
> >>sum.
> >>I'll be pleasant for any hint..
> > [...]
> Office: Taub 411
> Tel: +972 4 8294375
You can get a closed form in terms of special functions if you split
into two cases depending on whether n is even or odd.
In[39]:= n = 2*m;
In[40]:= InputForm[Sum[Binomial[n,k]*p^(n-k)*(1-p)^k, {k,0,m-1}]]
Out[40]//InputForm=
p^(2*m)*((p^(-1))^(2*m) - ((-4 + 4/p)^m*Gamma[1/2 + m]*
Hypergeometric2F1[1, -m, 1 + m, (-1 + p)/p])/(Sqrt[Pi]*Gamma[1 +
m]))
In[41]:= n = 2*m+1;
In[42]:= InputForm[Sum[Binomial[n,k]*p^(n-k)*(1-p)^k, {k,0,m-1}]]
Out[42]//InputForm=
p^(1 + 2*m)*((p^(-1))^(1 + 2*m) - (2^(1 + 2*m)*(-1 + p^(-1))^m*Gamma[3/2
+ m]*
Hypergeometric2F1[1, -1 - m, 1 + m, (-1 + p)/p])/(Sqrt[Pi]*Gamma[2 +
m]))
Daniel Lichtblau
Wolfram Research