Good afternoon.
It's my first time in the stack, I'm a beginner in R
, and my doubts are pretty basic.
I need to generate a sample of 1000 observations of a W
distribution function. W
is a discrete random variable, which assumes the values of 1
to 6
, represented by the sides of a given, given that it is addicted and whose probability function is p1=0.25
, p2=0.16
, p3=0.18
, p4=0.17
, p5=0.14
, p6=0.10
.
How can I write this function in R?
Thank you