Most Sunyaev–Zel’dovich (SZ) and X-ray analyses of galaxy clusters try to constrain the cluster total mass (MT(r)) and/or gas mass (Mg(r)) using parametrized models derived from both simulations and imaging observations, and assumptions of spherical symmetry and hydrostatic equilibrium. By numerically exploring the probability distributions of the cluster parameters given the simulated interferometric SZ data in the context of Bayesian methods, and assuming a β-model for the electron number density ne(r) described by two shape parameters β and rc, we investigate the capability of this model and analysis to return the simulated cluster input quantities via three parametrizations. In parametrization I we assume that the gas temperature is an independent free parameter and assume hydrostatic equilibrium, spherical geometry and an ideal gas equation of state. We find that parametrization I can hardly constrain the cluster parameters and fails to recover the true values of the simulated cluster. In particular it overestimates MT(r200) and Tg(r200) (MT(r200) = (6.43 ± 5.43) × 1015 M⊙ and Tg(r200) = (10.61 ± 5.28) keV) compared to the corresponding values of the simulated cluster (MT(r200) = 5.83 × 1014 M⊙ and Tg(r200) = 5 keV). We then investigate parametrizations II and III in which fg(r200) replaces temperature as a main variable; we do this because fg may vary significantly less from cluster to cluster than temperature. In parametrization II we relate MT(r200) and Tg assuming hydrostatic equilibrium. We find that parametrization II can constrain the cluster physical parameters but the temperature estimate is biased low (MT(r200) = (6.8 ± 2.1) × 1014 M⊙ and Tg(r200) = (3.0 ± 1.2) keV). In parametrization III, the virial theorem (plus the assumption that all the kinetic energy of the cluster is the internal energy of the gas) replaces the hydrostatic equilibrium assumption because we consider it more robust both in theory and in practice. We find that parametrization III results in unbiased estimates of the cluster properties (MT(r200) = (4.68 ± 1.56) × 1014 M⊙ and Tg(r200) = (4.3 ± 0.9) keV). We generate a second simulated cluster using a generalized Navarro–Frenk–White pressure profile and analyse it with an entropy-based model to take into account the temperature gradient in our analysis and improve the cluster gas density distribution. This model also constrains the cluster physical parameters and the results show a radial decline in the gas temperature as expected. The mean cluster total mass estimates are also within 1σ from the simulated cluster true values: MT(r200) = (5.9 ± 3.4) × 1014 M⊙ and Tg(r200) = (7.4 ± 2.6) keV using parametrization II, and MT(r200) = (8.0 ± 5.6) × 1014 M⊙ and Tg(r200) = (5.98 ± 2.43) keV using parametrization III. However, we find that for at least interferometric SZ analysis in practice at the present time, there is no differences in the Arcminute Microkelvin Imager (AMI) visibilities between the two models. This may of course change as the instruments improve.