4
Good afternoon.
It’s my first intervention in the stack, I’m a beginner in the R
, and my doubts are quite basic.
I need to generate a sample of 1000 observations of a distribution function W
.
W
is a discrete random variable, which assumes the values of 1
to 6
, represented by the sides of a data, 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