Bayesian confidence intervals for RateMyProfessors ratings (inspired by 3Blue1Brown)
Project description
rmp-ci
Bayesian confidence intervals for RateMyProfessors ratings.
Inspired by 3Blue1Brown's video on binomial distributions and the beta distribution — why you shouldn't trust online ratings at face value.
The Problem
A professor with 2 ratings averaging 5.0/5 looks better than one with 200 ratings averaging 4.5/5. But the first professor's true quality is far more uncertain. This tool computes a Bayesian credible interval using the Dirichlet-Multinomial model to quantify that uncertainty.
Why Dirichlet?
The 3b1b video uses the Beta distribution, which requires collapsing star ratings into binary (positive/negative). This tool uses the Dirichlet distribution — the multivariate generalization of Beta — which models all 5 star categories simultaneously. This gives you a credible interval directly on the expected star rating (1–5) without any arbitrary cutoff.
- Prior: Dir(1,1,1,1,1) — uniform over all 5 categories
- Posterior: Dir(n₁+1, n₂+1, n₃+1, n₄+1, n₅+1)
- CI computed via Monte Carlo sampling from the posterior
Install
pip install rmp-ci
# or
uv tool install rmp-ci
# or
pipx install rmp-ci
Usage
rmp-ci "Chao Zhang" -s "Georgia Tech"
rmp-ci "Mark Riedl" -s "Georgia Tech"
rmp-ci "Lingming Zhang" -s "UIUC"
# JSON output for piping
rmp-ci "Chao Zhang" -s "Georgia Tech" --json | jq .bayesian
# Custom confidence level
rmp-ci "Chao Zhang" -s "Georgia Tech" -c 0.90
# More Monte Carlo samples for tighter estimate
rmp-ci "Chao Zhang" -s "Georgia Tech" -n 200000
Zero dependencies — pure Python stdlib.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rmp_ci-0.2.0.tar.gz.
File metadata
- Download URL: rmp_ci-0.2.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
221d59556924cd1551bb2348f06a9aa5642a6fc26201213905f0e11738ebf43c
|
|
| MD5 |
a796bed56c698485b6a0cdef36ad76c5
|
|
| BLAKE2b-256 |
481c7475717b2aae685e46bfff76cf586030ef48d3cea82cbb3b5760ad455060
|
File details
Details for the file rmp_ci-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rmp_ci-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d29bb72556b3a0ce63f79d136e73629fa2e259c2f1e46c56d9e23744785ff761
|
|
| MD5 |
bdd3e0b4ca41519d1a6df4b166021d86
|
|
| BLAKE2b-256 |
591a4ecdd24cef3259872f8b70ae00c99a9a79f79653ce8f64d8cc782fea1177
|