       Re: Binomial ratio expectation

• To: mathgroup at smc.vnet.net
• Subject: [mg49936] Re: [mg49905] Binomial ratio expectation
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Fri, 6 Aug 2004 03:10:09 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Needs["Statistics`DiscreteDistributions`"];

dist=BinomialDistribution[n, w];

ev=FullSimplify[ExpectedValue[x/(2+x), dist,x], 0<=w<=1]

(-2*(w - 2)*w*(1 - w)^n - 2*(1 - w)^n +
(n + 2)*w*(n*w + w - 2) + 2)/((n + 1)*(n + 2)*w^2)

Limit[ev , w->0]

0

ev /. w -> 1 // Simplify

n/(n + 2)

ev == FullSimplify[Sum[x/(x+2)*PDF[dist,x], {
x,0,n}], 0<=w<=1]

True

Bob Hanlon

>
> From: Ismo Horppu <ishorppu at NOSPAMitu.st.jyu.fi>
To: mathgroup at smc.vnet.net
> Date: 2004/08/05 Thu AM 09:22:25 EDT
> To: mathgroup at smc.vnet.net
> Subject: [mg49936] [mg49905] Binomial ratio expectation
>
> I have the following problem, I need to compute
> EXPECTATION[X/(2+X)],
> where X follows Binomial distribution with n trials and success
> probability of w.
>
> I have tried to solve it with Mathematica (version 4.1) as
> Sum[((x)/(2 + x))*Binomial[n, x]*w^x*(1 - w)^(n - x), {x, 0, n}]
>
> I omit here the result which seems to be okay (according to
> simulations) for values 0<w<1. Problem is that result (intermediate
> or full simplified one) is not defined with values 0 or 1 of parameter w.
> However, it is trivial to compute the result by hand on those cases
> (as the X is then a fixed constant, 0 or n).
>
> Does anyone know how to get the full result with Mathematica, or at
> least a warning that the result is partial. I am also interested in
> whether someone knows what kind of summation formula Mathematica
uses
> for the sum, some kind of binomial identity formula perhaps? (I am
> unable to find which one, any references would be appreciated).
>

```

• Prev by Date: Re: Binomial ratio expectation
• Next by Date: Re: populate a list with random numbers from normaldistribution?
• Previous by thread: Re: Binomial ratio expectation
• Next by thread: Re: Binomial ratio expectation