id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
10770 Expectation of probability spaces is defined improperly Jamie Weigandt Jamie Weigandt "I'm not sure if anyone really maintains the file
sage/local/lib/python2.6/site-packages/sage/probability/random_variable.py
but there's a definite problem with the way expectation is defined.
{{{
sage: X=frequency_distribution([1,1,1,2,2,2])
sage: X.expectation()
0.500000000000000
}}}
Instead of weighting values by probabilities the function sums the squares of the probabilities involved. It should be an easy fix, I""ll try to put a patch up soon, if you're used to submitting patches and bored, you'll probably get to it before me.
" defect closed minor sage-duplicate/invalid/wontfix misc invalid Probability, Expectation N/A