I want to generate two sequences S and T of (pseudo) random normally distributed numbers with the following constraints:
- S has mean m_S, standard deviation sd_S, and lenght N
- T has mean m_T, standard deviation sd_T, and length N
- for each i, T(i) <= S(i), i.e. an element at position i in the sequence T is smaller than or equal the corresponding element in position i in sequence S
Ideally, I would like to generate the two sequences incrementally (one pair or numbers at a time).
I know how to generate S or T independently (for example in Java mean + stdev * ThreadLocalRandom.current().nextGaussian();- see also this question), but I don't know how to generate S and T satisfying the third constrain.
Any help is appreciated!
Aucun commentaire:
Enregistrer un commentaire