The more people in the group, the less XP gained for killing monsters, but it is not linear. In non-instanced areas, there is a slight increase in the total XP value of the monster for a group. However, in INSTANCED areas, there is a large increase in the total XP value based on the size of the group. So, in non-instanced areas, you will do better with 2 vs 5 (assuming you're killing them at the same rate). In instanced areas, you will do MUCH better with a full group of 5.