1

Apart from multivariate normal random samples, what other kind of multivariate random samples can we generate using NumPy/Python or other Python packages in general? Could you show us the codes for that? For example, if we want to generate a multidimensional chi square, t or Cauchy in Python, what'd be the code for it?

To be specific, I'd like a code that'd be similar to the following one, but with necessary adjustments for the parameters required, which was mu, cov for the multivariate normal below, which generates a random sample of size n=1000 from a multivariate normal in p=100 dimensions with zero mean (mu) and identity covariance (cov) matrix.

p=100; n=1000
mu = np.zeros([p])
cov = np.eye(p)
X = np.random.multivariate_normal(mu, cov, n).T #generates the sample 
Stat_math
  • 111
  • 1
  • I think coding it yourself would perhaps be the most effective way to do it. Given that a multivariate Cauchy is a multivariate Student's t with only 1 degree of freedom, the following answer gives you clues on how to do for both Cauchy and Student's t distributions: https://stackoverflow.com/questions/29798795/multivariate-student-t-distribution-with-python ! – bglbrt Jun 26 '20 at 09:05

0 Answers0