Each simulated student has a latent ability θ, drawn from a standard normal population (θ ~ N(0,1)) — this is the true, unobservable mastery a summative test tries to measure. Each test item behaves as a 3-parameter logistic (3PL) item-response model:
P(correct | θ) = c + (1 − c) / (1 + e^(−a(θ − b)))
where b is item difficulty (the ability level at which a student has ~50% chance of success once guessing is removed), a is discrimination (how sharply probability rises with ability), and c is a fixed 0.2 guessing floor (4-option multiple choice). Every item in the bank is spread ±0.6 around the chosen average difficulty so the test isn't a single point on the ability scale.
For each student, every item is answered independently (Bernoulli trial at that probability); the raw score is the fraction correct. A student passes if raw score ≥ the cut score you set — the exact decision a real summative exam makes to assign mastery/no-mastery or a grade band.
Reliability is estimated with the KR-20 formula for dichotomous items, and the Standard Error of Measurement (SEM) converts that into how many raw-score points a student's observed score could plausibly be off by due to measurement error alone:
KR-20 = (k / (k−1)) · (1 − Σ pᵢ(1−pᵢ) / σ²_total)
SEM (items) = √k · √(1 − KR-20)
Classification accuracy compares the pass/fail decision against each student's true ability being above/below the ability level that the cut score targets — the gap between the two is exactly the real-world risk every standard-setting panel accepts: some true-masters fail and some non-masters pass, purely from measurement noise. Widening the item bank or raising discrimination narrows that gap; a harsher guessing floor or a cut score placed where the test has few items widens it.