lundi 27 février 2023

Is there any way to generate a uniform distribution out of two other distributions which are uniform?

X=rand(n,1) is a random variable which is uniformly distributed and the range of X is between 0 to 1. I want variable Y to be negatively correlated with X with corrcoef equal to -0.4 and its distribution be uniform and range of Y be between 0 to 1. I tackle this problem in this way that I introduced a noise to the problem "z" such that: Y=\alpha(1-X)+\beta(z) and z=rand(n,1)

\alpha here is 0.4 and \beta is 0.6. The corrcoef(X,Y) is around -0.4 and the range of Y is [0 1] which satisfy our condition but the distribution of Y is not uniform any more. IT IS NORMAL. How can I satisfy this condition as well?

I expexct the summation of two uniform distribution be uniform as well but it is normal.




Aucun commentaire:

Enregistrer un commentaire