Re: partitioning into equiprobable intervals
- To: mathgroup at smc.vnet.net
- Subject: [mg41062] Re: [mg41013] partitioning into equiprobable intervals
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Wed, 30 Apr 2003 04:24:54 -0400 (EDT)
- References: <200304290921.FAA09409@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Use Quantiles in the Statistics AddOn.
In[1]:=
Needs["Statistics`"]
The function defined below, equiProb, gives the n - 1 endpoints of the
successive intervals, other than -Infinity and +Infinity, for any
distribution dist and integer n.
In[2]:=
equiProb[dist_, n_] := Table[Quantile[dist, j],
{j, 1/n, (n - 1)/n, 1/n}];
For example, for a standard normal distribution,
In[3]:=
dist=NormalDistribution[0, 1];
In[4]:=
equiProb[2]
Out[4]=
{0}
Here we have two equiprobable adjoining intervals, viz., {-Infinity, 0} and
{0, +Infinity}.
In[5]:=
equiProb[3.]
Out[5]=
{-0.430727,0.430727}
Here, we have three equiprobable intervals, viz., {_Infinity, -0.430727},
{-0.430727, 0.430727}, and {0.430727, +Infinity}. And so on.
In[6]:=
equiProb[10.]
Out[6]=
{-1.28155, -0.841621, -0.524401, -0.253347, 0., 0.253347, 0.524401,
0.841621, 1.28155}
Tomas Garza
Mexico City
----- Original Message -----
From: <susanlcw at aol.com>
To: mathgroup at smc.vnet.net
Subject: [mg41062] [mg41013] partitioning into equiprobable intervals
> Hi all,
>
> I am interested in taking a normal distribution with mean and standard
> deviation known, and partitioning it into n equiprobable intervals.
> This means that the area under the curve on each interval will be 1/n.
> I know how to define the pdf, but I am at a loss as to how to design
> some type of loop (?) that will accomplish this task.
>
> I would greatly appreciate any suggestions.
> Thanks,
> Susan
>
>
>
- References:
- partitioning into equiprobable intervals
- From: <susanlcw@aol.com>
- partitioning into equiprobable intervals