# Computing probability distribution function for uniform random variables and Y=1-X

X is uniform random variable in [0,1] and Y=1-X. How do I calculate the distribution function F(X,Y)? I can see that Y is also uniformly distributed and can draw the intervals. But I am unable to compute the distribution function when x+y>1 & x,y in [0,1]. How do I compute it for this specific case?

I'm interpreting your question as concerning the cdf, which by definition is a function $F$ for which

$$F(x,y) - F(x,0) - F(0,y) + F(0,0) = \Pr(X \le x, Y \le y) \text{;}$$

$$F(0,0) = 0.$$

For $x + y \lt 1$, the right hand side is zero and the left hand side becomes a statement that $F$ is a bilinear function, implying (in conjunction with some of the initial values specified below) that the graph of $F$ is part of a plane. For $x + y \gt 1$, the assumption of uniform distributions implies $F$ must be increasing at a unit rate in both $x$ and $y$, whence the graph of $F$ in this region is a part of a plane of the form $x + y = \text{constant}$. From the evident restrictions

$$F(x, 0) = F(0, y) = 0,$$

$$0 \le x \le 1, 0 \le y \le 1,$$

it is geometrically obvious that the first piece of the graph must lie in the xy plane and the second piece must intersect the first along the line segment $x + y = 1, 0 \le x \le 1$. The full solution therefore is

$$F(x,y) = 0 \quad \text{if} \quad x + y \le 1$$

$$F(x,y) = x + y - 1 \quad \text{if} \quad x + y \gt 1.$$

This result is the Fréchet–Hoeffding minimum copula $W(x,y)$. Generally, a copula expresses a multivariate distribution after the marginal variables have been subjected to a probability integral transformation; that is, the marginals have been made uniform. All 2D copulas must have values between this minimum $W$ and the maximum copula $M(x,y) = \min(x,y)$. $W$ expresses maximum anticorrelation between the variables while $M$ expresses maximum correlation between them. Follow the link (a Wikipedia article) for Mathematica plots of these copulas.

• +1 A better answer than mine as it explicitly takes into consideration the range over which the pdf is non-zero. – user28 Aug 25 '10 at 16:36
• @Srikant: Thanks; you are generous. Did you notice the connection with the theory of copulas? Maybe we should even add a "copula" tag. – whuber Aug 25 '10 at 17:39
• @whuber My familiarity with copulas does not go very far. In any case, I am not sure how many will see the connection. So, a copula tag may just confuse some. – user28 Aug 25 '10 at 21:56
• @Srikant: Granted. But isn't the point of tags to facilitate searches and create semantic ties among threads? I'm sure plenty of existing tags also have the potential to confuse the uninitiated already. Maybe this is a discussion for the meta site? – whuber Aug 26 '10 at 1:05
• @whuber True. But, right now the connection to copulas is a bit obscure for those who do not know what they are. Perhaps, you can add a line or two to make the connection in which case the tag 'copula' may make sense. – user28 Aug 26 '10 at 13:54

$F(x,y) = P(X \le x, Y \le y)$

Using the fact that $Y= 1-X$ and after simplifying, the above can be re-written as:

$F(x,y) = P(1-y \le X \le x)$

Since, $X$ is a uniform between 0 and 1, it follows that:

$F(x,y) = x+y-1$

Update

The above is a bit sloppy as I did not specify the domain of the cdf where it is non-zero appropriately. Consider:

$F(x,y) = P(1-y \le X \le x)$

Thus,

$F(x,y) = x+y-1$

Two points about the above cdf:

1. For the above cdf to be non-zero it must be the case that:

$x > 1-y$

2. Also, note that the cdf attains the value of 1 when $x+y=2$.

Thus, the correct way to represent the cdf is:

$F(x,y) = 0$ if $x+y \le 1$

$F(x,y) = x+y-1$ if $1 \le x+y \le 2$

$F(x,y) = 1$ otherwise

• And what if x=12 and y=1/2? Then your answer will have F(12, 1/2)=12+1/2-1=23/2. – PeterR Oct 14 '10 at 14:15
• @PeterR good point! Fixed the error. – user28 Oct 14 '10 at 14:44