I have a data set of two columns. The first divided by the second will give the percentage, and I am trying to find the average of these percentages.
However, the second column will sometimes be 0, in which case I set the rate to be 0 to avoid a division by 0 error. Due to this 0 error, the following methods will give two different answers and I wondered which one is more correct.
Total each of the two original columns and divide the first total by the second.
Find the mean average of the percentages column, including the ones that I have set to zero.
0 | 3
2 | 0
4 | 1
7 | 4
0 | 5
So, if we use method one: (0+2+4+7+0) / (3+0+1+4+5) = 1
And using method two: (0/3 + 0 + 4/1 + 7/4 + 0/5) does not equal 1
Thanks in advance :)