A program to simulate and compare probability problem