# uniform distribution probablity [closed]

Let $X$ and $Y$ be independent random variables each having the uniform distribution on $\{0, 1, ... , N\}$.

Find

i) $P(\min(X,Y))$

ii) $P(\max(X,Y))$

iii) $P(|Y-X|)$ .

I always get confused with this kind of problem of minimum and maximum in probability. Can any general method be applied here?

## closed as off-topic by Did, flawr, Em., user26857, Stefan MeskenFeb 28 '16 at 21:19

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Did, flawr, Em., user26857, Stefan Mesken
If this question can be reworded to fit the rules in the help center, please edit the question.

First, fix a certain number $z$ between $0$ and $N$. Note that $\min(X,Y)\geq z$ only if both $X$ and $Y$ are larger than $z$. Since $X$ and $Y$ are independent, their joint distribution factorizes (as per @flawr answer above) $$P_{X,Y}(X=x,Y=y)=P_X(X=x)P_Y(Y=y)=\frac{1}{(N+1)^2}\ .$$ The general procedure is now summing over all possible values your random variables can take (weighted with their joint probabilities), such that a certain condition is verified (namely $X$ and $Y$ both larger than $z$) $$P(\min(X,Y)\geq z)=\sum_{x=0}^{N}\sum_{y=0}^{N}P_{X,Y}(X=x,Y=y)\Theta(x-z)\Theta(y-z)\ ,$$ where $\Theta(t)=1$ for $t\geq 0$ and $=0$ otherwise. Therefore $$P(\min(X,Y)\geq z)=\frac{1}{(N+1)^2}\sum_{x=z}^{N}\sum_{y=z}^{N}1=\frac{(1+N-z)^2}{(1+N)^2}\ .$$ [The initial summation limits are $(0,N)$ as these are all possible values in the alphabets that $X$ and $Y$ can take. Due to the Theta constraints, the summation range gets truncated, and only goes from $z$ to $N$ (all the other summands are zero). To compute the sum of $1$ over a certain range, well, I don't think I have to explain this.] For example if $z=0$, the probability that $\min(X,Y)\geq 0$ is $1$ (as the minimum of two numbers between $0$ and $N$ is surely larger or equal to zero). If $z=N$, this probability is $1/(N+1)^2$, because out of the $(N+1)^2$ possible pairs of values $(X,Y)$, only the pair $(X=N,Y=N)$ would match the requirement $P(\min(X,Y)\geq N)$. Can you take it from here?

Edit. From $P(\min(X,Y)\geq z)$ we can compute the probability $P(\min(X,Y)= z)$ as $$P(\min(X,Y)= z)=P(\min(X,Y)\geq z)-P(\min(X,Y)\geq z+1)=$$ $$\frac{(1+N-z)^2}{(1+N)^2}-\frac{(1+N-z-1)^2}{(1+N)^2}=\frac{2 N-2 z+1}{(N+1)^2}\ ,$$ as per textbook solution given in the comment.

• how to do summation and set limit for summation also answer in book is given as 2(N-z)+1/(N+1)^2 – maths student Feb 28 '16 at 10:20
• same trick can be used for maximum or not – maths student Feb 28 '16 at 10:43
• Sure. Try and write back if you need more help. – Pierpaolo Vivo Feb 28 '16 at 12:57

There is one "trick" you can apply when dealing with minima and maxima: Note that

$$P(\max(X,Y) < x) = P(X < x \text{ and } Y < x)$$

• But how we proceed after that? – maths student Feb 28 '16 at 9:54
• As $X$ and $Y$ are independend, you can factorize $P(X < x \text{ and } Y < x ) = P(X < x) P(Y < x)$ – flawr Feb 28 '16 at 9:57
• but how to calculate probablity this is the main thing that I don"t understand – maths student Feb 28 '16 at 10:00
• You already confirmed the formula that @PierpaoloVivo wrote in his comment. – flawr Feb 28 '16 at 10:02
• X=Y case is also there\ – maths student Feb 28 '16 at 10:03