All problems
Antithetic Pair Mean
Problem
Antithetic variates combine a sample with its mirror image. Given a list of primary values and the list of mirrored values, return the mean of the union of the two lists.
Both lists must have the same length.
Hint
Average all samples together after concatenation.
Test cases
case 1
in: [[1,2],[3,4]]
expected: 2.5
case 2
in: [[0.5],[0.5]]
expected: 0.5
case 3
in: [[1,2,3],[1,4,2]]
expected: 2.1666666666666665
Starter codePython
def antithetic_pair_mean(primary, mirrored):
# Your code here
pass3 test cases · run your code against them in the editor