123k views
5 votes
Let x and y be independent each uniformly distributed on {1,2,...,n} find p(x < y )

User Derigible
by
7.9k points

1 Answer

4 votes
If we draw the contingency table of x (vertical) against y (horiz.), we have a square.
For n=4, we have (legend: < : x<y = : x=y > : x>y

y 1 2 3 4
x
1 = < < <
2 > = < <
3 > > = <
4 > > > =

We see that there are n(n-1)/2 cases of x<y out of n^2.
Therefore,
p(x<y)=n(n-1)/(2n^2)=(n-1)/(2n)

However, if the sample space is continuous, it will be simply p(x<y)=1/2.

User Yas Tabasam
by
7.7k points