How to create a new data frame from an existing data frame by randomising the values with average as original respective value and 20% standard deviation in python?
I want to create a new dataframe by randomising all the values such that if the original value of a particular entry is x the randomised value of that entry can lie in the range of x to x ± 20% of x, where 20% is the standard deviation of the normal distribution and the average of this normal probability distribution must be the original entry.
This process should repeat 10,000 times to perform simulation by taking one randomly generated data frame at a time.
Eg: If this is an existing data frame. Sample Data Frame
The value corresponding to agra and delhi can range from (1.6, 2.4) i.e 20%variation to 2. Thus the 10,000 randomised data frames should have all the values randomised in this order.
Aucun commentaire:
Enregistrer un commentaire