[R] Discrete random variable

tlorino@vet-alfort.fr tlorino at vet-alfort.fr
Mon Jul 1 11:24:10 CEST 2002


Hi,

I would create a function rdiscrete that returns the value of a discrete random
variable X defined on a subset which can change, and for the same probability for
the issue, eg:
X could sometimes take a value in the subset {2,3,4} with probability 1/3 for each
issue,
and sometimes X could take a value in the subset {2,3,4,5,6} with probability
1/5 for each
issue,
etc.

The function should have one parameter only: a vector, composed by the values of
the definition subset of X.

Thank your for your help,
Tristan Lorino

---------------------- 
École Nationale Vétérinaire d'Alfort - http://www.vet-alfort.fr,
Tél. 01 43 96 70 33
Mél. tlorino at vet-alfort.fr
Site personnel : http://daedale.free.fr

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list