All problems
IRT 2PL Probability
Problem
Return the two-parameter logistic probability 1/(1 + exp(-a*(theta - b))).
Hint
The slope a is the item discrimination.
Test cases
case 1
in: [0,1,0]
expected: 0.5
case 2
in: [1,1.5,0]
expected: 0.8175744761936437
case 3
in: [0,0.5,1]
expected: 0.3775406687981454
case 4
in: [2,1,-1]
expected: 0.9525741268224334
case 5
in: [0,2,0]
expected: 0.5
Starter codePython
import math
def irt_2pl_probability(theta, a, b):
# Your code here
pass5 test cases · run your code against them in the editor