Probability theory as a basis for building design