Skip to content
svgreliability-curve

Reliability curve

What share of units is still working at each age?

Demo data · seed 20261101 · 120 rows · default settings · 640 × 360SVG, lightSVG, darkDemo CSV

How to read it

  1. Read x as age and y as the share of units still working at that age.
  2. Find your mission time on x and read across for the reliability; a line marks it when one is set.
  3. Compare curves by how far apart they are at the age you care about.
  1. Callout 1: All units start out working.
  2. Callout 2: A fitted curve: the share still working at each age.
  3. Callout 3: One curve per group or profile.

Watch out

  • It comes from a fitted family. Past the last failure it is extrapolation, however smooth it looks.
  • The curves show no uncertainty, so read the intervals in the life table beside them.

Defaults

Mission time
0
Draw a line at this time (0 for none).
Range 0 to 1,000,000, step 10
B-life
0
Draw a line at this B-life (0 for none).
Range 0 to 1,000,000, step 10

Pinned in the code

  • R(t) = 1 − F(t). A curve named Kaplan–Meier is drawn as steps, others as smooth lines.
# Reliability curve — Codesplash Chart Lab (recipe "reliability-curve")
# controls: mission=0, bLife=0
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

try:
    import codesplash as cs  # optional: the app's chart theme
except ImportError:
    cs = None
if cs:
    cs.use_codesplash(dark=False)
PALETTE = cs.palette(dark=False)["categorical"] if cs else plt.rcParams["axes.prop_cycle"].by_key()["color"]

df = pd.read_csv("reliability-curve-demo.csv", keep_default_na=False, na_values=[""])  # demo data (only empty cells are missing): Chart Lab → Code → Download demo CSV
df["supplier"] = pd.Categorical(df["supplier"].astype("string"), categories=["A", "B"])

_tokens = cs.palette(dark=False) if cs else {}
SEQ = _tokens.get("sequential", ["#eff6fd", "#1a469d"])  # sequential ramp (low → high)
DIV = _tokens.get("diverging", ["#c13e2e", "#f3f5f8", "#0859ac"])  # negative, midpoint, positive
REF = _tokens.get("reference", "#4e5661")
GREY = _tokens.get("dim", "#ced1d6")
T = "hours"
Y = "reliability"
G = "supplier"
def levels_of(s):
    """Declared level order (categoricals), else order of first appearance."""
    if isinstance(s.dtype, pd.CategoricalDtype):
        return [v for v in s.cat.categories if (s == v).any()]
    return list(dict.fromkeys(s.dropna().astype(str)))
def curves():
    groups = levels_of(df[G]) if G else [None]
    for g in groups:
        d = df if g is None else df[df[G].astype(str) == str(g)]
        d = d.dropna(subset=[T, Y]).sort_values(T, kind="stable")
        t, v = d[T].to_numpy(dtype=float), d[Y].to_numpy(dtype=float)
        keep = np.isfinite(v)
        t, v = t[keep], v[keep]
        yield ("all" if g is None else str(g)), t, v
fig, ax = plt.subplots(figsize=(8, 4.5))
for i, (name, t, y) in enumerate(curves()):
    ax.plot(t, y, color=PALETTE[i % len(PALETTE)], label=name)
ax.set_xlabel(T)
ax.set_ylabel("Reliability")
ax.set_title("Reliability: share of units still working", fontsize=10, loc="left")
ax.legend(frameon=False)
plt.show()

Needs pandas, numpy, matplotlib · reads reliability-curve-demo.csv · app theme from the optional codesplash helper