The average of a vector $[x_1,x_2,\dots, x_n]$ is calculated simply
$$\overline x = \frac{x_1+x_2+\cdots + x_n}{n} = \sum_{i=1}^n\frac{1}{n}x_i$$
If you want to calculate a weighted average, take some set of weights $w_1,w_2,\dots,w_n\geq 0$ such that $w_1+\cdots +w_n = 1$ and calculate the weighted average using the formula
$$\overline{x_w} = \sum_{i=1}^n w_i x_i$$
Notes:
- The standard average of a vector, $\overline x$, is actually a "weighted average" if you take all weights equal to $\frac 1n$.
- If the weights are positive but do not sum to $1$, you can divide them by their sum so they do. Alternatively, you can simply calculate $$\overline{x_w} = \frac{\sum_{i=1}^n w_i x_i}{\sum_{i=1}^n w_i}$$
- Any number between the minimum and maximum value of $x_i$ can be the weighted average of $x$ if you pick the correct weights.