Calculating weighted average of operating margin (ROS) in benchmarking analysis

I'm looking for the formula for calculating the weighted average of operation margin data.

From all the sources I've found so far it calculated as following: the sum of all EBIT data divided by the sum of all revenue data.

My question is why is that so? I can't find any books or educational materials supporting this formula.

Seeing as the standard operating margin is calculated with the formula:

$$OM = {EBIT \over Revenue} * 100$$

What are the weights of the weighted average and where does the formula for the average comes from?