Sep-11-2020, 06:44 AM
cap510 Wrote:Since sum(weighted) = 1, does it affect the value of total?Well, if you were adding it to a number, it would affect it (a little bit). But dividing by 1 has no impact, so the line could be omitted. If that were true, then your algorithm would be able to calculate a weighted average without knowing the weights, but that's clearly absurd.
What I was hoping you'd do was realize that your algorithm is wrong, and google weighted average[ :).
Investopedia Wrote:In calculating a weighted average, each number in the data set is multiplied by a predetermined weight before the final calculation is made.
If you're still not sure, I recommend working it out on paper first. Also, I know some people learn well from Youtube (I'm not one of them) so that may be another way to try to learn about weighted averages.