Create Partition Function In Statistical Mechanics