Assume I want to generate a realization of a random variable $X$ with discrete distribution $F_X$. So I know the support of that random variable, but I don't know the distribution. However, if I call a value from the support, someone will tell me probability of that value according to $F_X$.
So in this case, you could call all the values from the support sequentially, then you could know the full distribution $F_X$, then you can use many methods to generate the realization of this random variable. However, I am considering the following procedure, I am not sure whether this procedure will let me generate the realization of $X$:
I first uniformly make a draw ($x$) from the support, then I will be told the probability of that specific value I draw from the support. Let's call this probability $p_x$. Then I flip a biased coin with Head probability $p_x$. If it really turns out to be head, then this value $x$ is generated from distribution $F_X$.
I am not sure whether the above claim is correct or not. Can some one prove it or disprove it mathematically?
Also, what if the biased coin does not turn up to be head? then what should I do? Should I redraw uniformly from the support, then repeat this procedure?