Implement a sampling function with nominal distribution.
Respostas da entrevista
Sigiloso
26 de mar. de 2018
I think you mean Normal distribution! If you are using R use set.seed(). You can then use rnorm() with size, mean & SD.
e.g.
>set.seed(123)
>rnorm(100, 2, 5)
1
Sigiloso
29 de mar. de 2018
I'm the original poster, sorry for my typo. I actually mean multinomial distribution. And the advanced question was, if the probability is a skewed distribution, how would you speed up your algorithm.
You can find both answer from Wikipedia. :)