Skip to main content

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 confidence interval using the Beta distribution to quantify that uncertainty.

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

How It Works

  1. Fetches the rating distribution (1-5★) from RMP's GraphQL API
  2. Treats 4-5★ as "positive" and 1-3★ as "negative"
  3. Applies a Beta(1,1) prior (uniform / Laplace)
  4. Computes the posterior Beta(positive+1, negative+1)
  5. Reports the 95% credible interval for P(positive rating)

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

rmp_ci-0.1.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rmp_ci-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file rmp_ci-0.1.1.tar.gz.

File metadata

  • Download URL: rmp_ci-0.1.1.tar.gz
  • Upload date:
  • Size: 5.2 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

Hashes for rmp_ci-0.1.1.tar.gz
Algorithm Hash digest
SHA256 831df59d39a41892f82ffcb4cb29d0fd6d891b780b3ea784d710bdf35d33a192
MD5 a7f24bdfdc3e91bbd33b4e2d357a23c5
BLAKE2b-256 23ce0195a97a4b630cdce095e850444eea1a4981e58c1469297b97a522220e3e

See more details on using hashes here.

File details

Details for the file rmp_ci-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rmp_ci-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 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

Hashes for rmp_ci-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fff84e26877fef74b7ad7d0d5739a226cc18e0b2cd65ac586dc981d5991fd5c1
MD5 1d97ad8e5f88dbb110844e9e1f623313
BLAKE2b-256 e807e70856bce277e5c78d27dece71af55434be19eb53f86e4b67f5ea5823bc3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page