The study of gravitational galaxy clustering in the expanding universe using hermodynamic fluctuation theory