# Optimal weight for weighted average

I have some data points for which I do not have individual errors. My goal is to calculate the weighted average and I am looking for the "optimal weights" that can be used. I was thinking about the distance from the median or the z-score ((xi -median)/MAD*1.483), but the weight of points that are equal to the median would be infinite.