C3W1_UNQC8 filtering treated vs untreated patients

In this question to filter the untreated vs treated patients from the input w, I can only get to the expected answer of 0.6 when I set the x[0]==True for untreated patient and x[0]==False for treated patient. If I set it to the reversed, I get the answer of 0.4. Why is this the case?

hi @ahwtsang

avoid posting codes on public post threads. it is against community guidelines.

Click on my name and then message. take a screenshot of the grade cell you encountered issue for the c-statistics.