Commit 1185c60
authored
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments