Re: calculating P(X>=Y)
- From: illywhacker <illywacker@xxxxxxxxx>
- Date: Thu, 5 Feb 2009 00:19:46 -0800 (PST)
On Feb 4, 9:28 pm, "Luis A. Afonso" <lic...@xxxxxxxxxxx> wrote:
Mark said:
Date: Feb 4, 2009 9:02 AM
Author: VonTressMS
Subject: Re: calculating P(X>=Y)
On Feb 4, 7:57 am, vontres...@xxxxxx wrote:
On Feb 4, 12:41 am, sad...@xxxxxxxxx wrote:
hello, how do i calculate P(X>=Y), where X and Y having uniform
density on {0,1...N}?
thanks!
It is (N+1)/(2*N) if X and Y are independent. This is because there
are (N+1)N/2 points satisfying the condition X>=Y on an (X,Y) grid,
and each point has a probability of 1/(N*N) under the assumption of
independence.
If you don't assume independence, then you have to resort to brute
force summation of the probabilities where X and Y satisfy X>=Y.
Mark
Sorry, it should be N/(2*(N+1)) since the probability for each point is 1/((N+1)*(N+1)). I forgot to count the zero in my answer above.
It gets messier if X and Y have different values of N, say Nx and Ny.
You run into these kinds of problems in the exact analysis of
categorical data, but the probabilities are binomial instead of
uniform. The uniform is a special case where you can get a simple
closed form solution. Mark
My Response
Let be Y =
_________0__1__2__3__... n-1__n
The probability to have X>=Y given Y , p(X>=Y|Y) are respectively
_(n+1)/(n+1), n/(n+1) , ... , 2/(n+1), 1/(n+1)
Then, because
1+ 2+ ...+ (n+1) = [(1+(n+1))/2]*(n+1)= (n+1)*(n+2)/2
One has, finally:
p(X>=Y) = (n+2)/(2*(n+1))
Suppose [0, 1, 2] , n=2 . Probability to get Y is always 1/3, those of X are 3/3 (for Y=0), 2/3 (for Y=1) and 1/3 (for Y=2) . Then results 3/9 + 2/9 + 1/9 = 6/9 = 2/3.
The formula above: (2+2)/(2*3)=2/3.
______________ X________
_________0_____1_____2__
Y=__ 0___*_____*_____*__
_____1__ *_____*________
_____2__ *______________
Mark´s formula, n/(2*(n+1)), gives p=1/3, wrongly, I guess.
***************************
Luis A. Afonso
Well done Afonso.
illywhacker;
.
- References:
- calculating P(X>=Y)
- From: sadirh
- Re: calculating P(X>=Y)
- From: Luis A. Afonso
- calculating P(X>=Y)
- Prev by Date: Re: scale equivariance
- Next by Date: Re: clustering data by probability distribution
- Previous by thread: Re: calculating P(X>=Y)
- Next by thread: Re: calculating P(X>=Y)
- Index(es):
Relevant Pages
|