 ## Goodness-of-fit tests

Purpose of the goodness-of-fit tests is to compare fitted theoretical distribution with empirical distribution. Some tests compare theoretical and empirical (observed) frequencies of values belonging to specified class intervals, while other tests compare theoretical and empirical cumulative distribution functions.

Chi-squared test.  This test compares theoretical and empirical (observed) frequencies. The control statistic of this test is: where fe,k is empirical frequency, ft,k theoretical frequency, and K is the number of class intervals of the random variable. Statistic c2 folows the c2-distribution with n = K  r  1 degrees of freedom, where r is the number of parametars in theoretical distribution. The c2-test is considered reliable if there is at least 5 intervals with at least 5 values in each.

The c2-test is an one-sided test since the c2-statistic can only take positive values. The c2-statistic is compared with the critical value for a specified significance level a. If: then the null hypothesis of the test can be adopted, i.e. the fit by the proposed theoretical distribution can be considered good.

Critical values of the c2-statistics for different number of degrees of freedom and significance levels are given here.

Kolmogorov-Smirnov test.  This non-parametric test compares theoretical and empirical cumulative distribution functions (c.d.f.). The control statistic is the largest difference between the two c.d.f.'s: The null hypothesis of the test (good fit) can be adopted if D is not greater than the crticial value DN: Critical value DN depends on sample size N and on significance level a (table is given here). Note that for large sample sizes there is an asympotic formula for DN (last row in the table).

Cramer-von Mises test. The Cramer-von Mises test also compares theoretical and empirical cumulative distribution functions (c.d.f.). The control statistic of the test is defined as: and essentally represents the sum of squared differences between the two c.d.f.'s. If the sample values are sorted in ascending order, and if empirical c.d.f. is represented by cumulative relative frequencies Fe(xi) = i/N, then the above control statistic becomes: In fact, this test uses statistic Nw2 instead of w2. Critical values of Nw2 are given here. Headers and keywords Page content

### page 7 / 8

Module Hydrology of Floods FC-UB - - - 