How this instrument works
SMp(x) is a piecewise function built from two separate power curves that meet at a single peak. Below a lower limit (PXmin) and above an upper limit (Xmax), the value is zero. Between PXmin and the peak location (ML), the curve rises following ((x − PXmin)/(ML − PXmin))^p1, scaled by the peak height; between ML and Xmax, it falls following ((Xmax − x)/(Xmax − ML))^p2, scaled by the same peak height. Because the two powers, p1 and p2, are set independently, the rising and falling sides don't have to mirror each other.
This independence is what makes SMp(x) useful: with p1 = p2 = 1 you get a plain triangular shape (straight-line ramp up, straight-line ramp down). Push p1 or p2 above 1 and that side of the curve becomes more concave, hugging zero longer before rising sharply near the peak; push a power toward zero and that side approaches a steep, near-vertical rise or fall instead. Because both sides can be tuned separately, a single SMp(x) setup can approximate the shape of many other peaked distributions — symmetric or lopsided, gentle or sharp — without switching formulas.
This is a purely closed-form evaluator: give it a specific x and the six shape parameters, and it returns the density at that single point, exactly. There's no cumulative distribution or probability calculation involved here — it evaluates the shape function itself, point by point, which is enough for plotting the curve, checking specific values, or feeding into other work by hand.
- Enter the point you want to evaluate into x — value to evaluate.
- Enter the curve's lower limit into PXmin — lower limit of x, and its upper limit into Xmax — upper limit of x.
- Enter where the curve peaks into ML — x where the density peaks — this must sit strictly between PXmin and Xmax.
- Enter the left-side and right-side steepness into p1 — left-side power and p2 — right-side power — both must be greater than zero; use 1 for a straight-line ramp on that side.
- Enter the height of the curve at its peak into peakVal — the density's peak value (at x=ML).
- Read SMp(x) — density at x — the curve's value at your chosen x, which will be 0 outside [PXmin, Xmax] and exactly peakVal at x=ML.
Worked example — a symmetric triangular curve peaking at 5
Enter 5 into x — value to evaluate, 0 into PXmin — lower limit of x, 5 into ML — x where the density peaks, 10 into Xmax — upper limit of x, 1 into both p1 — left-side power and p2 — right-side power, and 1 into peakVal — the density's peak value (at x=ML).
Because x equals ML exactly, both branch formulas agree at this point: ((5−0)/(5−0))^1 × 1 = 1^1 × 1. SMp(x) — density at x reads 1.000000 exactly, matching peakVal — at the peak itself, the curve's value is always exactly peakVal by construction, regardless of what p1, p2, or the limits are set to. Move to x=2.5 with the same p1=1 setup and the density drops to exactly 0.5 — halfway to the peak on a straight-line (p1=1) ramp gives exactly half the peak height.
Questions
What does the SMp(x) distribution actually model?
It's a flexible, general-purpose peaked-shape function rather than a distribution tied to one specific real-world process. By adjusting where it starts (PXmin), where it peaks (ML), where it ends (Xmax), how steeply it rises (p1) and falls (p2), and how tall the peak is (peakVal), it can approximate the shape of many other peaked curves — triangular, right-skewed, left-skewed, sharply spiked, or gently rounded — using one consistent piecewise formula.
What happens when p1 and p2 both equal 1?
The curve becomes a plain triangle: a straight line rising from 0 at PXmin up to peakVal at ML, then a straight line falling from peakVal back down to 0 at Xmax. This is the simplest case of the SMp(x) family and a useful starting point before experimenting with higher or lower powers on either side.
How do different p1 and p2 values change the shape?
A power greater than 1 makes that side of the curve concave — it stays closer to zero for longer before rising or falling sharply as it approaches the peak or the limit. A power between 0 and 1 makes that side convex — it rises or falls quickly at first, then flattens out as it approaches the peak or limit. Because p1 (left side) and p2 (right side) are set completely independently, the two sides of the curve can look very different from each other, unlike a symmetric shape where both sides always match.
Is SMp(x) the same as a normal or standard probability distribution?
No — it's a general-purpose piecewise shape function, not a normalized probability density with a known cumulative distribution function. This calculator evaluates the shape at a single point exactly; it doesn't compute areas under the curve, percentiles, or cumulative probabilities the way a true probability distribution calculator would.
Why does the density come out to exactly peakVal at x=ML?
Because at x=ML, the fraction in the rising-side formula, (ML−PXmin)/(ML−PXmin), equals 1, and 1 raised to any power p1 is still 1, so the whole expression collapses to 1 × peakVal. The same thing happens from the falling side's formula at x=ML. This is by design — ML is defined as the location of the peak, so both branches are built to agree there and return exactly the peak height.