MagicPlot Manual

Plotting and nonlinear fitting software

User Tools

Site Tools


Action disabled: media
interval_statistics

Calculating Integrals and Statistics on Intervals using Fit Plot

Setting of intervals in Fit interval tab of Fit Plot was initially intended for specifying the range of data which are used for fitting by sum of fit curves. However, this tab can also be used to calculate integrals and statistics on these intervals. Data-Baseline is used to calculate the results.

Peak Moments

MagicPlot can integrate data on selected intervals and calculate peak moments (x mean, variance, skewness, kurtosis). Spectrum line is treated as probability distribution curve: x values are treated as 'independent variable' and y values are treated as 'probability'. Standard statistical formulas are used to calculate moments (see below).

Statistical data and integrals are automatically updated if x or y data are changed or intervals are changed.

Integration on intervals

All statistical data are summarized in the intervals table:

Statistics on intervals

Managing Intervals

Move interval borders with mouse. Double click on interval to split it at desired position. Right click opens context menu from which new intervals can be created on free space and existing intervals can be deleted or split.

Relative Integrals Calculation

MagicPlot can calculate relative integrals to compare the relative intensity of spectrum lines. To compute relative integrals set Relative integrals checkbox. MagicPlot designate the smallest integral as 1, but you can enter a custom value. If you want to set not the smallest integral as a reference point, enter 1 first and then enter the value of desired integral relative to 1 into this field, so that other integrals will be calculated relative to this new value.

Computational Formulas

Central moments are calculated as follows (see table). All sums are calculated using compensated summation. Central moments are calculated on second pass after Mean calculation.

Property Formula
n The number of non-NaN (x,y) points
Y Sum (normalization) s = sum{j}{}{y_j}
X Mean (first moment) nu_1 = 1/s sum{j}{}{y_j x_j}
2, 3, 4th Central moments mu_k = 1/s sum{j}{}{y_j (x_j − nu_1)^k}, ~ k = 2...4

MagicPlot uses the following formulas to calculate intervals statistics:

Property Formula
Integral Calculated using
Trapezoidal rule
X Mean (expected value) mu = nu_1
Variance sigma^2 = {n / {n − 1}} mu_2
Standard deviation sigma = sqrt{sigma^2}
Skewness gamma_1 = sqrt{n (n − 1)} / {n − 2} {mu_3} / {sigma^3}
Kurtosis gamma_2 = {n − 1} / {(n − 2)(n − 3)} ({(n + 1) {mu_4} / {sigma^4} − 3 (n − 1)})

See Also

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
interval_statistics.txt · Last modified: Thu Jan 14 17:19:58 2021 by Alexander