Context. The anomalously large radii of hot Jupiters are still not fully understood, and all of the proposed explanations are based on the idea that these close-in giant planets possess hot interiors. Most of the mechanisms proposed have been tested on a handful of exoplanets. Aims. We approach the radius anomaly problem by adopting a statistical approach. We want to infer the internal luminosity for the sample of hot Jupiters, study its effect on the interior structure, and put constraints on which mechanism is the dominant one. Methods. We developed a flexible and robust hierarchical Bayesian model that couples the interior structure of exoplanets to the observed properties of close-in giant planets. We applied the model to 314 hot Jupite...