Selecting a random number from $(0,1)\cup(1,\infty)$ A random number $a$ is selected from $(0,1) \cup  (1,\infty)$.
Let $A $ be the event that (a random number from $(0,1) \cup  (1,\infty))$ $ \in (0,1)$. Let $P(A) = x$
Let $B$ be the event such that (a random number from $(0,1) \cup  (1,\infty))$ $ \in (1,\infty)$.Therefore, $P(B)=1-x$
Now, let $b = \frac{1}{a}.$ Since, a is random, b is random.
If $a \in (0,1)$(Probablity is $x$)  then $b \in (0,1)$(Probablity is $1-x$)
Therefore, $x = 1-x.$
Therefore, $x = \frac12$ which is definitely not right.
What is going wrong?
 A: While the comments are correct that you cannot pick a random number "uniformly" from a set of infinite length, that is not the real problem here. Let's make a few changes to get the same situation:
Pick a point from $(0,1)\cup (1,4)$ with uniform distribution. This is possible on this set. There will be a probability of $\frac 14$ that the point is in $(0,1)$ and of $\frac 34$ that the point is in $(1,4)$.
Now define the function $$f(x) = \begin{cases}3x+1, &\quad x \in (0,1)\\\dfrac{4-x}3,&\quad x\in (1,4)\end{cases}$$
and define $b = f(a)$ similar to how you defined $b = \frac 1a$. Just as in your case $b$ will be in $(1,4)$ if and only if $a \in (0,1)$.
If we pick $a$ uniformly at random, then $P(a \in (0,1)) = \frac 14, P(a \in (1,4)) = \frac 34$.
So $P(b \in (0,1)) = \frac 34, P(b \in (1,4)) = \frac 14$.
And here is your mistake:

Since, a is random, b is random.

You assumed that since the probability of picking a number in $(0,1)$ is $\frac 14$, that $P(b \in (0,1))$ must also be $\frac 14$.
But this is false, because you did not pick $b$ at random by the same method as picking $a$. $a$ was picked per the indicated distribution. Because of the functional dependence on $a$, $b$ is picked by a different probability distribution. Its odds of being in a given range are different from the odds for $a$ to be in that same range.
