How to Take a Weighted Average 🌱

Say we want to average the elements in the vector $a$, using a vector $weights$ which contains the corresponding weights for each element in $a$. Then, a weighted average would be: \(avg = sum(a * weights) / sum(weights)\)

Notes mentioning this note

There are no notes linking to this note.


Here are all the notes in this garden, along with their links, visualized as a graph.