Skip to content
DeepForgeby svx
All problems
HardStatisticsst-184

Coefficient of Repeatability

Problem

Return the coefficient of repeatability 1.96 * sd(a - b) for paired measurements, using the sample standard deviation of the differences. Return 0.0 when fewer than two pairs are given or lengths differ.

Hint

It is the half-width of the 95 percent limits of agreement.

Test cases

case 1
in: [[10,12,14],[9,11,13]]
expected: 0
case 2
in: [[10,12,14,16],[9,11,14,15]]
expected: 0.98
case 3
in: [[5,6,7],[4,6,8]]
expected: 1.96
case 4
in: [[1,5],[2,4]]
expected: 2.7718585822512662
case 5
in: [[1],[2]]
expected: 0
Starter codePython
def coefficient_of_repeatability(a, b):
    # Your code here
    pass

5 test cases · run your code against them in the editor