How to generate a gaussian distribution with rand()
Interview Answers
Anonymous
4 Sept 2013
Use either inverse transform or Box-muller, rand(m,n) only gives uniform r.v.
5
Anonymous
22 Oct 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
Anonymous
5 Dec 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
Anonymous
4 Nov 2012
rand(m,n) produces a m*n matrix, where each element is a random observation from N(0,1).