# MagicPlot Manual

Plotting and nonlinear fitting software

### Sidebar

Action disabled: source
interval_statistics

# Calculating Integrals and Statistics (Pro edition only) 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 (Statistics is only available in Pro edition). 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.

All statistical data are summarized in the intervals table:

## 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)
X Mean (first moment)
2, 3, 4th Central moments

MagicPlot uses the following formulas to calculate intervals statistics:

Property Formula
Integral Calculated using
Trapezoidal rule
X Mean (expected value)
Variance
Standard deviation
Skewness
Kurtosis

interval_statistics.txt · Last modified: Sun Nov 8 12:21:24 2015 (external edit)
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9017714858055115, "perplexity": 3355.7945585884095}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-43/segments/1570986707990.49/warc/CC-MAIN-20191020105426-20191020132926-00393.warc.gz"}