I use scipy.stats.multivariate_normal to generate random samples of dimension (1, 9).
However, when i compute the cdf of said samples, it is always zero.
import numpy as np
from scipy.stats import multivariate_normal
mean = np.array([1.00000,1.00000,-1.00000,1.00000,1.00000,-1.00000,-1.00000,-1.00000,-1.00000])
std = np.array([35.98047,63.84033,49.01465,0.00000,59.04541,33.57812,59.36084,0.00000,11.00098])
normal = multivariate_normal(mean=mean, cov=np.diag(std**2), allow_singular=True)
x_samples = []
cdf = []
for i in range(30):
x_samples.append(normal.rvs())
for x_i in x_samples:
cdf.append(normal.cdf(x_i))
print(cdf)
This prints [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
When I do the same thing but with dimesion (1,2) by changing third and fourth lines with:
mean = np.array([-1, 1])
std = np.array([150.98, 10.76])
It prints a non zero list with min = 0.001 and max = 0.933
I tried to re-iterate this random generation of (1,9)-dimension samples multiple times but the cdf of the samples is always zero.