Formula for Average medals per deck

how are the average deck points for 1 battle in clan war 2 calculated?
I’m trying to substitute numbers, but I can’t do it

We use the entire week of points and calculate the average points per player.