# Proportional weighting of proportions

I apologize for the horrific title, but I can't accurately express what I want to ask. If I have eight observations with two groups with each observation having a numerator and denominator values, the result variable is simply numerator / denominator:

name  group numerator denominator result
A         1        12          34  0.353
B         1        15          40  0.375
C         1        10          20  0.5
D         1      1000        1200  0.833
E         2       120         150  0.8
F         2        80         100  0.8
G         2       150         200  0.75
H         2       130         150  0.867


I am interested in the group means of the result:

group group_mean
1      0.515
2      0.804


However, in this scenario, observations A, B, and C are clearly driving the mean of group 1 down, even though observation D should clearly have more weight than the other ones. How should I correctly weight observations is this scenario? This seems like such a straightforward thing, but the fact that result is already a proportion, I'm having a difficulty figuring out the correct way of doing it. Thanks.