I'm afraid you will have to give more information. I know how to do a "weighted integral" given a function and weighting function but you seem to be talking about a numerical calculation for a function defined at discrete points. How, exactly, is the function to be integrated given and how is the weighting function given?