I've been experimenting with probability and found that in Sage, a probability space is also a random variable by inheritance. This may be useful. Without it, creating a random variable requires two classes: a probability space and a random variable on that probability space.
Unfortunately, the random variable doesn't work like I expected. For example: sage: ps = DiscreteProbabilitySpace([1,2,3],{1:1/3,2:1/3,3:1/3}) sage: ps.expectation() 0.333333333333333 (I expected 2.00000000000000) I've prepared a patch that gives me the value I'd expect, but I'd like to make sure this is the proper behavior. -- Paul --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---