In this thesis, we give a systematic study on the stochastic behaviors of heapsort, quicksort, and quickheapsort algorithm, respectively. Moreover, we propose a new variant of quickheapsort, and give experimental results on the performance of the improved quickheapsort. The costs considered include the numbers of swaps, the number of comparisons, and the total time used by quicksort, heapsort, quickheapsort, and the improved quickheapsort.