Random Functions and their Application in Geology