Question: Maple can't seem to handle summations of binomial distributions accurately

Maple seems to give me very inaccurate results for this computation, I'm wondering if this is a known issue and if there's a way to fix it? Worksheet:

Exact commands I ran:
B := (n, i, p) -> binomial(n, i)*(p^i)*(1-p)^(n-i)/i;


This outputs 0, when it should output 1/2. See image attached:


Is there a fix for this?

Please Wait...