Pergunta de entrevista da empresa TGS Management Company

How to generate a gaussian distribution with rand()

Respostas da entrevista

Sigiloso

4 de set. de 2013

Use either inverse transform or Box-muller, rand(m,n) only gives uniform r.v.

5

Sigiloso

22 de out. de 2021

Generate a random variable between 0 and 1 uniformly and use inverse cdf of a gaussian to compute the samples from a normal distribution.

1

Sigiloso

5 de dez. de 2021

Use Central Limit Theorem. Generate samples of size 'n' with replacement using rand() and compute mean. The distribution of such means will be gaussian irrespective of distribution being followed in rand().

1

Sigiloso

4 de nov. de 2012

rand(m,n) produces a m*n matrix, where each element is a random observation from N(0,1).