# how to weigh data according to given distribution

Here is what im trying to do:

Given $n$ arbitrary data points $(x_i, y_i)$ and a distribution, say $N(0,1)$. I need to produce output $(x_i, y^*_i)$ such that $y^*_i$ are weighted versions of $y_i$, where the weights are determined by the given distribution and the weights must sum to $1$.

Are there any good algorithms out there that does this?

-
It is not clear at all what you want. How do the Xis relate to the Yis in this? What values from the Yis are you taking a weighted average of to get Yi*? What do you mean by "weights are determined by the given distribution? How many weights do you have?What is your motivation for doing this? – Michael Chernick Jun 15 '12 at 16:03
How do the Xis relate to the Yis in this? They are completely arbitrary. What values from the Yis are you taking a weighted average of to get Yi*? Its a one-to-one correspondance. Yi*=wi*Yi. How many weights do you have? I will have n weights since there are n data points. What do you mean by "weights are determined by the given distribution? It means we map the Xi along the domain of the distribution, and the weights are assigned based on the density f(Xi). – juicebox Jun 15 '12 at 17:09
Are both the Xis and Yis from the same distribution (N(0,1) in your example)? So the wis are >0 and sum to 1. How is wi determined based on f(Xi)? What is your motivation for doing this? – Michael Chernick Jun 15 '12 at 17:46