I am looking to generate a set of 5 random numbers in R with a mean value of 2000. The tricky part however is that I wish for the 1st random number to be higher than the second, which will be higher than the third. The fourth will be higher than the third, and the fifth will be higher than the fourth. To explain this more clearly, 1=High, 2=Mid, 3=Low, 4=Mid, 5=High; while still keeping the numbers random around a mean of about 2000 (for the Higher set). Is this even possible to do in R?
I suppose the 1st and 5th values should be around 2000, the 2nd and 4th values can be around 2000 but I imagine can fluctuate quite a bit, and the 3rd value should be relatively lower. The SD can be very varied as well.
So for example, a satisfactory string could be:
2,300, 1,843, 987, 1,300, 1,900
Aucun commentaire:
Enregistrer un commentaire