Does anybody know how to do this sort of thing in Sage?  Asked by me
today by a Stanford CS professor...

"It would be nice if it knew how to simplify the tail probability of a
binomial distribution. Mathematica can do:

FullSimplify[ Sum[Binomial[total, k] x^k (1 - x)^(total - k), {k, 0, n}]]
-> (1 - x)^total ((1/(1 - x))^
   total - (1 - x)^(-1 - n) x^(1 + n)
     Binomial[total, 1 + n] Hypergeometric2F1[1, 1 + n - total, 2 + n,
      x/(-1 + x)])

With Sage it doesn't seem to have the hypergeometric functions (or
maybe it just doesn't know the simplification):

total, n, x, k = var('total', 'n', 'x', 'k')

simplify( sum( binomial(total,k) * x^k * (1-x)^(total - k), k, 0, n))
-> sum(x^k*(-x + 1)^(-k + total)*binomial(total, k), k, 0, n)

I was finding it was really slow to evaluate this with big values..."

-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to