Calculate geometric probability (#855)