RandomExperiment.n_terms()
This method sets the number of samples to 2*(p+n)!/p!n!, i.e the number of terms in the full PC expansion of order p in n random variables.