Hi, Let say I have a range [0, 100] Now I need to simulate 1000 10 mid-points within the range with accuracy upto second decimal number. Let say, one simulated set is X1, X2, ..., X10 Ofcourrse X1 < X2 < ... <X10 I have one more constraint that the difference between any 2 consecutive mid-points shall be at-least 5.00. I wonder if there is any Statistical theory available to support this kind of simulation. Alternately, is there any way in R to implement this?
Hi! Just an idea. You randomly select the first point. Cut +/- 5 from the original space [0;100]. Select second point. Project it to the original space. Cut again. Repeat. Simplified method without cutting: every time mark +/- 5 as a bad space and select point again if it is in forbidden area. Hope it helps. Regards, Sergiy On Sat, 31 May 2025, 19:52 Brian Smith, <briansmith199312 at gmail.com> wrote:> Hi, > > Let say I have a range [0, 100] > > Now I need to simulate 1000 10 mid-points within the range with > accuracy upto second decimal number. > > Let say, one simulated set is > > X1, X2, ..., X10 > > Ofcourrse > > X1 < X2 < ... <X10 > > I have one more constraint that the difference between any 2 > consecutive mid-points shall be at-least 5.00. > > I wonder if there is any Statistical theory available to support this > kind of simulation. > > Alternately, is there any way in R to implement this? > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
If this is a real problem and not homework, can you tell us the context? It is not at all clear (to me) what you mean by "simulate", i.e. what your target distribution is, which may depend on/be defined by the context. Bert "An educated person is one who can entertain new ideas, entertain others, and entertain herself." On Sat, May 31, 2025 at 11:52?AM Brian Smith <briansmith199312 at gmail.com> wrote:> > Hi, > > Let say I have a range [0, 100] > > Now I need to simulate 1000 10 mid-points within the range with > accuracy upto second decimal number. > > Let say, one simulated set is > > X1, X2, ..., X10 > > Ofcourrse > > X1 < X2 < ... <X10 > > I have one more constraint that the difference between any 2 > consecutive mid-points shall be at-least 5.00. > > I wonder if there is any Statistical theory available to support this > kind of simulation. > > Alternately, is there any way in R to implement this? > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.