Banihashemi, BatoulThe discovery of black hole thermodynamics and its extension to cosmological horizonsdemonstrated a deep connection between thermodynamics and the nature of spacetime as a quantum system. It is then of great importance to properly understand the statistical mechanics of gravitational systems with horizon from first principles. While employing a partition function and the gravitational “Euclidean path integral” produces the expected physical result for entropy, a number of fundamental questions about the underlying analysis persist. This dissertation sharpens and resolves some puzzles regarding statistical mechanics of gravitational ensembles and the gravitational path integral, with a focus on cosmological horizons and de Sitter space. The main questions addressed in this dissertation are: how is the entropy of de Sitterspace derived in absence of any boundary on which the statistical ensemble can be properly defined? What is the correct interpretation of the first law of de Sitter horizon, according to which the horizon area shrinks upon adding matter in de Sitter static patch? And finally, can entropy of horizon-bounded systems be derived from a Hamiltonian approach and phase space path integral, without the trickery of the gravitational Euclidean path integral? The first two questions are answered by introducing an artificial boundary in the system on which a gravitational ensemble can be properly defined. Once the ensemble is defined, the semiclassical approximation of the statistical partition function yields the entropy, and the interpretation of the de Sitter first law becomes clear by identifying the system energy as the quasilocal energy defined on the boundary. To tackle the last question, the real-time phase space path integral is utilised in the Hamiltonian formulation which maintains connection to the Hilbert space of the system, and it is found that the horizon entropy is derived from a nearly Lorentzian configuration.enThermodynamics of quantum gravitational ensemblesDissertationPhysicsBlack holesCosmological horizonsQuantum gravity