The aim of this thesis is to generalize the results from the article [LMT] for the score of mismatched letters. This is an introductory work and it includes complete theoretical build-up of random sequence comparison, depending on parameters. At the end we prove the large deviations inequality for the proportions of mismatches. It gives probability for proportions of mismatches being near the asymptotic proportions of mismatches. This thesis also includes a fair bit of practical examples and an introduction into algorithms, used for sequence comparison