Metadata-Version: 2.4
Name: rmp-ci
Version: 0.1.1
Summary: Bayesian confidence intervals for RateMyProfessors ratings (inspired by 3Blue1Brown)
Project-URL: Homepage, https://github.com/broyojo/rmp-ci
Author-email: David <broyojo@example.com>
License-Expression: MIT
Keywords: 3blue1brown,bayesian,beta-distribution,confidence-interval,ratemyprofessors
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Education
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# rmp-ci

Bayesian confidence intervals for [RateMyProfessors](https://www.ratemyprofessors.com/) ratings.

Inspired by [3Blue1Brown's video](https://youtu.be/8idr1WZ1A7Q) 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

```bash
pip install rmp-ci
# or
uv tool install rmp-ci
# or
pipx install rmp-ci
```

## Usage

```bash
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