At the beginning main features of negative binomial and Poisson distribution are described, which are mainly used for modelling claim frequency. In order to test, if some data is distributed negative binomial, Kolmogorov-Smirnov test is introduced in chapter 4.1. For the calculation of p-value Frey algorithm is used on some data and pseudocode written in program R is presented. Two other methods are then defined in chapter 4.2, which are mainly used in practice to estimate parameters of some distribution. These are method of moment and method of maximum likelihood estimation. In the next chapter, quality of approximation is tested with chi-squared test. At the end, negative binomial model is used to predict claim frequency of some actuarial data.