vendredi 18 février 2022

Generate random and unique probabilities based on the data in a column rstudio

I have a database with different ages (16-85) what I'm triying to do is to assign a random probability to each age but following the next conditions:

  1. The random probability show be between 20-100
  2. The probability show be higher in the lowest and higest values

For example: I have this dataframe

Age Probability
16 85
18 80
25 70
30 50
35 40
65 60
75 65
85 70

I'd really appreciate if you can help me with this. Tank you so much!




Aucun commentaire:

Enregistrer un commentaire