Example:
X = Uniform(0,1) Y = Binomial(10, X)
Every distribution will check to see whether each param is a number or an RV. If param is an RV, Y will be defined on the ProbabilitySpace whose .draw() method is:
def draw(): p = param.draw() return np.random.binomial(n=10, p=param)
Then modify the underlying ProbabilitySpace of X to also be on this probability space. (Question: does the above generate a probability space where the outcome is a pair (x, y)?)
Example:
X = Uniform(0,1) Y = Binomial(10, X)Every distribution will check to see whether each param is a number or an RV. If param is an RV, Y will be defined on the ProbabilitySpace whose .draw() method is:
def draw(): p = param.draw() return np.random.binomial(n=10, p=param)Then modify the underlying ProbabilitySpace of X to also be on this probability space. (Question: does the above generate a probability space where the outcome is a pair (x, y)?)