Frage im Vorstellungsgespräch bei LinkedIn

Implement a sampling function with nominal distribution.

Antworten zu Vorstellungsgespräch

Anonym

26. März 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

Anonym

29. März 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. :)