Resources / Methods and formulas
Methods and formulas
What every tool on this site calculates, how, and how to get the same numbers in R. All results were checked against the R functions listed; the differences are at the third decimal or smaller.
Item analysis
| Statistic | Formula or rule |
|---|---|
| Facility | p = number correct / number of test-takers |
| D index | p in the top 27% − p in the bottom 27% (ranked by total score) |
| Corrected item–total r | Pearson r between the item and the total of the other items |
| Alpha if deleted | Cronbach's alpha recomputed without the item |
R: psych::alpha() · Source: Brown (2005); Carr (2011)
Reliability
| Statistic | Formula or rule |
|---|---|
| Cronbach's alpha (KR-20 for 0/1 items) | α = k/(k − 1) × (1 − Σ item variances / total variance) |
| Feldt 95% CI | 1 − (1 − α) × F(1 − γ/2; n − 1, (n − 1)(k − 1)) to 1 − (1 − α) × F(γ/2; …) |
| Split-half (odd–even) | r between halves, corrected with Spearman–Brown: 2r/(1 + r) |
| Spearman–Brown | ρ* = nρ / (1 + (n − 1)ρ) |
| SEM | SD × √(1 − reliability) |
| SE of a difference | SEM × √2 (equal SEMs) |
R: psych::alpha() (Feldt CI) · Source: Cronbach (1951); Feldt (1965)
Kelley's true-score estimate
| Statistic | Formula or rule |
|---|---|
| Estimate | T̂ = ρX + (1 − ρ)μ |
| Standard error of estimation | SD × √(ρ(1 − ρ)) |
R: — · Source: Kelley (1947)
Rater agreement
| Statistic | Formula or rule |
|---|---|
| Cohen's kappa | κ = (p_o − p_e) / (1 − p_e) |
| Quadratic weighted kappa | 1 − Σ w·O / Σ w·E, with w = (i − j)² / (K − 1)² |
| ICC (two-way) | consistency: (MSR − MSE)/(MSR + (k − 1)MSE); agreement: (MSR − MSE)/(MSR + (k − 1)MSE + k(MSC − MSE)/n) |
| Fleiss' kappa | (P̄ − P̄_e) / (1 − P̄_e) for any number of raters |
R: irr::kappa2(), irr::icc(), irr::kappam.fleiss() · Source: Cohen (1960); Fleiss (1971); Shrout & Fleiss (1979)
Descriptive statistics
| Statistic | Formula or rule |
|---|---|
| Skewness (type 3) | m₃ / s³ |
| Excess kurtosis (type 3) | m₄ / s⁴ − 3 |
| Percentile rank | percentage of the group scoring at or below the score |
| z and T | z = (x − mean)/SD; T = 50 + 10z |
R: psych::describe() · Source: Brown (2005)
DIF (Mantel–Haenszel)
| Statistic | Formula or rule |
|---|---|
| Common odds ratio | α_MH = Σ(A·D/N) / Σ(B·C/N) over total-score strata |
| ETS delta | MH D-DIF = −2.35 ln α_MH |
| Test statistic | MH χ² with continuity correction; iterative purification of the matching score |
| ETS categories (simplified) | A: |Δ| < 1 or not significant; B: moderate; C: |Δ| ≥ 1.5 and significant |
R: difR::difMH(purify = TRUE) · Source: Holland & Thayer (1988); Holland & Wainer (1993)
Rasch model
| Statistic | Formula or rule |
|---|---|
| Model | P(correct) = exp(θ − b) / (1 + exp(θ − b)) |
| Estimation | joint maximum likelihood with (L − 1)/L bias correction |
| Infit mean-square | Σ(residual²) / Σ(variance) |
| Outfit mean-square | mean of squared standardized residuals |
| Person reliability | (observed variance − mean error variance) / observed variance |
R: TAM::tam.jml(); eRm::RM() · Source: Bond & Fox (2015); Wright & Linacre (1994)
Standard setting
| Statistic | Formula or rule |
|---|---|
| Angoff cut | mean over judges of the sum of item probabilities |
| SE of the cut | SD of judges' cuts / √(number of judges) |
| Contrasting groups | the score that minimizes false passes + false fails |
R: — · Source: Angoff (1971); Cizek & Bunch (2007)
Comparing two groups
| Statistic | Formula or rule |
|---|---|
| Welch's t | t = (M₁ − M₂) / √(s₁²/n₁ + s₂²/n₂), with Welch–Satterthwaite df |
| Cohen's d | d = (M₁ − M₂) / pooled SD |
| Hedges' g | g = d × (1 − 3 / (4(n₁ + n₂) − 9)) |
| 95% CI for d | d ± 1.96 × √((n₁ + n₂)/(n₁n₂) + d²/(2(n₁ + n₂))) |
R: t.test() in R · Source: Welch (1947); Cohen (1988); Plonsky & Oswald (2014)
Correlation
| Statistic | Formula or rule |
|---|---|
| Pearson's r | covariance / (SD_x × SD_y); t = r√(n − 2)/√(1 − r²) |
| 95% CI | tanh(atanh(r) ± 1.96/√(n − 3)) (Fisher z) |
| Spearman's rho | Pearson r of the ranks (ties get average ranks) |
| Influential case | the student whose removal changes r the most |
R: cor.test() in R · Source: Fisher (1921); Spearman (1904)
Test length (Spearman–Brown)
| Statistic | Formula or rule |
|---|---|
| Predicted reliability | ρ* = kρ / (1 + (k − 1)ρ), where k = new length / old length |
| Length factor for a target | k = ρ*(1 − ρ) / (ρ(1 − ρ*)) |
R: — · Source: Spearman (1910); Brown (1910)
A note on privacy
All calculations run in your browser with plain JavaScript. Nothing you paste is uploaded or stored on a server. Drafts and progress are kept in your browser's local storage only, and you can clear them by clearing site data. Local processing removes one risk, not all of them: on a shared or unsecured computer, other people, browser extensions or saved drafts could still expose data, so remove student names where you can and clear the boxes when you finish.
Validation against R
Each tool was checked by running the same sample data through R. The table shows the results. Matching R shows that the calculations are correct. It does not show that a statistic is the right one for your design, or that your test is valid; that is a question of judgment and evidence.
| Statistic | Sample data | Testwise | R | R function |
|---|---|---|---|---|
| Cronbach's alpha | Pizza Placement Test (120 × 20) | 0.8004 | 0.8004 | psych::alpha() |
| Feldt 95% CI for alpha | Pizza Placement Test | [0.7447, 0.8488] | [0.74, 0.85] | psych::alpha.ci() |
| Corrected item–total r, item 7 | Pizza Placement Test | −0.3810 | −0.3810 | psych::alpha() r.drop |
| Cohen's kappa | Two raters, 80 essays | 0.2005 | 0.2005 | irr::kappa2() |
| Quadratic weighted kappa | Two raters, 80 essays | 0.7681 | 0.7681 | irr::kappa2(weight = "squared") |
| ICC, consistency | Two raters, 80 essays | 0.8807 | 0.8807 | irr::icc(model = "twoway", type = "consistency") |
| ICC, absolute agreement | Two raters, 80 essays | 0.7704 | 0.7704 | irr::icc(model = "twoway", type = "agreement") |
| Fleiss' kappa | Three raters, 60 speakers | 0.1518 | 0.1518 | irr::kappam.fleiss() |
| Mantel–Haenszel χ², item 7 | DIF sample (400 × 20) | 13.5941 | 13.5941 | difR::difMH(purify = TRUE) |
| MH common odds ratio, item 7 | DIF sample | 3.1092 | 3.1092 | difR::difMH() alphaMH |
| Welch's t (df) | Extensive reading vs regular | 2.7520 (95.63) | 2.7520 (95.63) | t.test() |
| Pearson's r [95% CI] | Reading and GPA (90) | 0.4833 [0.3069, 0.6276] | 0.4833 [0.3069, 0.6276] | cor.test() |
| Spearman's rho | Reading and GPA | 0.5716 | 0.5716 | cor(method = "spearman") |
The Rasch tool uses joint maximum likelihood with a bias correction. Its item difficulties were within 0.02 logits of conditional maximum likelihood estimates (eRm), and infit values were close to TAM. Software that uses other estimation methods will give slightly different numbers.
Reference software
R 4.3.3 with psych 2.4.1, irr 0.85 and difR 5.1 (checked November 2026). Testwise values are computed in double precision and rounded only for display: coefficients to two or three decimals, p-values to three decimals (or "< .001"), following APA style.
Edge cases the tools check
- Missing data: item-based tools (item analysis, reliability, Rasch) use only complete rows (listwise deletion) and tell you how many rows were left out. Rater and correlation tools use the rows where both scores exist. If a blank means "wrong", replace it with 0 yourself.
- Items or raters with no variation (everyone got the item right, or a rater gave every essay the same band): the tool warns you, because these break correlations and agreement statistics.
- Too few cases: every tool warns when the sample is small for that statistic.
- Wrong format: letters in a 0/1 tool, text instead of numbers, or a missing group column produce a plain-English message instead of a result.