Turn raw sensor readings into a fairness metric. See Lorenz curve points and cumulative shares. Save tables, plot trends, and validate system balance now.
In physics workflows, the Gini coefficient can quantify nonuniformity in intensity maps, particle counts across detectors, energy deposition over bins, or load sharing across components.
Sample detector-channel intensities and optional exposure weights.
| Channel | Intensity | Exposure weight |
|---|---|---|
| 1 | 1.2 | 6 |
| 2 | 2.1 | 3 |
| 3 | 2.8 | 4 |
| 4 | 3.2 | 5 |
| 5 | 4.0 | 6 |
| 6 | 5.5 | 1 |
The calculator builds the Lorenz curve from sorted values. For nonnegative magnitudes, the Gini coefficient is:
With values x and weights w, define cumulative shares:
The area A is computed by trapezoids between consecutive Lorenz points. This approach works for unequal weights and connects directly to uniformity analysis in measurement systems.
Many physics measurements yield arrays: counts per channel, beam-profile pixels, energy deposition over voxels, or forces shared by parallel elements. A single summary number speeds comparisons across runs. The Gini coefficient maps nonuniformity onto a 0 to 1 scale. Because it is unitless, it compares runs even when absolute scaling changes.
Treat each bin as an “agent” holding a magnitude (intensity, power, stress, dose, or counts). With 64 pixels you have 64 observations. Use consistent preprocessing (background subtraction and masks) so runs stay comparable. Use values-only when bins represent equal area and exposure; use weights when they differ.
The calculator sorts values (and weights) and builds cumulative population share p versus cumulative value share L. The Lorenz curve lies on or below the diagonal. The Gini coefficient is G = 1 − 2A, where A is the area under the curve computed by trapezoids.
Perfect uniformity gives G = 0, while extreme concentration approaches G = 1. For n equal-weight bins with all signal in one bin, G = (n−1)/n; for 10 bins this is 0.9. As a practical heuristic, G < 0.1 is often very uniform and G > 0.3 indicates noticeable imbalance.
Weights model how much each observation should contribute to totals, such as unequal voxel volumes or varying dwell times. In weighted mode, p accumulates weight share and L accumulates weighted signal share.
When configurations are close, uncertainty helps avoid over-interpreting noise. The jackknife option recomputes Gini after removing each observation once, estimating a standard error and an approximate 95% confidence interval. It is most practical for n ≤ 300.
Keep binning fixed, then track Gini across time, temperature, alignment settings, or component swaps. A change from G = 0.22 to 0.12 reflects a strong uniformity improvement, while slow increases can flag misalignment or detector issues. This is helpful for calibration and alignment troubleshooting.
Export summary metrics (mean, median, Gini, and optional Theil) alongside the Lorenz table for plotting L versus p. Record your negative-value handling choice, weighting rationale, and dataset definition (bins and time window) so the analysis remains reproducible.
Yes. Choose a handling method. “Shift” adds a constant to make all values nonnegative, “Clamp” sets negatives to zero, and “Reject” stops the calculation if negatives appear.
Use weights when observations represent different areas, volumes, exposure times, or sampling densities. This prevents small bins from contributing as much as large bins to the Lorenz curve and Gini.
Multiplying all values by a constant does not change Gini, because the Lorenz curve depends on shares. Adding an offset can change Gini, which is why negative handling options matter.
It indicates extreme concentration. For 10 equal bins, 0.9 matches the case where essentially all signal sits in a single bin, with the others near zero.
The Theil T index requires a positive mean and strictly positive values in the log term. If many values are zero or the mean is nonpositive, the calculator will omit Theil and show a note.
More is better, but even 20–50 bins can be informative. For jackknife uncertainty, keep datasets reasonably sized and representative. Very large n can disable uncertainty to keep computation responsive.
Export CSV and plot cumulative population share on the x-axis and cumulative value share on the y-axis. Add the 45° line as a reference; the curve’s bowing indicates nonuniformity.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.