Skip to content
DeepForgeby svx
All problems
MediumStatisticsst-158

Split-Half Reliability

Problem

Split the items into odd-indexed and even-indexed halves, sum each half per subject, and return the Pearson correlation between the two half-test totals using population moments. Return 0.0 when there are fewer than two items, lengths are inconsistent, or either half has zero variance.

Hint

This is the uncorrected split-half correlation; apply Spearman-Brown to lengthen it back.

Test cases

case 1
in: [[[1,2,3,4],[2,4,6,8],[1,2,3,4],[2,4,6,8]]]
expected: 1
case 2
in: [[[1,2,3,4],[4,3,2,1],[1,2,3,4],[4,3,2,1]]]
expected: -1
case 3
in: [[[5,5],[5,5]]]
expected: 0
case 4
in: [[[1,2,3]]]
expected: 0
case 5
in: [[[1,2],[1,2,3]]]
expected: 0
Starter codePython
def split_half_reliability(items):
    # Your code here
    pass

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