Hi Paul,

> Thanks for explaining that, I see how that causes problems when S is not a
> set of numbers. Even so, would it make sense for the random variable ps to
> be the identity function X(x) = x on the probability space ps? Currently the
> random variable ps is the function X(x) = P(x). Is this a useful random
> variable that I'm just not aware of?

Well, ps is a probability space (you did create it as
DiscreteProbabilitySpace,
rather than DiscreteRandomVariable, which I had missed in my first
reply),
hence its values are necessarily probabilities.  There is no other
valid choice.

To create a DiscreteRandomVariable, you currently must first create a
probability space, then the function on that space.  One could have
shorter
constructors which assume a finite uniform probability space, if not
given.

The order of the arguments is probability space, then function or
values,
but if a probability space is no longer required, this order should
change.

--David


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to