Is a uniformly random number over the real line a valid distribution? Is $\text{Unif}(- \infty, \infty ) $ a valid distribution?
I'm trying to capture the idea of a completely random number (where every number has an equal chance of being chosen), but I'm not sure if that idea can be captured using a valid statistical distribution.
I'm thinking there may be some way to do this via a mapping. For example, it looks like we can map numbers from the range $(-1, 3)$ to all of the reals via the function $f(x) = - \log (\frac{4}{x+1} - 1)$ which has a domain of $(-1, 3)$ and a range of $(-\infty, \infty)$.
So, could $\text{Unif}(-\infty, \infty)$ be defined using a mapping somehow from $\text{Unif}(-1, 3)$? If so, how would you define this mapping?

Tim's answer is a fantastic answer, and I wanted to go more into depth about the results of their answer in a way that won't fit into a comment.
Let's walk through the mapping described in the question. We define the following process. Pick any random number between -1 and 3. (Sample a number from $\text{Unif}(-1, 3)$). Then, use the function $f(x) = - \log (\frac{4}{x+1} - 1)$ to convert your number between -1 and 3 to number between $-\infty$ and $\infty$ (which is the range of $f\,$).
Note that $f$ is a one-to-one function (since it passes the horizontal line test), which means that after the conversion, every single number has an equal chance of being chosen.
So then why isn't this a uniform distribution over all of the real numbers? If every number has an equal chance of being chosen, doesn't that make it a uniform distribution? No!
The reason is that distributions don't indicate the probability of a particular value being chosen; they indicate the probability that a value within a particular range will be chosen.
In our case, it is true that every number has an equal chance of being chosen. However, there are some numbers where there's a higher chance of choosing a value that's close to that number. And that is what the distribution reflects. So the distribution is not uniform.
Overall, a uniform distribution does not mean that every number has an equal chance of being chosen. Instead, it means that no matter what range you pick, the probability of a sampled value falling within that range only depends on the size of the range. (Not the specific endpoints of the range.)
EDIT:
After writing this answer, I came across a video recently published on YouTube (after this answer was written) by Numberphile (technically, Numberphile2) titled "More on Bertrand's Paradox (with 3blue1brown) - Numberphile" which gives a better intuition about this exact question. In the video, the idea that "the probability of a sampled value falling within that range only depends on the size of the range" is what is described as "translational symmetry."
Based on the video, it is likely not correct to say that a "uniform distribution" must have translational symmetry. However, it does seem to be the case that the most common way of clearly defining an unclear uniform distribution is to restrict the distribution to have translational symmetry. (For example, one might be willing to call the distribution based on $f(x) = -\log(\frac{4}{x+1} - 1)$ a "uniform distribution." However, as clearly shown by the graph in Tim's answer, that distribution is not translationally symmetric. That is, if we look through a window at the graph, and we move that window from side to side, the graph looks different based on where we have the window.)
