All problems
Potential Outcomes Consistency
Problem
Check the potential outcomes consistency assumption and return the sorted indices where the observed outcome differs from the potential outcome corresponding to the treatment received.
Hint
Consistency links the observed outcome to the potential outcome of the treatment received.
Test cases
case 1
in: [[1,0,1,0],[5,3,7,3],[0,3,0,4],[5,2,7,1]]
expected: [3]
case 2
in: [[1,0],[2,1],[2,1],[2,1]]
expected: []
case 3
in: [[],[],[],[]]
expected: []
Starter codePython
def consistency_violations(treatment, outcome, y0, y1):
# Your code here
pass3 test cases · run your code against them in the editor