I would like to implement the solution to the following problem with Python, but I cannot manage to figure the math first:
I have a 1-D vector V1 of length L, characterized by mean M and standard deviation S. Given a target number T, I want to generate a random vector V2 of length L, such that std(V1 + V2) ≈ T and mean(V1+V2) ≈ M. I figured out that in order to achieve mean(V1+V2) ≈ M, V2 should be generated with a random function such as random.uniform(-K, K).
So, what is the equation that allows me to find K starting from S and T?
Thank you in advance for your help!
Aucun commentaire:
Enregistrer un commentaire