MagicPlot Manual

Plotting and nonlinear fitting software

User Tools

Site Tools


interval_statistics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
interval_statistics [Fri Nov 5 13:58:11 2010]
Gray
interval_statistics [Thu Jan 14 17:19:58 2021] (current)
Alexander
Line 1: Line 1:
 ====== Calculating Integrals and Statistics on Intervals using Fit Plot ====== ====== Calculating Integrals and Statistics on Intervals using Fit Plot ======
-Setting intervals in ''Fit interval'' tab of Fit Plot was initially intended for setting data range which is 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. 
  
-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 variableand //y// values are treated as 'probability'Standard statistical formulas are used to calculate moments+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 curvesHowever, this tab can also be used to calculate integrals and statistics on these intervals. Data-Baseline is used to calculate the results.
  
-Statistical data and integrals are automatically updated if //x// or //y// data is changed or intervals are changed.+===== 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.png|Integration on intervals}} {{:integration-on-intervals.png|Integration on intervals}}
  
-All statistical data is summarized in the intervals table:+All statistical data are summarized in the intervals table:
  
-{{:statistics-on-intervals.png|Statistics on intervals}}+{{:statistics-on-intervals.png?nolink|Statistics on intervals}}
  
 ===== Managing Intervals ===== ===== Managing Intervals =====
Line 18: Line 20:
 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. 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.
  
-===== Formulas =====+===== Computational Formulas ===== 
 +Central moments are calculated as follows (see table). All sums are calculated using [[wp>Compensated_summation|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) | <m>s = sum{j}{}{y_j}</m>
 +| X Mean (first moment) | <m>nu_1 = 1/s sum{j}{}{y_j x_j}</m> 
 +| 2, 3, 4<sup>th</sup> [[wp>Central moment|Central moments]] | <m>mu_k = 1/s sum{j}{}{y_j (x_j − nu_1)^k}, ~ k = 2...4</m>
 MagicPlot uses the following formulas to calculate intervals statistics: MagicPlot uses the following formulas to calculate intervals statistics:
 ^  Property  ^  Formula  ^ ^  Property  ^  Formula  ^
 | Integral | Calculated using \\ [[integration|Trapezoidal rule]] | | Integral | Calculated using \\ [[integration|Trapezoidal rule]] |
 | X Mean (expected value) | <m>mu = nu_1</m> | | X Mean (expected value) | <m>mu = nu_1</m> |
-| Variance | <m>sigma^2 = mu_2</m>+| Variance | <m>sigma^2 = {n / {n − 1}} mu_2</m>
-| Standard deviation | <m>sigma = sqrt{mu_2}</m> | +| Standard deviation | <m>sigma = sqrt{sigma^2}</m> | 
-| Skewness | <m>gamma_1 = {mu_3} / {sigma^3}</m>+| Skewness | <m>gamma_1 = sqrt{n (n − 1)} / {n − 2} {mu_3} / {sigma^3}</m>
-| Kurtosis | <m>gamma_2 = {mu_4} / {sigma^4} − 3</m> | +| Kurtosis | <m>gamma_2 = {n − 1} / {(n − 2)(n − 3)({(n + 1) {mu_4} / {sigma^4} − 3 (n − 1)})</m> |
-| Y Sum | <m>s = sum{k}{}{y_k}</m> | +
- +
-Intermediate values are calculated as follows: +
-^  Property  ^  Formula +
-| [[wp>Raw moment|Raw moments]] | <m>nu_n = 1/s sum{k}{}{y_k {x_k}^n}, ~ n = 1...4, ~ s = sum{k}{}{y_k}</m>+
-| [[wp>Central moment|Central moments]] | <m>mu_2 = nu_2 − mu^2</m> \\ <m>mu_3 = nu_3 − 3 mu nu_2 + 2 mu^3</m> \\ <m>mu_4 = nu_4 − 4 mu nu_3 + 6 mu^2 nu_2 − 3 mu^4</m> |+
  
 ===== See Also ===== ===== See Also =====
   * [[fitting]]   * [[fitting]]
   * [[spline]]   * [[spline]]
 +  * [[statistics]]
interval_statistics.1288954691.txt.gz · Last modified: Sun Nov 8 12:20:32 2015 (external edit)