0
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ You should be careful, as your situation reminds me of Simpson's Paradox. Comparing success rates without taking into account the number of trials for each surgeon seems wrong. You should wait for a more experienced user to answer. $\endgroup$ – ArnoV Feb 24 at 7:46
  • $\begingroup$ @ArnoV, thank you for your comment. That is what I am wondering. If there is a way to compare success rates and take into account the number of trials each surgeon has. $\endgroup$ – dfahsjdahfsudaf Feb 24 at 8:06
  • $\begingroup$ Use ANOVA (or, better, a Binomial GLM) with the Tukey HSD. $\endgroup$ – whuber Feb 24 at 15:29
0
$\begingroup$

As you have binomial data with possibly different probability parameters, you could use logistic regression. See Where does the binary logistic regression model equation come from? and search this site.

Another possibility is a logistic mixed model, that is, representing the per ID probabilities as random variables, and estimate their expectation and variance. That might give better per-ID estimates since it is a way of shrinking the individual noisy estimates toward a common center value. If a random effect variance of zero is consistent with the data, it means that all the probabilities equal is consistent with the data.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.