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

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

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

For example: I have this data frame

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!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source