I have the following data frame:
False True Total Cases Success %
surgeon_id
0 1.0 0.0 1.0 0.000000
2 1.0 6.0 7.0 85.714286
3 7.0 33.0 40.0 82.500000
4 10.0 39.0 49.0 79.591837
5 22.0 75.0 97.0 77.319588
6 61.0 67.0 128.0 52.343750
7 1.0 19.0 20.0 95.000000
8 23.0 53.0 76.0 69.736842
9 5.0 34.0 39.0 87.179487
10 20.0 65.0 85.0 76.470588
11 8.0 23.0 31.0 74.193548
12 7.0 24.0 31.0 77.419355
13 25.0 62.0 87.0 71.264368
16 8.0 20.0 28.0 71.428571
17 18.0 78.0 96.0 81.250000
18 13.0 63.0 76.0 82.894737
19 14.0 39.0 53.0 73.584906
20 18.0 59.0 77.0 76.623377
21 5.0 11.0 16.0 68.750000
22 0.0 1.0 1.0 100.000000
24 0.0 1.0 1.0 100.000000
25 13.0 57.0 70.0 81.428571
28 0.0 7.0 7.0 100.000000
30 52.0 49.0 101.0 48.514851
31 6.0 12.0 18.0 66.666667
32 15.0 55.0 70.0 78.571429
41 0.0 1.0 1.0 100.000000
43 2.0 6.0 8.0 75.000000
The "false" column equals the number of failed cases, while the "True" column equals the number of passing cases. I computed the "Success %" column by df[True]/(df[False]+df[True) * 100
.
Is there a way to statistically compare the success rates of the surgeon ids even though each surgeon id has completed a different number of total cases? I would like to draw a conclusion that some surgeon ids have a higher success rate than others. Also, could I compare a surgeon id's success rate to the overall average success rate?
I know you can use a t-test to compare means of different sample sizes, but I am not sure how to apply that method in this situation.