[R] Simulating mid-points from a defined range

Brian Smith br|@n@m|th199312 @end|ng |rom gm@||@com
Tue Jun 3 08:59:44 CEST 2025


Hi JRG,

It is not a homwork, but a practical problem. I was unsure about the
theritical framework to generate such sequence.

I introduced the condition that accuracy up to second decimal number,
so that we would get a finite number of possible values. Otherwise I
thought there could be infinite possibilities. Let me know your
opinion if there is any other way to impose finiteness in the possible
numbers of ways to generate such sequence.

Thanks and regards,

On Sun, 1 Jun 2025 at 06:31, JRG <jrg using loesl.us> wrote:
>
>
>
> On Saturday, May 31st, 2025 at 7:44 PM, Bert Gunter <bgunter.4567 using gmail.com> wrote:
>
> JRG:
>
> I don't think your specification is correct -- perhaps just a thinko. I think a 10-tuple of "reals" (scare quotes because of computer precision) with your specifications is what is wanted.
>
> Bert
>
> "An educated person is one who can entertain new ideas, entertain others, and entertain herself."
>
>
> Well, I had started with 10-tuples of reals.  Forcing integer elements was a feeble attempt to deal with this aspect of the original post:
>
>          ". . .  with accuracy up to second decimal number".
>
> But as this seems to be homework, radio silence ensues.
>
>
> ---JRG
>
>
>
> On Sat, May 31, 2025 at 3:43 PM JRG <jrg using loesl.us> wrote:
>>
>> I'll second Bert's comments, also assuming this is not homework. In addition:
>>
>> Your use of "mid-point" is not a standard one (in my world), nor perhaps is that of "simulate".
>>
>> Let me attempt to re-state your problem: You wish to choose 10-tuples of integers 0 <= k <= 100 satisfying
>>
>> 1) 0 <= k_i <= 100 for i = 1:10;
>> and
>> 2) k_(i+1) - k_(i) >= 5 for i = 1:9.
>>
>> Finally, you'd like 1000 of those 10-tuples.
>> [Here, "k_(i)" is the usual notation for order statistics.]
>>
>> Is that the task?
>>
>> If so, are there are other requirements on the k_i ?
>>
>> The word "simulate" suggests the k_i are supposed to be realizations of random variables. If so, what sort of distributional assumptions did you have in mind?
>>
>>
>> ---JRG
>>
>>
>>
>> On Saturday, May 31st, 2025 at 6:09 PM, Bert Gunter <bgunter.4567 using gmail.com> wrote:
>>
>> >
>> >
>> > 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 using 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 using 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.
>> >
>> >
>> > ______________________________________________
>> > R-help using 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.
>
>



More information about the R-help mailing list