Suppose that X and Y are discrete random variables with a jo
Suppose that X and Y are discrete random variables with a joint probability
mass function pXY (x,y). Show that the following procedure generates a random
variable X distributed as pX|Y(x|y).
First, Generate X distributed as pX(x).
Second, Accept X with probability p(y|X).
Third, If X is accepted, terminate and return X. Otherwise go to First step.
Now suppose that X is uniformly distributed on the integers 1,2,...,100 and
that given X=x, Y is uniform on the integers 1,2,...,x. You observe Y=44.
What does this tell you about X?
Solution
X and Y are discrete variables
x is uniform discrete for 1, to 100
P(x) =0.01
Y is uniform 1 to x and hence P(Y) = 1/x
As y =44, Accept x with p = P(44/x) = P(x,44)/P(44) = 0.01
