dimanche 16 octobre 2016

Building a function of a random variable dynamically in python

I have some random variables using scipy.stats as follows:

import scipy.stats as st
x1 = st.uniform()
x2 = st.uniform()

Now I would like make another random variable based on previous random variables and make some calculations like var for the new random variable. Assume that I want the new random variable to be something like max(2, x1) + x2. How can I define this dynamically?




Aucun commentaire:

Enregistrer un commentaire