Lighting is a huge factor for yields. Sure other factors certainly play a role in making a harvest poor or excellent (genetics, water, pH & nutrients, temperature, ventilation/carbon dioxide concentration, vegetative period, proper container size, and minimizing other negative stresses such as pest infestations), but lighting is huge and indoors we need lighting that is both of the proper spectrum and intense enough for our plants to thrive. When all other conditions are perfect, your yield is essentially going to be determined by your lighting. Thus the best way to predict yield or help foster garden efficiency is to consider the amount of energy being consumed for lighting.
If you're getting about 1 gram per watt, your methods and plant health are likely exceptional. If you're yielding much less than that, something might be off and there is very likely room for improvement. If you typically yield a gram per watt, or otherwise are aware what you typically yield then you should be able to predict your yields even if you change your lighting.
The amount of space plants are being grown in matters much less indoors, so long as there is enough space. At any rate it can't really be used to determine yields like lighting can. If you have six plants growing under a 400 watt HID in a 3x3 room, or six or more plants in a 4x4 room under that same 400 watts: the yield should be about the same or less. Of course, if you keep expanding the space and/or number of plants without also increasing lighting your yield will only decrease as that lighting is forced to cover a larger area, becoming ever less intense. Therefore lighting is a much better indicator of yield than space or number of plants.
When trying to determine the amount of lighting to provide for x amount of space cannabis likes between 30 and 50 watts HID per square foot (anymore and CO2 supplementation is advisable, plus increased water and fertilizer). So a 400 watt HID is perfect for a 3x3 (9 sq ft) area or no larger than 4x4 (12 sq ft) area. You will get more yield per square inch in the 3x3 space than you would in the 4x4 space, but over all yields should be about the same. Hope this helps.