I have two approaches for data sampling:
- Sampling from a uniform distribution in $[0, 1]$ and rejecting values outside a certain limit, i.e. $0.50<p<0.51$.
- Sampling from a uniform distribution in $(0.50,0.51)$.
Having seen the plots of both ways, it seems they follow the same distribution, but how do I mathematically prove it? If they do follow the same distribution, what might the distribution be? Is it $\mathcal{U}(0.50,0.51)$?
I'm particularly interested in a rigorous explanation, but an intuitive one is also fine.
Note:
You may also refer to these two posts from Stack Overflow since they're both very related and things which motivate me to ask this question: