Skip to content
DeepForgeby svx
All problems
MediumStatisticsst-162

IRT 1PL Probability

Problem

Return the one-parameter logistic probability 1/(1 + exp(-(theta - b))).

Hint

The 1PL is the Rasch model with a single difficulty parameter.

Test cases

case 1
in: [0,0]
expected: 0.5
case 2
in: [1,0]
expected: 0.7310585786300049
case 3
in: [0,1]
expected: 0.2689414213699951
case 4
in: [2,-1]
expected: 0.9525741268224334
case 5
in: [-5,5]
expected: 0.000045397868702434395
Starter codePython
import math
def irt_1pl_probability(theta, b):
    # Your code here
    pass

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