We use Shen et al.'s (2009) measurements of luminosity-dependent clustering in the Sloan Digital Sky Survey Data Release 5 quasar catalogue, at redshifts 0.4 ≤z≤ 2.5, to constrain the relation between quasar luminosity and host halo mass and to infer the duty cycle fopt, the fraction of black holes that shine as optically luminous quasars at a given time. We assume a monotonic mean relation between quasar luminosity and host halo mass, with lognormal scatter Σ. For specified fopt and Σ, matching the observed quasar space density determines the normalization of the luminosity–halo mass relation, from which we predict the clustering bias. The data show no change of bias between the faint and bright halves of the quasar sample but a modest increase in bias for the brightest 10 per cent. At the mean redshift z= 1.45 of the sample, the data can be well described either by models with small intrinsic scatter (Σ= 0.1 dex) and a duty cycle fopt= 6 × 10−4 or by models with much larger duty cycles and larger values of the scatter. ‘Continuity equation’ models of the black hole mass population imply fopt≥ 2 × 10−3 in this range of masses and redshifts, and the combination of this constraint with the clustering measurements implies scatter Σ≥ 0.4 dex. These findings contrast with those inferred from the much stronger clustering of high-luminosity quasars at z≈ 4, which require minimal scatter between luminosity and halo mass and duty cycles close to one.