Skip to content

Commit 1185c60

Browse files
spec: add pp-basic specification (#4607)
## New Specification: `pp-basic` Related to #4587 --- ### specification.md # pp-basic: Probability-Probability (P-P) Plot ## Description A diagnostic plot comparing the cumulative distribution function (CDF) of observed data against a theoretical distribution by plotting empirical CDF values against theoretical CDF values. Unlike Q-Q plots which compare quantiles, P-P plots compare cumulative probabilities on both axes (0 to 1), making them more sensitive to deviations in the center of the distribution. Points falling along the 45-degree diagonal indicate a good fit. ## Applications - Assessing whether sample data follows a hypothesized distribution (e.g., normality testing for regression residuals) - Reliability engineering: selecting the best-fit distribution for failure time data - Quality control: verifying process measurements conform to expected distributional assumptions ## Data - `observed` (numeric) - Sample data values drawn from an unknown distribution - `theoretical_distribution` (string) - Name of the theoretical distribution to compare against (e.g., normal) - Size: 50-500 data points - Example: 200 samples from a slightly skewed distribution compared against a normal reference ## Notes - Both axes range from 0 to 1 (cumulative probabilities) - Include a 45-degree reference line representing perfect distributional fit - Use a square aspect ratio to preserve the visual meaning of the diagonal - Sort observed data and compute empirical CDF as i/(n+1) or similar plotting position formula - Evaluate theoretical CDF using fitted or specified distribution parameters - S-shaped deviations from the diagonal suggest the data has heavier or lighter tails than the reference distribution --- **Next:** Add `approved` label to the issue to merge this PR. --- :robot: *[spec-create workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/22779542905)* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 05c9949 commit 1185c60

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

plots/pp-basic/specification.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# pp-basic: Probability-Probability (P-P) Plot
2+
3+
## Description
4+
5+
A diagnostic plot comparing the cumulative distribution function (CDF) of observed data against a theoretical distribution by plotting empirical CDF values against theoretical CDF values. Unlike Q-Q plots which compare quantiles, P-P plots compare cumulative probabilities on both axes (0 to 1), making them more sensitive to deviations in the center of the distribution. Points falling along the 45-degree diagonal indicate a good fit.
6+
7+
## Applications
8+
9+
- Assessing whether sample data follows a hypothesized distribution (e.g., normality testing for regression residuals)
10+
- Reliability engineering: selecting the best-fit distribution for failure time data
11+
- Quality control: verifying process measurements conform to expected distributional assumptions
12+
13+
## Data
14+
15+
- `observed` (numeric) - Sample data values drawn from an unknown distribution
16+
- `theoretical_distribution` (string) - Name of the theoretical distribution to compare against (e.g., normal)
17+
- Size: 50-500 data points
18+
- Example: 200 samples from a slightly skewed distribution compared against a normal reference
19+
20+
## Notes
21+
22+
- Both axes range from 0 to 1 (cumulative probabilities)
23+
- Include a 45-degree reference line representing perfect distributional fit
24+
- Use a square aspect ratio to preserve the visual meaning of the diagonal
25+
- Sort observed data and compute empirical CDF as i/(n+1) or similar plotting position formula
26+
- Evaluate theoretical CDF using fitted or specified distribution parameters
27+
- S-shaped deviations from the diagonal suggest the data has heavier or lighter tails than the reference distribution

plots/pp-basic/specification.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Specification-level metadata for pp-basic
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: pp-basic
5+
title: Probability-Probability (P-P) Plot
6+
7+
# Specification tracking
8+
created: "2026-03-06T19:54:34Z"
9+
updated: null
10+
issue: 4587
11+
suggested: MarkusNeusinger
12+
13+
# Classification tags (applies to all library implementations)
14+
# See docs/reference/tagging-system.md for detailed guidelines
15+
tags:
16+
plot_type:
17+
- pp
18+
- calibration
19+
data_type:
20+
- numeric
21+
- continuous
22+
domain:
23+
- statistics
24+
- general
25+
features:
26+
- basic
27+
- distribution
28+
- 2d

0 commit comments

Comments
 (0)