mardi 27 février 2018

Generate binomial random variables based on inverse transformation in R

It's my first coding course at uni, and I'm stuck with the two algorithms asked below.

I've been asked to develop an algorithm in R that generates binomional random variables based on the inverse transformation. And to develop an algorithm again in R that generates Normal random variables based on the acceptance-rejection technique.

I've been looking around, but i'm not sure how to do it. I know there are internal R functions to generate random variables from different distributions (like: rnorm (n, mean, stddev) ) but I can't use them.




Aucun commentaire:

Enregistrer un commentaire