# Who will cancel: early signals on real course enrolments

A subscription team often reads a customer's first weeks of use to pick who gets a save offer. This study tests that
habit on 32,593 enrolments in 7 courses at the Open University, from Feb 2013 to Oct 2014, where a student can cancel
any day and every click on the course site is logged. Each rule is fixed on the three earlier cohorts and then applied
once to the latest, Oct 2014.

What it found: two weeks of low use barely raised the later cancellation rate (25% against 20% on the earlier cohorts,
26% against 20% on Oct 2014). A missed first marked assignment did better: 32% of those students cancelled later,
against 14% of those who handed it in, and 30% against 13% on Oct 2014. The assignment signal was chosen after the
earlier cohorts' results and before Oct 2014 was read. Every money figure rests on declared assumptions. Checks declared
after every result was read (`CHANGES-r2.md`, `CHANGES-r4.md`) found that in three course runs with a computer-marked
first test the flag marks the whole run, and that use read on the same day as the flag does far worse than the flag.
On the other 19 runs, where the call is recommended, calling the flagged nets about US$1,800 per 1,000 students at the
assumed costs, where calling everyone loses about US$9,200.

## Data

Open University Learning Analytics Dataset (OULAD), Kuzilek, Hlosta and Zdrahal, Scientific Data; UCI Machine Learning
Repository dataset 349; licence CC BY 4.0. `data/sources.json` has the URL and the sha256 of the download and of each
derived file. The derived files leave out every demographic field.

## Rebuild

From this folder, with Python 3.12 and NumPy (pytest for the tests):

    python3 -I -B tools/get_data.py --cache ~/.cache/trial-to-paid-retention
    python3 -I -B tools/get_first_assessment.py --cache ~/.cache/trial-to-paid-retention
    python3 -I -B tools/run_study.py train
    python3 -I -B tools/run_assessment_signal.py train
    python3 -I -B tools/run_study.py holdout
    python3 -I -B tools/run_assessment_signal.py holdout
    python3 -I -B tools/run_study.py describe
    python3 -I -B tools/after_results.py
    python3 -I -B tools/get_due_usage.py --cache ~/.cache/trial-to-paid-retention
    python3 -I -B tools/run_change2.py
    python3 -I -B tools/run_change3.py
    python3 -I -B tools/run_change4.py
    python3 -I -B site/render.py
    python3 -B -m pytest -q -p no:cacheprovider tests

The first two commands download the public zip (44.6 MB) and check it against its sha256. The stages run in the order
the study used: the two training stages fix the rules, the holdout stages read Oct 2014, the next two describe all
four cohorts and add the figures marked as added after the results, and the next four run the three later changes.

## Files

- `index.html`, `holdout.html`, `results.html`, `method.html`: the pages.
- `protocol-r1.json`, `predictions-r1.json`, `assumptions.json`: the design, declared before any outcome was
  computed. `CHANGES-r1.md`: the assignment signal, declared after the training results and before the holdout.
  `CHANGES-r2.md` and `CHANGES-r4.md`: checks declared after every result had been read, before their code ran. The
  change between them, the value of a kept enrolment at which calling everyone nets more, is described on the method
  page.
- `results/`: every result file the pages read.
- `tools/`, `tests/`, `site/`: the code, the tests and the page builder.
- `vendor/`: the design system's files, copied unedited from one pinned release.

Some files are packed in trial-to-paid-retention-data-1.zip; unzip it here to restore the full export, which the manifest lists file by file.
