> >Note: There are also distributions that are neither discrete, continuous
> > or a mixture of the two. For example, there are numerous distributions
> > based upon the Cantor ternary sets.
>
> Practical counterexamples like what you have above are more compelling ;)
Sure, a standard example of a Cantor ternary set distribution can be created
like this:
Let Y1, Y2, ... be a sequence of independent, identically distributed random
variables with P(Y=0)=P(Y=1)=0.5
Recall: A Cantor ternary set is created by removing the "middle third" from
the closed interval [0, 1], i.e. the open interval (1/3, 2/3) is removed, ad
infinitum.
Now, consider a random variable X defined on the interval [0, 1] such that
X is in the interval [0, 1/3] if Y1=1 and in the interval [2/3, 1] otherwise,
call the interval that contains X i1.
Let X be in the lowest third of i1 if Y2=1 and in the highest third of i1
otherwise, call the new interval that contains X i2.
Let X be in the lowest third of i2 if Y3=1 and in the highest third of i2
otherwise, call the new interval that contains X i3.
And so on for Y4, Y5, ....
Then X satisfies the requirements for a probability distribution but it is
obviously neither discrete, nor continuous nor a mixture of the two.
Distributions like this are actually used in practical applications as
probability models within fields such as biophysics, molecular biology and
quantum mechanics.
[Proving that X is a probability distribution isn't exactly trivial it
requires rather advanced concepts from measure theory, see Chung, "A course
in Probability Theory", Academic Press (1974), p.1213, for a rigorous
treatment of this.]
> >but if you want a completely generic and typesafe definition you should
> >go for something like
> >
> >public interface ProbabilityDistribution {
> > public Probability distributionFunction(Number x);
> >}
>
> I think we can make it work with doubles and don't see a big loss there. I
> guess this is where I get off the bus ;)  though I see your point.
Ok, but I do think there is a strong case for having a separate Probability
class.
/Frank N

To unsubscribe, email: commonsdevunsubscribe@jakarta.apache.org
For additional commands, email: commonsdevhelp@jakarta.apache.org
