## Data

## Data in 2D and 3D

Edit and select Data from a grid and draw a 2D or 3D Graph. You may view 3D data in the 3D viewer and make Contour plots and Cross-sections through Contour plots. Some statistical properties of the data may be calculated. You may also draw a histogram or the (cumulative, normalized) distribution function of selected data. You may apply a Chi-square test or a Kolmogorov-Smirnov test to compare two distributions.

## Chi-square test 1 and 2

The Chi-square test is used to test differences between binned distributions. The selected Y-values in grid 1 and grid 2 are compared. In the **first** test the Y-values in grid 1 are assumed to represent a theoretical distribution. Chi-squared is defined as

where Ni is the number in the i-th bin and ni is the number expected according to some known distribution. Both distributions should contain the same total number of events. The probability (0<P<1) that the numbers Ni are drawn from the expected distribution is calculated. It is an incomplete Gamma function of Chi-squared. In the **second** test two measured data sets (in grid 1 and grid 2) are compared. Chi-squared is then defined as

where Ni and Mi are the numbers in the i-th bin of the distributions calculated in grid 1 and grid 2. The total numbers should be the same. The probability P that the two distributions are drawn from the same underlying distribution is calculated. A small value of P indicates that the two distributions are probably different.