Statistical mechanics of elastic moduli