Cronbach's alpha and McDonald's omega
Do a questionnaire's items hang together? Read alpha and omega, catch a reverse-scored item, and avoid the two claims alpha can't support.
What runs in CodeSplash
- Internal consistency (Cronbach's α, McDonald's ω) Verified in Python and R
You will be able to
- Interpret alpha and omega for a scale
- Detect a reverse-scored item using item statistics
- Explain why a high alpha doesn't show that a scale is unidimensional or valid
Read first
How items hang together
ReadA scale adds several items into one score. If they measure one thing, they should correlate.
Cronbach's alphaCronbach's alphaA reliability estimate from how a scale's items covary. It assumes each item measures the factor equally well. summarizes that using the number of items and how they covary. With items and average correlation , standardized alpha is:
Here = 7 and = 0.43 give 0.84. Alpha rises with more items as well as with stronger correlations, so length alone can make it look good.
Spot the broken scale
PredictPredict first
A six-item survey has one item worded the opposite way ("I rarely feel…"), and nobody flipped it before analysis.
What does that do to alpha?
Reveal
It falls sharply. In this example = 0.36, with a mean inter-item correlation of only 0.09. The reversed item correlates negatively with the rest, canceling their covariance. Fix the coding, not the scale.
Find the culprit
In the appOpen the example. Look at the assumption Items scored in the same direction, and at each item's corrected item–total correlation and "alpha if dropped".
α = .36, 90% CI [.24, .47]
- Cronbach's α
- 0.3639
- 90% CI
- [0.2419, 0.4731]
- Standardized α
- 0.3723
- McDonald's ω
- 0.5512
Effect size
- Cronbach's α 0.3639 90% CI [0.2419, 0.4731]
Plots
View data
| Item | r (text) | Item | r |
|---|---|---|---|
| q1 | 1.00 | q1 | 1 |
| q2 | 0.46 | q1 | 0.4592 |
| q3 | 0.43 | q1 | 0.4260 |
| q4 (reversed) | -0.46 | q1 | −0.4603 |
| q5 | 0.48 | q1 | 0.4753 |
| q6 | 0.16 | q1 | 0.1616 |
| q1 | 0.46 | q2 | 0.4592 |
| q2 | 1.00 | q2 | 1 |
| q3 | 0.45 | q2 | 0.4538 |
| q4 (reversed) | -0.40 | q2 | −0.3984 |
| q5 | 0.32 | q2 | 0.3236 |
| q6 | 0.13 | q2 | 0.1315 |
| q1 | 0.43 | q3 | 0.4260 |
| q2 | 0.45 | q3 | 0.4538 |
| q3 | 1.00 | q3 | 1 |
| q4 (reversed) | -0.42 | q3 | −0.4187 |
| q5 | 0.38 | q3 | 0.3839 |
| q6 | 0.12 | q3 | 0.1161 |
| q1 | -0.46 | q4 (reversed) | −0.4603 |
| q2 | -0.40 | q4 (reversed) | −0.3984 |
| q3 | -0.42 | q4 (reversed) | −0.4187 |
| q4 (reversed) | 1.00 | q4 (reversed) | 1 |
| q5 | -0.37 | q4 (reversed) | −0.3733 |
| q6 | -0.10 | q4 (reversed) | −0.1024 |
| q1 | 0.48 | q5 | 0.4753 |
| q2 | 0.32 | q5 | 0.3236 |
| q3 | 0.38 | q5 | 0.3839 |
| q4 (reversed) | -0.37 | q5 | −0.3733 |
| q5 | 1.00 | q5 | 1 |
| q6 | 0.17 | q5 | 0.1714 |
| q1 | 0.16 | q6 | 0.1616 |
| q2 | 0.13 | q6 | 0.1315 |
| q3 | 0.12 | q6 | 0.1161 |
| q4 (reversed) | -0.10 | q6 | −0.1024 |
| q5 | 0.17 | q6 | 0.1714 |
| q6 | 1.00 | q6 | 1 |
Assumptions
- Items scored in the same direction — Negative corrected item–total correlation for q4 (reversed) — reverse-code before computing α.
- One underlying factor — Weak items (corrected item–total r < .30): q6.
- Sample size — 198 complete respondents.
Item statistics
| Item | Mean | SD | Corrected item–total r | α if dropped | Loading (one factor) |
|---|---|---|---|---|---|
| q1 | 3.086 | 1.212 | 0.4469 | 0.1113 | 0.7246 |
| q2 | 3.162 | 1.124 | 0.4049 | 0.1615 | 0.6317 |
| q3 | 3.101 | 1.192 | 0.3969 | 0.1556 | 0.6411 |
| q4 (reversed) | 2.975 | 1.215 | −0.5253 | 0.6945 | −0.6333 |
| q5 | 3 | 1.242 | 0.4082 | 0.1378 | 0.6017 |
| q6 | 2.990 | 1.144 | 0.1846 | 0.3120 | 0.2109 |
- 2 of 200 rows were left out because a value was missing.
- α from the item covariance matrix (n − 1); ω total = (Σλ)² / ((Σλ)² + Σψ) from a one-factor ML fit of the correlation matrix.
The exact R script · R R version 4.5.1 (2025-06-13)
# Internal consistency (Cronbach's α, McDonald's ω)
# Generated by CodeSplash Analytics 1.0.0 on 2026-11-09 · method reliability.alpha 1.0.1 · spec b3b1fa26f585b429
# Dataset: likert_sim (version 1)
# Runs on its own: outside the app, cs_publish() writes $CS_RESULT_PATH or prints the result JSON.
# %% Setup
library(codesplashr)
# %% Data
df <- as.data.frame(nanoparquet::read_parquet("tests/parity/fixtures/likert_sim.parquet", col_select = c("q1", "q2", "q3", "q4 (reversed)", "q5", "q6")))
n_input <- nrow(df)
df <- df[stats::complete.cases(df[c("q1", "q2", "q3", "q4 (reversed)", "q5", "q6")]), , drop = FALSE] # listwise deletion
df[] <- lapply(df, function(x) if (is.factor(x)) droplevels(x) else x)
n_dropped <- n_input - nrow(df)
warnings <- list()
if (n_dropped > 0) {
warnings <- c(warnings, cs_warning("CS_W_ROWS_DROPPED", dropped = n_dropped, total = n_input))
}
if (n_input > 0 && nrow(df) == 0) cs_error("CS_E_NO_ROWS")
cs_check_finite_columns(df, c("q1", "q2", "q3", "q4 (reversed)", "q5", "q6")) # infinite values stop the run (registry/errors.yaml)
# %% Cronbach's alpha
items <- c("q1", "q2", "q3", "q4 (reversed)", "q5", "q6")
X <- as.matrix(df[items])
n <- nrow(X)
k <- ncol(X)
if (n < 3) cs_error("CS_E_TOO_FEW_ROWS", what = "Cronbach's α", min = 3, n = n)
for (j in seq_len(k)) {
# its correlations (standardized alpha, item-total r, omega) would be 0 / 0
if (length(unique(X[, j])) < 2) cs_error("CS_E_CONSTANT", column = items[j])
}
conf <- 0.9
res <- cs_alpha(X, conf) # twin of codesplash.stats.reliability.alpha
values <- list(alpha = res$alpha, alpha_low = res$ci_low, alpha_high = res$ci_high, alpha_std = res$alpha_std,
mean_r = res$mean_r, n = n, k = k, omega = NA)
# %% McDonald's omega (one-factor ML factor analysis, EM)
om <- NULL
if (TRUE && k >= 3) {
if (n <= k) { # the correlation matrix is singular with no more respondents than items
warnings <- c(warnings, cs_warning("CS_W_SMALL_SAMPLE", n = n, consequence = "McDonald's ω needs more respondents than items, so it is not reported."))
} else {
om <- cs_omega_1f(res$R)
if (om$converged) values$omega <- om$omega
}
}
fin <- function(x) if (is.null(x) || !is.finite(x)) NA else unname(x)
rows <- list()
for (j in seq_len(k)) {
item <- items[j]
load <- if (!is.null(om) && om$converged) om$loadings[j] else NA
values[[sprintf("item_mean[%s]", item)]] <- unname(res$item_mean[j])
values[[sprintf("item_sd[%s]", item)]] <- unname(res$item_sd[j])
values[[sprintf("item_total_r[%s]", item)]] <- res$item_total[j]
values[[sprintf("alpha_if_deleted[%s]", item)]] <- fin(res$if_deleted[j])
values[[sprintf("loading[%s]", item)]] <- load
rows[[j]] <- list(item = item, mean = unname(res$item_mean[j]), sd = unname(res$item_sd[j]), r_drop = res$item_total[j],
alpha_drop = fin(res$if_deleted[j]), loading = load)
}
# %% Assumptions
neg <- items[res$item_total < 0]
weak <- items[res$item_total >= 0 & res$item_total < 0.3]
assumptions <- list(
list(key = "item_direction", label = "Items scored in the same direction", status = if (length(neg)) "warn" else "pass",
detail = if (length(neg)) sprintf("Negative corrected item–total correlation for %s — reverse-code before computing α.", paste(neg, collapse = ", "))
else "Every item correlates positively with the rest of the scale."),
list(key = "unidimensionality", label = "One underlying factor", status = if (length(weak)) "warn" else "pass",
detail = if (length(weak)) sprintf("Weak items (corrected item–total r < .30): %s.", paste(weak, collapse = ", "))
else "Every item correlates at least .30 with the rest of the scale."),
list(key = "sample_size", label = "Sample size", status = if (n < 100) "warn" else "pass",
detail = paste0(sprintf("%d complete respondents", n), if (n < 100) " — the interval is wide." else "."))
)
if (!is.null(om) && !om$converged) warnings <- c(warnings, "The one-factor model did not converge; ω is not reported.")
# %% Result
pct <- sprintf("%.0f%%", conf * 100)
R <- res$R
cs_publish(list(
method = "reliability.alpha",
methodVersion = "1.0.1",
title = "Internal consistency",
engine = cs_engine_info("stats", "codesplashr"),
n = n,
summary = paste0(sprintf("Cronbach's α = %.3f, %s CI [%.3f, %.3f] for %d items", res$alpha, pct, res$ci_low, res$ci_high, k),
if (!is.na(values$omega)) sprintf("; ω = %.3f.", values$omega) else "."),
apa = sprintf("α = %s, %s CI [%s, %s]", cs_fmt_num(res$alpha, 2, leading_zero = FALSE), pct, cs_fmt_num(res$ci_low, 2, leading_zero = FALSE),
cs_fmt_num(res$ci_high, 2, leading_zero = FALSE)),
statistics = c(list(list(key = "alpha", label = "Cronbach's α", value = res$alpha), list(key = "ci", label = paste(pct, "CI"), value = c(res$ci_low, res$ci_high)),
list(key = "alpha_std", label = "Standardized α", value = res$alpha_std)),
if (!is.na(values$omega)) list(list(key = "omega", label = "McDonald's ω", value = values$omega))),
tables = list(list(key = "items", title = "Item statistics", columns = list(
list(key = "item", label = "Item", type = "string"), list(key = "mean", label = "Mean", type = "number"),
list(key = "sd", label = "SD", type = "number"), list(key = "r_drop", label = "Corrected item–total r", type = "number"),
list(key = "alpha_drop", label = "α if dropped", type = "number"), list(key = "loading", label = "Loading (one factor)", type = "number")
), rows = rows)),
effectSizes = list(list(key = "alpha", label = "Cronbach's α", value = res$alpha, ciLow = res$ci_low, ciHigh = res$ci_high,
ciLevel = conf, method = "Feldt (1965) F interval")),
assumptions = assumptions,
warnings = warnings,
notes = list("α from the item covariance matrix (n − 1); ω total = (Σλ)² / ((Σλ)² + Σψ) from a one-factor ML fit of the correlation matrix."),
charts = list(cs_chart("corr", "matrix-heatmap", "Inter-item correlations", list(
row = cs_col("Item", rep(items, each = k), "categorical", levels = items),
col = cs_col("Item ", rep(items, times = k), "categorical", levels = items),
value = cs_col("r", as.vector(t(R)), "numeric"),
label = cs_col("r (text)", sprintf("%.2f", as.vector(t(R))), "categorical")
), controls = list(scale = "diverging", min = -1, max = 1))),
values = values
))
α = .36, 90% CI [.24, .47]
- Cronbach's α
- 0.3639
- 90% CI
- [0.2419, 0.4731]
- Standardized α
- 0.3723
- McDonald's ω
- 0.5512
Effect size
- Cronbach's α 0.3639 90% CI [0.2419, 0.4731]
To keep this page light, the plots are shown once, under the R tab.
Assumptions
- Items scored in the same direction — Negative corrected item–total correlation for q4 (reversed) — reverse-code before computing α.
- One underlying factor — Weak items (corrected item–total r < .30): q6.
- Sample size — 198 complete respondents.
Item statistics
| Item | Mean | SD | Corrected item–total r | α if dropped | Loading (one factor) |
|---|---|---|---|---|---|
| q1 | 3.086 | 1.212 | 0.4469 | 0.1113 | 0.7246 |
| q2 | 3.162 | 1.124 | 0.4049 | 0.1615 | 0.6317 |
| q3 | 3.101 | 1.192 | 0.3969 | 0.1556 | 0.6411 |
| q4 (reversed) | 2.975 | 1.215 | −0.5253 | 0.6945 | −0.6333 |
| q5 | 3 | 1.242 | 0.4082 | 0.1378 | 0.6017 |
| q6 | 2.990 | 1.144 | 0.1846 | 0.3120 | 0.2109 |
- 2 of 200 rows were left out because a value was missing.
- α from the item covariance matrix (n − 1); ω total = (Σλ)² / ((Σλ)² + Σψ) from a one-factor ML fit of the correlation matrix.
The exact Python script · Python Python 3.13.5 · scipy 1.18.1 · pandas 3.1.0
# Internal consistency (Cronbach's α, McDonald's ω)
# Generated by CodeSplash Analytics 1.0.0 on 2026-11-09 · method reliability.alpha 1.0.1 · spec b3b1fa26f585b429
# Dataset: likert_sim (version 1)
# Runs on its own: outside the app, cs.publish() writes $CS_RESULT_PATH or prints the result JSON.
# %% Setup
import numpy as np
import pandas as pd
import codesplash as cs
from codesplash.stats import reliability as rl # α and one-factor ω (twins of R's cs_alpha / cs_omega_1f)
# %% Data
df = pd.read_parquet("tests/parity/fixtures/likert_sim.parquet", columns=["q1", "q2", "q3", "q4 (reversed)", "q5", "q6"])
n_input = len(df)
df = df.dropna(subset=["q1", "q2", "q3", "q4 (reversed)", "q5", "q6"]) # listwise deletion over the analysis columns
n_dropped = n_input - len(df)
warnings = []
if n_dropped:
warnings.append(cs.cs_warning("CS_W_ROWS_DROPPED", dropped=n_dropped, total=n_input))
if n_input and not len(df):
cs.cs_error("CS_E_NO_ROWS")
cs.check_finite_columns(df, ["q1", "q2", "q3", "q4 (reversed)", "q5", "q6"]) # infinite values stop the run (registry/errors.yaml)
# %% Cronbach's alpha
items = ["q1", "q2", "q3", "q4 (reversed)", "q5", "q6"]
X = df[items].to_numpy(dtype=float)
n, k = X.shape
if n < 3:
cs.cs_error("CS_E_TOO_FEW_ROWS", what="Cronbach's α", min=3, n=n)
for j, item in enumerate(items):
if len(np.unique(X[:, j])) < 2: # its correlations (standardized α, item–total r, ω) would be 0 / 0
cs.cs_error("CS_E_CONSTANT", column=item)
conf = 0.9
res = rl.alpha(X, conf)
values = {"alpha": res["alpha"], "alpha_low": res["ci_low"], "alpha_high": res["ci_high"], "alpha_std": res["alpha_std"],
"mean_r": res["mean_r"], "n": float(n), "k": float(k), "omega": None}
# %% McDonald's omega (one-factor ML factor analysis, EM)
om = None
if True and k >= 3:
if n <= k: # the correlation matrix is singular with no more respondents than items
warnings.append(cs.cs_warning("CS_W_SMALL_SAMPLE", n=n, consequence="McDonald's ω needs more respondents than items, so it is not reported."))
else:
om = rl.omega_1f(res["R"])
if om["converged"]:
values["omega"] = om["omega"]
nan = lambda x: None if x is None or not np.isfinite(x) else float(x) # noqa: E731
rows = []
for j, item in enumerate(items):
load = float(om["loadings"][j]) if om and om["converged"] else None
values[f"item_mean[{item}]"], values[f"item_sd[{item}]"] = float(res["item_mean"][j]), float(res["item_sd"][j])
values[f"item_total_r[{item}]"] = float(res["item_total"][j])
values[f"alpha_if_deleted[{item}]"] = nan(res["if_deleted"][j])
values[f"loading[{item}]"] = load
rows.append({"item": item, "mean": float(res["item_mean"][j]), "sd": float(res["item_sd"][j]), "r_drop": float(res["item_total"][j]),
"alpha_drop": nan(res["if_deleted"][j]), "loading": load})
# %% Assumptions
neg = [items[j] for j in range(k) if res["item_total"][j] < 0]
weak = [items[j] for j in range(k) if 0 <= res["item_total"][j] < 0.3]
assumptions = [
{"key": "item_direction", "label": "Items scored in the same direction", "status": "warn" if neg else "pass",
"detail": f"Negative corrected item–total correlation for {', '.join(neg)} — reverse-code before computing α." if neg
else "Every item correlates positively with the rest of the scale."},
{"key": "unidimensionality", "label": "One underlying factor", "status": "warn" if weak else "pass",
"detail": f"Weak items (corrected item–total r < .30): {', '.join(weak)}." if weak else "Every item correlates at least .30 with the rest of the scale."},
{"key": "sample_size", "label": "Sample size", "status": "warn" if n < 100 else "pass",
"detail": f"{n} complete respondents" + (" — the interval is wide." if n < 100 else ".")},
]
if om and not om["converged"]:
warnings.append("The one-factor model did not converge; ω is not reported.")
# %% Result
pct = f"{conf:.0%}"
R = res["R"]
cs.publish({
"method": "reliability.alpha",
"methodVersion": "1.0.1",
"title": "Internal consistency",
"engine": cs.engine_info("numpy", "scipy", "codesplash"),
"n": int(n),
"summary": f"Cronbach's α = {res['alpha']:.3f}, {pct} CI [{res['ci_low']:.3f}, {res['ci_high']:.3f}] for {k} items"
+ (f"; ω = {values['omega']:.3f}." if values["omega"] is not None else "."),
"apa": f"α = {cs.fmt_num(res['alpha'], 2, leading_zero=False)}, {pct} CI [{cs.fmt_num(res['ci_low'], 2, leading_zero=False)}, {cs.fmt_num(res['ci_high'], 2, leading_zero=False)}]",
"statistics": [{"key": "alpha", "label": "Cronbach's α", "value": res["alpha"]}, {"key": "ci", "label": f"{pct} CI", "value": [res["ci_low"], res["ci_high"]]},
{"key": "alpha_std", "label": "Standardized α", "value": res["alpha_std"]}]
+ ([{"key": "omega", "label": "McDonald's ω", "value": values["omega"]}] if values["omega"] is not None else []),
"tables": [{"key": "items", "title": "Item statistics", "columns": [
{"key": "item", "label": "Item", "type": "string"}, {"key": "mean", "label": "Mean", "type": "number"},
{"key": "sd", "label": "SD", "type": "number"}, {"key": "r_drop", "label": "Corrected item–total r", "type": "number"},
{"key": "alpha_drop", "label": "α if dropped", "type": "number"}, {"key": "loading", "label": "Loading (one factor)", "type": "number"},
], "rows": rows}],
"effectSizes": [{"key": "alpha", "label": "Cronbach's α", "value": res["alpha"], "ciLow": res["ci_low"], "ciHigh": res["ci_high"],
"ciLevel": conf, "method": "Feldt (1965) F interval"}],
"assumptions": assumptions,
"warnings": warnings,
"notes": ["α from the item covariance matrix (n − 1); ω total = (Σλ)² / ((Σλ)² + Σψ) from a one-factor ML fit of the correlation matrix."],
"charts": [cs.chart("corr", "matrix-heatmap", "Inter-item correlations", {
"row": cs.col("Item", [a for a in items for _ in items], "categorical", levels=items),
"col": cs.col("Item ", [b for _ in items for b in items], "categorical", levels=items),
"value": cs.col("r", R.ravel().tolist(), "numeric"),
"label": cs.col("r (text)", [f"{x:.2f}" for x in R.ravel()], "categorical"),
}, controls={"scale": "diverging", "min": -1, "max": 1})],
"values": values,
})
Omega, and what alpha can't say
ReadAlpha assumes every item measures the factor equally well. McDonald's omegaMcDonald's omegaA reliability estimate from a factor model, which lets items load on the factor by different amounts. comes from a one-factor model and doesn't. For the attitude scale, the two agree: = 0.84 (95% interval 0.74 to 0.92) and = 0.84.
Alpha can't support two common claims:
- "High alpha means one dimension." Two distinct clusters can give a high alpha. Check with factor analysis.
- "High alpha means valid." Items can agree and all measure the wrong thing.
Your own scale
ReflectThink of a survey or composite score you use. What evidence, apart from alpha, shows it measures one thing? And what would show it measures the right thing?
Same statistic, two dialects
Readimport pandas as pd
df = pd.read_csv("attitude.csv")
items = df[["rating", "complaints", "privileges", "learning", "raises", "critical", "advance"]]
k = items.shape[1]
alpha = k / (k - 1) * (1 - items.var(ddof=1).sum() / items.sum(axis=1).var(ddof=1))
print(alpha)library(psych)
df <- read.csv("attitude.csv")
alpha(df[, c("rating", "complaints", "privileges", "learning", "raises", "critical", "advance")])$totalCheck your understanding
CheckpointCheck yourself
A scale has 4 items with an average correlation of 0.5. What is standardized alpha? Give two decimals.
Show the answer
Answer: 0.8
.
Check yourself
A 40-item scale has α = 0.93. Which claim is justified?
Show the answer
Answer: c
Alpha grows with length. It speaks to the total score's consistency, not to dimensionality or validity, and says nothing about individual items.
Check yourself
An item's corrected item–total correlation is strongly negative. What do you check first?
Show the answer
Answer: a
A strongly negative item–total correlation usually means reverse scoring. Flip it first. Then decide, on content, whether it belongs in the scale.
Recap
Recap- Alpha depends on both the number of items and their correlations.
- An unflipped reverse-worded item can wreck alpha, and item statistics reveal it.
- Report omega too, and check dimensionality separately. Consistency isn't validity.
Concepts in this lesson