[R] Generating Random Numbers
kjetilbrinchmannhalvorsen at gmail.com
Thu Jul 19 18:27:08 CEST 2012
Those restrictions you have given do not define a unique distribution!
so you need to think better
about what you need. For instance, if you want a uniform distribution
between min and max with n=5
independent observations from that, but conditional upon sum=total.
For that, you could use rejection sampling, but would be
phenomenally ineffective ...
On Thu, Jul 19, 2012 at 7:12 AM, arunkumar1111 <akpbond007 at gmail.com> wrote:
> My inputs is min=(10,10,10,10,10) and max=(100,100,100,100,100)
> total = 300
> i have to generate 5 numbers between min and max and those numbers should
> sum upto total
> Can anyone help?
> Thanks in Advance
> View this message in context: http://r.789695.n4.nabble.com/Generating-Random-Numbers-tp4637020.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help