jeudi 22 juillet 2021

Subset a table such that the samples are normally distributed around a value in a column

I have the following table called original_table:

name      height      age
personA   180         21
personB   190         37
personC   168         27
personD   182         56
...

My goal is to create two random samples of size 100 from the original_table such that the mean of age is normally distributed around 25, and height average is close to 175. Basically, a person with age 25 and height 175 has the highest chance of being in the tables, but not guaranteed.




Aucun commentaire:

Enregistrer un commentaire