0

Here is the spec :

A sufficient condition for correlation to decode convolution is that the elements of each vector (of dimension n) be independently and identically distributed with mean 0 and variance 1/n.

What I do is :

    stdev = np.sqrt(1/n) #var to std dev
    val = np.random.normal(loc=0,scale=stdev,size=n)

Are the generated numbers IID ?

Is variation => stdev logic correct ?

sten
  • 7,028
  • 9
  • 41
  • 63

1 Answers1

3

Numpy's random number generator uses the same distribution and will independently generate random numbers for n times, so the numbers are i.i.d. And standard deviation is square root of variance, so your logic is correct.

whilrun
  • 1,701
  • 11
  • 21