avg(Randomize, reorder, subtract adjacent)?
- From: randomman <randomman@xxxxxxxx>
- Date: Wed, 31 May 2006 00:30:51 +0200
Hm I was short of ideas for the subject :-P
I'm not very strong in statistics.
I need to solve this problem: I have N stochastic variables.
All variables have the same distribution. I'm not sure what distribution these variables would have, probably the following could be a good approximation for me:
density(x) = 1/100 * 1/(x+1)^1.01 | for x >= 0
density(x) = 0 | x < 0
cumulate(x) = 1 - 1/(x+1)^0.01 | x >= 0
cumulate(x) = 0 | x < 0
inv_cumul(x) = 1/(1-x)^100 - 1 | 0 <= x < 1
but I might also be interested in knowing the solution even for a "more standard" probability distribution.
The problem is this: I need to randomize N of them, sort them from the smallest to the highest, repeat the process endless times to obtain an infinite number of sorted lists, then calculate the average, across all the lists, of the ith variable minus the (i-1)th variable (this is always positive: the list is sorted). It should be a value dependent on i, N and the density function but I have no clue of how to calculate it.
Symbolically, not with a monte carlo simulation (too easy!:-P).
I try to explain my question better with some examples of an equivalent computer simulation (in metalanguage):
----
Problem with 2 variables:
Y21acc = 0 //accumulator for computing the average
repeat 10000000..000 times:
{
X1 = inv_cumul(random(0,1)) //randomize X1 with the density prob. above
X2 = inv_cumul(random(0,1)) //randomize X2 with the density prob. above
Y1 = min(X1,X2)
Y2 = max(X1,X2)
//(so that Y1 <= Y2)
Y21acc += Y2-Y1
}
print Y21acc / 10000000..000 //this is avg(Y2-Y1), what I want to know
----
Problem with 3 variables:
Y21acc = 0
Y32acc = 0
repeat 10000000..000 times:
{
X1= inv_cumul(random(0,1)) //randomize values for X1,X2,X3 w/above dens.
X2= inv_cumul(random(0,1))
X3= inv_cumul(random(0,1))
(Y1,Y2,Y3) = sort(X1,X2,X3)
Y21acc += Y2-Y1
Y32acc += Y3-Y2
}
//What I want to know:
print Y21acc / 10000000..000 //avg(Y2-Y1) = ?
print Y32acc / 10000000..000 //avg(Y3-Y2) = ?
----
And also in general for N variables, randomize then sort, then
for i = 1..N I would need to know how to compute all the averages avg(Xi-X(i-1))
----
Is there a way to do such stuff symbolically without simulation?
Thanks in advance
.
- Prev by Date: Re: Inverted Bell Curve
- Next by Date: Re: Chi-Squared Test (goodness of fit) confidence levels
- Previous by thread: A question in linear algebra
- Next by thread: Does there exist POSITIVE stable distributions with "alpha=1" (Feller's notations)
- Index(es):
Relevant Pages
|