# commons-dev mailing list archives

##### Site index · List index
Message view
Top
From F Norin <f...@bredband.net>
Subject Re: [math] Questions regarding probability distributions
Date Wed, 20 Oct 2004 17:09:34 GMT
```
> >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 counter-examples 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.12-13, 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, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org

```
Mime
View raw message