I am currently working on a project where we have a distance with a normal distribution, and want to give weights to readings based on the distribution.
i.e: if the distance between two points is given to be a normal distribution with mean= 5 meters and sigma = 1 meter, and my reading about the distance gives 5.1 meters, i want to give this reading more weight than a reading that gives 5.9 meters because according to the normal distribution, 5.1 is more probable than 5.9. i have found a function in matlab ( normpdf ) that would map it based on the probability of occurrence. i.e. error =0 maps to 0.4
Now I want to know how is this normalized so that the sum of probabilities for all readings would be equal to 1.
Let there be $n$ samples then define your weight for the $i^{th}$ sample as
$W_i = \frac{e^{\frac{{(x_i-5)}^2}{2}}}{\sum_{i=1}^{n}{e^{\frac{{(x_i-5)}^2}{2}}}}$
This should solve your problem.