Mott transition in a cavity-boson system: A quantitative comparison between theory and experiment