We need to pick $2$ number randomly from $1$ to $n$. what is the probability of one number being smaller than $k$ $(1<K<n)$ and the other one is greater than $k$?
My attempt
Here I assumed whatever $k$ is gonna be, it doesn't matter as one number will be always greater than the other number.
Given a set of numbers: $1 - n$.
Number of ways the first number can be picked is : $n$ (any number between $1 - n$)
Number of ways the second. number can be picked is : $n$ (any number between $1 - n$)
Total Combination is $n \times n = n^{2}$.
Now to pick the numbers in such a way that one is greater than the other,
Number of ways the first number can be picked is : $n$ (any number between $1 -n$)
Number of ways the second. number can be picked is : $n-1$ (any number other than the first number)
favorable combinations we get is $n(n-1)$
The probability that the two numbers picked between 1 to n, where one number is greater than the other, is : $\dfrac{n(n-1)}{n^{2}} = \dfrac{n-1}{n}$.
I am not sure whether am I right or wrong?
There are $n-k$ numbers greater than $k$ and $k-1$ numbers smaller. Thus Your probability should be $2\times\frac{(n-k)\times(k-1)}{n^{2}}$