Re: eqiprobable intervals
- To: mathgroup at smc.vnet.net
- Subject: [mg41056] Re: [mg41020] eqiprobable intervals
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Wed, 30 Apr 2003 04:23:58 -0400 (EDT)
- References: <200304290923.FAA09453@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
susanlcw at aol.com wrote:
>
> Hi all,
>
> I am interested in finding a program that will divide the domain of
> a probability density function
> into n non-overlapping equiprobable intervals. Specifically, I am working
> with a normal distribution, where mean and standard deviation are known
> (and I know how to define the pdf), so the area under the curve on each
> interval would be 1/n.
>
> Any help would be greatly appreciated.
> Thanks,
> Susan
This will work with any distribution for which Quantile is implemented.
equiprobableIntervals[dist_,n_] :=
Partition[Table[Quantile[dist,k/n], {k,0,n}], 2, 1]
Example:
<<Statistics`
dist = NormalDistribution[];
In[23]:= intervals = N[equiprobableIntervals[dist,8]]
Out[23]= {{-Infinity, -1.15035}, {-1.15035, -0.67449}, {-0.67449,
-0.318639},
{-0.318639, 0.}, {0., 0.318639}, {0.318639, 0.67449},
{0.67449, 1.15035}, {1.15035, Infinity}}
We check that this is correct.
In[24]:= Map[CDF[dist,#[[2]]]&, intervals]
Out[24]= {0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1}
Daniel Lichtblau
Wolfram Research
- References:
- eqiprobable intervals
- From: <susanlcw@aol.com>
- eqiprobable intervals