MathGroup Archive 2004

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

Search the Archive

Re: Binomial ratio expectation

This does what you want:

Load the discrete distributions package (see the documentation in the Help


Evaluate the required expectation value and simplify the result:

FullSimplify[ExpectedValue[x/(2 + x), BinomialDistribution[n, w], x]]

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

N.B. I haven't checked the correctness of this result.

Steve Luttrell

"Ismo Horppu" <ishorppu at> wrote in message
news:cetem8$6fs$1 at
> I have the following problem, I need to compute
> 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: Problem with eval. of neg. cube root of neg. #
  • Next by Date: Re: Binomial ratio expectation
  • Previous by thread: Re: Binomial ratio expectation
  • Next by thread: Re: Binomial ratio expectation