Introduction
The ∼ 5 σ \sim5\sigma ∼ 5 σ discrepancy between local distance-ladder and cosmic microwave background (CMB)-calibrated inferences of the Hubble constant H 0 H_0 H 0 , known as the Hubble tension, is one of the most pressing problems in cosmology (e.g. [53 ] (R iess et al. 2022a; Louis et al. 2025; Camphuis et al. 2026; Freedman et al. 2025; Di Valentino et al. 2025)). While there are many routes to local H 0 H_0 H 0 , which contribute to the overall tension (see H0DN Collaboration et al. 2026 for their covariance-weighted combination), the sharpest local constraint comes from the specific combination of Gaia EDR3 parallaxes, Cepheids, and Type Ia supernovae. This motivates a careful examination of the statistical assumptions entering the Milky Way (MW) Cepheid calibration.
Here we examine the MW Cepheid calibration at the level of individual stars. We construct the first Bayesian forward model of the MW Cepheid population that explicitly accounts for the sample selection function, incorporates the
© 2025 The Authors thin-disc geometry of the Galaxy as a distance prior, and infers the intrinsic population properties jointly with the period–luminosity relation and the Gaia parallax zero-point offset. In particular, we show that the reduced Hubble tension reported by Högås & Mörtsell (2026, hereafter HM26), who adopted a uniform-in-volume distance prior without selection modelling, is an artefact of that omission. We show that when Galactic disc geometry and survey truncation are modelled consistently, the inferred period–luminosity parameters agree well with the maximum-likelihood values obtained by SH0ES from their parallax-space regression — a consequence, we show, of the small intrinsic scatter of the Cepheid period–luminosity relation. Adopting a uniform-in-volume prior without selection modelling induces a bias. The prior describes the characteristics of the underlying population while the selection function determines which of those objects enter the sample; ignoring the latter while specifying the former generates mock populations inconsistent with the observed sample.
The Cepheid distance scale has been extensively tested against potential astrophysical systematics. JWST observations have ruled out unrecognised photometric crowding in extragalactic hosts as a significant contributor to the tension, with analyses of more than 1000 Cepheids in N4258 and up to 19 SN Ia hosts finding no evidence for bias in Hubble Space Telescope (H S T HST H S T ) photometry (Riess et al. 2024, 2025). A second key uncertainty for the parallax-based Cepheid calibration is the Gaia parallax zero-point offset, δ ϖ \delta\varpi δ ϖ . While the EDR3 calibration models δ ϖ \delta\varpi δ ϖ as a function of magnitude, colour, and ecliptic latitude (Lindegren et al. 2021), it remains weakly constrained for bright stars like MW Cepheids (G < 9 G < 9 G < 9 mag), a brightness range where EDR3 lacks calibration sources. The SH0ES analysis (Riess et al. 2021, hereafter R21) combined high- and low-parallax samples of Cepheids with H S T HST H S T photometry to jointly measure the offset (which is additive) and the Cepheid luminosity (which is multiplicative), yielding δ ϖ = − 14 ± 6 \delta\varpi= -14 \pm6 δ ϖ = − 14 ± 6 µas. Independent validations using asteroseismology, photometric parallaxes, red clump stars, eclipsing binaries, and orbital parallaxes generally favour residual offsets between 0 and − 20 -20 − 20 µas, suggesting that, for bright stars, the EDR3 parallax-bias recipe of Lindegren et al. (2021) (the Z5/Z6 correction evaluated from source magnitude, colour or effective wavenumber, ecliptic latitude, and astrometric-solution type) may over-correct the zero-point by ∼ 15 \sim15 ∼ 15 µas (Zinn 2021; Groenewegen 2021; Huang et al. 2021; Fabricius et al. 2021; Bhardwaj et al. 2021; Stassun & Torres 2021; Groenewegen 2023; Ding et al. 2025). An alternative route to Cepheid calibration that largely avoids the uncertainty of the parallax offset calibrates Cepheids in open clusters where the Gaia DR3 parallaxes are measured from fainter cluster stars (12 < G < 18 12 < G < 18 12 < G < 18 mag), well within the range of the Lindegren et al. (2021) calibration, and achieves a 0.9 per cent luminosity-scale precision consistent with that of the field Cepheids (Riess et al. 2022b; Cruz Reyes & Anderson 2023). The metallicity dependence of the period–luminosity relation has also been explored extensively (Breval et al. 2022; Molinaro et al. 2023), although its magnitude remains debated, with recent claims of a negligible effect (Madore et al. 2025; Madore & Freedman 2026) challenged by evidence favouring the standard slope of ∼ − 0.2 ± 0.1 \sim-0.2 \pm0.1 ∼ − 0.2 ± 0.1 mag dex− 1 ^{-1} − 1 (Breval et al. 2025). However, this term has little leverage on H 0 H_0 H 0 , with a change of ∼ 0.2 \sim0.2 ∼ 0.2 km s− 1 ^{-1} − 1 Mpc− 1 ^{-1} − 1 for a 0.1 mag dex− 1 ^{-1} − 1 change in slope due to the consistency of Cepheid metallicities along the distance ladder.
While many potential astrophysical systematics have been investigated, increasing attention has also focused on the statistical framework used to infer the Cepheid calibration and the treatment of selection effects. Several studies have explored the sensitivity of the distance ladder to modelling assumptions. For example, Efstathiou (2021) examined alternative implementations of the SH0ES analysis and discussed the impact of specific modelling choices; Kushnir & Sharon (2025) removed the requirement of a Cepheid period–luminosity relation; Bidenko et al. (2023) refit using a Gaussian process; Mörtsell et al. (2022) explored colour selection for Cepheids; see Verde et al. (2024) for a review. Subsequent analyses by the SH0ES team (Riess et al. 2022a, hereafter R22) have addressed these issues in updated treatments. Collectively, this body of work underscores that per cent-level inference in the distance ladder requires careful and transparent treatment of statistical assumptions. On the Bayesian side, Cardona et al. (2017) marginalised over hyperparameters that down-weight outliers, Delgado et al. (2019) constructed a hierarchical model for period–luminosity relations from Gaia parallaxes, and Feeney et al. (2018) built a hierarchical model of the full distance ladder, inferring H 0 H_0 H 0 end-to-end but adopting a uniform prior on distance modulus (thus failing to capture the intrinsically uniform-in-volume distribution of galaxies) and neglecting the selection function. None of these Bayesian approaches, however, incorporate a principled treatment of sample selection. Stiskalek et al. (2026) applied rigorous selection modelling to the geometric-anchor and Cepheid-host rungs of the distance ladder, but compressed the MW calibration into a single Gaussian constraint on the period–luminosity zero-point. Desmond et al. (2025) showed, in a toy model and directly on the CosmicFlows-4 dataset (Tully et al. 2023), that neglecting selection within a Bayesian framework can significantly bias the inference of H 0 H_0 H 0 , and that the distance prior must be correspondingly restricted even for nominally volume-limited samples—a toy case in which selection is a sharp cutoff in true distance, possible only in simulations. For the Cepheid samples below, selection is instead imposed on observed quantities such as magnitude or period, so the analogous correction is the selection normalisation that marginalises over both those observables and the latent Cepheid properties.
We describe the MW, Large Magellanic Cloud (LMC), and N4258 Cepheid data in § 2 , and develop the Bayesian forward model in § 3 . § 4 presents the baseline posteriors and model validation, while § 5 discusses the implications for H 0 H_0 H 0 . § 6 concludes. Throughout, N ( x ∣ μ , σ 2 ) \mathcal{N}(x \mid\mu, \sigma^2) N ( x ∣ μ , σ 2 ) denotes the univariate normal density with mean μ \mu μ and variance σ 2 \sigma^2 σ 2 , generalised to N ( x ∣ μ , Σ ) \mathcal{N}(\boldsymbol{x} \mid\boldsymbol{\mu}, \boldsymbol{\Sigma}) N ( x ∣ μ , Σ ) for the multivariate case with covariance matrix Σ \boldsymbol{\Sigma} Σ ; x ∼ N ( μ , σ 2 ) x \sim\mathcal{N}(\mu, \sigma^2) x ∼ N ( μ , σ 2 ) indicates that x x x is drawn from the corresponding distribution; Φ \Phi Φ is the standard normal cumulative distribution function (CDF); and all logarithms are base-10.
Geometric and Cepheid data
We use the MW Cepheids compiled by R21, with HST photometry in the F555W, F814W, and F160W bands and Gaia EDR3 parallaxes (Gaia Collaboration et al. [25 ] ). Of the 75 Cepheids in the R21 catalogue, seven lack Gaia EDR3 parallaxes that pass the RUWE or GOF quality cuts (CY Aur, DL Cas, RW Cam, SV Per, SY Nor, RX Cam, and U Aql) and are excluded. We further exclude S Vul and SV Vul, which were flagged as possible outliers in R21. Both exhibit significant secular period evolution, and as the longest-period, most massive Cepheids in the sample, their large angular diameters may also cause a shifting Gaia photocentre. This leaves 66 stars in the MW sample, the same sample analysed by R21 and HM26. Magnitudes are standardised via the reddening-free Wesenheit magnitude m H W m_{\mathrm{H}}^{\mathrm{W}} m H W (Madore 1982).
The Cepheids were observed across two HST campaigns with distinct selection criteria given in R21: Cycle 22 (C22) targeted long-period Cepheids (P > 8 P > 8 P > 8 days) within a distance range of ∼ 6.6 \sim6.6 ∼ 6.6 kpc, while Cycle 27 (C27) targeted nearby Cepheids at distances < 1.25 < 1.25 < 1.25 kpc, with V > 6 V > 6 V > 6 mag to avoid Gaia saturation. C27 was undertaken after the discovery of the Gaia parallax offset anomaly and the subsequent need for a broader range of Cepheid parallaxes to break degeneracies. Figure 1 shows the Galactocentric distribution of the combined sample, confirming that it traces the thin disc. Later in the analysis, we include additional Cepheid samples with geometric constraints: the LMC and N4258, taken from the SH0ES compilation of R22, as well as their host galaxy geometric distance measurements (Pietrzyński et al. 2019; Reid et al. 2019). Gaia parallaxes are subject to a global zero-point offset (Lindegren et al. 2021), which is a function of source magnitude, colour, and angular coordinate. δ ϖ \delta\varpi δ ϖ denotes the residual parallax offset , i.e. that which may not be fully corrected by Lindegren et al. (2021), who refer to an uncertainty in their correction of several μ \mu μ as. For the regime of interest for Cepheids, the bright end of the Lindegren et al. (2021) calibrated range, we estimate the uncertainty in the correction to be σ ∼ 10 μ \sigma\sim10\ \mu σ ∼ 10 μ as. The reported parallax is ϖ o b s = 1 / d − δ ϖ \varpi_{\mathrm{obs}} = 1/d - \delta\varpi ϖ obs = 1/ d − δ ϖ , where d d d is the distance; we treat δ ϖ \delta\varpi δ ϖ as a single residual offset shared by all MW Cepheids and infer it as a free parameter throughout.
Figure 1. Galactocentric distribution of the MW Cepheids (C22: dark red circles; C27: olive triangles), with distances from parallax inversion assuming δ ϖ = − 0.01 \delta\varpi=-0.01 δ ϖ = − 0.01 mas. Left : face-on projection with Drimmel et al. (2025) spiral arm traces (grey); the Sun and Galactic Centre (GC) positions are marked. The sample spans R G C ≈ 7 R_{\mathrm{GC}}\approx7 R GC ≈ 7 –11 11 11 kpc, concentrated in the solar neighbourhood. Right : edge-on view, confirming that the Cepheids trace the Galactic thin disc with height above the midplane ∣ z G C ∣ ≲ 0.2 \lvert z_{\mathrm{GC}}\rvert\lesssim0.2 ∣ z GC ∣ ≲ 0.2 kpc.
For each MW Cepheid, the R21 catalogue provides the Wesenheit apparent magnitude m H W m_{\mathrm{H}}^{\mathrm{W}} m H W with measurement uncertainty σ m \sigma_m σ m , the pulsation period P P P , a direct spectroscopic metallicity [Fe/H], and the Gaia EDR3 parallax ϖ o b s \varpi_{\mathrm{obs}} ϖ obs with uncertainty σ ϖ \sigma_{\varpi} σ ϖ . We adopt the same [Fe/H] values as R21 and HM26 for consistency, but note the modest revisions reported by Bhardwaj et al. (2023). In Table 1 we summarise the observables that enter our model. The Wesenheit magnitude is constructed from the F555W, F814W, and F160W HST bands to cancel reddening to first order under the assumed extinction law (Madore 1982), so the per-star apparent-magnitude model carries no distance-dependent extinction term A H A_{\mathrm{H}} A H that would otherwise need to be inferred or read from a dust map. For the C22 + C27 sample used here, the per-star Wesenheit colour term is F 160 W − m H W = R ( F 555 W − F 814 W ) = 0.50 ± 0.13 F160W - m_{\mathrm{H}}^{\mathrm{W}} = \mathcal{R}(F555W - F814W) = 0.50 \pm0.13 F 160 W − m H W = R ( F 555 W − F 814 W ) = 0.50 ± 0.13 mag, combining intrinsic Cepheid colour and reddening, with the intrinsic colour expected to dominate. The Wesenheit construction suppresses this scatter. Were it not applied, a parallax-based recalibration of the period–luminosity zero-point would absorb only the mean reddening, leaving the 0.13 mag as a per-star residual in distance modulus. Because m H W m_{\mathrm{H}}^{\mathrm{W}} m H W is computed from the per-star photometry, the correction does not couple to the adopted distance prior; the only such coupling enters via the optional C22 extinction selection cut A H < 0.4 A_{\mathrm{H}} < 0.4 A H < 0.4 mag, which is evaluated from the three-dimensional dust map at the latent distance and propagated jointly with the disc distance prior in the selection-normalisation integral (Eq. (27) ; § 5.4 ). Periods are determined from decades of high-cadence monitoring and are effectively noise-free, especially in the MW and LMC, with uncertainties at the 1–2 per cent level in log P \log P log P for more distant hosts. Metallicity uncertainties are dominated by systematic methodological differences rather than statistical errors, with a typical scatter of ∼ 0.06 \sim0.06 ∼ 0.06 dex.
Table 1. Summary of observables. “All” populations refer to all four datasets: C22, C27, LMC, and N4258.
The C22 parent population comprises known MW Cepheids drawn from historical variability catalogues such as the General Catalogue of Variable Stars (Samus et al. 2017), OGLE (Udalski et al. 1992), and Tammann et al. (2003), which impose an implicit completeness limit of V ≲ 15 V \lesssim15 V ≲ 15 mag. From this parent sample, three explicit cuts were applied for HST observation by SH0ES: a period cut P > 8 P > 8 P > 8 days, an extinction cut A H < 0.4 A_{\mathrm{H}} < 0.4 A H < 0.4 mag, and a saturation cut V > 6 V > 6 V > 6 mag to avoid Gaia detector saturation. Table 2 summarises the four datasets. The period cut is distance-independent, whereas the extinction and brightness cuts are distance-dependent. Of the ∼ 70 \sim70 ∼ 70 Cepheids in Tammann et al. (2003) satisfying these criteria, HST snapshot scheduling randomly selected 50 for observation. We assume this scheduling to be equivalent to random subsampling, which therefore requires no additional modelling. The V > 6 V > 6 V > 6 mag cut excludes only the nearest Cepheids; the only a single object (T Mon, V ∼ 6.07 V \sim6.07 V ∼ 6.07 mag) lies near this boundary. The extinction cut A H < 0.4 A_{\mathrm{H}} < 0.4 A H < 0.4 mag preferentially removes distant Cepheids along dusty sightlines. To evaluate this extinction cut at arbitrary positions in the MW, we use a combination of the Bayestar19 three-dimensional dust map (Green et al. 2019), which covers declinations δ > − 30 ∘ \delta> -30^\circ δ > − 3 0 ∘ , and the Marshall et al. (2006) map for the inner MW where Bayestar19 lacks coverage.2 Bayestar19 reddening is converted to A H A_{\mathrm{H}} A H using R H = 0.469 R_{\mathrm{H}} = 0.469 R H = 0.469 (Green et al. 2019), while Marshall et al. (2006) A K s A_{\mathrm{K_s}} A K s values are converted via A H = 1.55 A K s A_{\mathrm{H}} = 1.55 A_{\mathrm{K_s}} A H = 1.55 A K s . The formal implementation of this cut within the selection function is described in § 3.4 .
Table 2. Summary of datasets. N C e p h N_{\mathrm{Ceph}} N Ceph is the number of Cepheids in each sample. C22 and C27 are from R21; LMC and N4258 are from R22. Counts are after excluding 9 stars (7 lacking Gaia EDR3 parallaxes passing GOF/RUWE quality cuts, 2 outliers) from the original 75. For the LMC and N4258, only HST photometry is used. Geometric anchors: LMC detached eclipsing binary distance from Pietrzyński et al. (2019); N4258 megamaser distance from Reid et al. (2019).
C27 targets nearby, high-parallax Cepheids to complement the more distant C22 sample, selecting those with photometric parallax ϖ p h o t > 0.8 \varpi_{\mathrm{phot}} > 0.8 ϖ phot > 0.8 mas and A H < 0.6 A_{\mathrm{H}} < 0.6 A H < 0.6 mag. The photometric parallax used for this pre-HST target selection was computed from pre-existing photometry, periods, and metallicities,
log ϖ p h o t 1 m a s = − 0.2 [ m H W − M ~ H , 1 W − b ~ W ( log P 1 d a y − 1 ) − Z ~ W [ F e / H − 10 ] ] , (1) \log\frac{\varpi_{\mathrm{phot}}}{1\ \mathrm{mas}} = -0.2 \left[m_{\mathrm{H}}^{\mathrm{W}} - \widetilde{M}_{\mathrm{H},1}^{\mathrm{W}} - \widetilde{b}_{\mathrm{W}}\left(\log\frac{P}{1\ \mathrm{day}} - 1\right) - \widetilde{Z}_{\mathrm{W}}[\mathrm{Fe/H} - 10]\right], \tag*{(1)} log 1 mas ϖ phot = − 0.2 [ m H W − M H , 1 W − b W ( log 1 day P − 1 ) − Z W [ Fe/H − 10 ] ] , (1)
where m H W m_{\mathrm{H}}^{\mathrm{W}} m H W here denotes the pre-HST estimate from existing photometry and M ~ H , 1 W \widetilde{M}_{\mathrm{H},1}^{\mathrm{W}} M H , 1 W , b ~ W \widetilde{b}_{\mathrm{W}} b W , and Z ~ W \widetilde{Z}_{\mathrm{W}} Z W are the period– luminosity zero-point, slope, and metallicity coefficient from Riess et al. (2016). This cut was applied to the predicted photometric parallax rather than the Gaia trigonometric parallax because the C27 proposal was written before Gaia DR3; the DR2 parallax uncertainties were roughly twice as large, making the photometric estimate more precise. However, we shall later treat this selection as a smooth lower limit on ϖ o b s \varpi_{\mathrm{obs}} ϖ obs .
As an additional constraint on the Gaia parallax zero-point and the period–luminosity relation, we include two galaxies with independent geometric distance measurements. Pietrzyński et al. (2019) measured a distance modulus to the LMC of 18.477 ± 0.026 mag from detached eclipsing binaries, while Reid et al. (2019) measured a distance modulus to N4258 of 29.398 ± 0.032 mag from water megamaser kinematics. Both are adopted as geometric anchors for the Cepheid calibration, following the SH0ES programme (R22). We use 69 LMC and 443 N4258 Cepheids with HST photometry, observed using the same three-filter system as the MW sample, enabling a consistent calibration of the period–luminosity relation across these distance rungs. The R22 catalogue provides LMC and N4258 Cepheid Wesenheit apparent magnitudes together with per-galaxy covariance matrices Σ j \boldsymbol{\Sigma}_j Σ j , where j ∈ { L M C , N 4258 } j \in\{\mathrm{LMC}, \mathrm{N4258}\} j ∈ { LMC , N4258 } labels the anchor galaxy throughout, that account for crowding-induced photometric biases from sky background estimation and systematic uncertainties in the metallicity scale (section 2.1 of R22). For MW Cepheid metallicities we convert [Fe/H] to [O/H] = [Fe/H] + 0.06, following the R22 prescription based on Romaniello et al. (2022); the LMC and N4258 metallicities are already reported as [O/H]. The LMC sample uses a single metallicity value in accord with the finding by Romaniello et al. (2022) that all of the SH0ES Cepheids were consistent with the mean spectroscopic metallicity of the LMC field.
Figure 2 compares the distributions of log P o b s \log P_{\mathrm{obs}} log P obs , [O/H]o b s _{\mathrm{obs}} obs , ϖ o b s \varpi_{\mathrm{obs}} ϖ obs , and m H , o b s W m^{W}_{H,\mathrm{obs}} m H , obs W for the C22 and C27 samples. The C27 selection on predicted parallax yields a sample of nearby Cepheids with systematically shorter periods and larger parallaxes, whereas the C22 sample extends to longer periods and smaller parallaxes. Both samples span a similar metallicity range, [O/H] ≈ 0.0 to 0.4 dex with a median of ∼ 0.1 dex. Each sample is a subset of known classical Cepheids from the GCVS catalogue. Both are confined to the MW disc and, even within the MW, cover only a limited range of distances due to selection: the parallax distributions in Figure 2 lack Cepheids at small ϖ o b s \varpi_{\mathrm{obs}} ϖ obs relative to the expectation from a volume-complete survey. The dashed lines in Figure 2 show the misspecified HM26-like uniform-in-volume reference model, while the dotted lines show the thin-disc prediction without any selection applied. The two no-selection distributions are similar, so the observed parallax histograms disagree mainly because the target selection removes low-parallax objects from the parent population. The discrepancy is particularly pronounced for C22. C27, by contrast, more closely resembles a volume-limited sample, albeit local, because of its parallax cut, which imposes an effective upper distance limit. We shall compare to their work in § 5.2 . This incompleteness—driven by the selection criteria described above—must be accounted for in the inference, and motivates the forward-modelling approach of § 3 .
Figure 2. Distributions of observed period (log P o b s \log P_{\mathrm{obs}} log P obs ), metallicity ([ O / H ] o b s [\mathrm{O}/\mathrm{H}]_{\mathrm{obs}} [ O / H ] obs ), Gaia EDR3 parallax (ϖ o b s \varpi_{\mathrm{obs}} ϖ obs ), and Wesenheit apparent magnitude (m H , o b s W m^{W}_{H,\mathrm{obs}} m H , obs W ) for the C22 (red) and C27 (green) Cepheid samples. Dashed lines in the parallax panel show the expected counts per bin from the uniform-in-volume prior adopted by HM26, p ( ϖ o b s ) ∝ ( ϖ o b s + δ ϖ ) − 4 p(\varpi_{\mathrm{obs}})\propto(\varpi_{\mathrm{obs}}+\delta\varpi)^{-4} p ( ϖ obs ) ∝ ( ϖ obs + δ ϖ ) − 4 , assuming δ ϖ = − 0.01 \delta\varpi=-0.01 δ ϖ = − 0.01 mas; each curve is normalised over the observed parallax range of that campaign and then multiplied by the sample size and parallax bin width. Dotted lines show the corresponding unselected prediction from the thin-disc prior of Eq. (2) , normalised in the same way. HM26 assumed the uniform-in-volume prior without selection modelling, yielding a misspecified generative model for the observed Cepheid samples.
Bayesian forward model
We construct a Bayesian forward model to jointly infer the period–luminosity relation parameters, the parallax zero-point offset δ ϖ \delta_{\varpi} δ ϖ , and per-star distances, broadly following the forward-modelling framework of Stiskalek et al. (2026). Our approach differs from that of R21, who optimise in parallax space using model (i.e., photometric) parallaxes derived from observed magnitudes and periods, in that we forward-model the Cepheid observables directly by sampling per-star distances as latent variables. The data consist of Wesenheit apparent magnitudes m H W m^{W}_{H} m H W from HST , pulsation periods P P P , spectroscopic metallicities [O/H], and Gaia EDR3 parallaxes ϖ \varpi ϖ for the 66 MW Cepheids described in § 2 , together with the host geometric distance and Cepheid photometry in the LMC and N4258 (Table 1 ). The model comprises four Cepheid populations, all consistently measured with HST : the two MW campaigns C22 and C27, and the LMC and N4258. All four share the period–luminosity relation parameters ( M H , 1 W , b W , Z W ) (M^{W}_{H,1}, b_W, Z_W) ( M H , 1 W , b W , Z W ) , while the two MW campaigns share the parallax zero-point offset δ ϖ \delta_{\varpi} δ ϖ . Each population p p p has independent period distribution hyperparameters, and all populations except the LMC additionally have independent metallicity distribution hyperparameters (Eq. (5) ). For the LMC, the catalogued metallicities are used as fixed covariates (§ 3.3 ). The two MW campaigns are additionally modelled with independent intrinsic scatters σ i n t C 22 \sigma_{\mathrm{int}}^{\mathrm{C22}} σ int C22 and σ i n t C 27 \sigma_{\mathrm{int}}^{\mathrm{C27}} σ int C27 ; for the LMC and N4258, an intrinsic scatter of 0.06 mag is already included in the SH0ES-reported covariance matrices Σ j \Sigma_j Σ j , and we do not recalibrate it. As we find, this 0.06 mag scatter closely matches our inferred values for the MW campaigns. This population-level independence is a flexible modelling choice rather than an assertion that the intrinsic Cepheid populations must differ; for simplicity, we treat the population hyperparameters independently. The period population prior has little direct leverage because period measurement uncertainties are negligible, so the likelihood effectively fixes each Cepheid’s period to its
observed value, and the period prior enters only through the population normalisation and selection terms. Similarly, the metallicity population prior has limited leverage because the metallicity measurement uncertainty is comparable to the width of the observed metallicity distribution, and the period–luminosity relation is only weakly sensitive to metallicity. For the intrinsic scatter, we explicitly test shared-scatter variants in § 4 and find that the period–luminosity parameters are robust. We denote the full set of global parameters Λ \Lambda Λ ; the directed acyclic graph of the model is shown in Figure 3 .
Figure 3. Directed acyclic graph of the forward model for a single MW campaign. Rows separate global parameters, population distributions, per-Cepheid latent variables, deterministic transforms, sampling distributions, observed data, and conditioned selection. The Cepheid plate denotes conditional independence across stars given the global and population-level variables. The selection plate denotes the detection fraction entering the campaign normalisation described in § 3.4 . The disc prior generates ( d i , ℓ i , b i ) (d_i, \ell_i, b_i) ( d i , ℓ i , b i ) , with observed angles drawn through delta-function sampling distributions. The period and metallicity hyperparameters define population distributions for log P i \log P_i log P i and [ O / H ] i [\mathrm{O/H}]_i [ O/H ] i . The latent period maps directly to log P o b s , i \log P_{\mathrm{obs},i} log P obs , i , while [ O / H ] i [\mathrm{O/H}]_i [ O/H ] i maps to [ O / H ] o b s , i [\mathrm{O/H}]_{\mathrm{obs},i} [ O/H ] obs , i and enters the magnitude path through M H , i W M^{W}_{H,i} M H , i W and m H , i W m^{W}_{H,i} m H , i W . When multiple campaigns are modelled jointly, the period–luminosity parameters ( M H , 1 W , b W , Z W ) (M^{W}_{H,1}, b_W, Z_W) ( M H , 1 W , b W , Z W ) and parallax offset δ ϖ \delta_{\varpi} δ ϖ are shared across all populations, while the period and metallicity hyperparameters and intrinsic scatter are independent per campaign. The LMC and N4258 anchor-galaxy distance nodes and geometric-distance sampling distributions are not shown because this diagram represents a single MW campaign.
Priors
Table 3 summarises all inferred and fixed parameters. We adopt broad normal priors on the period–luminosity parameters M H , 1 W M^{W}_{H,1} M H , 1 W , b W b_W b W , and Z W Z_W Z W , centred approximately on the R21 baseline values. Since both the priors and posteriors are near-Gaussian, the fractional information contributed by the prior is σ p o s t 2 / σ p r i o r 2 \sigma_{\mathrm{post}}^2/\sigma_{\mathrm{prior}}^2 σ post 2 / σ prior 2 , where σ p o s t \sigma_{\mathrm{post}} σ post is the posterior width reported in § 4 . This evaluates to at most 1 per cent for M H , 1 W M^{W}_{H,1} M H , 1 W , b W b_W b W , and Z W Z_W Z W in the baseline model, so any double-counting with R21 is negligible. Following R21, we sample the zero-point offset δ ϖ \delta\varpi δ ϖ from a normal prior. Similarly, the intrinsic scatters σ i n t C 22 \sigma_{\mathrm{int}}^{\mathrm{C22}} σ int C22 and σ i n t C 27 \sigma_{\mathrm{int}}^{\mathrm{C27}} σ int C27 are each sampled independently from a truncated normal prior.
For the i t h i^{\mathrm{th}} i th MW Cepheid, the distance d i d_i d i is drawn from a Galactic disc prior that models Cepheids as tracing a thin disc. The joint density over position ( d , ℓ , b ) (d,\ell,b) ( d , ℓ , b ) is
π d i s c ( d , ℓ , b ) = 1 Z V d 2 exp ( − R G C ( d , ℓ , b ) R d ) exp ( − ∣ z ( d , b ) ∣ z d ) , (2) \pi_{\mathrm{disc}}(d,\ell,b)=\frac{1}{Z_V}d^2\exp\left(-\frac{R_{\mathrm{GC}}(d,\ell,b)}{R_d}\right)\exp\left(-\frac{\lvert z(d,b)\rvert}{z_d}\right), \tag*{(2)} π disc ( d , ℓ , b ) = Z V 1 d 2 exp ( − R d R GC ( d , ℓ , b ) ) exp ( − z d ∣ z ( d , b )∣ ) , (2)
where R G C R_{\mathrm{GC}} R GC is the Galactocentric radius, z z z the height above the midplane, R d R_d R d the disc scale length, z d z_d z d the scale height, and
Z V = ∫ d d d ℓ d b cos b d 2 exp ( − R G C / R d ) exp ( − ∣ z ∣ / z d ) Z_V=\int dd\,d\ell\,db\cos b\,d^2\exp\left(-R_{\mathrm{GC}}/R_d\right)\exp\left(-\lvert z\rvert/z_d\right) Z V = ∫ dd d ℓ d b cos b d 2 exp ( − R GC / R d ) exp ( − ∣ z ∣ / z d )
is the volume prior normalisation. The factor d 2 d^2 d 2 arises from the volume element in spherical coordinates. Galactocentric coordinates follow from heliocentric distance d d d and Galactic longitude and latitude ( ℓ , b ) (\ell,b) ( ℓ , b ) as
R G C = ( R ⊙ − d cos b cos ℓ ) 2 + ( d cos b sin ℓ ) 2 , (3) R_{\mathrm{GC}}=\sqrt{(R_{\odot}-d\cos b\cos\ell)^2+(d\cos b\sin\ell)^2}, \tag*{(3)} R GC = ( R ⊙ − d cos b cos ℓ ) 2 + ( d cos b sin ℓ ) 2 , (3)
z = d sin b , (4) z=d\sin b, \tag*{(4)} z = d sin b , (4)
where R ⊙ = 8.122 R_{\odot}=8.122 R ⊙ = 8.122 kpc is the solar Galactocentric distance (GRAVITY Collaboration et al. 2019). The true pulsation period and metallicity of each Cepheid are treated as latent variables drawn from population-specific Gaussian distributions,
log P ∼ N ( μ log P p , ( σ log P p ) 2 ) , \log P\sim\mathcal{N}\left(\mu^{p}_{\log P},(\sigma^{p}_{\log P})^2\right), log P ∼ N ( μ l o g P p , ( σ l o g P p ) 2 ) ,
[ O / H ] ∼ N ( μ [ O / H ] p , ( σ [ O / H ] p ) 2 ) , (5) [\mathrm{O/H}]\sim\mathcal{N}\left(\mu^{p}_{[\mathrm{O/H}]},(\sigma^{p}_{[\mathrm{O/H}]})^2\right), \tag*{(5)} [ O/H ] ∼ N ( μ [ O/H ] p , ( σ [ O/H ] p ) 2 ) , (5)
where p p p denotes the population to which the Cepheid belongs. Each population has an independent set of period hyperparameters ( μ log P p , σ log P p ) (\mu^{p}_{\log P},\sigma^{p}_{\log P}) ( μ l o g P p , σ l o g P p ) ; the metallicity hyperparameters ( μ [ O / H ] p , σ [ O / H ] p ) (\mu^{p}_{[\mathrm{O/H}]},\sigma^{p}_{[\mathrm{O/H}]}) ( μ [ O/H ] p , σ [ O/H ] p ) are sampled independently for all populations except the LMC, for which the catalogued metallicities are treated as fixed inputs since the SH0ES catalogue reports only a single metallicity value for LMC Cepheids (§ 3.3 ). The means are sampled with uniform priors and the standard deviations with half-normal priors. The period and metallicity distributions are assumed independent. Such Gaussian hyperpriors have been found to yield unbiased regression even in cases where the population distribution is non-Gaussian (Bartlett & Desmond 2023). In the remainder of this section, we suppress the population superscript p p p for brevity; all population-dependent quantities are understood to carry it.
We adopt R d = 2.5 R_d=2.5 R d = 2.5 kpc and z d = 0.1 z_d=0.1 z d = 0.1 kpc, values inspired by R d = 2.30 ± 0.09 R_d=2.30\pm0.09 R d = 2.30 ± 0.09 kpc measured by Bobylev & Bajkova (2021) for young (< 120 <120 < 120 Myr) Cepheids and by Nunnari et al. (2026); fixing instead to the central Bobylev & Bajkova (2021) values, including z d = 75 ± 5 z_d=75\pm5 z d = 75 ± 5 pc, has no appreciable effect on the inferred parameters. The prior is truncated to [ d min , d max ] [d_{\min},d_{\max}] [ d m i n , d m a x ] and normalised numerically per sightline via Simpson’s rule, where d min = 0.1 d_{\min}=0.1 d m i n = 0.1 kpc and d max = 8.5 d_{\max}=8.5 d m a x = 8.5 kpc for C22 and d max = 2.0 d_{\max}=2.0 d m a x = 2.0 kpc for C27. The same spatial prior enters both the per-star likelihood and the selection-normalisation integral, so the likelihood and selection terms describe the same underlying parent population. These upper limits are never reached by the posterior and have no impact on the inference, provided they are sufficiently large. For the LMC and N4258, we sample the distance d j d_j d j to each host from a uniform-in-volume prior, π ( d j ) ∝ d j 2 \pi(d_j)\propto d_j^2 π ( d j ) ∝ d j 2 , and apply the geometric distance modulus measurement as a likelihood constraint in Eq. (21) . Thus, for each anchor galaxy, the distance posterior contains the factor π ( d j ) N ( μ ~ j ∣ μ ( d j ) , σ μ , j 2 ) \pi(d_j)\mathcal{N}(\tilde{\mu}_j\mid\mu(d_j),\sigma_{\mu,j}^2) π ( d j ) N ( μ ~ j ∣ μ ( d j ) , σ μ , j 2 ) , where μ ~ j ± σ μ , j \tilde{\mu}_j\pm\sigma_{\mu,j} μ ~ j ± σ μ , j is the geometric distance modulus measurement. There is no double counting of volume factors: for example, the N4258 megamaser analysis of Reid et al. (2019) used a prior uniform in distance rather than uniform in volume.
The angular positions of observed Cepheids are known, but computing the detection probability of § 3.4 requires marginalising over the angular position Ω = ( ℓ , b ) \boldsymbol{\Omega}=(\ell,b) Ω = ( ℓ , b ) on the sky, since the normalisation integral extends over all positions where a Cepheid could have been detected. The conditional prior on distance given sky position is π d i s c ( d ∣ Ω ) = π d i s c ( d , Ω ) / π d i s c ( Ω ) \pi_{\mathrm{disc}}(d\mid\boldsymbol{\Omega})=\pi_{\mathrm{disc}}(d,\boldsymbol{\Omega})/\pi_{\mathrm{disc}}(\boldsymbol{\Omega}) π disc ( d ∣ Ω ) = π disc ( d , Ω ) / π disc ( Ω ) , where the population angular distribution follows from marginalising Eq. (2) over distance,
π d i s c ( Ω ) = Z ( Ω ) Z V , (6) \pi_{\mathrm{disc}}(\boldsymbol{\Omega})=\frac{\mathcal{Z}(\boldsymbol{\Omega})}{Z_V}, \tag*{(6)} π disc ( Ω ) = Z V Z ( Ω ) , (6)
where
Z ( Ω ) ≡ ∫ d d d 2 exp ( − R G C R d ) exp ( − ∣ z ∣ z d ) , (7) \mathcal{Z}(\boldsymbol{\Omega})\equiv\int dd\,d^2\exp\left(-\frac{R_{\mathrm{GC}}}{R_d}\right)\exp\left(-\frac{\lvert z\rvert}{z_d}\right), \tag*{(7)} Z ( Ω ) ≡ ∫ dd d 2 exp ( − R d R GC ) exp ( − z d ∣ z ∣ ) , (7)
which depends on the disc model parameters ( R d , z d ) (R_d,z_d) ( R d , z d ) and is largest in directions where the disc column density is highest.
Deterministic transformations
Given the sampled global parameters, per-star distances, and latent true periods and metallicities, we compute the true observables deterministically. The period–luminosity relation gives the absolute Wesenheit magnitude of the i t h i^{\mathrm{th}} i th Cepheid as
M H , i W = M H , 1 W + b W ( log P i 1 d a y − 1 ) + Z W [ O / H ] i , (8) M^{W}_{H,i}=M^{W}_{H,1}+b_W\left(\log\frac{P_i}{1\ \mathrm{day}}-1\right)+Z_W[\mathrm{O/H}]_i, \tag*{(8)} M H , i W = M H , 1 W + b W ( log 1 day P i − 1 ) + Z W [ O/H ] i , (8)
where P i P_i P i is the latent true period and [ O / H ] i [\mathrm{O/H}]_i [ O/H ] i the latent true metallicity; the wavelength dependence of Z W Z_W Z W is discussed. in Breuval et al. (2022). The true apparent magnitude then follows from the distance modulus,
m H , i W ( d i , Λ ) = M H , i W + μ ( d i ) , (9) m^{W}_{H,i}(d_i,\Lambda) = M^{W}_{H,i} + \mu(d_i), \tag*{(9)} m H , i W ( d i , Λ ) = M H , i W + μ ( d i ) , (9)
μ ( d ) = 5 log 10 ( d / k p c ) + 10 , (10) \mu(d) = 5\log_{10}(d/\mathrm{kpc}) + 10, \tag*{(10)} μ ( d ) = 5 log 10 ( d / kpc ) + 10 , (10)
and the true parallax is
ϖ i = 1 m a s d i / k p c − δ ϖ , (11) \varpi_i = \frac{1\,\mathrm{mas}}{d_i/\mathrm{kpc}} - \delta_{\varpi}, \tag*{(11)} ϖ i = d i / kpc 1 mas − δ ϖ , (11)
where δ ϖ \delta_{\varpi} δ ϖ is the Gaia parallax zero-point offset. For the LMC and N4258, the true apparent magnitudes follow from the same period–luminosity relation, with all Cepheids in galaxy j j j placed at distance d j d_j d j .
Likelihoods
For each MW Cepheid, the observed Wesenheit magnitude and Gaia EDR3 parallax are compared to their true values. The magnitude likelihood for the i t h i^{\mathrm{th}} i th Cepheid, conditioned on the true period log P i \log P_i log P i and metallicity [ O / H ] i [\mathrm{O/H}]_i [ O/H ] i , is
L ( m H , o b s , i W ∣ d i , log P i , [ O / H ] i , Λ ) = N ( m H , o b s , i W ∣ m H , i W , σ m , i 2 + ( σ i n t c i ) 2 ) , (12) \begin{aligned}
\mathcal{L}(m^{W}_{H,\mathrm{obs},i}\mid d_i,\log P_i,[\mathrm{O/H}]_i,\Lambda)
&= \mathcal{N}\left(m^{W}_{H,\mathrm{obs},i}\mid m^{W}_{H,i},\sigma_{m,i}^{2}+(\sigma_{\mathrm{int}}^{c_i})^{2}\right), \tag*{(12)}
\end{aligned} L ( m H , obs , i W ∣ d i , log P i , [ O/H ] i , Λ ) = N ( m H , obs , i W ∣ m H , i W , σ m , i 2 + ( σ int c i ) 2 ) , (12)
where σ m , i \sigma_{m,i} σ m , i is the photometric uncertainty and σ i n t c i \sigma_{\mathrm{int}}^{c_i} σ int c i the intrinsic scatter for campaign c i ∈ { C 22 , C 27 } c_i \in\{\mathrm{C22},\mathrm{C27}\} c i ∈ { C22 , C27 } . The parallax likelihood is
L ( ϖ o b s , i ∣ d i , Λ ) = N ( ϖ o b s , i ∣ ϖ i , σ ϖ , i 2 ) , (13) \mathcal{L}(\varpi_{\mathrm{obs},i}\mid d_i,\Lambda)=\mathcal{N}(\varpi_{\mathrm{obs},i}\mid\varpi_i,\sigma_{\varpi,i}^{2}), \tag*{(13)} L ( ϖ obs , i ∣ d i , Λ ) = N ( ϖ obs , i ∣ ϖ i , σ ϖ , i 2 ) , (13)
where σ ϖ , i \sigma_{\varpi,i} σ ϖ , i is the reported Gaia parallax uncertainty.
The period measurement uncertainties are negligibly small, so the period likelihood is effectively a delta function,
L ( log P o b s , i ∣ log P i ) ≈ δ ( log P o b s , i − log P i ) . (14) \mathcal{L}(\log P_{\mathrm{obs},i}\mid\log P_i)\approx\delta(\log P_{\mathrm{obs},i}-\log P_i). \tag*{(14)} L ( log P obs , i ∣ log P i ) ≈ δ ( log P obs , i − log P i ) . (14)
For the metallicity, individual measurement uncertainties are rarely reported; the dominant errors are methodological and approximately constant across the sample. We therefore adopt a Gaussian likelihood,
L ( [ O / H ] o b s , i ∣ [ O / H ] i ) = N ( [ O / H ] o b s , i ∣ [ O / H ] i , ϵ [ O / H ] 2 ) , (15) \mathcal{L}([\mathrm{O/H}]_{\mathrm{obs},i}\mid[\mathrm{O/H}]_i)=\mathcal{N}([\mathrm{O/H}]_{\mathrm{obs},i}\mid[\mathrm{O/H}]_i,\epsilon_{[\mathrm{O/H}]}^{2}), \tag*{(15)} L ([ O/H ] obs , i ∣ [ O/H ] i ) = N ([ O/H ] obs , i ∣ [ O/H ] i , ϵ [ O/H ] 2 ) , (15)
with a fixed measurement uncertainty ϵ [ O / H ] = 0.06 \epsilon_{[\mathrm{O/H}]}=0.06 ϵ [ O/H ] = 0.06 dex, distinct from the population scatter σ [ O / H ] \sigma_{[\mathrm{O/H}]} σ [ O/H ] of Eq. (5) . This value is consistent with the ∼ 0.05 \sim0.05 ∼ 0.05 dex systematic scale uncertainty adopted by Gieren et al. (2018), the ≲ 0.07 \lesssim0.07 ≲ 0.07 dex propagated measurement error reported by Romaniello et al. (2022), and the ≲ 0.05 \lesssim0.05 ≲ 0.05 dex precision achieved in the homogeneous reanalysis of da Silva et al. (2022). The exact value has negligible impact on the inference, as it enters only through the precision-weighted combination with σ [ O / H ] \sigma_{[\mathrm{O/H}]} σ [ O/H ] .
Similarly, the sky position of each Cepheid is measured effectively without error, so the likelihood of the observed angular position is a delta function, L ( Ω o b s ∣ Ω ) = δ ( Ω − Ω o b s ) \mathcal{L}(\boldsymbol{\Omega}_{\mathrm{obs}}\mid\boldsymbol{\Omega})=\delta(\boldsymbol{\Omega}-\boldsymbol{\Omega}_{\mathrm{obs}}) L ( Ω obs ∣ Ω ) = δ ( Ω − Ω obs ) . The full prior on the star’s three-dimensional position is π d i s c ( d , Ω ) = π d i s c ( d ∣ Ω ) π d i s c ( Ω ) \pi_{\mathrm{disc}}(d,\boldsymbol{\Omega})=\pi_{\mathrm{disc}}(d\mid\boldsymbol{\Omega})\pi_{\mathrm{disc}}(\boldsymbol{\Omega}) π disc ( d , Ω ) = π disc ( d ∣ Ω ) π disc ( Ω ) —Eqs. (2) and (6) ; integrating over the true sky position against the delta function evaluates π d i s c ( Ω ) \pi_{\mathrm{disc}}(\boldsymbol{\Omega}) π disc ( Ω ) at Ω o b s \boldsymbol{\Omega}_{\mathrm{obs}} Ω obs . Since π d i s c ( d ∣ Ω ) = π d i s c ( d , Ω ) / π d i s c ( Ω ) \pi_{\mathrm{disc}}(d\mid\boldsymbol{\Omega})=\pi_{\mathrm{disc}}(d,\boldsymbol{\Omega})/\pi_{\mathrm{disc}}(\boldsymbol{\Omega}) π disc ( d ∣ Ω ) = π disc ( d , Ω ) / π disc ( Ω ) , the factor π d i s c ( Ω o b s ) \pi_{\mathrm{disc}}(\boldsymbol{\Omega}_{\mathrm{obs}}) π disc ( Ω obs ) from the prior cancels with the denominator of the conditional, leaving simply π d i s c ( d , Ω o b s ) = ϱ ( d , Ω o b s ) / Z V \pi_{\mathrm{disc}}(d, \boldsymbol{\Omega}_{\mathrm{obs}})=\varrho(d,\boldsymbol{\Omega}_{\mathrm{obs}})/Z_V π disc ( d , Ω obs ) = ϱ ( d , Ω obs ) / Z V , where
ϱ ( d , Ω ) = d 2 exp ( − R G C R d ) exp ( − ∣ z ∣ z d ) (16) \varrho(d,\boldsymbol{\Omega})=d^2\exp\left(-\frac{R_{\mathrm{GC}}}{R_d}\right)\exp\left(-\frac{|z|}{z_d}\right) \tag*{(16)} ϱ ( d , Ω ) = d 2 exp ( − R d R GC ) exp ( − z d ∣ z ∣ ) (16)
is the unnormalised disc density. The remaining global normalisation Z V Z_V Z V cancels against the selection term, which we will introduce in § 3.4 .
The true period and metallicity are nuisance latent parameters that can be marginalised analytically. Combining the measurement likelihoods with the Gaussian population prior of Eq. (5) , the joint marginalised likelihood is
L m a r g ( m H , o b s , i W , log P o b s , i , [ O / H ] o b s , i ∣ d i , Λ ) = ∫ d log P i d [ O / H ] i L ( m H , o b s , i W ∣ d i , log P i , [ O / H ] i , Λ ) × L ( log P o b s , i ∣ log P i ) L ( [ O / H ] o b s , i ∣ [ O / H ] i ) × π ( log P i ∣ Λ ) π ( [ O / H ] i ∣ Λ ) . (17) \begin{aligned}
\mathcal{L}^{\mathrm{marg}}(m^{W}_{H,\mathrm{obs},i},\log P_{\mathrm{obs},i},[\mathrm{O/H}]_{\mathrm{obs},i}\mid d_i,\Lambda)
={}&\int\mathrm{d}\log P_i\,\mathrm{d}[\mathrm{O/H}]_i\,\mathcal{L}(m^{W}_{H,\mathrm{obs},i}\mid d_i,\log P_i,[\mathrm{O/H}]_i,\Lambda)\\
&\times\mathcal{L}(\log P_{\mathrm{obs},i}\mid\log P_i)\mathcal{L}([\mathrm{O/H}]_{\mathrm{obs},i}\mid[\mathrm{O/H}]_i)\\
&\times\pi(\log P_i\mid\Lambda)\pi([\mathrm{O/H}]_i\mid\Lambda). \tag*{(17)}
\end{aligned} L marg ( m H , obs , i W , log P obs , i , [ O/H ] obs , i ∣ d i , Λ ) = ∫ d log P i d [ O/H ] i L ( m H , obs , i W ∣ d i , log P i , [ O/H ] i , Λ ) × L ( log P obs , i ∣ log P i ) L ([ O/H ] obs , i ∣ [ O/H ] i ) × π ( log P i ∣ Λ ) π ([ O/H ] i ∣ Λ ) . (17)
The delta-function period likelihood of Eq. (14) collapses the integral over log P i \log P_i log P i , setting log P i = log P o b s , i \log P_i=\log P_{\mathrm{obs},i} log P i = log P obs , i and leaving behind the period prior π ( log P o b s , i ∣ Λ ) \pi(\log P_{\mathrm{obs},i}\mid\Lambda) π ( log P obs , i ∣ Λ ) . The true metallicity [ O / H ] i [\mathrm{O/H}]_i [ O/H ] i enters the magnitude likelihood linearly through the Z W [ O / H ] i Z_W[\mathrm{O/H}]_i Z W [ O/H ] i term of the period–luminosity relation, while both the metallicity likelihood and population prior are Gaussian; the three factors are jointly Gaussian in [ O / H ] i [\mathrm{O/H}]_i [ O/H ] i and integrate analytically to give
L m a r g ( m H , o b s , i W , log P o b s , i , [ O / H ] o b s , i ∣ d i , Λ ) = N ( m H , o b s , i W ∣ m H , i W ( d i , log P o b s , i , [ O / H ] ⋆ , i ) , σ 1 , i 2 ) × N ( log P o b s , i ∣ μ log P , σ log P 2 ) × N ( [ O / H ] o b s , i ∣ μ [ O / H ] , ϵ [ O / H ] 2 + σ [ O / H ] 2 ) . (18) \begin{aligned}
\mathcal{L}^{\mathrm{marg}}(m^{W}_{H,\mathrm{obs},i},\log P_{\mathrm{obs},i},[\mathrm{O/H}]_{\mathrm{obs},i}\mid d_i,\Lambda)
={}&\mathcal{N}\left(m^{W}_{H,\mathrm{obs},i}\mid m^{W}_{H,i}(d_i,\log P_{\mathrm{obs},i},[\mathrm{O/H}]_{\star,i}),\sigma^2_{1,i}\right)\\
&\times\mathcal{N}\left(\log P_{\mathrm{obs},i}\mid\mu_{\log P},\sigma^2_{\log P}\right)\\
&\times\mathcal{N}\left([\mathrm{O/H}]_{\mathrm{obs},i}\mid\mu_{[\mathrm{O/H}]},\epsilon^2_{[\mathrm{O/H}]}+\sigma^2_{[\mathrm{O/H}]}\right). \tag*{(18)}
\end{aligned} L marg ( m H , obs , i W , log P obs , i , [ O/H ] obs , i ∣ d i , Λ ) = N ( m H , obs , i W ∣ m H , i W ( d i , log P obs , i , [ O/H ] ⋆ , i ) , σ 1 , i 2 ) × N ( log P obs , i ∣ μ l o g P , σ l o g P 2 ) × N ( [ O/H ] obs , i ∣ μ [ O/H ] , ϵ [ O/H ] 2 + σ [ O/H ] 2 ) . (18)
where [ O / H ] ⋆ , i [\mathrm{O/H}]_{\star,i} [ O/H ] ⋆ , i is the effective metallicity, obtained as the precision-weighted mean of the observed value and the population mean,
[ O / H ] ⋆ , i = σ ~ [ O / H ] 2 ( [ O / H ] o b s , i ϵ [ O / H ] 2 + μ [ O / H ] σ [ O / H ] 2 ) , (19) [\mathrm{O/H}]_{\star,i}=\widetilde{\sigma}^{2}_{[\mathrm{O/H}]}\left(\frac{[\mathrm{O/H}]_{\mathrm{obs},i}}{\epsilon^2_{[\mathrm{O/H}]}}+\frac{\mu_{[\mathrm{O/H}]}}{\sigma^2_{[\mathrm{O/H}]}}\right), \tag*{(19)} [ O/H ] ⋆ , i = σ [ O/H ] 2 ( ϵ [ O/H ] 2 [ O/H ] obs , i + σ [ O/H ] 2 μ [ O/H ] ) , (19)
with posterior precision σ ~ [ O / H ] − 2 = ϵ [ O / H ] − 2 + σ [ O / H ] − 2 \widetilde{\sigma}^{-2}_{[\mathrm{O/H}]}=\epsilon^{-2}_{[\mathrm{O/H}]}+\sigma^{-2}_{[\mathrm{O/H}]} σ [ O/H ] − 2 = ϵ [ O/H ] − 2 + σ [ O/H ] − 2 . The total variance is σ 1 , i 2 = σ m , i 2 + ( σ i n t ) 2 + Z W 2 σ ~ [ O / H ] 2 \sigma^2_{1,i}=\sigma^2_{m,i}+(\sigma_{\mathrm{int}})^2+Z_W^2\widetilde{\sigma}^2_{[\mathrm{O/H}]} σ 1 , i 2 = σ m , i 2 + ( σ int ) 2 + Z W 2 σ [ O/H ] 2 . The second factor in Eq. (18) is the period prior evaluated at the observed period, which constrains μ log P \mu_{\log P} μ l o g P and σ log P \sigma_{\log P} σ l o g P ; the third is the marginalised metallicity likelihood, which constrains μ [ O / H ] \mu_{[\mathrm{O/H}]} μ [ O/H ] and σ [ O / H ] \sigma_{[\mathrm{O/H}]} σ [ O/H ] . The marginalised per-star likelihood is therefore
L i = L m a r g ( m H , o b s , i W , log P o b s , i , [ O / H ] o b s , i ∣ d i , Λ ) × N ( ϖ o b s , i ∣ ϖ i , σ ϖ , i 2 ) . (20) \mathcal{L}_i=\mathcal{L}^{\mathrm{marg}}(m^{W}_{H,\mathrm{obs},i},\log P_{\mathrm{obs},i},[\mathrm{O/H}]_{\mathrm{obs},i}\mid d_i,\Lambda)
\times\mathcal{N}(\varpi_{\mathrm{obs},i}\mid\varpi_i,\sigma^2_{\varpi,i}). \tag*{(20)} L i = L marg ( m H , obs , i W , log P obs , i , [ O/H ] obs , i ∣ d i , Λ ) × N ( ϖ obs , i ∣ ϖ i , σ ϖ , i 2 ) . (20)
For j ∈ { L M C , N 4258 } j\in\{\mathrm{LMC},\mathrm{N4258}\} j ∈ { LMC , N4258 } , the geometric distance modulus constrains the galaxy distance via
L ( μ ~ j ∣ μ j ) = N ( μ ~ j ∣ μ j , σ μ , j 2 ) , (21) \mathcal{L}(\widetilde{\mu}_j\mid\mu_j)=\mathcal{N}(\widetilde{\mu}_j\mid\mu_j,\sigma^2_{\mu,j}), \tag*{(21)} L ( μ j ∣ μ j ) = N ( μ j ∣ μ j , σ μ , j 2 ) , (21)
where μ ~ j \widetilde{\mu}_j μ j is the measured geometric distance modulus, σ μ , j \sigma_{\mu,j} σ μ , j its uncertainty, and μ j = μ ( d j ) \mu_j=\mu(d_j) μ j = μ ( d j ) is the distance modulus corresponding to the sampled galaxy distance d j d_j d j . The anchor Cepheid photometry is modelled as a multivariate normal:
L ( m H , j W ∣ μ j , Λ ) = N ( m H , j W ∣ M H , j W + μ j , Σ j ) , (22) \mathcal{L}(m^{W}_{H,j}\mid\mu_j,\Lambda)=\mathcal{N}(m^{W}_{H,j}\mid M^{W}_{H,j}+\mu_j,\Sigma_j), \tag*{(22)} L ( m H , j W ∣ μ j , Λ ) = N ( m H , j W ∣ M H , j W + μ j , Σ j ) , (22)
where M H , j W M^{W}_{H,j} M H , j W is the vector of true absolute magnitudes from the period–luminosity relation and Σ j \Sigma_j Σ j is the SH0ES-reported covariance matrix. As for the MW Cepheids,
delta-function period likelihood sets log P k = log P o b s , k \log P_k=\log P_{\mathrm{obs},k} log P k = log P obs , k in each true absolute magnitude, leaving behind the period prior factors π ( log P o b s , k ∣ Λ ) \pi(\log P_{\mathrm{obs},k}\mid\Lambda) π ( log P obs , k ∣ Λ ) . For N4258, which has spectroscopic [ O / H ] [\mathrm{O/H}] [ O/H ] measurements, the true metallicities are marginalised as in Eq. (18) , adopting ϵ [ O / H ] = 0.06 \epsilon_{[\mathrm{O/H}]}=0.06 ϵ [ O/H ] = 0.06 dex. Each Cepheid’s true absolute magnitude is evaluated at the effective metallicity [ O / H ] ⋆ , k [\mathrm{O/H}]_{\star,k} [ O/H ] ⋆ , k of Eq. (19) , and the marginalisation adds Z W 2 σ ~ [ O / H ] 2 Z_W^2\widetilde{\sigma}^2_{[\mathrm{O/H}]} Z W 2 σ [ O/H ] 2 to the diagonal of the covariance. Because each Cepheid’s magnitude depends linearly on its own metallicity, and the per-star metallicity posteriors are conditionally independent given the population hyperparameters, the off-diagonal structure of Σ j \Sigma_j Σ j is unchanged. The marginalised anchor Cepheid likelihood is therefore
L j m a r g = N ( m H , j W ∣ M H , j W ( log P o b s , [ O / H ] ⋆ , j ) + μ j , Σ j + Z W 2 σ ~ [ O / H ] 2 I ) × ∏ k = 1 N j N ( log P o b s , k ∣ μ log P , σ log P 2 ) × N ( [ O / H ] o b s , k ∣ μ [ O / H ] , ϵ [ O / H ] 2 + σ [ O / H ] 2 ) . (23) \begin{aligned}
\mathcal{L}^{\mathrm{marg}}_j={}&\mathcal{N}\left(\boldsymbol{m}^{W}_{H,j}\mid\boldsymbol{M}^{W}_{H,j}(\log P_{\mathrm{obs}},[\mathrm{O/H}]_{\star,j})+\mu_j,\right.\\
&\left.\qquad\qquad\Sigma_j+Z_W^2\widetilde{\sigma}^2_{[\mathrm{O/H}]}I\right)\\
&\times\prod_{k=1}^{N_j}\mathcal{N}\left(\log P_{\mathrm{obs},k}\mid\mu_{\log P},\sigma^2_{\log P}\right)\\
&\times\mathcal{N}\left([\mathrm{O/H}]_{\mathrm{obs},k}\mid\mu_{[\mathrm{O/H}]},\epsilon^2_{[\mathrm{O/H}]}+\sigma^2_{[\mathrm{O/H}]}\right). \tag*{(23)}
\end{aligned} L j marg = N ( m H , j W ∣ M H , j W ( log P obs , [ O/H ] ⋆ , j ) + μ j , Σ j + Z W 2 σ [ O/H ] 2 I ) × k = 1 ∏ N j N ( log P obs , k ∣ μ l o g P , σ l o g P 2 ) × N ( [ O/H ] obs , k ∣ μ [ O/H ] , ϵ [ O/H ] 2 + σ [ O/H ] 2 ) . (23)
where N j N_j N j is the number of Cepheids in galaxy j j j , and log P o b s \log P_{\mathrm{obs}} log P obs and [ O / H ] ⋆ , j [\mathrm{O/H}]_{\star,j} [ O/H ] ⋆ , j denote the vectors of observed periods and effective metallicities for those Cepheids. For the LMC, the catalogue reports a single spectroscopic metallicity value (§ 2 ); we therefore treat the central value as a fixed covariate in the true absolute magnitudes and do not infer the population hyperparameters μ [ O / H ] \mu_{[\mathrm{O/H}]} μ [ O/H ] and σ [ O / H ] \sigma_{[\mathrm{O/H}]} σ [ O/H ] for the LMC. An uncertainty on this shared value would induce a fully correlated metallicity covariance ϵ L M C 2 1 1 T \epsilon^2_{\mathrm{LMC}}\boldsymbol{1}\boldsymbol{1}^{\mathsf{T}} ϵ LMC 2 1 1 T between the LMC Cepheids, where 1 \boldsymbol{1} 1 is a vector of ones with one entry for each LMC Cepheid. Since metallicity enters the period–luminosity relation linearly, this would propagate into the magnitude likelihood as Z W 2 ϵ L M C 2 1 1 T Z_W^2\epsilon^2_{\mathrm{LMC}}\boldsymbol{1}\boldsymbol{1}^{\mathsf{T}} Z W 2 ϵ LMC 2 1 1 T , rather than as the diagonal term Z W 2 σ ~ [ O / H ] 2 I Z_W^2\widetilde{\sigma}^2_{[\mathrm{O/H}]}I Z W 2 σ [ O/H ] 2 I in Eq. (23) . For ϵ L M C = 0.06 \epsilon_{\mathrm{LMC}}=0.06 ϵ LMC = 0.06 dex and ∣ Z W ∣ ≃ 0.22 |Z_W|\simeq0.22 ∣ Z W ∣ ≃ 0.22 mag dex− 1 ^{-1} − 1 , the induced common-mode magnitude uncertainty is 0.013 mag, smaller than the 0.026 mag geometric distance uncertainty of the LMC; we therefore assume its effect on the inferred period–luminosity parameters is negligible.
Selection modelling
Both the C22 and C27 samples are subject to selection criteria. We account for these following the framework of Kelly (2007) (recently applied and extended by Stiskalek et al. (2026), which introduced two terms: a per-star selection weight and a normalisation factor. We model each selection criterion as a smooth cut on some observable x x x , with transition width w x w_x w x (so that the period cut of Eq. (46) is recovered in the w x → 0 w_x\to0 w x → 0 limit). The selection function for a lower or upper threshold is, respectively,
S l o w ( x ) = Φ ( x − x min w x ) , \mathcal{S}_{\mathrm{low}}(x)=\Phi\left(\frac{x-x_{\min}}{w_x}\right), S low ( x ) = Φ ( w x x − x m i n ) ,
S h i g h ( x ) = Φ ( x max − x w x ) . (24) \mathcal{S}_{\mathrm{high}}(x)=\Phi\left(\frac{x_{\max}-x}{w_x}\right). \tag*{(24)} S high ( x ) = Φ ( w x x m a x − x ) . (24)
The selection function enters the posterior of Eq. (47) through two terms. The first is the per-star selection weight, given by Eq. (24) evaluated at the observed catalogue values. For example, for a star with observed magnitude m m m and an upper limit at m max m_{\max} m m a x , the per-star selection weight is
S ( m ) = Φ ( m max − m w m ) . (25) S(m) = \Phi\left(\frac{m_{\max} - m}{w_{m}}\right). \tag*{(25)} S ( m ) = Φ ( w m m m a x − m ) . (25)
The second term is a normalisation factor [ p ( S = 1 ∣ Λ ) ] − n p [p(S = 1 \mid\Lambda)]^{-n_{p}} [ p ( S = 1 ∣ Λ ) ] − n p , where n p n_{p} n p is the number of observed stars and p ( S = 1 ∣ Λ ) p(S = 1 \mid\Lambda) p ( S = 1 ∣ Λ ) is the marginalised detection probability. This is obtained by integrating the selection function weighted by the likelihood and prior over all observed and latent variables:
p ( S = 1 ∣ Λ ) = ∫ d x d θ S ( x ) L ( x ∣ θ , Λ ) π ( θ ∣ Λ ) , (26) p(S = 1 \mid\Lambda) = \int\mathrm{d}x\,\mathrm{d}\theta\,S(x)\,\mathcal{L}(x \mid\theta,\Lambda)\,\pi(\theta\mid\Lambda), \tag*{(26)} p ( S = 1 ∣ Λ ) = ∫ d x d θ S ( x ) L ( x ∣ θ , Λ ) π ( θ ∣ Λ ) , (26)
where x x x denotes the observed quantities, θ \theta θ the per-source latent parameters (such as distance), L ( x ∣ θ , Λ ) \mathcal{L}(x \mid\theta,\Lambda) L ( x ∣ θ , Λ ) the likelihood of the observables, and π ( θ ∣ Λ ) \pi(\theta\mid\Lambda) π ( θ ∣ Λ ) the prior, which may depend on some of the global parameters.
For the Cepheid problem, we consider the per-star selection weight of Eq. (25) to comprise cuts on up to four observables: the Wesenheit magnitude m H , o b s W m^{W}_{H,\mathrm{obs}} m H , obs W , the parallax ϖ o b s \varpi_{\mathrm{obs}} ϖ obs , the pulsation period log P o b s \log P_{\mathrm{obs}} log P obs , and the H H H -band extinction A H A_{H} A H . We assume no selection on metallicity, though one could be straightforwardly included. We model the magnitude selection as an effective cut in the Wesenheit band; the underlying photometric criteria are not strictly in Wesenheit, but the Wesenheit magnitude is directly predictable from the period–luminosity relation, making this considerably easier in practice (see § 5.4 for further discussion). The corresponding marginalised detection probability of Eq. (26) is
p ( S = 1 ∣ Λ ) = ∫ d Ω d d d m d ϖ × d log P d log P o b s d [ O / H ] d [ O / H ] o b s × S ( m , ϖ , log P o b s , A H ( d , Ω ) ) × L ( m ∣ d , log P , [ O / H ] , Λ ) L ( ϖ ∣ d , Λ ) × L ( log P o b s ∣ log P ) L ( [ O / H ] o b s ∣ [ O / H ] ) × π d i s c ( d , Ω ) π ( log P , [ O / H ] ∣ Λ ) , (27) \begin{aligned}
p(S = 1 \mid\Lambda) ={}& \int\mathrm{d}\Omega\,\mathrm{d}d\,\mathrm{d}m\,\mathrm{d}\varpi\\
&\times\mathrm{d}\log P\,\mathrm{d}\log P_{\mathrm{obs}}\,\mathrm{d}[\mathrm{O/H}]\,\mathrm{d}[\mathrm{O/H}]_{\mathrm{obs}} \\
&\times S(m,\varpi,\log P_{\mathrm{obs}},A_{H}(d,\Omega)) \\
&\times\mathcal{L}(m \mid d,\log P,[\mathrm{O/H}],\Lambda)\,\mathcal{L}(\varpi\mid d,\Lambda) \\
&\times\mathcal{L}(\log P_{\mathrm{obs}} \mid\log P)\,\mathcal{L}([\mathrm{O/H}]_{\mathrm{obs}} \mid[\mathrm{O/H}]) \\
&\times\pi_{\mathrm{disc}}(d,\Omega)\,\pi(\log P,[\mathrm{O/H}] \mid\Lambda), \tag*{(27)}
\end{aligned} p ( S = 1 ∣ Λ ) = ∫ d Ω d d d m d ϖ × d log P d log P obs d [ O/H ] d [ O/H ] obs × S ( m , ϖ , log P obs , A H ( d , Ω )) × L ( m ∣ d , log P , [ O/H ] , Λ ) L ( ϖ ∣ d , Λ ) × L ( log P obs ∣ log P ) L ([ O/H ] obs ∣ [ O/H ]) × π disc ( d , Ω ) π ( log P , [ O/H ] ∣ Λ ) , (27)
where Ω \Omega Ω denotes the angular position on the sky, m ≡ m H W m \equiv m^{W}_{H} m ≡ m H W the Wesenheit magnitude, ϖ \varpi ϖ the parallax, and A H ( d , Ω ) A_{H}(d,\Omega) A H ( d , Ω ) the line-of-sight (LOS) H H H -band extinction model described in § 2 . The magnitude and parallax likelihoods are Gaussian, centred on the values predicted by the period–luminosity relation and 1 / d − δ ϖ 1/d - \delta_{\varpi} 1/ d − δ ϖ , respectively; the period and metallicity likelihoods L ( log P o b s ∣ log P ) \mathcal{L}(\log P_{\mathrm{obs}} \mid\log P) L ( log P obs ∣ log P ) and L ( [ O / H ] o b s ∣ [ O / H ] ) \mathcal{L}([\mathrm{O/H}]_{\mathrm{obs}} \mid[\mathrm{O/H}]) L ([ O/H ] obs ∣ [ O/H ]) relate the observed values to the true underlying quantities. The remaining terms are the joint position prior π d i s c ( d , Ω ) \pi_{\mathrm{disc}}(d,\Omega) π disc ( d , Ω ) of Eq. (2) and the prior π ( log P , [ O / H ] ∣ Λ ) \pi(\log P,[\mathrm{O/H}] \mid\Lambda) π ( log P , [ O/H ] ∣ Λ ) on Cepheid properties. In principle, the integral should include both the true sky position Ω \Omega Ω and the observed position Ω o b s \Omega_{\mathrm{obs}} Ω obs with the delta-function likelihood of § 3.3 ; since this collapses the integral over Ω o b s \Omega_{\mathrm{obs}} Ω obs , we write a single Ω \Omega Ω throughout. Assuming that the selection cuts are independent, the joint selection function factorises as
S ( m , ϖ , log P o b s , A H ) = S ( m ) S ( ϖ ) S ( log P o b s ) S ( A H ) , (28) \begin{aligned}
S(m,\varpi,\log P_{\mathrm{obs}},A_H)
&= S(m)\,S(\varpi)\,S(\log P_{\mathrm{obs}})\,S(A_H), \tag*{(28)}
\end{aligned} S ( m , ϖ , log P obs , A H ) = S ( m ) S ( ϖ ) S ( log P obs ) S ( A H ) , (28)
where each factor takes the S l o w S_{\mathrm{low}} S low or S h i g h S_{\mathrm{high}} S high form of Eq. (24) depending on whether the cut imposes a lower or upper threshold. This nine-dimensional integral must be evaluated for each observational campaign, but the choice of Gaussian population priors and likelihoods, combined with modelling the selection cuts as normal CDFs, permits a sequence of analytic marginalisations that reduce it to a tractable form. With the following steps, we reduce the selection normalisation to a three-dimensional numerical integral over ( d , ℓ , b ) (d,\ell,b) ( d , ℓ , b ) , with a closed-form integrand built from Gaussian CDFs. The analytic steps below are the standard Gaussian-linear marginalisations used in hierarchical standard-candle models, including those used in SN Ia cosmology (e.g. March et al. 2011; Rubin et al. 2015; Shariff et al. 2016). We first marginalise the Gaussian population variables. First, because there is no selection on metallicity and the likelihood is normalised, the integral over [ O / H ] o b s [\mathrm{O}/\mathrm{H}]_{\mathrm{obs}} [ O / H ] obs evaluates to unity and [ O / H ] o b s [\mathrm{O}/\mathrm{H}]_{\mathrm{obs}} [ O / H ] obs drops out. The true metallicity [ O / H ] [\mathrm{O}/\mathrm{H}] [ O / H ] , however, remains through the magnitude likelihood. Since selection does not depend on the observed metallicity, integrating over [ O / H ] o b s [\mathrm{O}/\mathrm{H}]_{\mathrm{obs}} [ O / H ] obs removes the metallicity measurement likelihood. Only the true metallicity remains, with its parent-population prior, and integrating it out of the product of this prior and the magnitude likelihood gives
∫ d [ O / H ] L ( m ∣ d , log P , [ O / H ] , Λ ) π ( [ O / H ] ∣ Λ ) = N ( m ∣ m ‾ ( d , log P ) , σ 1 2 ) , (29) \int\mathrm{d}[\mathrm{O}/\mathrm{H}]\,\mathcal{L}(m\mid d,\log P,[\mathrm{O}/\mathrm{H}],\Lambda)\,\pi([\mathrm{O}/\mathrm{H}]\mid\Lambda)
= \mathcal{N}\left(m\mid\overline{m}(d,\log P),\sigma_1^2\right), \tag*{(29)} ∫ d [ O / H ] L ( m ∣ d , log P , [ O / H ] , Λ ) π ([ O / H ] ∣ Λ ) = N ( m ∣ m ( d , log P ) , σ 1 2 ) , (29)
where σ 1 2 = σ m 2 + σ i n t 2 + Z W 2 σ [ O / H ] 2 \sigma_1^2=\sigma_m^2+\sigma_{\mathrm{int}}^2+Z_W^2\sigma_{[\mathrm{O}/\mathrm{H}]}^2 σ 1 2 = σ m 2 + σ int 2 + Z W 2 σ [ O / H ] 2 (analogous to σ 1 , i \sigma_{1,i} σ 1 , i of Eq. (18) but with σ [ O / H ] \sigma_{[\mathrm{O}/\mathrm{H}]} σ [ O / H ] replacing σ ~ [ O / H ] \widetilde{\sigma}_{[\mathrm{O}/\mathrm{H}]} σ [ O / H ] , since no per-star measurement enters); here σ m \sigma_m σ m and σ i n t \sigma_{\mathrm{int}} σ int are set to the median values across the campaign rather than per-star quantities—a simplification, since in principle the per-star uncertainties should be sampled within the normalisation integral. The model mean magnitude m ‾ ( d , log P ) = M H , 1 W + b W ( log P − 1 ) + Z W μ [ O / H ] + μ ( d ) \overline{m}(d,\log P)=M^W_{H,1}+b_W(\log P-1)+Z_W\mu_{[\mathrm{O}/\mathrm{H}]}+\mu(d) m ( d , log P ) = M H , 1 W + b W ( log P − 1 ) + Z W μ [ O / H ] + μ ( d ) is evaluated at the prior mean metallicity μ [ O / H ] \mu_{[\mathrm{O}/\mathrm{H}]} μ [ O / H ] .
Second, as in the per-star likelihood, the delta-function period likelihood of Eq. (14) collapses the integral over log P o b s \log P_{\mathrm{obs}} log P obs , setting log P o b s = log P \log P_{\mathrm{obs}}=\log P log P obs = log P everywhere. By the same argument, m ‾ \overline{m} m is linear in log P \log P log P through the slope b W b_W b W , so the product of Eq. (29) with the Gaussian period prior is again Gaussian in log P \log P log P . The integral over log P \log P log P with the period selection then yields
∫ d log P S ( log P ) N ( m ∣ m ‾ , σ 1 2 ) π ( log P ∣ Λ ) = N ( m ∣ m ^ ( d ) , σ 2 2 ) × Φ ( μ ~ log P ( m , d ) − log P min w log P 2 + σ ~ log P 2 ) , (30) \begin{aligned}
\int\mathrm{d}\log P\,S(\log P)\,\mathcal{N}(m\mid\overline{m},\sigma_1^2)\,\pi(\log P\mid\Lambda)
&= \mathcal{N}(m\mid\widehat{m}(d),\sigma_2^2)\\
&\quad\times\Phi\left(\frac{\widetilde{\mu}_{\log P}(m,d)-\log P_{\min}}{\sqrt{w_{\log P}^2+\widetilde{\sigma}_{\log P}^2}}\right), \tag*{(30)}
\end{aligned} ∫ d log P S ( log P ) N ( m ∣ m , σ 1 2 ) π ( log P ∣ Λ ) = N ( m ∣ m ( d ) , σ 2 2 ) × Φ w l o g P 2 + σ l o g P 2 μ l o g P ( m , d ) − log P m i n , (30)
where m ^ ( d ) = M H , 1 W + b W ( μ log P − 1 ) + Z W μ [ O / H ] + μ ( d ) \widehat{m}(d)=M^W_{H,1}+b_W(\mu_{\log P}-1)+Z_W\mu_{[\mathrm{O}/\mathrm{H}]}+\mu(d) m ( d ) = M H , 1 W + b W ( μ l o g P − 1 ) + Z W μ [ O / H ] + μ ( d ) is the mean magnitude at the prior mean and σ 2 2 = σ 1 2 + b W 2 σ log P 2 \sigma_2^2=\sigma_1^2+b_W^2\sigma_{\log P}^2 σ 2 2 = σ 1 2 + b W 2 σ l o g P 2 the total variance. The quantities μ ~ log P ( m , d ) \widetilde{\mu}_{\log P}(m,d) μ l o g P ( m , d ) and σ ~ log P 2 \widetilde{\sigma}_{\log P}^2 σ l o g P 2 are the mean and variance of the posterior Gaussian in log P \log P log P obtained from multiplying the magnitude likelihood (which constrains log P \log P log P through the slope b W b_W b W ) with the period prior. Explicitly,
σ ~ log P − 2 = b W 2 σ 1 − 2 + σ log P − 2 , (31) \widetilde{\sigma}_{\log P}^{-2}=b_W^2\sigma_1^{-2}+\sigma_{\log P}^{-2}, \tag*{(31)} σ l o g P − 2 = b W 2 σ 1 − 2 + σ l o g P − 2 , (31)
μ ~ log P ( m , d ) = μ log P + b W σ ~ log P 2 σ 1 2 ( m − m ^ ( d ) ) , (32) \widetilde{\mu}_{\log P}(m,d)=\mu_{\log P}+\frac{b_W\widetilde{\sigma}_{\log P}^2}{\sigma_1^2}\left(m-\widehat{m}(d)\right), \tag*{(32)} μ l o g P ( m , d ) = μ l o g P + σ 1 2 b W σ l o g P 2 ( m − m ( d ) ) , (32)
analogous to the metallicity expressions of Eq. (19) .
After both marginalisations, the detection probability reduces to an integral over ( Ω , d ) (\Omega,d) ( Ω , d ) and the Gaussian observables ( m , ϖ ) (m,\varpi) ( m , ϖ ) . Selection factors that depend deterministically on ( d , Ω ) (d,\Omega) ( d , Ω ) —such as the extinction cut, evaluated from the three-dimensional dust map—separate from those involving these Gaussian variables. Each remaining selection factor is a smooth threshold on a linear function of the observables: the magnitude and parallax selections act directly on m m m and ϖ \varpi ϖ , while the period selection inherited from Eq. (30) depends on m m m through μ ~ log P ( m , d ) \widetilde{\mu}_{\log P}(m,d) μ l o g P ( m , d ) .
The remaining integral over Gaussian observables can then be written as a multivariate-normal CDF. Let n n n denote the number of observables with Gaussian likelihoods (among m m m and ϖ \varpi ϖ ) that enter at least one selection cut. Standardising these into a vector z ∈ R n \boldsymbol{z}\in\mathbb{R}^n z ∈ R n , where each component z i = ( x i − x ^ i ) / σ i z_i=(x_i-\widehat{x}_i)/\sigma_i z i = ( x i − x i ) / σ i is the standardised residual of the i t h i^{\mathrm{th}} i th observable, the product of Gaussian likelihoods becomes ϕ n ( z ) \phi_n(\boldsymbol{z}) ϕ n ( z ) , with ϕ n \phi_n ϕ n the n n n -variate standard normal density. For example, when both magnitude and parallax selections are applied ( n = 2 ) (n=2) ( n = 2 ) ,
z = ( m − m ^ σ m , ϖ − ϖ ^ σ ϖ ) T , (33) \boldsymbol{z}=\left(\frac{m-\widehat{m}}{\sigma_m},\frac{\varpi-\widehat{\varpi}}{\sigma_\varpi}\right)^{T}, \tag*{(33)} z = ( σ m m − m , σ ϖ ϖ − ϖ ) T , (33)
where σ ϖ \sigma_\varpi σ ϖ is set to the median parallax uncertainty of the campaign. Under this substitution, each selection factor takes the form Φ ( α k + γ k T z ) \Phi(\alpha_k+\boldsymbol{\gamma}_k^{T}\boldsymbol{z}) Φ ( α k + γ k T z ) , where α k \alpha_k α k is a scalar absorbing the selection threshold and the predicted observable, and γ k ∈ R n \boldsymbol{\gamma}_k\in\mathbb{R}^n γ k ∈ R n captures the ratio of the likelihood width to the selection width along each observable. Continuing the n = 2 n=2 n = 2 case, an upper magnitude cut and a lower parallax cut yield
m a g n i t u d e : α 1 = m max − m ^ w m , γ 1 = ( − σ m w m , 0 ) T , \mathrm{magnitude:}\quad\alpha_1=\frac{m_{\max}-\widehat{m}}{w_m},\qquad
\boldsymbol{\gamma}_1=\left(-\frac{\sigma_m}{w_m},0\right)^{T}, magnitude : α 1 = w m m m a x − m , γ 1 = ( − w m σ m , 0 ) T ,
p a r a l l a x : α 2 = ϖ ^ − ϖ min w ϖ , γ 2 = ( 0 , σ ϖ w ϖ ) T , (34) \mathrm{parallax:}\quad\alpha_2=\frac{\widehat{\varpi}-\varpi_{\min}}{w_\varpi},\qquad
\boldsymbol{\gamma}_2=\left(0,\frac{\sigma_\varpi}{w_\varpi}\right)^{T}, \tag*{(34)} parallax : α 2 = w ϖ ϖ − ϖ m i n , γ 2 = ( 0 , w ϖ σ ϖ ) T , (34)
where each γ k \boldsymbol{\gamma}_k γ k has a zero entry for the observable that does not enter that cut. The integral over z \boldsymbol{z} z evaluates analytically:
∫ d z ∏ k = 1 K Φ ( α k + γ k T z ) ϕ n ( z ) = Φ K ( h ; R ) , (35) \int\mathrm{d}\boldsymbol{z}\,\prod_{k=1}^{K}\Phi(\alpha_k+\boldsymbol{\gamma}_k^{T}\boldsymbol{z})\,\phi_n(\boldsymbol{z})=\Phi_K(\boldsymbol{h};\boldsymbol{R}), \tag*{(35)} ∫ d z k = 1 ∏ K Φ ( α k + γ k T z ) ϕ n ( z ) = Φ K ( h ; R ) , (35)
where Φ K \Phi_K Φ K is the K K K -dimensional multivariate normal CDF with zero mean and correlation matrix R \boldsymbol{R} R , and
h k = α k 1 + ∥ γ k ∥ 2 , h_k=\frac{\alpha_k}{\sqrt{1+\lVert\boldsymbol{\gamma}_k\rVert^2}}, h k = 1 + ∥ γ k ∥ 2 α k ,
R j k = γ j ⋅ γ k ( 1 + ∥ γ j ∥ 2 ) ( 1 + ∥ γ k ∥ 2 ) (36) R_{jk}=\frac{\boldsymbol{\gamma}_j\cdot\boldsymbol{\gamma}_k}{\sqrt{(1+\lVert\boldsymbol{\gamma}_j\rVert^2)(1+\lVert\boldsymbol{\gamma}_k\rVert^2)}} \tag*{(36)} R j k = ( 1 + ∥ γ j ∥ 2 ) ( 1 + ∥ γ k ∥ 2 ) γ j ⋅ γ k (36)
and R k k = 1 R_{kk}=1 R k k = 1 . The arguments h k h_k h k absorb the distance-dependent predicted observables and selection thresholds, while R j k R_{jk} R j k captures correlations between selection criteria that share dependence on the same underlying observables.
Applying this identity gives the aforementioned three-dimensional selection normalisation,
p ( S = 1 ∣ Λ ) = ∫ d Ω d d S e x t ( d , Ω ) Φ K ( h ( d ) ; R ( d ) ) × π d i s c ( d , Ω ) , (37) p(S = 1 \mid\Lambda) = \int\mathrm{d}\Omega\, \mathrm{d}d \, S_{\mathrm{ext}}(d, \Omega) \, \Phi_K(h(d); R(d))
\times\pi_{\mathrm{disc}}(d, \Omega), \tag*{(37)} p ( S = 1 ∣ Λ ) = ∫ d Ω d d S ext ( d , Ω ) Φ K ( h ( d ) ; R ( d )) × π disc ( d , Ω ) , (37)
where S e x t ( d , Ω ) = Φ ( ( A H , max − A H ( d , Ω ) ) / w A H ) S_{\mathrm{ext}}(d, \Omega) = \Phi((A_{H,\max} - A_H(d, \Omega))/w_{A_H}) S ext ( d , Ω ) = Φ (( A H , m a x − A H ( d , Ω )) / w A H ) is the extinction selection factor evaluated from the dust map (set to unity when no extinction cut is applied), and Φ K ( h ( d ) ; R ( d ) ) \Phi_K(h(d); R(d)) Φ K ( h ( d ) ; R ( d )) encapsulates all K K K selection cuts on the Gaussian observables. The dimension K K K and the explicit forms of h ( d ) h(d) h ( d ) and R ( d ) R(d) R ( d ) for each campaign are derived in § 3.5 and § 3.6 .
Thus, the original nine-dimensional integral of Eq. (27) reduces to a numerical integral over ( d , ℓ , b ) (d, \ell, b) ( d , ℓ , b ) . The distance integral is evaluated via Simpson’s rule on a fine grid for each sightline,3 while the integral over Ω = ( ℓ , b ) \Omega= (\ell, b) Ω = ( ℓ , b ) is approximated by Monte Carlo sampling. For a uniform-in-volume prior with no extinction cut, the integrand would be independent of Ω \Omega Ω and the detection probability would reduce to a single one-dimensional integral over d d d ; the disc geometry of Eq. (2) and the sightline-dependent extinction, however, require the full angular integration. Expanding π d i s c ( d , Ω ) = ϱ ( d , Ω ) / Z V \pi_{\mathrm{disc}}(d, \Omega) = \varrho(d, \Omega)/Z_V π disc ( d , Ω ) = ϱ ( d , Ω ) / Z V from Eq. (2) , where ϱ ( d , Ω ) \varrho(d, \Omega) ϱ ( d , Ω ) is the unnormalised disc density of Eq. (16) , the factor Z V − 1 Z_V^{-1} Z V − 1 appears identically in the per-star prior and in the detection probability and cancels in the posterior (§ 3.3 ). Only the unnormalised integral over ϱ \varrho ϱ is therefore needed:
p ( S = 1 ∣ Λ ) ≈ 4 π Z V N l o s ∑ j = 1 N l o s ∫ d min d max d d S e x t ( d , Ω j ) Φ K ( h ( d ) ; R ( d ) ) × ϱ ( d , Ω j ) , (38) \begin{aligned}
p(S = 1 \mid\Lambda)
&\approx\frac{4\pi}{Z_V N_{\mathrm{los}}}
\sum_{j=1}^{N_{\mathrm{los}}}
\int_{d_{\min}}^{d_{\max}} \mathrm{d}d \, S_{\mathrm{ext}}(d, \Omega_j) \, \Phi_K(h(d); R(d)) \\
&\qquad\times\varrho(d, \Omega_j), \tag*{(38)}
\end{aligned} p ( S = 1 ∣ Λ ) ≈ Z V N los 4 π j = 1 ∑ N los ∫ d m i n d m a x d d S ext ( d , Ω j ) Φ K ( h ( d ) ; R ( d )) × ϱ ( d , Ω j ) , (38)
where the Ω j \Omega_j Ω j are sampled uniformly on the sky and the distance integral along each sightline is evaluated via Simpson’s rule on a fine grid. In practice, we importance-sample the Ω j \Omega_j Ω j from π d i s c ( Ω ) \pi_{\mathrm{disc}}(\Omega) π disc ( Ω ) (Eq. (6) ) to concentrate draws near the Galactic plane, where ϱ \varrho ϱ is largest.
C27 selection
The C27 sample targets nearby Cepheids, selected primarily on the photometry-predicted parallax ϖ p h o t > 0.8 \varpi_{\mathrm{phot}} > 0.8 ϖ phot > 0.8 mas computed following Eq. (1) . Because this selection was applied using a fixed set of baseline period–luminosity parameters, modelling the criterion exactly would couple the selection function to those assumed values. We instead approximate this as a smooth lower cut on the observed parallax at ϖ min \varpi_{\min} ϖ m i n with a transition width w ϖ = 0.05 w_\varpi= 0.05 w ϖ = 0.05 mas, which is independent of Λ \Lambda Λ . We similarly assume a lower cut on the Wesenheit magnitude at m H , min W m^{W}_{H,\min} m H , m i n W to exclude the nearest, brightest Cepheids. The effective threshold m H , min W m^{W}_{H,\min} m H , m i n W is inferred with a uniform prior. Although C27 also applied an extinction cut (A H < 0.6 A_H < 0.6 A H < 0.6 mag), we treat this as negligible for the nearby C27 sample. The per-star selection weight is therefore
S ( x o b s , i ) = Φ ( ϖ o b s , i − ϖ min w ϖ ) Φ ( m H , o b s , i W − m H , min W w m ) , (39) S(\boldsymbol{x}_{\mathrm{obs},i}) =
\Phi\left(\frac{\varpi_{\mathrm{obs},i} - \varpi_{\min}}{w_\varpi}\right)
\Phi\left(\frac{m^{W}_{H,\mathrm{obs},i} - m^{W}_{H,\min}}{w_m}\right), \tag*{(39)} S ( x obs , i ) = Φ ( w ϖ ϖ obs , i − ϖ m i n ) Φ ( w m m H , obs , i W − m H , m i n W ) , (39)
depending only on the observed parallax and magnitude.
For the marginalised detection probability, the [ O / H ] [O/H] [ O / H ] and log P \log P log P integrals proceed as in Eqs. (29) and (30) , but without a period selection cut; the log P \log P log P marginalisation therefore yields a Gaussian in m m m with variance σ m 2 \sigma_m^2 σ m 2 and mean m ^ ( d ) \hat{m}(d) m ^ ( d ) , without the Φ \Phi Φ factor of Eq. (30) . The two remaining selection factors act on Gaussian observables (K = 2 K = 2 K = 2 , n = 2 n = 2 n = 2 ): the magnitude cut on m m m and the parallax cut on ϖ \varpi ϖ . Since they are independent given the distance, the correlation matrix R R R is diagonal and Φ 2 ( h ; R ) \Phi_2(h; R) Φ 2 ( h ; R ) factorises as Φ ( h 1 ) Φ ( h 2 ) \Phi(h_1)\Phi(h_2) Φ ( h 1 ) Φ ( h 2 ) . Setting S e x t = 1 S_{\mathrm{ext}} = 1 S ext = 1 in Eq. (37) , the C27 detection probability is
p ( S = 1 ∣ Λ ) = ∫ d Ω d d Φ ( h 1 ( d ) ) Φ ( h 2 ( d ) ) × π d i s c ( d , Ω ) , (40) p(S = 1 \mid\Lambda) = \int\mathrm{d}\Omega\, \mathrm{d}d \, \Phi(h_1(d)) \, \Phi(h_2(d))
\times\pi_{\mathrm{disc}}(d, \Omega), \tag*{(40)} p ( S = 1 ∣ Λ ) = ∫ d Ω d d Φ ( h 1 ( d )) Φ ( h 2 ( d )) × π disc ( d , Ω ) , (40)
where
h 1 ( d ) = m ^ ( d ) − m H , min W w m 2 + σ m 2 , (41) h_1(d) = \frac{\hat{m}(d) - m^{W}_{H,\min}}{\sqrt{w_m^2 + \sigma_m^2}}, \tag*{(41)} h 1 ( d ) = w m 2 + σ m 2 m ^ ( d ) − m H , m i n W , (41)
h 2 ( d ) = ϖ ^ ( d ) − ϖ min w ϖ 2 + σ ϖ 2 . h_2(d) = \frac{\hat{\varpi}(d) - \varpi_{\min}}{\sqrt{w_\varpi^2 + \sigma_\varpi^2}}. h 2 ( d ) = w ϖ 2 + σ ϖ 2 ϖ ^ ( d ) − ϖ m i n .
Following Eq. (38) , we evaluate Eq. (40) with S e x t = 1 S_{\mathrm{ext}} = 1 S ext = 1 , N l o s = 5000 N_{\mathrm{los}} = 5000 N los = 5000 sightlines, d min = 0.1 d_{\min} = 0.1 d m i n = 0.1 kpc, and d max = 2.0 d_{\max} = 2.0 d m a x = 2.0 kpc. Because the analytic marginalisation reduces the problem to a set of one-dimensional integrals over distance, the detection probability is computationally tractable even on-the-fly during sampling.
C22 selection
The C22 sample is subject to four selection criteria. The original photometric selection was not performed in the Wesenheit band; however, we approximate it as an effective upper cut on the Wesenheit magnitude, m H W < m H , max W m^{W}_{H} < m^{W}_{H,\max} m H W < m H , m a x W , noting that the magnitude threshold is sufficiently broad that the sensitivity to the choice of band is minimised. We similarly model an effective lower cut on the observed parallax, ϖ o b s > ϖ min \varpi_{\mathrm{obs}} > \varpi_{\min} ϖ obs > ϖ m i n , and a lower cut on pulsation period, log P > log P min \log P > \log P_{\min} log P > log P m i n ; an extinction cut, A H < A H , max A_H < A_{H,\max} A H < A H , m a x , is optionally included but disabled in the baseline model (§ 5.4 ). The effective thresholds ϖ min \varpi_{\min} ϖ m i n and m H , max W m^{W}_{H,\max} m H , m a x W are jointly inferred with uniform priors. The per-star selection weight is
S ( x o b s , i , d i ) = Φ ( m H , max W − m H , o b s , i W w m ) Φ ( ϖ o b s , i − ϖ min w ϖ ) × Φ ( log P o b s , i − log P min w log P ) × Φ ( A H , max − A H ( d i , ℓ i , b i ) w A H ) , (42) \begin{aligned}
S(\boldsymbol{x}_{\mathrm{obs},i}, d_i)
&= \Phi\left(\frac{m^{W}_{H,\max} - m^{W}_{H,\mathrm{obs},i}}{w_m}\right)
\Phi\left(\frac{\varpi_{\mathrm{obs},i} - \varpi_{\min}}{w_\varpi}\right) \\
&\quad\times\Phi\left(\frac{\log P_{\mathrm{obs},i} - \log P_{\min}}{w_{\log P}}\right) \\
&\quad\times\Phi\left(\frac{A_{H,\max} - A_H(d_i,\ell_i,b_i)}{w_{A_H}}\right), \tag*{(42)}
\end{aligned} S ( x obs , i , d i ) = Φ ( w m m H , m a x W − m H , obs , i W ) Φ ( w ϖ ϖ obs , i − ϖ m i n ) × Φ ( w l o g P log P obs , i − log P m i n ) × Φ ( w A H A H , m a x − A H ( d i , ℓ i , b i ) ) , (42)
where the extinction factor depends on the latent distance d i d_i d i through the three-dimensional dust map.
The marginalised detection probability follows Eq. (38) . The period selection enters through the Φ \Phi Φ factor of Eq. (30) , which depends on m m m via μ ~ log P ( m , d ) \tilde{\mu}_{\log P}(m,d) μ ~ l o g P ( m , d ) . Combined with the magnitude cut, this gives K = 3 K=3 K = 3 selection factors acting on n = 2 n=2 n = 2 Gaussian observables (m m m and ϖ \varpi ϖ ):
h 1 ( d ) = m H , m a x W − m ^ ( d ) w m 2 + σ m 2 , h 2 ( d ) = ϖ ^ ( d ) − ϖ min w ϖ 2 + σ ϖ 2 , h 3 = μ log P − log P min w log P 2 + σ log P 2 . (43) h_1(d)=\frac{m_{\mathrm{H,max}}^{W}-\hat{m}(d)}{\sqrt{w_m^2+\sigma_m^2}},
\qquad
h_2(d)=\frac{\hat{\varpi}(d)-\varpi_{\min}}{\sqrt{w_\varpi^2+\sigma_\varpi^2}},
\qquad
h_3=\frac{\mu_{\log P}-\log P_{\min}}{\sqrt{w_{\log P}^2+\sigma_{\log P}^2}}. \tag*{(43)} h 1 ( d ) = w m 2 + σ m 2 m H , max W − m ^ ( d ) , h 2 ( d ) = w ϖ 2 + σ ϖ 2 ϖ ^ ( d ) − ϖ m i n , h 3 = w l o g P 2 + σ l o g P 2 μ l o g P − log P m i n . (43)
Because the parallax cut depends only on ϖ \varpi ϖ while the magnitude and period cuts depend only on m m m , the correlation matrix has R 12 = R 23 = 0 R_{12}=R_{23}=0 R 12 = R 23 = 0 and a single non-zero off-diagonal entry
R 13 = − b W σ log P 2 ( w m 2 + σ m 2 ) ( w log P 2 + σ log P 2 ) , (44) R_{13}=\frac{-b_W\sigma_{\log P}^2}{\sqrt{(w_m^2+\sigma_m^2)(w_{\log P}^2+\sigma_{\log P}^2)}}, \tag*{(44)} R 13 = ( w m 2 + σ m 2 ) ( w l o g P 2 + σ l o g P 2 ) − b W σ l o g P 2 , (44)
which is positive (since b W < 0 b_W<0 b W < 0 ) and captures the correlation between the magnitude and period cuts through their shared dependence on the latent period. The trivariate CDF therefore factorises as Φ 3 ( h ; R ) = Φ ( h 2 ) Φ 2 ( h 1 , h 3 ; R 13 ) \Phi_3(h;R)=\Phi(h_2)\Phi_2(h_1,h_3;R_{13}) Φ 3 ( h ; R ) = Φ ( h 2 ) Φ 2 ( h 1 , h 3 ; R 13 ) . The bivariate CDF is evaluated via the integral representation
Φ 2 ( x 1 , x 2 ; ρ ) = Φ ( x 1 ) Φ ( x 2 ) + ∫ 0 ρ ϕ 2 ( x 1 , x 2 ; t ) d t , (45) \Phi_2(x_1,x_2;\rho)=\Phi(x_1)\Phi(x_2)+\int_0^\rho\phi_2(x_1,x_2;t)\,\mathrm{d}t, \tag*{(45)} Φ 2 ( x 1 , x 2 ; ρ ) = Φ ( x 1 ) Φ ( x 2 ) + ∫ 0 ρ ϕ 2 ( x 1 , x 2 ; t ) d t , (45)
where ϕ 2 ( x 1 , x 2 ; t ) \phi_2(x_1,x_2;t) ϕ 2 ( x 1 , x 2 ; t ) is the standard bivariate normal density with correlation t t t . The integrand is smooth and the integral is computed to high accuracy with a low-order Gauss–Legendre quadrature rule, making the evaluation of Φ 2 \Phi_2 Φ 2 essentially as fast as that of the univariate Φ \Phi Φ . When the extinction cut is enabled, the extinction selection S e x t ( d , Ω ) = Φ ( ( A H , m a x − A H ( d , Ω ) ) / w A H ) S_{\mathrm{ext}}(d,\Omega)=\Phi((A_{\mathrm{H,max}}-A_{\mathrm{H}}(d,\Omega))/w_{A_{\mathrm{H}}}) S ext ( d , Ω ) = Φ (( A H , max − A H ( d , Ω )) / w A H ) is included in the integrand; in the baseline model S e x t = 1 S_{\mathrm{ext}}=1 S ext = 1 . We use N l o s = 5000 N_{\mathrm{los}}=5000 N los = 5000 sightlines, d min = 0.1 d_{\min}=0.1 d m i n = 0.1 kpc, and d max = 8.5 d_{\max}=8.5 d m a x = 8.5 kpc.
LMC and N4258 selection
For the anchor samples, the only selection modelled here is the period truncation. Both anchor catalogues are truncated at log P c u t = − 0.3 \log P_{\mathrm{cut}}=-0.3 log P cut = − 0.3 (i.e. P c u t ≈ 0.5 P_{\mathrm{cut}}\approx0.5 P cut ≈ 0.5 day), excluding short-period Cepheids. Following the same selection framework as for the MW campaigns (§ 3.4 ), the selection-adjusted anchor likelihood is Eq. (23) divided by the detection probability—the probability that a Cepheid drawn from the population prior satisfies the period cut. The per-star period prior in Eq. (23) remains the full Gaussian N ( log P o b s , k ∣ μ log P , σ log P 2 ) \mathcal{N}(\log P_{\mathrm{obs},k}\mid\mu_{\log P},\sigma_{\log P}^2) N ( log P obs , k ∣ μ l o g P , σ l o g P 2 ) ; the per-star selection weight is unity for all observed Cepheids (since they all satisfy log P o b s , k > log P c u t \log P_{\mathrm{obs},k}>\log P_{\mathrm{cut}} log P obs , k > log P cut ), and only the normalisation factor contributes, equivalent to the normalisation of the period prior truncated at log P c u t \log P_{\mathrm{cut}} log P cut . Because there is no assumed magnitude selection for the LMC and N4258, the integral of the multivariate magnitude likelihood over m \boldsymbol{m} m evaluates to unity irrespective of the covariance Σ j \Sigma_j Σ j , and the detection probability reduces to
p ( S = 1 ∣ Λ ) = ∫ log P c u t ∞ N ( log P ∣ μ log P , σ log P 2 ) d log P = Φ ( μ log P − log P c u t σ log P ) . (46) \begin{aligned}
p(S=1\mid\Lambda)=\int_{\log P_{\mathrm{cut}}}^{\infty}\mathcal{N}(\log P\mid\mu_{\log P},\sigma_{\log P}^2)\,\mathrm{d}\log P \\
&=\Phi\left(\frac{\mu_{\log P}-\log P_{\mathrm{cut}}}{\sigma_{\log P}}\right). \tag*{(46)}
\end{aligned} p ( S = 1 ∣ Λ ) = ∫ l o g P cut ∞ N ( log P ∣ μ l o g P , σ l o g P 2 ) d log P = Φ ( σ l o g P μ l o g P − log P cut ) . (46)
The selection-adjusted anchor likelihood is therefore Eq. (23) divided by p ( S = 1 ∣ Λ ) N j p(S=1\mid\Lambda)^{N_j} p ( S = 1 ∣ Λ ) N j . Beyond this, we do not model further selection effects for the LMC and N4258 Cepheids. A complete treatment would additionally address magnitude-dependent selection within each galaxy. For the LMC (μ ≈ 18.5 \mu\approx18.5 μ ≈ 18.5 ), Cepheids at the period cut have m H W ≈ 17 m_{\mathrm{H}}^{W}\approx17 m H W ≈ 17 mag, far brighter than any H S T HST H S T detection limit; magnitude selection is therefore irrelevant. For N4258 (μ ≈ 29.4 \mu\approx29.4 μ ≈ 29.4 ), the faintest Cepheids reach m H W ≈ 28 m_{\mathrm{H}}^{W}\approx28 m H W ≈ 28 mag, still brighter than but approaching the H S T HST H S T WFC3/IR detection limit in crowded fields. Modelling this would require integrating the multivariate likelihood of Eq. (23) over the selection region and marginalising over the magnitudes of undetected Cepheids, whose covariance with the observed sample is not available.
Full posterior and inference
Combining the priors, likelihoods, and selection modelling, the full posterior is
P ( Λ , { d i } , { d j } ∣ D ) ∝ π ( Λ ) × ∏ p ∈ { C 22 , C 27 } [ p p ( S = 1 ∣ Λ ) ] − n p × ∏ i ∈ p L i S ( x o b s , i , d i ) π d i s c ( d i , ℓ i , b i ) × ∏ j ∈ { L M C , N 4258 } [ p j ( S = 1 ∣ Λ ) ] − N j L j m a r g L ( μ ~ j ∣ μ j ) π ( d j ) . (47) \mathcal{P}(\Lambda,\{d_i\},\{d_j\}\mid D)\propto\pi(\Lambda)
\times\prod_{p\in\{\mathrm{C22},\mathrm{C27}\}}
\left[p_p(S=1\mid\Lambda)\right]^{-n_p}
\times\prod_{i\in p}\mathcal{L}_i\,S(\boldsymbol{x}_{\mathrm{obs},i},d_i)\,\pi_{\mathrm{disc}}(d_i,\ell_i,b_i)
\times\prod_{j\in\{\mathrm{LMC},\mathrm{N4258}\}}
\left[p_j(S=1\mid\Lambda)\right]^{-N_j}\mathcal{L}^{\mathrm{marg}}_j\mathcal{L}(\tilde{\mu}_j\mid\mu_j)\,\pi(d_j). \tag*{(47)} P ( Λ , { d i } , { d j } ∣ D ) ∝ π ( Λ ) × p ∈ { C22 , C27 } ∏ [ p p ( S = 1 ∣ Λ ) ] − n p × i ∈ p ∏ L i S ( x obs , i , d i ) π disc ( d i , ℓ i , b i ) × j ∈ { LMC , N4258 } ∏ [ p j ( S = 1 ∣ Λ ) ] − N j L j marg L ( μ ~ j ∣ μ j ) π ( d j ) . (47)
The first product runs over the MW campaigns, where n p n_p n p is the number of Cepheids in campaign p p p , L i \mathcal{L}_i L i the marginalised per-star likelihood of Eq. (20) , S ( ⋅ ) S(\cdot) S ( ⋅ ) the per-star selection weight of Eqs. (39) and (42) , p p ( S = 1 ∣ Λ ) p_p(S=1\mid\Lambda) p p ( S = 1 ∣ Λ ) the campaign-level detection probability of Eq. (27) , and π d i s c ( d i , ℓ i , b i ) \pi_{\mathrm{disc}}(d_i,\ell_i,b_i) π disc ( d i , ℓ i , b i ) the joint position prior of Eq. (2) . The second product runs over the LMC and N4258, where p j ( S = 1 ∣ Λ ) p_j(S=1\mid\Lambda) p j ( S = 1 ∣ Λ ) is the per-star period detection probability of Eq. (46) , L j m a r g \mathcal{L}^{\mathrm{marg}}_j L j marg the marginalised host Cepheid likelihood of Eq. (23) , L ( μ ~ j ∣ μ j ) \mathcal{L}(\tilde{\mu}_j\mid\mu_j) L ( μ ~ j ∣ μ j ) the geometric distance constraint of Eq. (21) , and π ( d j ) \pi(d_j) π ( d j ) a uniform-in-volume distance prior. All Cepheids within a given host galaxy are placed at a common distance d j d_j d j , which is a free parameter of the model.
The sampled parameters are therefore the global parameters Λ \Lambda Λ —comprising the shared period–luminosity relation parameters, the parallax offset, the per-campaign intrinsic scatters, and the population hyperparameters—together with the distance d i d_i d i to each MW Cepheid and the distance d j d_j d j to each host galaxy. Table 1 lists the observables entering the model, and Table 3 collects all inferred and fixed parameters alongside the populations to which they apply; in total the model has 91 sampled parameters. We implement the model in JAX and sample with the No-U-Turn Sampler (NUTS; Hoffman & Gelman 2011) via numpyro4 (Phan et al. 2019). We run four independent chains, each with 1000 warm-up and 5000 sampling steps, and verify convergence by requiring R ^ < 1.01 \hat{R} < 1.01 R ^ < 1.01 for all parameters; we collect at least 5000 effective samples per parameter.
Table 3. Model parameters. “All” refers to C22, C27, LMC, and N4258. Per-population quantities (superscript p p p ) are sampled independently for each population. In total, the model has 91 inferred parameters: 4 shared, 21 per-population (the LMC contributes only period hyperparameters; the effective selection thresholds contribute 3), and 66 latent per-star distances. Normal priors are written N ( μ , σ 2 ) \mathcal{N}(\mu, \sigma^{2}) N ( μ , σ 2 ) ; bounds denote truncation.
For comparison, we also implement the R21 parallax-space model, which avoids sampling per-star distances. For each Cepheid, we compute a photometric parallax from the observed Wesenheit magnitude and the period–luminosity relation,
ϖ p h o t = 10 − 0.2 ( m H W − M H W − 10 ) , (48) \varpi_{\mathrm{phot}} = 10^{-0.2\left(m^{W}_{H}-M^{W}_{H}-10\right)}, \tag*{(48)} ϖ phot = 1 0 − 0.2 ( m H W − M H W − 10 ) , (48)
and the χ 2 \chi^2 χ 2 per star is
χ i 2 = ( ϖ o b s − ϖ p h o t + δ ϖ ) 2 σ ~ ϖ , i 2 , (49) \chi_i^2 = \frac{\left(\varpi_{\mathrm{obs}}-\varpi_{\mathrm{phot}}+\delta_{\varpi}\right)^2}{\widetilde{\sigma}_{\varpi,i}^2}, \tag*{(49)} χ i 2 = σ ϖ , i 2 ( ϖ obs − ϖ phot + δ ϖ ) 2 , (49)
where
σ ~ ϖ , i 2 = ( 0.2 ln 10 ϖ p h o t σ m , t o t ) 2 + ( α σ ϖ , E D R 3 ) 2 (50) \widetilde{\sigma}_{\varpi,i}^2 = \left(0.2\ln10\,\varpi_{\mathrm{phot}}\,\sigma_{m,\mathrm{tot}}\right)^2+\left(\alpha\sigma_{\varpi,\mathrm{EDR3}}\right)^2 \tag*{(50)} σ ϖ , i 2 = ( 0.2 ln 10 ϖ phot σ m , tot ) 2 + ( α σ ϖ , EDR3 ) 2 (50)
combining the propagated magnitude uncertainty with the Gaia parallax error inflated by a factor α = 1.1 \alpha= 1.1 α = 1.1 . This model applies no additional selection modelling and fixes the intrinsic scatter to 0.06 mag5 .
Results
The baseline inference combines the C22 and C27 samples with the disc distance prior (Eq. (2) ) and selection modelling applied to both MW campaigns; the LMC and N4258 are optionally included as additional geometric calibrators. The term “MW Cepheids” denotes the joint C22 + C27 sample; individual campaign results appear in Appendix § 9 . Subsequent variants omit the selection modelling or replace the disc prior with a uniform-in-volume prior.
The R21 χ 2 \chi^2 χ 2 method applied to the MW Cepheids yields results closely matching our forward model. In Appendix § 10 we show that this agreement is driven by the small intrinsic scatter of the period–luminosity relation, and in Appendix C we validate the inference methods on mock catalogues mimicking the C22 and C27 campaigns.
Baseline posteriors
Figure 4 shows the marginalised posterior of the period–luminosity parameters (M H , 1 W M^{W}_{H,1} M H , 1 W , b W b_W b W , Z W Z_W Z W ) and the parallax offset δ ϖ \delta_{\varpi} δ ϖ for three model configurations: (i) C22 and C27 with the disc prior and selection modelling but without the LMC and N4258, (ii) the same with the LMC and N4258 Cepheid populations and their geometric distance calibrations, and (iii) a model including all four populations that neglects selection modelling, adopts a uniform-in-volume MW distance prior, and uses a wide δ ϖ \delta_{\varpi} δ ϖ prior, designed to emulate the analysis of HM26.
Figure 4. Marginalised posterior of the period–luminosity parameters (M H , 1 W M^{\mathrm{W}}_{H,1} M H , 1 W , b W b_{\mathrm{W}} b W , Z W Z_{\mathrm{W}} Z W ) and the parallax offset δ ϖ \delta_{\varpi} δ ϖ for three model configurations: C22 and C27 (MW only) with a MW disc distance prior and selection (blue, filled), the baseline model including the LMC and N4258 with the same MW disc prior and selection (red, filled), and all four populations with a uniform-in-volume MW distance prior, no selection, and a wide δ ϖ \delta_{\varpi} δ ϖ prior, emulating HM26 (orange). The 0.7 σ 0.7\sigma 0.7 σ agreement in M H , 1 W M^{\mathrm{W}}_{H,1} M H , 1 W with the baseline SH0ES value translates to a shift in H 0 H_0 H 0 of less than 0.2 k m s − 1 M p c − 1 0.2\ \mathrm{km\ s^{-1}\ Mpc^{-1}} 0.2 km s − 1 Mp c − 1 (§ 5.3 ). The baseline SH0ES contours from R22 are shown in black, and the R21 χ 2 \chi^2 χ 2 contours for C22 + C27 are shown in green. The baseline SH0ES (R22) constraints derive from the full three-rung fit (geometric anchors, Cepheids, and Type Ia supernovae), while the R21 χ 2 \chi^2 χ 2 uses only the MW Cepheid parallaxes. For visual clarity, the SH0ES constraints are dashed in the panels along the diagonal. All contours show the 1 σ 1\sigma 1 σ and 2 σ 2\sigma 2 σ credible regions.
The MW-only posterior is substantially wider, by factors of 1.8, 2.1, and 2.1 in M H , 1 W M^{W}_{H,1} M H , 1 W , b W b_W b W , and Z W Z_W Z W , respectively, but only by a factor of 1.2 in δ ϖ \delta_{\varpi} δ ϖ . Both b W b_W b W and Z W Z_W Z W are strongly correlated with M H , 1 W M^{W}_{H,1} M H , 1 W in the MW-only inference; including the LMC and N4258 Cepheids partially breaks these degeneracies and tightens the constraints. Since δ ϖ \delta_{\varpi} δ ϖ enters only through the MW parallaxes, the LMC and N4258 do not substantially tighten the constraint; the baseline posterior gives δ ϖ = − 12.4 ± 5.3 \delta_{\varpi}=-12.4\pm5.3 δ ϖ = − 12.4 ± 5.3 μ \mu μ as, compared with − 9.9 ± 6.1 -9.9\pm6.1 − 9.9 ± 6.1 μ \mu μ as from the MW-only inference. For comparison, Cruz Reyes & Anderson (2023) report δ ϖ = − 13 ± 5 \delta_{\varpi}=-13\pm5 δ ϖ = − 13 ± 5 μ \mu μ as from their near-infrared HST Wesenheit calibration using 15 open-cluster Cepheids and the 67-star HST Cepheid sample, agreeing with our posterior. The addition of the LMC and N4258 introduces no tension with the MW-only result. We also compare these posteriors to the baseline SH0ES contours from the joint three-rung fit reported in table 5 of R22, combining geometric calibrators, MW and extragalactic Cepheids, and Type Ia supernovae. All three parameters agree with our baseline posteriors to within 1 σ 1\sigma 1 σ .
Applying the R21 χ 2 \chi^2 χ 2 method to the C22 and C27 samples yields M H , 1 W = − 5.904 ± 0.035 M^{W}_{H,1}=-5.904\pm0.035 M H , 1 W = − 5.904 ± 0.035 mag and δ ϖ = − 14.0 ± 6.3 \delta_{\varpi}=-14.0\pm6.3 δ ϖ = − 14.0 ± 6.3 μ \mu μ as (Table 4 ). Compared to our MW-only forward model with selection (M H , 1 W = − 5.889 ± 0.040 M^{W}_{H,1}=-5.889\pm0.040 M H , 1 W = − 5.889 ± 0.040 mag, δ ϖ = − 9.9 ± 6.1 \delta_{\varpi}=-9.9\pm6.1 δ ϖ = − 9.9 ± 6.1 μ \mu μ as), the χ 2 \chi^2 χ 2 method recovers a ∼ 0.02 \sim0.02 ∼ 0.02 mag brighter zero-point and a ∼ 4 \sim4 ∼ 4 μ \mu μ as more negative parallax offset. On the other hand, our MW-only forward model zero-point is consistent with the M H , 1 W = − 5.903 ± 0.024 M^{W}_{H,1}=-5.903\pm0.024 M H , 1 W = − 5.903 ± 0.024 mag reported in table 4 of R22 from a global period–luminosity analysis of the R21 sample. Including the LMC and N4258 tightens the constraint to M H , 1 W = − 5.909 ± 0.022 M^{W}_{H,1}=-5.909\pm0.022 M H , 1 W = − 5.909 ± 0.022 mag, consistent with the baseline SH0ES value of M H , 1 W = − 5.894 M^{W}_{H,1}=-5.894 M H , 1 W = − 5.894 mag and implies a shift in H 0 H_0 H 0 below 0.2 km s− 1 ^{-1} − 1 Mpc− 1 ^{-1} − 1 . The main difference in Figure 4 is the opposite sign of the M H , 1 W M^{W}_{H,1} M H , 1 W –b W b_W b W posterior correlation relative to the baseline SH0ES contour. A possible reason for this difference is that the SH0ES contour is not the same posterior object: it comes from the full three-rung analysis, whereas our contour uses only MW, LMC, and N4258 Cepheids with geometric distances.
Table 4. Posterior means and standard deviations for several model variants. The baseline configuration is shown in bold. A “+” denotes a joint inference in which the campaigns share period–luminosity parameters but retain separate selection functions and population hyperpriors. Parenthetical labels indicate departures from this baseline (distance prior or δ ϖ \delta_{\varpi} δ ϖ prior width). “Wide δ ϖ \delta_{\varpi} δ ϖ ” replaces the baseline N ( 0 , 10 2 ) \mathcal{N}(0, 10^2) N ( 0 , 1 0 2 ) µas prior with a uniform prior over [ − 100 , 100 ] [-100, 100] [ − 100 , 100 ] µas. Variants without selection modelling are ordered from the most biased (closest to HM26) to the least. The frequentist χ 2 \chi^2 χ 2 section is shown for comparison with R21 and R22. The spiral arm modulation of the distance prior is described in Appendix E. A difference between R21 as reported and our emulation for C22 + C27 is the result of R21 fixing the period–luminosity parameters where they appear in the error terms.
Figure 5 shows the marginalised posterior distributions of the per-campaign intrinsic scatter σ i n t \sigma_{\mathrm{int}} σ int . The C22 scatter peaks at ∼ 0.07 \sim0.07 ∼ 0.07 mag, roughly 1.8 times larger than the C27 value of ∼ 0.04 \sim0.04 ∼ 0.04 mag, possibly reflecting residual extinction scatter in the more distant C22 sample, where dust corrections are larger and the Wesenheit magnitude does not fully remove sightline-to-sightline variations in the reddening law. Including the LMC and N4258 tightens the period–luminosity relation parameters but leaves the MW scatter posteriors unchanged, as expected since σ i n t \sigma_{\mathrm{int}} σ int is determined by the spread of MW magnitudes about the relation and is largely independent of the global zero-point.
Figure 5. Marginalised posterior of the intrinsic scatter σ i n t \sigma_{\mathrm{int}} σ int for C22 (solid) and C27 (dashed), comparing the MW-only model with separate per-campaign scatters (blue), the baseline model including the LMC and N4258 with separate scatters (red), and the MW-only model with a single shared σ i n t \sigma_{\mathrm{int}} σ int for both campaigns (green dotted; 0.051 ± 0.015 0.051 \pm0.015 0.051 ± 0.015 mag). Including the LMC and N4258 and inferring their joint scatter yields σ i n t = 0.063 ± 0.009 \sigma_{\mathrm{int}} = 0.063 \pm0.009 σ int = 0.063 ± 0.009 mag.
To test whether the MW, LMC, and N4258 scatters are consistent, we run two additional configurations. First, we impose a single shared σ i n t \sigma_{\mathrm{int}} σ int across all four populations (with the 0.06 mag already in Σ j \Sigma_j Σ j subtracted in quadrature for the LMC and N4258). The ∼ 500 \sim500 ∼ 500 LMC and N4258 Cepheids dominate the constraint, yielding σ i n t = 0.063 ± 0.009 \sigma_{\mathrm{int}}=0.063\pm0.009 σ int = 0.063 ± 0.009 mag; without these populations the same shared model gives the less precise σ i n t = 0.051 ± 0.015 \sigma_{\mathrm{int}}=0.051\pm0.015 σ int = 0.051 ± 0.015 mag. Second, we allow separate scatters for C22, C27, and the LMC + N4258 jointly. The LMC + N4258 scatter is σ i n t L M C + N 4258 = 0.070 ± 0.010 \sigma_{\mathrm{int}}^{\mathrm{LMC+N4258}}=0.070\pm0.010 σ int LMC + N4258 = 0.070 ± 0.010 mag, roughly 15 per cent larger than the 0.06 mag assumed by R22, while the MW campaigns separate cleanly: σ i n t C 22 = 0.071 ± 0.022 \sigma_{\mathrm{int}}^{\mathrm{C22}} = 0.071 \pm0.022 σ int C22 = 0.071 ± 0.022 mag and σ i n t C 27 = 0.041 ± 0.015 \sigma_{\mathrm{int}}^{\mathrm{C27}} = 0.041 \pm0.015 σ int C27 = 0.041 ± 0.015 mag. Despite these differences, the period–luminosity parameters are robust to the scatter model: M H , 1 W M^{\mathrm{W}}_{H,1} M H , 1 W , b W b_{\mathrm{W}} b W , and Z W Z_{\mathrm{W}} Z W shift by less than 0.3 σ 0.3\sigma 0.3 σ between the shared and per-campaign configurations when the LMC and N4258 are included (Figure D1 ).
Figure D1. Robustness of the period–luminosity calibration to the intrinsic-scatter parametrisation. Red shows the baseline forward model with independent C22 and C27 intrinsic scatters, green the variant with a single shared MW scatter; both inferences use C22 + C27 + LMC + N4258 with the disc distance prior and the baseline selection model. Posterior-mean shifts are 0.006 mag in M H , 1 W M^{W}_{H,1} M H , 1 W , 0.002 in b W b_W b W , and 0.2 μ \mu μ as in δ ϖ \delta\varpi δ ϖ , all small compared to the marginal uncertainties.
We also run models with a free parallax uncertainty scaling f ϖ f_{\varpi} f ϖ that multiplies the reported Gaia parallax uncertainties (R21 adopt a fixed factor of 1.1). With a single shared σ i n t \sigma_{\mathrm{int}} σ int across C22 and C27 in the MW-only configuration, we obtain σ i n t = 0.039 ± 0.016 \sigma_{\mathrm{int}} = 0.039 \pm0.016 σ int = 0.039 ± 0.016 mag, f ϖ = 1.23 ± 0.16 f_{\varpi} = 1.23 \pm0.16 f ϖ = 1.23 ± 0.16 , and δ ϖ = − 8.5 ± 6.4 μ a s \delta_{\varpi} = -8.5 \pm6.4\ \mu\mathrm{as} δ ϖ = − 8.5 ± 6.4 μ as (Table 4 ). The inferred f ϖ > 1 f_{\varpi} > 1 f ϖ > 1 indi This indicates that the reported parallax uncertainties may be mildly underestimated. Analysing each campaign separately with the LMC and N4258, we find f ϖ = 1.24 ± 0.18 f_{\varpi} = 1.24 \pm0.18 f ϖ = 1.24 ± 0.18 for C22 and f ϖ = 0.71 ± 0.33 f_{\varpi} = 0.71 \pm0.33 f ϖ = 0.71 ± 0.33 for C27. In all cases, f ϖ f_{\varpi} f ϖ has negligible impact on the inferred period–luminosity parameters and parallax offset.
The baseline result is robust to the choice of δ ϖ \delta_{\varpi} δ ϖ prior: switching to a uniform prior shifts δ ϖ \delta_{\varpi} δ ϖ by 4.8 μ \mu μ as (from − 12.4 -12.4 − 12.4 to − 17.2 -17.2 − 17.2 μ \mu μ as) while M H , 1 W M^{W}_{H,1} M H , 1 W changes by 0.013 mag, both well within the posterior uncertainties. Similarly, replacing the axisymmetric disc prior with the spiral-arm-modulated prior of Appendix E leaves the posteriors unchanged: δ ϖ \delta_{\varpi} δ ϖ shifts by 0.4 μ \mu μ as and M H , 1 W M^{W}_{H,1} M H , 1 W by 0.001 mag. Posterior means and standard deviations for all model variants are reported in Table 4 .
Impact of selection modelling and distance prior
To quantify the impact of selection modelling and the distance prior, we replace the disc prior with a uniform-in-volume prior for the MW Cepheids (retaining only the aforementioned per-campaign d min d_{\min} d m i n and d max d_{\max} d m a x for normalisation) and disable the selection modelling. The resulting posteriors are incompatible with the baseline model: M H , 1 W M^{W}_{H,1} M H , 1 W shifts to brighter values by ∼ 0.05 \sim0.05 ∼ 0.05 mag and δ ϖ \delta_{\varpi} δ ϖ to more negative values by ∼ 14 \sim14 ∼ 14 μ \mu μ as.
Table 4 reports further model variants that isolate the individual contributions of the selection modelling and distance prior. Disabling the selection modelling alone (disc prior, no selection) in the C22 + C27 + LMC + N4258 configuration shifts δ ϖ \delta_{\varpi} δ ϖ from − 12.4 -12.4 − 12.4 to − 22.3 -22.3 − 22.3 μ \mu μ as and M H , 1 W M^{W}_{H,1} M H , 1 W from − 5.909 -5.909 − 5.909 to − 5.938 -5.938 − 5.938 mag; additionally replacing the disc prior with a uniform-in-volume prior moves δ ϖ \delta_{\varpi} δ ϖ to − 26.4 -26.4 − 26.4 μ \mu μ as and M H , 1 W M^{W}_{H,1} M H , 1 W to − 5.954 -5.954 − 5.954 mag. The selection modelling and the disc prior therefore act in the same direction, each pulling δ ϖ \delta_{\varpi} δ ϖ towards zero and M H , 1 W M^{W}_{H,1} M H , 1 W towards fainter values. Their contributions differ substantially, however. Replacing the disc prior with a uniform-in-volume prior while retaining the selection modelling shifts M H , 1 W M^{W}_{H,1} M H , 1 W by only 0.002 mag and δ ϖ \delta_{\varpi} δ ϖ by 0.2 μ \mu μ as, well within the posterior uncertainties. Selection modelling alone accounts for ∼ 0.03 \sim0.03 ∼ 0.03 mag in M H , 1 W M^{W}_{H,1} M H , 1 W and ∼ 10 \sim10 ∼ 10 μ \mu μ as in δ ϖ \delta_{\varpi} δ ϖ , substantially larger than the effect of changing the distance prior. Once the selection function is correctly modelled, the shape of the distance prior—disc or uniform-in-volume—is effectively irrelevant: the per-star likelihood constrains each distance to a narrow interval over which the disc geometry varies minimally. Without the LMC and N4258, the shifts are larger still: the MW-only inference without selection yields δ ϖ = − 23.6 ± 6.0 \delta_{\varpi} = -23.6 \pm6.0 δ ϖ = − 23.6 ± 6.0 μ \mu μ as and M H , 1 W = − 5.950 ± 0.039 M^{W}_{H,1} = -5.950 \pm0.039 M H , 1 W = − 5.950 ± 0.039 mag with the disc prior, and δ ϖ = − 30.1 ± 6.2 \delta_{\varpi} = -30.1 \pm6.2 δ ϖ = − 30.1 ± 6.2 μ \mu μ as and M H , 1 W = − 5.984 ± 0.039 M^{W}_{H,1} = -5.984 \pm0.039 M H , 1 W = − 5.984 ± 0.039 mag with the uniform-in-volume prior. These models neglect the known selection criteria and therefore yield biased posteriors; they are reported to quantify the magnitude of the bias, not as reliable inferences.
Model validation
To verify that the forward model reproduces the observed data, we perform a posterior predictive check (PPC), shown in Figure 6 . For each of 1000 thinned posterior draws, we generate mock MW Cepheids by sampling distances from the disc prior and periods and metallicities from the inferred population distributions, then computing apparent magnitudes and parallaxes from the period–luminosity relation and parallax offset. Observational noise is bootstrapped from the data, and each mock candidate is accepted only if it passes the probabilistic selection function. The resulting distributions of m H W m^{W}_{H} m H W , ϖ \varpi ϖ , and log P \log P log P closely match the observed data, with two-sample Kolmogorov–Smirnov p p p -values of 0.33, 0.22, and 0.99, respectively. The joint ϖ o b s \varpi_{\mathrm{obs}} ϖ obs –m H W m^{W}_{H} m H W distribution (Figure 6 , bottom right) confirms that the forward model also reproduces the observed correlation between parallax and magnitude. Even when analysing the C22 or C27 samples individually, the forward model with selection reproduces the observed distributions for each campaign. To illustrate the bias introduced by neglecting the selection function and adopting a uniform-in-volume prior for the MW Cepheids, Figure 6 also shows the corresponding PPC. This model predicts systematically fainter magnitudes and smaller parallaxes than observed and is clearly incompatible with the data. The predicted parallax distribution is bimodal, reflecting the two observational campaigns; a single shared distance range would exacerbate the discrepancy further.
Figure 6. PPCs for two model variants: the baseline model (C22 + C27 + LMC + N4258, disc prior, with selection) and the model with a uniform-in-volume prior and no selection, emulating HM26. Marginal panels compare normalised histograms of the observed (black) and simulated m H W m_H^W m H W , ϖ \varpi ϖ , and log P \log P log P , each annotated with the two-sample KS p p p -value for the baseline model (which is effectively zero for the model without selection); the bottom-right panel shows the joint ϖ \varpi ϖ –m H W m_H^W m H W distribution for the baseline model. The effective selection thresholds are inferred jointly with the period–luminosity parameters (Table 3 ), except for the C27 parallax cut which is fixed.
In Appendix § 14 , we compare the per-star distance moduli inferred from the forward model with photometric predictions from the baseline SH0ES period–luminosity parameters; the residuals scatter about zero with no significant systematic offset.
Discussion
Comparison with previous approaches
We present a forward-modelling framework for the MW, LMC, and N4258 Cepheid samples that incorporates physically motivated priors—including the thin-disc geometry of the MW—and includes a rigorous treatment of the sample selection function, the neglect of which otherwise biases the inference. Stiskalek et al. (2026) introduced a related framework for extragalactic Cepheids, inferring H 0 H_0 H 0 without supernovae but compressing the MW calibration into a single Gaussian constraint on M H , 1 W M_{H,1}^{W} M H , 1 W . Here we model the MW sample star by star, lifting that compression.
The standard treatment, such as that of Riess et al. (2016) or R21, minimises a χ 2 \chi^2 χ 2 between observed parallaxes and the photometric predictions of the period–luminosity relation, with no explicit priors or selection modelling. The χ 2 \chi^2 χ 2 specifies a Gaussian likelihood for each observed parallax around its photometric prediction but invokes no distribution for the latent Cepheid properties, so no selection-dependent term enters the inference. Selection nonetheless biases the result when the cuts correlate with the residuals being minimised, an effect that is negligible for the MW Cepheid sample (Appendix § 10 ). In Type Ia supernova cosmology, where the selection-induced residual bias is severe, the χ 2 \chi^2 χ 2 inference is supplemented by dedicated bias-correction frameworks such as BEAMS with Bias Corrections (BBC; Kessler & Scolnic 2017; Popovic et al. 2021). The forward modelling approach, by contrast, generates the catalogue from an explicit population, distance prior, and detection probability. The selection therefore enters the inference natively, removing the need for a separate bias correction.
On the Bayesian side, several efforts have tackled the problem. Cardona et al. (2017) marginalise over hyperparameters that scale the per-star uncertainties, effectively down-weighting outliers. Delgado et al. (2019) construct a hierarchical Bayesian model for period–luminosity relations from Gaia parallaxes, placing a joint Gaussian-mixture hyperprior on period, metallicity, and parallax to capture their correlations. Feeney et al. (2018) build a hierarchical model of the full distance ladder—from MW Cepheids through extragalactic Cepheids to Hubble-flow supernovae—inferring H 0 H_0 H 0 end to end.
What all three Bayesian approaches share is the absence of a principled treatment of the selection function. Delgado et al. (2019) implicitly learn the correlation structure of period, metallicity, and parallax through their Gaussian-mixture hyperprior, which acts as a proxy for selection modelling: it allows the model to discover that longer-period Cepheids are brighter and therefore observed at larger distances (smaller parallaxes in their parametrisation). In reality, this correlation is induced by selection without being present in the intrinsic population; it ought therefore to be captured by an explicit selection treatment, as we construct here.
Feeney et al. (2018), by contrast, adopt a uniform prior on the distance modulus, which does not reflect the (approximately) uniform-in-volume distribution of extragalactic objects. At small redshifts, a uniform-in-distance-modulus prior goes as 1 / d 1/d 1/ d , favouring closer objects, whereas a uniform-in-volume prior goes as d 2 d^2 d 2 , favouring more distant ones. The similarity between results using a uniform-in-distance-modulus prior and those from a uniform-in-volume prior with selection modelling in this case is not coincidental. In Appendix § 10 we show that, for the MW Cepheid calibration specifically, the per-star forward-model likelihood is well approximated by the R21 χ 2 \chi^2 χ 2 after marginalising over the latent distance and linearising the distance modulus. This relies on the very small intrinsic scatter of the Cepheid period–luminosity relation, ∼ 0.05 \sim0.05 ∼ 0.05 mag (here) or 2–3 per cent in distance; it has not been demonstrated to hold even approximately in other settings, where larger intrinsic scatter or peculiar velocity uncertainties may break the linearisation. For example, in Appendix § 10 we show that an inflated intrinsic scatter of 0.15 mag would have produced a ∼ 0.5 σ \sim0.5\sigma ∼ 0.5 σ bias in M H , 1 W M_{H,1}^W M H , 1 W for the combined sample. Desmond et al. (2025) lay out this interplay between selection and priors explicitly in a toy model for a distance-ladder inference of H 0 H_0 H 0 , showing that the cancellation between volume prior and selection holds exactly in the case of negligible redshift uncertainties and selection on redshift.
In this work we construct the first forward model of the MW Cepheid population that explicitly accounts for selection effects, models distance priors accurately, and infers the intrinsic population properties. The inferred period–luminosity relation parameters and Gaia parallax offset are consistent within 1 σ 1\sigma 1 σ with, and of comparable precision to, both R21 and the baseline SH0ES result of R22. Our results highlight the importance of forward modelling and principled selection treatment, an approach set to become the standard for future distance-ladder (and other) analyses. Realising this programme requires well-defined observational campaigns with well-characterised selection functions, though the advent of simulation-based inference (SBI; Cranmer et al. 2020; Alsing et al. 2019) will in principle make even complex selection modelling tractable. SBI does not, however, remove the underlying modelling burden: the simulator must still specify a parent population, a selection function, an extinction model, and a parallax-error model, and misspecification of any of these would propagate into the inferred posterior. For the current ∼ 60 \sim60 ∼ 60 MW Cepheids split between C22 and C27, the data are unlikely to resolve a Gaussian-CDF selection from a more complex shape, and in any case no more realistic alternative is available from the published catalogue information.
That our forward model and the χ 2 \chi^2 χ 2 should agree so closely was not a priori obvious; the agreement reinforces the SH0ES MW Cepheid calibration of the period–luminosity relation (R21; R22) and bounds the impact of any alternative selection treatment, including SBI, since the χ 2 \chi^2 χ 2 emulation makes no selection-modelling assumption at all (Table 4 and Appendix § 10 ) yet M H , 1 W M^{\mathrm{W}}_{H,1} M H , 1 W and δ ϖ \delta_{\varpi} δ ϖ shift by less than 1 σ 1\sigma 1 σ from the analytic forward model. For example, the agreement is unlikely to extend to bluer-band period–luminosity calibrations, where the intrinsic scatter is a factor of two or more larger than the Wesenheit H H H -band benchmark of ∼ 0.06 \sim0.06 ∼ 0.06 mag (Persson et al. 2004; Soszyński et al. 2015). The Bayesian framework additionally supports posterior predictive checks (Figure 6 ) as a direct diagnostic of generative-model adequacy, showing that the uniform-in-volume-without-selection variant of HM26 is incompatible with the observed Cepheid distributions.
The intrinsic scatter of the period–luminosity relation is another point of departure from R21, who adopt a fixed value of 0.06 0.06 0.06 mag motivated by the scatter of LMC Cepheids. We instead treat the scatter as a free parameter, inferring σ i n t C 22 = 0.071 ± 0.022 \sigma_{\mathrm{int}}^{\mathrm{C22}} = 0.071 \pm0.022 σ int C22 = 0.071 ± 0.022 mag and σ i n t C 27 = 0.040 ± 0.016 \sigma_{\mathrm{int}}^{\mathrm{C27}} = 0.040 \pm0.016 σ int C27 = 0.040 ± 0.016 mag in the baseline model. The larger C22 scatter could reflect residual sightline-to-sightline extinction uncertainties in the more distant C22 sample, although a mean extinction mismatch would instead enter mainly as a systematic zero-point shift. Consistent with this possibility, the separate C22 + LMC + N4258 inference gives M H , 1 W = − 5.865 ± 0.026 M^{\mathrm{W}}_{H,1} = -5.865 \pm0.026 M H , 1 W = − 5.865 ± 0.026 mag, offset by 0.051 0.051 0.051 mag (1.4 σ 1.4\sigma 1.4 σ ) from the C27 + LMC + N4258 value of − 5.916 ± 0.024 -5.916 \pm0.024 − 5.916 ± 0.024 mag (Table A1 and Figure A1 ). A period-dependent intrinsic scatter could also contribute given the longer periods of the C22 sample. As discussed in § 4.1 , allowing a free parallax uncertainty scaling f ϖ f_{\varpi} f ϖ yields f ϖ = 1.23 ± 0.16 f_{\varpi} = 1.23 \pm0.16 f ϖ = 1.23 ± 0.16 for the joint MW sample, consistent with the fixed factor of 1.1 1.1 1.1 adopted by R21, with negligible impact on the period–luminosity parameters.
Table A1. Posterior means and standard deviations for the C22 and C27 campaigns analysed separately, each combined with the LMC and N4258. Layout follows Table 4 . The C22 selection does not include the extinction cut A H < 0.4 A_H < 0.4 A H < 0.4 mag; the effect of including it is discussed in § 5.4 .
Figure A1. Marginalised posteriors of (M H , 1 W M^{W}_{H,1} M H , 1 W , b W b_W b W , Z W Z_W Z W , δ ϖ \delta_{\varpi} δ ϖ ) for the individual C22 + LMC + N4258 (blue, filled) and C27 + LMC + N4258 (red, filled) configurations with disc prior and selection modelling. The corresponding R21 χ 2 \chi^2 χ 2 contours are shown for C22 (green, filled) and C27 (orange, filled), and the baseline SH0ES contours from R22 in black. All contours show the 1 σ 1\sigma 1 σ and 2 σ 2\sigma 2 σ credible regions.
The low scatter of the Cepheid period–luminosity relation and the high precision of the H S T HST H S T Wesenheit magnitudes provide a stringent test of the G a i a Gaia G aia EDR3 parallaxes. Our tests of rescaling the parallax uncertainties yield f ϖ = 1.24 ± 0.18 f_{\varpi} = 1.24 \pm0.18 f ϖ = 1.24 ± 0.18 for C22 and f ϖ = 0.71 ± 0.33 f_{\varpi} = 0.71 \pm0.33 f ϖ = 0.71 ± 0.33 for C27, or f ϖ = 1.23 ± 0.16 f_{\varpi} = 1.23 \pm0.16 f ϖ = 1.23 ± 0.16 when modelling the two samples jointly (in which case the more distant C22 sample dominates the f ϖ f_{\varpi} f ϖ constraint), indicating that the G a i a Gaia G aia uncertainties are reasonably estimated. This conclusion is consistent with that of R21, who found good agreement between model residuals and (10 per cent inflated) parallax errors, with a best χ 2 \chi^2 χ 2 of 68 for 66 Cepheids. A similar result was reported by Ripepi et al. (2026), who found χ d o f 2 ≈ 1.04 \chi^2_{\mathrm{dof}} \approx1.04 χ dof 2 ≈ 1.04 for this same H S T HST H S T sample. In contrast, Madore & Freedman (2026) report on noise in the G a i a Gaia G aia EDR3 parallaxes of MW Cepheids based on photometry drawn from heterogeneous ground-based sources, stating “something subtle is amiss” regarding G a i a Gaia G aia parallaxes. However, they do not quantify the significance of this statement or whether, or by how much, their residuals exceed the combined parallax and photometric uncertainties of the data, precluding a direct comparison with the results from G a i a Gaia G aia presented here.
We attempted to replicate their “qualine” colour analysis, Q = ( V − I ) − X ( I − N I R ) Q = (V-I)-X(I-NIR) Q = ( V − I ) − X ( I − N I R ) , where NIR denotes a near-infrared photometric band and X X X is the relevant reddening ratio. The measure of Q Q Q is noisy, as it combines the noise of four bands with a value of X > 1 X > 1 X > 1 so that it is empirically equivalent to the noise of ∼ 6 \sim6 ∼ 6 bands added in quadrature. In contrast, the conventional Wesenheit of NIR–R ( V − I ) R(V-I) R ( V − I ) , where R ≲ 0.4 R \lesssim0.4 R ≲ 0.4 , has noise equivalent to ∼ 1.5 \sim1.5 ∼ 1.5 bands added in quadrature and thus is less demanding to measure. Specifically, we extended the period–luminosity model to include the qualine colour Q Q Q as an additional predictor, inferring its coefficient c W c_W c W jointly with all other parameters. For MW Cepheids and the LMC where Q Q Q can be reliably measured, we find c W = − 0.06 ± 0.38 c_W = -0.06 \pm0.38 c W = − 0.06 ± 0.38 , consistent with zero, with no evidence that residual colour information improves the calibration. At greater distances, the qualine colour becomes too noisy to measure usefully. The period–luminosity zero-point remains unchanged regardless of whether variations around the mean Q Q Q are included.
Comparison with Högås & Mörtsell (2026)
HM26 claim that adopting physically motivated priors in the distance ladder reduces the Hubble tension from 5 σ 5\sigma 5 σ to 2 σ 2\sigma 2 σ . They extend the χ 2 \chi^2 χ 2 model of R22 by treating MW Cepheids individually and sampling their distances as free parameters, rather than collapsing them into a single Gaussian constraint on the period–luminosity zero-point. Motivated by Desmond et al. (2025), they impose a uniform-in-volume distance prior, π ( d ) ∝ d 2 \pi(d) \propto d^2 π ( d ) ∝ d 2 , on both the MW Cepheids and the nearby Cepheid host galaxies in the SH0ES sample. An equally fundamental point of Desmond et al. (2025), however, is that modelling selection is crucial: neglecting it biases the inference. HM26 entirely neglect this point, arguing that the MW Cepheid sample can be considered effectively complete because both G a i a Gaia G aia and H S T HST H S T are capable of detecting Cepheids at much larger distances. This capability is beside the point. What matters is how the MW Cepheids in the SH0ES sample were actually selected: they are clearly confined to a limited distance range, and hence are not representative of the underlying population, which extends throughout the MW disc (and the Universe). The same argument applies to the nearby Cepheid host galaxies. Even if Type Ia supernovae are routinely detected at much larger distances, the question is why these particular nearby galaxies were selected for Cepheid observations—a selection effect that must be modelled, as done by Stiskalek et al. (2026). Indeed, Desmond et al. (2025) showed that even for a volume-limited sample—one that is complete out to a fixed true distance (rather than observed quantities like redshift or magnitude)—the selection must be accounted for by restricting the distance prior to the same range. An improper d 2 d^2 d 2 prior that extends beyond the true-distance cutoff in this toy setting biases the inference even in that case. The mechanism is straightforward: a uniform-in-volume prior assigns increasing weight to large distances through the d 2 d^2 d 2 volume factor, but the selection excludes stars beyond a certain range. Without modelling the selection, the inference overweights distant Cepheids, shifting the period–luminosity zero-point to brighter values and δ ϖ \delta_{\varpi} δ ϖ to more negative values. HM26 report a marginalised posterior of M H , 1 W = − 5.959 ± 0.018 M^{\mathrm{W}}_{H,1} = -5.959 \pm0.018 M H , 1 W = − 5.959 ± 0.018 mag and δ ϖ = − 26.2 ± 5.0 μ \delta_{\varpi} = -26.2 \pm5.0\,\mu δ ϖ = − 26.2 ± 5.0 μ as (their figure 2). This brighter zero-point relative to the baseline SH0ES value of − 5.894 -5.894 − 5.894 mag implies a larger distance scale, yielding H 0 = 70.6 ± 1.0 k m s − 1 M p c − 1 H_0 = 70.6 \pm1.0\ \mathrm{km\ s^{-1}\ Mpc^{-1}} H 0 = 70.6 ± 1.0 km s − 1 Mp c − 1 . This result is driven by their neglect of selection effects. Of our analysis variants, the one most closely resembling their approach—a uniform-in-volume prior with no selection modelling and a wide prior on δ ϖ \delta\varpi δ ϖ , using MW, LMC, and N4258 Cepheids—yields M H , 1 W = − 5.982 ± 0.023 M_{H,1}^{W} = -5.982 \pm0.023 M H , 1 W = − 5.982 ± 0.023 mag and δ ϖ = − 36.3 ± 6.1 μ a s \delta\varpi= -36.3 \pm6.1\ \mu\mathrm{as} δ ϖ = − 36.3 ± 6.1 μ as , in reasonable agreement with them. The residual difference is likely attributable to two factors: we model the Cepheid population hyperprior, and their global fit includes the remainder of the distance ladder, which, while lacking a geometric distance calibration, may still mildly pull the period–luminosity parameters and δ ϖ \delta\varpi δ ϖ . Modelling selection, as we do in this work, shifts the Cepheid zero-point back towards the baseline SH0ES value and consequently pushes H 0 H_0 H 0 back up (§ 5.3 ).
In Figure 6 we present PPCs for our baseline model. When selection is included, the predicted distributions of m H W m_H^{W} m H W , ϖ o b s \varpi_{\mathrm{obs}} ϖ obs , and log P o b s \log P_{\mathrm{obs}} log P obs closely match the observed data. Without selection modelling, the predicted distributions of both m H W m_H^{W} m H W and ϖ o b s \varpi_{\mathrm{obs}} ϖ obs are incompatible with the observations. The degree of this incompatibility depends on the range of the distance prior: we adopt d min = 0.1 d_{\min} = 0.1 d m i n = 0.1 kpc for both samples and d max = 8.5 d_{\max} = 8.5 d m a x = 8.5 kpc and d max = 2.0 d_{\max} = 2.0 d m a x = 2.0 kpc for the C22 and C27 samples, respectively, somewhat larger than the most distant Cepheid in each. Extending d max d_{\max} d m a x further would worsen the disagreement, as the model would predict Cepheids at distances where none are observed. This connects directly to the selection argument above. Even for the C27 sample, where the dominant selection is in parallax and therefore approximately in distance, completeness up to some maximum distance does not obviate the need for selection modelling. That maximum distance must be explicitly encoded, e.g., in the prior; otherwise the inference assigns non-negligible probability to distances beyond the threshold, allowed by the likelihood but completely excluded by the selection.
The close agreement between our Bayesian forward model and the SH0ES parallax-space χ 2 \chi^2 χ 2 analysis is interesting. The two approaches differ fundamentally: SH0ES calibrates directly in parallax space without sampling distances, imposing a spatial prior, or explicitly modelling selection. In Appendix § 10 we show analytically that the per-star likelihood of the forward model, after marginalising over the latent distance under a power-law prior and locally linearising the distance modulus, reduces to a Gaussian in parallax space whose exponent matches the χ 2 \chi^2 χ 2 . Depending on whether the selection acts in parallax or in magnitude, different prefactors multiply the exponential, but these are effectively constant or negligible when the intrinsic scatter of the period–luminosity relation is small, i.e. when the parallax measurement uncertainty dominates the error budget, as is the case for MW Cepheids. In this regime, the Bayesian forward model reduces effectively to a weighted regression in parallax space conditional on the observed sample. Mock bias tests (Appendix C) confirm that, at the baseline scatter of σ i n t ≈ 0.06 \sigma_{\mathrm{int}} \approx0.06 σ int ≈ 0.06 mag, consistent with the value inferred from the data, the linearised Gaussian and χ 2 \chi^2 χ 2 methods are only mildly biased; only when the scatter ≳ 0.15 \gtrsim0.15 ≳ 0.15 mag would the χ 2 \chi^2 χ 2 method be significantly biased (the Bayesian forward model is unbiased in all cases).
The consistency of the inferred period–luminosity parameters across methods therefore follows from the small intrinsic scatter of MW Cepheids, and demonstrates that the larger shift introduced by a uniform-in-volume prior without selection modelling, as adopted by HM26, is a consequence of a poor generative model of the data. Because the intrinsic scatter is small, the per-star likelihood sharply constrains the distance, rendering the prior approximately constant over the relevant interval; its effective value is set by the peak location, which depends on the model parameters. When the selection function is included in the posterior, these per-star prior factors approximately cancel against the selection normalisation, as shown in Appendix § 10 under the linearisation of the distance modulus, and the functional form of the prior has negligible impact on the inferred parameters. Without selection modelling, however, the prior factors evaluated at different parameter-dependent distances for different stars no longer cancel, and the inference becomes biased. This is shown by the adoption of a uniform-in-volume prior without modelling of the selection function producing posterior predictive distributions of observables clearly discrepant with the data (Figure 6 ).
While not important for our main argument, we also note a spurious asymmetry in HM26’s treatment of the second and third rungs of the distance ladder. They impose a uniform-in-volume prior on MW Cepheids and nearby Cepheid host galaxies, yet for the Hubble flow supernovae they retain the χ 2 \chi^2 χ 2 treatment of R22. They argue that the BEAMS with Bias Corrections method (BBC; Popovic et al. 2021), while correcting SN Ia distance modulus for observational selection effects and standardisation biases, operates at the level of SN Ia standardisation and is not designed to compensate for assumptions about distance priors in the calibration of the local distance ladder. On this basis they dismiss the suggestion of Desmond et al. (2025) that BBC may already compensate for the use of a flat prior on distance modulus. If this is the case, and BBC does not effectively account for the distance prior, then a uniform-in-volume prior should have been applied to the Hubble-flow hosts as well, yet HM26 do not do so. They motivate this by noting that Hubble-flow distances can be viewed as derived quantities (d = c z / H 0 d = cz/H_0 d = cz / H 0 ) rather than free parameters, so that a uniform-in-volume prior on them would translate into a prior on H 0 H_0 H 0 itself. This is unconvincing: by the same reasoning, any distance in the ladder could be recast as a derived quantity, and no distance prior would ever be required. There is no reason why a prior on distances should not translate to an effective prior on H 0 H_0 H 0 , which is precisely what happens in the rest of the model anyway when marginalising over the latent distances.
Implications for the Hubble constant
Our full Bayesian forward model is restricted to the calibration of the first rung of the distance ladder (Cepheids), although the consequences for the full distance ladder inference of H 0 H_0 H 0 are clear. Given that the Cepheid period–luminosity relation parameters we infer are consistent with the baseline SH0ES values, we expect modifications to the SH0ES H 0 H_0 H 0 value to be marginal and the Hubble tension to remain at ∼ 5 σ \sim5\sigma ∼ 5 σ . To verify this, we replicate the χ 2 \chi^2 χ 2 analysis of the full distance ladder of R22, recovering H 0 = 73.04 ± 1.01 k m s − 1 M p c − 1 H_0 = 73.04 \pm1.01\ \mathrm{km\ s^{-1}\ Mpc^{-1}} H 0 = 73.04 ± 1.01 km s − 1 Mp c − 1 , matching their reported value. R22 constrain the period–luminosity zero-point using both HST and Gaia parallaxes, obtaining M H , 1 W = − 5.804 ± 0.082 M^{\mathrm{W}}_{H,1}=-5.804 \pm0.082 M H , 1 W = − 5.804 ± 0.082 mag and M H , 1 W = − 5.903 ± 0.025 M^{\mathrm{W}}_{H,1}=-5.903 \pm0.025 M H , 1 W = − 5.903 ± 0.025 mag, respectively. These constraints are derived from partially overlapping sets of MW Cepheids observed with two independent astrometric instruments; the per-star error budget is dominated by the parallax uncertainties (∼ 0.14 \sim0.14 ∼ 0.14 mag for Gaia , ∼ 0.35 \sim0.35 ∼ 0.35 mag for HST ), which are independent, minimising the correlation between the two constraints. We consider dropping the HST constraint and retaining only the Gaia one, which yields H 0 = 72.91 ± 1.01 k m s − 1 M p c − 1 H_0=72.91 \pm1.01\ \mathrm{km\,s^{-1}\,Mpc^{-1}} H 0 = 72.91 ± 1.01 km s − 1 Mp c − 1 , a negligible shift. Replacing the Gaia constraint with the zero-point inferred in this work yields H 0 = 73.12 ± 1.08 k m s − 1 M p c − 1 H_0=73.12 \pm1.08\ \mathrm{km\,s^{-1}\,Mpc^{-1}} H 0 = 73.12 ± 1.08 km s − 1 Mp c − 1 . These shifts are at most ∼ 0.1 σ \sim0.1\sigma ∼ 0.1 σ , confirming that our inferred Cepheid zero-point leaves the Hubble tension intact. To isolate the impact of the Gaia parallax-offset modelling on H 0 H_0 H 0 , we repeat the R21 χ 2 \chi^2 χ 2 inference of the MW calibration with δ ϖ \delta\varpi δ ϖ fixed to zero, obtaining M H , 1 W = − 5.867 ± 0.015 M^{\mathrm{W}}_{H,1}=-5.867 \pm0.015 M H , 1 W = − 5.867 ± 0.015 mag, fainter by 0.044 mag than the baseline. Substituting this constraint into the SH0ES χ 2 \chi^2 χ 2 shifts H 0 H_0 H 0 from the aforementioned 72.91 ± 1.01 k m s − 1 M p c − 1 72.91 \pm1.01\ \mathrm{km\,s^{-1}\,Mpc^{-1}} 72.91 ± 1.01 km s − 1 Mp c − 1 to 73.70 ± 0.95 k m s − 1 M p c − 1 73.70 \pm0.95\ \mathrm{km\,s^{-1}\,Mpc^{-1}} 73.70 ± 0.95 km s − 1 Mp c − 1 , an upward shift of about 1 σ 1\sigma 1 σ . This χ 2 \chi^2 χ 2 -based estimate is only illustrative, as it grafts our Bayesian zero-point onto the frequentist framework of R22; we leave a fully consistent Bayesian reanalysis of the complete distance ladder to future work. We similarly expect a negligible impact on the two-rung Bayesian distance ladder of Stiskalek et al. (2026), who used the same MW constraints as R22.
Limitations of this work
For the C27 sample, the reported selection cuts alone suffice to reproduce the observed distributions in a PPC (Figure 6 ). We additionally introduce a mild selection term on the Wesenheit magnitude, in place of a V V V -band cut to avoid HST saturation, to remove the brightest Cepheids, though this has a negligible effect on the inferred parameters.
The C22 sample presents greater challenges. It was drawn from a parent catalogue of MW Cepheids with an implicit completeness limit V ≲ 15 V \lesssim15 V ≲ 15 mag, to which three explicit cuts were applied: a period cut P > 8 P>8 P > 8 days, an extinction cut A H < 0.4 A_H<0.4 A H < 0.4 mag, and a saturation cut V > 6 V>6 V > 6 mag. We implement the period and extinction cuts, but these alone do not reproduce the observed distributions of magnitude and parallax. We therefore introduce additional smooth selection terms on the Wesenheit magnitude and observed parallax. The parallax selection dominates; results would be near-indistinguishable had we neglected the Wesenheit magnitude term. This therefore constitutes an effective selection function, not identical to the reported cuts, and can potentially be understood as partially modelling the selection of the parent sample population itself. The inferred thresholds yield a PPC that closely reproduces the observed distributions (Figure 6 ).
The parent sample selection is complicated by the fact that it operates on the V V V -band magnitude, whereas our forward model predicts the Wesenheit magnitude. Modelling the V V V -band selection self-consistently would require predicting V V V -band magnitudes and hence modelling the period–luminosity relation in that band, with its own intrinsic scatter correlated with the Wesenheit scatter (see Yasin et al. 2026 for such a treatment of correlated scatter in galaxy cluster scaling relations). While in principle straightforward, this would require extending the framework to multiple bands simultaneously. We instead adopt the simpler approach of modelling an effective selection in Wesenheit magnitude with a smooth cut, even though the data were never selected on this quantity. Since the V V V -band and Wesenheit magnitudes are strongly correlated, a smooth cut in the latter can effectively mimic a cut in the former.
The choice of smooth selection function is itself an approximation: the true HST magnitude completeness is not exactly a Gaussian CDF in m H W m_H^{\mathrm{W}} m H W , and the Gaia parallax selection was applied to the photometric parallax computed from fiducial period–luminosity parameters rather than directly to ϖ o b s \varpi_{\mathrm{obs}} ϖ obs , so our smooth cut on ϖ o b s \varpi_{\mathrm{obs}} ϖ obs only approximates the true selection criterion. The PPC of Figure 6 is statistically consistent with the data, leaving no obvious signature of selection-shape misspecification in the observables that enter the cuts. The effective C22 and C27 thresholds are inferred jointly with the period–luminosity parameters and δ ϖ \delta\varpi δ ϖ , and Figure 2 shows that they are well constrained and not particularly correlated with ( M H , 1 W , b W , Z W , δ ϖ ) (M^{\mathrm{W}}_{H,1}, b_W, Z_W, \delta\varpi) ( M H , 1 W , b W , Z W , δ ϖ ) .
A further potential limitation concerns the modelling of selection associated with extinction. The C22 sample was subject to an explicit cut A H < 0.4 A_H<0.4 A H < 0.4 mag, but modelling this selection requires knowing the extinction not only along the observed sightlines but in principle at all positions in the Galaxy. The extinction model described in § 2 is itself a source of systematic uncertainty: the standard deviation of the inter-map differences for the C22 Cepheids is 0.08 mag, and no existing map provides reliable extinctions throughout the Galactic plane. Hierarchical reddening inference, as in BayesN (Mandel et al. 2022), would require the individual F555W, F814W, and F160W magnitudes, whereas our likelihood uses only the reddening-suppressed m H W m_H^{\mathrm{W}} m H W . Moreover, the definition of the Wesenheit magnitude assumes a fixed extinction law; Skowron et al. (2026) show that spatial R V R_V R V variations across the MW disc can shift the Gaia -based Wesenheit index W G W_G W G by up to ∼ 0.7 \sim0.7 ∼ 0.7 mag, though the near-infrared m H W m_H^{\mathrm{W}} m H W used here is far less sensitive. Given these systematic uncertainties, the baseline C22 selection does not include the extinction cut. When the LMC and N4258 are included, enabling the extinction selection has a negligible effect on the period–luminosity parameters (Δ M H , 1 W = 0.008 \Delta M^{\mathrm{W}}_{H,1}=0.008 Δ M H , 1 W = 0.008 mag); without anchors, the effect is larger, but the inference is in any case poorly constrained (Appendix § 9 ). The C27 Cepheids are too nearby for extinction selection to matter. For a single MW campaign, the M H , 1 W M^{\mathrm{W}}_{H,1} M H , 1 W –δ ϖ \delta\varpi δ ϖ degeneracy is not exact: changing M H , 1 W M^{\mathrm{W}}_{H,1} M H , 1 W applies a constant shift in distance modulus, whereas a shift in δ ϖ \delta\varpi δ ϖ alters the inferred parallax distance modulus by Δ μ ≃ − ( 5 / ln 10 ) Δ ϖ d \Delta\mu\simeq-(5/\ln10)\Delta\varpi d Δ μ ≃ − ( 5/ ln 10 ) Δ ϖ d . The C22 campaign gives a baseline δ ϖ = 1 ± 7 \delta\varpi=1\pm7 δ ϖ = 1 ± 7 μ \mu μ as, but this posterior remains prior-dominated and should not be interpreted as a parallax-offset constraint. Including the LMC and N4258 extends the distance baseline and anchors M H , 1 W M^{\mathrm{W}}_{H,1} M H , 1 W independently of the MW parallaxes.
Conclusion
We have presented a Bayesian forward model of the MW Cepheid population that jointly infers the period–luminosity relation parameters, the Gaia parallax zero-point offset, and the intrinsic population distributions, while marginalising over the distances and latent true periods and metallicities of individual Cepheids and explicitly accounting for the sample selection function and the disc geometry of the MW. Combined with geometric calibration of the LMC and N4258, our baseline model yields a period–luminosity zero-point of M H , 1 W = − 5.909 ± 0.022 M^{W}_{H,1} = -5.909 \pm0.022 M H , 1 W = − 5.909 ± 0.022 mag and a Gaia parallax offset of δ ϖ = − 12.4 ± 5.3 μ a s \delta_{\varpi} = -12.4 \pm5.3\ \mu\mathrm{as} δ ϖ = − 12.4 ± 5.3 μ as ; the zero-point is consistent within 0.7 σ 0.7\sigma 0.7 σ with the baseline SH0ES value. Neglecting the selection function and adopting a uniform-in-volume prior shifts M H , 1 W M^{W}_{H,1} M H , 1 W brighter by ∼ 0.05 \sim0.05 ∼ 0.05 mag and δ ϖ \delta_{\varpi} δ ϖ more negative by ∼ 14 μ a s \sim14\ \mu\mathrm{as} ∼ 14 μ as , demonstrating that principled selection modelling is essential for unbiased inference. The reduced Hubble tension reported by HM26 is an artefact of this neglect: applying a uniform-in-volume prior without accounting for the selection that defines the sample biases the zero-point bright and H 0 H_0 H 0 low (see also Desmond et al. 2025). The apparent mitigation of the Hubble tension in HM26 therefore arises from modelling assumptions that fail to match the generating process of the data, not from new information.
This work is part of a larger programme to forward-model the full distance ladder in a statistically rigorous way. Stiskalek et al. (2026) developed the framework for the second rung—the Cepheid host galaxies—and showed that, when coupled with the Manticore-Local model of the local Universe (McAlpine et al. 2025), which accounts for galaxy bias and peculiar velocities, H 0 H_0 H 0 can be inferred without supernovae at ∼ 1.8 \sim1.8 ∼ 1.8 per cent precision from as few as 35 host galaxies. The present work extends the programme to the first rung, treating the MW calibration self-consistently. The remaining piece is the third rung: applying a similar approach to the Type Ia supernovae and performing end-to-end Bayesian inference from geometric anchors to the Hubble flow. Feeney et al. (2018) pursued this goal but adopted a uniform-in-distance-modulus prior and neglected the selection function. Modelling Type Ia supernova selection is particularly challenging, as it depends on discovery magnitude, light-curve colour and stretch, host-galaxy properties, and survey-specific targeting strategies, among others (Kessler & Scolnic 2017; Popovic et al. 2021; Boyd et al. 2024).
Looking beyond current data, such forward modelling will be particularly compelling when applied to dedicated observational campaigns collecting samples with well-defined selection criteria, rather than to archival data with heterogeneous selection criteria, as is currently the case. The selection terms computed here are detection probabilities, i.e. the average fraction of objects selected from a parent population. They can therefore be estimated by Monte Carlo from simulated catalogues and then emulated when direct evaluation is expensive or analytically intractable. Boyd et al. (2026) present a complementary simulation-based route, which can learn the selection-conditioned likelihood directly from realistic survey simulations. More broadly, the framework we develop extends beyond the Cepheid–supernova ladder. Alternative distance indicators such as the tip of the red giant branch, surface brightness fluctuations, and masers can be treated analogously, provided their selection is well understood, and can independently challenge or corroborate the Hubble tension.
Data availability
The C22 and C27 data used in this work were extracted from table 1 of R22. The SH0ES data are available at github.com/PantheonPlusSH0ES/DataRelease . The code and all other data will be made available on reasonable request to the authors.
Acknowledgements
We thank Pedro G. Ferreira for useful inputs and discussions. R.S acknowledges financial support from STFC Grant No. ST/X508664/1, the Snell Exhibition of Balliol College, Oxford, and a Hintze Fellowship at the Oxford Centre for Astrophysical Surveys, funded through generous support from the Hintze Family Charitable Foundation. H.D is supported by a Royal Society University Research Fellowship (grant no. 211046).
The authors would like to acknowledge the use of the University of Oxford Advanced Research Computing (ARC) facility in carrying out this work.6
Individual campaign results
Table A1 reports posteriors for the C22 and C27 campaigns analysed separately, each combined with the LMC and N4258; Figure A1 shows the corresponding corner plots. The LMC and N4258 are required to break the M H , 1 W M^{W}_{H,1} M H , 1 W –δ w \delta_{w} δ w degeneracy inherent in parallax-only data, so we include them throughout.
With the LMC and N4258—which dominate the constraint on M H , 1 W M^{W}_{H,1} M H , 1 W —the two campaigns yield consistent zero-points: M H , 1 W = − 5.865 ± 0.026 M^{W}_{H,1}=-5.865\pm0.026 M H , 1 W = − 5.865 ± 0.026 mag (C22) and − 5.916 ± 0.024 -5.916\pm0.024 − 5.916 ± 0.024 mag (C27), differing by 1.4 σ 1.4\sigma 1.4 σ . The slopes and metallicity coefficients, likewise dominated by the LMC and N4258 data, agree to within 0.5 σ 0.5\sigma 0.5 σ . Both individual-campaign zero-points are consistent with the joint C22+C27 result of M H , 1 W = − 5.909 ± 0.022 M^{W}_{H,1}=-5.909\pm0.022 M H , 1 W = − 5.909 ± 0.022 mag (Table 4 ), confirming that the two campaigns carry no internal tension. Selection modelling has a larger effect on C22 than on C27: disabling the selection function shifts M H , 1 W M^{W}_{H,1} M H , 1 W by 0.040 0.040 0.040 mag and δ w \delta_{w} δ w by 11 μ a s 11\ \mu\mathrm{as} 11 μ as for C22, compared with 0.008 0.008 0.008 mag and 6 μ a s 6\ \mu\mathrm{as} 6 μ as for C27. This is expected, as the more distant C22 sample is more strongly affected by magnitude truncation. Similarly, the nearby C27 Cepheids (d ≲ 1.25 d\lesssim1.25 d ≲ 1.25 kpc, ϖ ≳ 800 μ a s \varpi\gtrsim800\ \mu\mathrm{as} ϖ ≳ 800 μ as ) are largely insensitive to the parallax offset: for δ w = − 10 μ a s \delta_{w}=-10\ \mu\mathrm{as} δ w = − 10 μ as , the induced distance modulus shift is only ∼ 0.02 \sim0.02 ∼ 0.02 mag, compared with ∼ 0.07 \sim0.07 ∼ 0.07 mag for the typical C22 parallax of ∼ 300 μ a s \sim300\ \mu\mathrm{as} ∼ 300 μ as . The constraint on δ w \delta_{w} δ w is therefore driven by the more distant C22 sample.
The baseline C22 selection does not include the extinction-cut A H < 0.4 A_H<0.4 A H < 0.4 mag, owing to the systematic uncertainties in three-dimensional dust maps discussed in § 5.4 . With the LMC and N4258 included, enabling the extinction selection has a negligible effect on the period–luminosity parameters (Δ M H , 1 W = 0.008 \Delta M^{W}_{H,1}=0.008 Δ M H , 1 W = 0.008 mag), but the inferred scatter increases, consistent with residual extinction along the more distant C22 sightlines. The R21 χ 2 \chi^2 χ 2 rows apply the frequentist χ 2 \chi^2 χ 2 method with intrinsic scatter fixed at 0.06 0.06 0.06 mag.
Similarity of the forward model and the χ 2 \chi^2 χ 2 method
Here we derive the relation between the forward model of § 3 and the χ 2 \chi^2 χ 2 treatment of R21. For simplicity, we treat the period and metallicity as known quantities with no population prior or selection, so that neither requires marginalisation; since they enter the Gaussian likelihood linearly, they could be marginalised analytically under a Gaussian population prior as in the main text. The per-star likelihood for a single MW Cepheid at distance d d d then reduces to
L ( m H , o b s W , ϖ o b s ∣ d , θ ) = N ( m H , o b s W ∣ M + μ ( d ) , σ l 2 ) × N ( ϖ o b s ∣ 1 / d − δ w , σ ϖ 2 ) (51) \mathcal{L}\left(m^{W}_{H,\mathrm{obs}},\varpi_{\mathrm{obs}}\mid d,\theta\right)
= \mathcal{N}\left(m^{W}_{H,\mathrm{obs}}\mid M+\mu(d),\sigma_l^2\right)
\times\mathcal{N}\left(\varpi_{\mathrm{obs}}\mid1/d-\delta_w,\sigma_\varpi^2\right) \tag*{(51)} L ( m H , obs W , ϖ obs ∣ d , θ ) = N ( m H , obs W ∣ M + μ ( d ) , σ l 2 ) × N ( ϖ obs ∣ 1/ d − δ w , σ ϖ 2 ) (51)
where M = M H , 1 W + b w ( log P − 1 ) + Z W [ O / H ] M=M^{W}_{H,1}+bw\left(\log P-1\right)+Z_W\left[\mathrm{O/H}\right] M = M H , 1 W + b w ( log P − 1 ) + Z W [ O/H ] is the predicted absolute magnitude, σ l 2 = σ m 2 + σ i n t 2 \sigma_l^2=\sigma_m^2+\sigma_{\mathrm{int}}^2 σ l 2 = σ m 2 + σ int 2 is the total magnitude
variance, and μ ( d ) = 5 log ( d / 10 p c ) \mu(d) = 5\log(d/10\ \mathrm{pc}) μ ( d ) = 5 log ( d /10 pc ) is the distance modulus. Adopting a uniform-in-volume distance prior, π ( d ) ∝ d 2 \pi(d) \propto d^2 π ( d ) ∝ d 2 , the marginal likelihood is
L m a r g ( m H , o b s W , ϖ o b s ∣ θ ) ∝ ∫ d d d 2 N ( m H , o b s W ∣ M + μ ( d ) , σ 1 2 ) N ( ϖ o b s ∣ 1 / d − δ ϖ , σ ϖ 2 ) . (52) \mathcal{L}^{\mathrm{marg}}(m_{H,\mathrm{obs}}^W,\varpi_{\mathrm{obs}}\mid\theta)\propto\int\mathrm{d}d\,d^2\,\mathcal{N}(m_{H,\mathrm{obs}}^W\mid M+\mu(d),\sigma_1^2)\mathcal{N}(\varpi_{\mathrm{obs}}\mid1/d-\delta_\varpi,\sigma_\varpi^2). \tag*{(52)} L marg ( m H , obs W , ϖ obs ∣ θ ) ∝ ∫ d d d 2 N ( m H , obs W ∣ M + μ ( d ) , σ 1 2 ) N ( ϖ obs ∣ 1/ d − δ ϖ , σ ϖ 2 ) . (52)
Changing variables to ϖ = 1 / d − δ ϖ \varpi=1/d-\delta_\varpi ϖ = 1/ d − δ ϖ , so that d = 1 / ( ϖ + δ ϖ ) d=1/(\varpi+\delta_\varpi) d = 1/ ( ϖ + δ ϖ ) and ∣ d d ∣ = d ϖ / ( ϖ + δ ϖ ) 2 |\mathrm{d}d|=\mathrm{d}\varpi/(\varpi+\delta_\varpi)^2 ∣ d d ∣ = d ϖ / ( ϖ + δ ϖ ) 2 , the parallax likelihood simplifies and the integral becomes
L m a r g ∝ ∫ d ϖ ( ϖ + δ ϖ ) − 4 N ( m H , o b s W ∣ M + μ ( ϖ ) , σ 1 2 ) × N ( ϖ o b s ∣ ϖ , σ ϖ 2 ) . (53) \mathcal{L}^{\mathrm{marg}}\propto\int\mathrm{d}\varpi\,(\varpi+\delta_\varpi)^{-4}\mathcal{N}(m_{H,\mathrm{obs}}^W\mid M+\mu(\varpi),\sigma_1^2)\times\mathcal{N}(\varpi_{\mathrm{obs}}\mid\varpi,\sigma_\varpi^2). \tag*{(53)} L marg ∝ ∫ d ϖ ( ϖ + δ ϖ ) − 4 N ( m H , obs W ∣ M + μ ( ϖ ) , σ 1 2 ) × N ( ϖ obs ∣ ϖ , σ ϖ 2 ) . (53)
where μ ( ϖ ) = − 5 log ( ϖ + δ ϖ ) + 10 \mu(\varpi)=-5\log(\varpi+\delta_\varpi)+10 μ ( ϖ ) = − 5 log ( ϖ + δ ϖ ) + 10 . Following the main text, we define the photometric parallax as the geometric parallax corresponding to the photometric distance,
ϖ p h o t = 10 − 0.2 ( m H , o b s W − M − 10 ) . (54) \varpi_{\mathrm{phot}}=10^{-0.2(m_{H,\mathrm{obs}}^W-M-10)}. \tag*{(54)} ϖ phot = 1 0 − 0.2 ( m H , obs W − M − 10 ) . (54)
In the ϖ \varpi ϖ coordinate, the magnitude likelihood peaks at ϖ = ϖ p h o t − δ ϖ \varpi=\varpi_{\mathrm{phot}}-\delta_\varpi ϖ = ϖ phot − δ ϖ , since μ ( ϖ ) = m H , o b s W − M \mu(\varpi)=m_{H,\mathrm{obs}}^W-M μ ( ϖ ) = m H , obs W − M when ϖ + δ ϖ = ϖ p h o t \varpi+\delta_\varpi=\varpi_{\mathrm{phot}} ϖ + δ ϖ = ϖ phot . To marginalise Eq. (53) analytically, we linearise μ ( ϖ ) \mu(\varpi) μ ( ϖ ) around ϖ p h o t − δ ϖ \varpi_{\mathrm{phot}}-\delta_\varpi ϖ phot − δ ϖ . Since
d μ d ϖ = − 5 ln 10 ( ϖ + δ ϖ ) , (55) \frac{\mathrm{d}\mu}{\mathrm{d}\varpi}=-\frac{5}{\ln10(\varpi+\delta_\varpi)}, \tag*{(55)} d ϖ d μ = − ln 10 ( ϖ + δ ϖ ) 5 , (55)
a first-order Taylor expansion gives
μ ( ϖ ) ≈ μ ( ϖ p h o t − δ ϖ ) − 5 ln 10 ϖ − ϖ p h o t + δ ϖ ϖ p h o t . (56) \mu(\varpi)\approx\mu(\varpi_{\mathrm{phot}}-\delta_\varpi)-\frac{5}{\ln10}\frac{\varpi-\varpi_{\mathrm{phot}}+\delta_\varpi}{\varpi_{\mathrm{phot}}}. \tag*{(56)} μ ( ϖ ) ≈ μ ( ϖ phot − δ ϖ ) − ln 10 5 ϖ phot ϖ − ϖ phot + δ ϖ . (56)
Substituting into the magnitude likelihood and using m H , o b s W = M + μ ( ϖ p h o t − δ ϖ ) m_{H,\mathrm{obs}}^W=M+\mu(\varpi_{\mathrm{phot}}-\delta_\varpi) m H , obs W = M + μ ( ϖ phot − δ ϖ ) , the residual is
m H , o b s W − M − μ ( ϖ ) ≈ 5 ln 10 ϖ − ϖ p h o t + δ ϖ ϖ p h o t . (57) m_{H,\mathrm{obs}}^W-M-\mu(\varpi)\approx\frac{5}{\ln10}\frac{\varpi-\varpi_{\mathrm{phot}}+\delta_\varpi}{\varpi_{\mathrm{phot}}}. \tag*{(57)} m H , obs W − M − μ ( ϖ ) ≈ ln 10 5 ϖ phot ϖ − ϖ phot + δ ϖ . (57)
The magnitude Gaussian becomes
N ( m H , o b s W ∣ M + μ ( ϖ ) , σ 1 2 ) ≈ σ ϖ , m σ 1 N ( ϖ ∣ ϖ p h o t − δ ϖ , σ ϖ , m 2 ) , (58) \mathcal{N}(m_{H,\mathrm{obs}}^W\mid M+\mu(\varpi),\sigma_1^2)\approx\frac{\sigma_{\varpi,m}}{\sigma_1}\mathcal{N}(\varpi\mid\varpi_{\mathrm{phot}}-\delta_\varpi,\sigma_{\varpi,m}^2), \tag*{(58)} N ( m H , obs W ∣ M + μ ( ϖ ) , σ 1 2 ) ≈ σ 1 σ ϖ , m N ( ϖ ∣ ϖ phot − δ ϖ , σ ϖ , m 2 ) , (58)
where the uncertainty in “parallax space” after the linearisation is
σ ϖ , m = ln 10 5 ϖ p h o t σ 1 . (59) \sigma_{\varpi,m}=\frac{\ln10}{5}\varpi_{\mathrm{phot}}\sigma_1. \tag*{(59)} σ ϖ , m = 5 ln 10 ϖ phot σ 1 . (59)
Expanding the volume-prior factor around ϖ p h o t − δ ϖ \varpi_{\mathrm{phot}}-\delta_\varpi ϖ phot − δ ϖ ,
( ϖ + δ ϖ ) − 4 ≈ ϖ p h o t − 4 [ 1 − 4 ( ϖ − ϖ p h o t + δ ϖ ) ϖ p h o t ] . (60) (\varpi+\delta_\varpi)^{-4}\approx\varpi_{\mathrm{phot}}^{-4}\left[1-\frac{4(\varpi-\varpi_{\mathrm{phot}}+\delta_\varpi)}{\varpi_{\mathrm{phot}}}\right]. \tag*{(60)} ( ϖ + δ ϖ ) − 4 ≈ ϖ phot − 4 [ 1 − ϖ phot 4 ( ϖ − ϖ phot + δ ϖ ) ] . (60)
The first-order correction is suppressed by the Gaussian likelihood centred on ϖ p h o t − δ ϖ \varpi_{\mathrm{phot}}-\delta_\varpi ϖ phot − δ ϖ and we drop it. With this, the marginal likelihood reduces to a product of two Gaussians in ϖ \varpi ϖ ,
L m a r g ∝ ϖ p h o t − 3 ∫ d ϖ N ( ϖ o b s ∣ ϖ , σ ϖ 2 ) N ( ϖ ∣ ϖ p h o t − δ ϖ , σ ϖ , m 2 ) , (61) \mathcal{L}^{\mathrm{marg}}\propto\varpi_{\mathrm{phot}}^{-3}\int\mathrm{d}\varpi\,\mathcal{N}(\varpi_{\mathrm{obs}}\mid\varpi,\sigma_\varpi^2)\mathcal{N}(\varpi\mid\varpi_{\mathrm{phot}}-\delta_\varpi,\sigma_{\varpi,m}^2), \tag*{(61)} L marg ∝ ϖ phot − 3 ∫ d ϖ N ( ϖ obs ∣ ϖ , σ ϖ 2 ) N ( ϖ ∣ ϖ phot − δ ϖ , σ ϖ , m 2 ) , (61)
which evaluates to
L m a r g ∝ ϖ p h o t − 3 N ( ϖ o b s ∣ ϖ p h o t − δ ϖ , σ ~ ϖ 2 ) , (62) \mathcal{L}^{\mathrm{marg}}\propto\varpi_{\mathrm{phot}}^{-3}\mathcal{N}(\varpi_{\mathrm{obs}}\mid\varpi_{\mathrm{phot}}-\delta_\varpi,\widetilde{\sigma}_\varpi^2), \tag*{(62)} L marg ∝ ϖ phot − 3 N ( ϖ obs ∣ ϖ phot − δ ϖ , σ ϖ 2 ) , (62)
with
σ ~ ϖ 2 = ( ln 10 5 ) 2 ϖ p h o t 2 σ 1 2 + σ ϖ 2 . (63) \widetilde{\sigma}_\varpi^2=\left(\frac{\ln10}{5}\right)^2\varpi_{\mathrm{phot}}^2\sigma_1^2+\sigma_\varpi^2. \tag*{(63)} σ ϖ 2 = ( 5 ln 10 ) 2 ϖ phot 2 σ 1 2 + σ ϖ 2 . (63)
The Gaussian exponent ( ϖ o b s − ϖ p h o t + δ ϖ ) 2 / σ ~ ϖ 2 (\varpi_{\mathrm{obs}}-\varpi_{\mathrm{phot}}+\delta_\varpi)^2/\widetilde{\sigma}_\varpi^2 ( ϖ obs − ϖ phot + δ ϖ ) 2 / σ ϖ 2 recovers the R21 χ 2 \chi^2 χ 2 of Eq. (49) , and σ ~ ϖ \widetilde{\sigma}_\varpi σ ϖ matches Eq. (50) upon identifying σ ϖ \sigma_\varpi σ ϖ with α σ ϖ , E D R 3 \alpha\sigma_{\varpi,\mathrm{EDR3}} α σ ϖ , EDR3 and σ 1 \sigma_1 σ 1 with σ m , t o t \sigma_{m,\mathrm{tot}} σ m , tot . We now consider the selection function term.
Parallax selection
For a parallax selection S ( ϖ o b s ) = Θ ( ϖ o b s − ϖ min ) S(\varpi_{\mathrm{obs}})=\Theta(\varpi_{\mathrm{obs}}-\varpi_{\min}) S ( ϖ obs ) = Θ ( ϖ obs − ϖ m i n ) , modelled as a step function, integrating the parallax likelihood against the selection gives
∫ ϖ min ∞ d ϖ o b s N ( ϖ o b s ∣ v − δ ϖ , σ ϖ 2 ) = Φ ( v − δ ϖ − ϖ min σ ϖ ) . (64) \int_{\varpi_{\min}}^\infty\mathrm{d}\varpi_{\mathrm{obs}}\,\mathcal{N}(\varpi_{\mathrm{obs}}\mid v-\delta_\varpi,\sigma_\varpi^2)=\Phi\left(\frac{v-\delta_\varpi-\varpi_{\min}}{\sigma_\varpi}\right). \tag*{(64)} ∫ ϖ m i n ∞ d ϖ obs N ( ϖ obs ∣ v − δ ϖ , σ ϖ 2 ) = Φ ( σ ϖ v − δ ϖ − ϖ m i n ) . (64)
where v = 1 / d v=1/d v = 1/ d is the geometric parallax. Since S S S depends only on ϖ o b s \varpi_{\mathrm{obs}} ϖ obs , the magnitude likelihood integrates to unity over m H , o b s W m_{H,\mathrm{obs}}^W m H , obs W for any σ 1 \sigma_1 σ 1 . Marginalising over the distance with the uniform-in-volume prior (v − 4 = d 2 ∣ d d / d v ∣ v^{-4}=d^2|\mathrm{d}d/\mathrm{d}v| v − 4 = d 2 ∣ d d / d v ∣ ), the detection probability is
p ( S = 1 ∣ δ ϖ ) ∝ ∫ d v v − 4 Φ ( v − δ ϖ − ϖ min σ ϖ ) . (65) p(S=1\mid\delta_\varpi)\propto\int\mathrm{d}v\,v^{-4}\Phi\left(\frac{v-\delta_\varpi-\varpi_{\min}}{\sigma_\varpi}\right). \tag*{(65)} p ( S = 1 ∣ δ ϖ ) ∝ ∫ d v v − 4 Φ ( σ ϖ v − δ ϖ − ϖ m i n ) . (65)
The detection probability is independent of the period–luminosity relation parameters ( M H , 1 W , b W , Z W ) (M_{H,1}^W,b_W,Z_W) ( M H , 1 W , b W , Z W ) , since M M M has dropped out entirely. To evaluate the integral analytically, we take the sharp-cut limit σ ϖ → 0 \sigma_\varpi\to0 σ ϖ → 0 , in which the parallax measurement errors are assumed to have a negligible effect on the selection. Then Φ → Θ ( v − δ ϖ − ϖ min ) \Phi\to\Theta(v-\delta_\varpi-\varpi_{\min}) Φ → Θ ( v − δ ϖ − ϖ m i n ) and the integral evaluates to
p ( S = 1 ∣ δ ϖ ) ∝ ∫ ϖ min + δ ϖ ∞ d v v − 4 = 1 3 ( ϖ min + δ ϖ ) − 3 . (66) p(S=1\mid\delta_\varpi)\propto\int_{\varpi_{\min}+\delta_\varpi}^{\infty}\mathrm{d}v\,v^{-4}=\frac{1}{3}(\varpi_{\min}+\delta_\varpi)^{-3}. \tag*{(66)} p ( S = 1 ∣ δ ϖ ) ∝ ∫ ϖ m i n + δ ϖ ∞ d v v − 4 = 3 1 ( ϖ m i n + δ ϖ ) − 3 . (66)
Applying this approximation to the detection probability while retaining the full parallax uncertainty in the marginal likelihood, the selection-adjusted likelihood is
L m a r g p ( S = 1 ∣ δ ϖ ) ∝ ( ϖ min + δ ϖ ϖ p h o t ) 3 N ( ϖ o b s ∣ ϖ p h o t − δ ϖ , σ ~ ϖ 2 ) . (67) \frac{\mathcal{L}^{\mathrm{marg}}}{p(S=1\mid\delta_\varpi)}\propto\left(\frac{\varpi_{\min}+\delta_\varpi}{\varpi_{\mathrm{phot}}}\right)^3\mathcal{N}(\varpi_{\mathrm{obs}}\mid\varpi_{\mathrm{phot}}-\delta_\varpi,\widetilde{\sigma}_\varpi^2). \tag*{(67)} p ( S = 1 ∣ δ ϖ ) L marg ∝ ( ϖ phot ϖ m i n + δ ϖ ) 3 N ( ϖ obs ∣ ϖ phot − δ ϖ , σ ϖ 2 ) . (67)
Magnitude selection
We now consider a selection on the Wesenheit magnitude, S ( m ) = Θ ( m H , max W − m H , o b s W ) S(m)=\Theta(m_{H,\max}^W-m_{H,\mathrm{obs}}^W) S ( m ) = Θ ( m H , m a x W − m H , obs W ) , imposing a faint-end limit. As before, because S S S depends on m H , o b s W m_{H,\mathrm{obs}}^W m H , obs W rather than ϖ o b s \varpi_{\mathrm{obs}} ϖ obs , the parallax likelihood integrates to unity over ϖ o b s \varpi_{\mathrm{obs}} ϖ obs . Integrating the magnitude likelihood against the selection,
∫ − ∞ m H , max W d m N ( m ∣ M + μ ( d ) , σ 1 2 ) = Φ ( m H , max W − M − μ ( d ) σ 1 ) , (68) \int_{-\infty}^{m_{H,\max}^W}\mathrm{d}m\,\mathcal{N}(m\mid M+\mu(d),\sigma_1^2)=\Phi\left(\frac{m_{H,\max}^W-M-\mu(d)}{\sigma_1}\right), \tag*{(68)} ∫ − ∞ m H , m a x W d m N ( m ∣ M + μ ( d ) , σ 1 2 ) = Φ ( σ 1 m H , m a x W − M − μ ( d ) ) , (68)
so the marginalised detection probability becomes
p ( S = 1 ∣ θ ) ∝ ∫ 0 ∞ d d d 2 Φ ( m H , max W − M − μ ( d ) σ 1 ) , (69) p(S=1\mid\theta)\propto\int_0^\infty\mathrm{d}d\,d^2\Phi\left(\frac{m_{H,\max}^W-M-\mu(d)}{\sigma_1}\right), \tag*{(69)} p ( S = 1 ∣ θ ) ∝ ∫ 0 ∞ d d d 2 Φ ( σ 1 m H , m a x W − M − μ ( d ) ) , (69)
which, unlike the parallax selection of Eq. (65) , depends on the period–luminosity relation parameters through M M M (but not δ ϖ \delta_\varpi δ ϖ ). In a similar sharp-cut limit (σ 1 → 0 \sigma_1 \to0 σ 1 → 0 ), the step function imposes an upper distance cut at d max d_{\max} d m a x defined by μ ( d max ) = m H , max W − M \mu(d_{\max}) = m^{W}_{H,\max} - M μ ( d m a x ) = m H , m a x W − M , corresponding to
ϖ min ( m ) ≡ 1 / d max = 10 − 0.2 ( m H , max W − M − 10 ) . (70) \varpi_{\min}^{(m)} \equiv1/d_{\max} = 10^{-0.2\left(m^{W}_{H,\max}-M-10\right)} . \tag*{(70)} ϖ m i n ( m ) ≡ 1/ d m a x = 1 0 − 0.2 ( m H , m a x W − M − 10 ) . (70)
The integral then evaluates to
p ( S = 1 ∣ θ ) ∝ d max 3 = ( ϖ min ( m ) ) − 3 . (71) p(S = 1 \mid\theta) \propto d_{\max}^{3} = \left(\varpi_{\min}^{(m)}\right)^{-3}. \tag*{(71)} p ( S = 1 ∣ θ ) ∝ d m a x 3 = ( ϖ m i n ( m ) ) − 3 . (71)
The parallax ratio entering the selection-adjusted likelihood is
ϖ min ( m ) ϖ p h o t = 10 − 0.2 ( m H , max W − M − 10 ) 10 − 0.2 ( m H , o b s W − M − 10 ) = 10 − 0.2 ( m H , max W − m H , o b s W ) , (72) \frac{\varpi_{\min}^{(m)}}{\varpi_{\mathrm{phot}}}
=
\frac{10^{-0.2\left(m^{W}_{H,\max}-M-10\right)}}{10^{-0.2\left(m^{W}_{H,\mathrm{obs}}-M-10\right)}}
= 10^{-0.2\left(m^{W}_{H,\max}-m^{W}_{H,\mathrm{obs}}\right)}, \tag*{(72)} ϖ phot ϖ m i n ( m ) = 1 0 − 0.2 ( m H , obs W − M − 10 ) 1 0 − 0.2 ( m H , m a x W − M − 10 ) = 1 0 − 0.2 ( m H , m a x W − m H , obs W ) , (72)
which is a per-star constant independent of θ \theta θ . The selection-adjusted marginal likelihood under a magnitude cut therefore reduces to
L m a r g p ( S = 1 ∣ θ ) ∝ N ( ϖ o b s ∣ ϖ p h o t − δ ϖ , σ ~ ϖ 2 ) . (73) \frac{\mathcal{L}^{\mathrm{marg}}}{p(S = 1 \mid\theta)}
\propto\mathcal{N}\left(\varpi_{\mathrm{obs}} \mid\varpi_{\mathrm{phot}}-\delta_\varpi,\widetilde{\sigma}_\varpi^2\right). \tag*{(73)} p ( S = 1 ∣ θ ) L marg ∝ N ( ϖ obs ∣ ϖ phot − δ ϖ , σ ϖ 2 ) . (73)
Summary
The results above rest on two approximations: the linearisation of μ ( ϖ ) \mu(\varpi) μ ( ϖ ) , which is accurate when the intrinsic magnitude scatter σ 1 \sigma_1 σ 1 is small, and the sharp-cut evaluation of the detection probabilities, which assumes that observational errors have a negligible effect on the selection. Had we instead adopted π ( d ) ∝ d k \pi(d) \propto d^k π ( d ) ∝ d k for arbitrary k k k , the prefactor and detection probability would both scale as the ( k + 1 ) (k + 1) ( k + 1 ) -th power of the geometric parallax: the magnitude-selection cancellation would remain exact, and the parallax-selection ratio would retain the same structure with exponent k + 1 k+1 k + 1 in place of 3. The Galactic thin-disc prior used in the main text is not a simple power law, so the magnitude-selection cancellation is no longer exact; the ratio ϖ min ( m ) / ϖ p h o t \varpi_{\min}^{(m)}/\varpi_{\mathrm{phot}} ϖ m i n ( m ) / ϖ phot remains a per-star constant, but the prior-dependent prefactor no longer reduces to a simple power of this ratio. We verify in the main text that the choice of distance prior has a negligible effect on the inferred parameters once the selection is self-consistently accounted for in the forward model, because the per-star likelihood localises each distance to a narrow range over which the disc geometry varies minimally. In Appendix C we show on mock data that for both magnitude- and parallax-selected samples, the linearised Gaussian with selection and the χ 2 \chi^2 χ 2 approach yield consistent results, with neither exhibiting significant bias in the inferred period–luminosity parameters.
For a magnitude-selected sample, the linearised Gaussian per-star likelihood differs from the χ 2 \chi^2 χ 2 only by the prefactor
1 σ ~ ϖ = 1 ( ln 10 5 ) 2 ϖ p h o t 2 σ 1 2 + σ ϖ 2 . (74) \frac{1}{\widetilde{\sigma}_\varpi}
=
\frac{1}{\sqrt{\left(\frac{\ln10}{5}\right)^2\varpi_{\mathrm{phot}}^2\sigma_1^2+\sigma_\varpi^2}} . \tag*{(74)} σ ϖ 1 = ( 5 l n 10 ) 2 ϖ phot 2 σ 1 2 + σ ϖ 2 1 . (74)
Because the parallax measurement uncertainty dominates the error budget, with the photometric contribution ( ln 10 / 5 ) ϖ p h o t σ 1 (\ln10/5)\varpi_{\mathrm{phot}}\sigma_1 ( ln 10/5 ) ϖ phot σ 1 being small when the intrinsic scatter σ 1 \sigma_1 σ 1 is small, we have σ ~ ϖ ≈ σ ϖ \widetilde{\sigma}_\varpi\approx\sigma_\varpi σ ϖ ≈ σ ϖ , a per-star constant independent of the model parameters θ \theta θ . The prefactor therefore drops out of the posterior and the two methods yield identical inferences.
For a parallax-selected sample, the linearised Gaussian carries an additional factor
( ϖ min + δ ϖ ϖ p h o t ) 3 1 σ ~ ϖ . (75) \left(\frac{\varpi_{\min}+\delta_\varpi}{\varpi_{\mathrm{phot}}}\right)^3 \frac{1}{\widetilde{\sigma}_\varpi}. \tag*{(75)} ( ϖ phot ϖ m i n + δ ϖ ) 3 σ ϖ 1 . (75)
The 1 / σ ~ ϖ 1/\widetilde{\sigma}_\varpi 1/ σ ϖ term is again negligible for the same reason. The cubic ratio in principle depends on θ \theta θ through both ϖ p h o t \varpi_{\mathrm{phot}} ϖ phot and δ ϖ \delta_\varpi δ ϖ ; however, since ∣ δ ϖ ∣ ∼ 10 μ a s |\delta_\varpi| \sim10\ \mu\mathrm{as} ∣ δ ϖ ∣ ∼ 10 μ as is much smaller than the selection threshold ϖ min = 800 μ a s \varpi_{\min} = 800\ \mathrm{\mu as} ϖ m i n = 800 μ as , the numerator ϖ min + δ ϖ ≈ ϖ min \varpi_{\min}+\delta_\varpi\approx\varpi_{\min} ϖ m i n + δ ϖ ≈ ϖ m i n is effectively constant with respect to δ ϖ \delta_\varpi δ ϖ . The ratio then reduces to ( ϖ min / ϖ p h o t ) 3 (\varpi_{\min}/\varpi_{\mathrm{phot}})^3 ( ϖ m i n / ϖ phot ) 3 , which still depends on θ \theta θ through ϖ p h o t \varpi_{\mathrm{phot}} ϖ phot , but for most C27 stars the photometric parallax is close to the selection threshold (ϖ p h o t ≈ ϖ min \varpi_{\mathrm{phot}} \approx\varpi_{\min} ϖ phot ≈ ϖ m i n ), driving this ratio towards unity. The entire correction factor is therefore approximately negligible. In Appendix C we verify these conclusions on mock data, additionally testing the full forward model derived in the main text and probing the effect of higher intrinsic scatter.
Validation on mock data
We validate the inference framework on mock catalogues that mimic the C22 and C27 observational campaigns separately, isolating the effect of the magnitude-limited and parallax-limited selection functions.
For each mock realisation, we generate a parent population of Cepheids as follows. Per-star distances are drawn from a uniform-in-volume prior (adopted for simplicity in this mock example),
π ( d ) ∝ d 2 , d ∈ [ 0.3 , d max ] k p c , (76) \pi(d) \propto d^2,\qquad d \in[0.3,d_{\max}]\ \mathrm{kpc}, \tag*{(76)} π ( d ) ∝ d 2 , d ∈ [ 0.3 , d m a x ] kpc , (76)
where d max = 10 k p c d_{\max}=10\ \mathrm{kpc} d m a x = 10 kpc for the C22 mock and d max = 2 k p c d_{\max}=2\ \mathrm{kpc} d m a x = 2 kpc for the C27 mock; in both cases d max d_{\max} d m a x is much larger than the distances of any stars retained after selection, so the upper boundary does not affect the selected sample. The parent population sizes N p a r e n t = 2000 N_{\mathrm{parent}}=2000 N parent = 2000 for C22 and N p a r e n t = 100 N_{\mathrm{parent}}=100 N parent = 100 for C27 are chosen so that after selection the mock catalogues contain approximately 47 and 26 stars, respectively, comparable to the real samples. True pulsation periods and metallicities are drawn from Gaussian distributions,
log P ∼ N ( μ log P , σ log P 2 ) , \log P \sim\mathcal{N}(\mu_{\log P},\sigma_{\log P}^2), log P ∼ N ( μ l o g P , σ l o g P 2 ) ,
[ O / H ] ∼ N ( 0 , 0.15 2 ) , (77) [\mathrm{O}/\mathrm{H}] \sim\mathcal{N}(0,0.15^2), \tag*{(77)} [ O / H ] ∼ N ( 0 , 0.1 5 2 ) , (77)
with ( μ log P , σ log P ) = ( 0.8 , 0.3 ) (\mu_{\log P},\sigma_{\log P})=(0.8,0.3) ( μ l o g P , σ l o g P ) = ( 0.8 , 0.3 ) for C22 and ( 0.75 , 0.2 ) (0.75,0.2) ( 0.75 , 0.2 ) for C27. Given the sampled distances, periods, and metallicities, we compute absolute Wesenheit magnitudes from the period–luminosity relation in Eq. (8) with baseline parameters ( M H , 1 W , b W , Z W ) = ( − 5.90 , − 3.30 , − 0.22 ) (M^{W}_{H,1},b_{W},Z_{W})=(-5.90,-3.30,-0.22) ( M H , 1 W , b W , Z W ) = ( − 5.90 , − 3.30 , − 0.22 ) and intrinsic scatter σ i n t = 0.06 \sigma_{\mathrm{int}}=0.06 σ int = 0.06 mag. Observed magnitudes and parallaxes are then drawn from the per-star likelihoods,
m H , o b s W ∼ N ( m H W , σ m 2 + σ i n t 2 ) , m^{W}_{H,\mathrm{obs}} \sim\mathcal{N}\left(m^{W}_{H},\sigma_m^2+\sigma_{\mathrm{int}}^2\right), m H , obs W ∼ N ( m H W , σ m 2 + σ int 2 ) ,
ϖ o b s ∼ N ( 1 / d i − δ ϖ , σ ϖ 2 ) , (78) \varpi_{\mathrm{obs}} \sim\mathcal{N}\left(1/d_i-\delta_\varpi,\sigma_\varpi^2\right), \tag*{(78)} ϖ obs ∼ N ( 1/ d i − δ ϖ , σ ϖ 2 ) , (78)
with σ m = 0.028 \sigma_m=0.028 σ m = 0.028 mag, σ ϖ = 0.019 \sigma_\varpi=0.019 σ ϖ = 0.019 mas (matching the median uncertainties of the MW Cepheid catalogue), and baseline offset δ ϖ = − 0.014 \delta_\varpi=-0.014 δ ϖ = − 0.014 mas.
The selection function is then applied to the parent sample. For C22, we impose an upper apparent-magnitude limit m H W < 6.5 m^{W}_{H}<6.5 m H W < 6.5 mag and a lower period cut P > 8 P>8 P > 8 days. For C27, we impose a lower parallax cut with threshold ϖ min = 0.8 \varpi_{\min}=0.8 ϖ m i n = 0.8 mas and transition width w ϖ = 0.05 w_{\varpi}=0.05 w ϖ = 0.05 mas; we verify that selecting instead on the photometric parallax with period–luminosity parameters slightly offset from the true values yields no significant difference in the bias tests. We adopt wide uniform priors on all inferred parameters.
We compare three inference approaches applied to each mock: (i) the linearised Gaussian likelihood in Eq. (62) , incorporating the magnitude-selection factor for C22 in Eq. (73) and the parallax-selection factor for C27 in Eq. (67) ; (ii) the R21 χ 2 \chi^2 χ 2 method in Eq. (49) , which does not model selection explicitly; and (iii) the full forward model derived in the main text, which samples per-star distances from the disc prior and self-consistently accounts for selection. For each mock realisation and inference method, we record the normalised bias for each parameter θ \theta θ ,
b θ = θ ^ − θ t r u e σ θ , (79) b_\theta=\frac{\hat{\theta}-\theta_{\mathrm{true}}}{\sigma_\theta}, \tag*{(79)} b θ = σ θ θ ^ − θ true , (79)
where θ ^ \hat{\theta} θ ^ and σ θ \sigma_\theta σ θ are the posterior mean and standard deviation. For an unbiased result with correct uncertainty calibration and approximately Gaussian posteriors away from prior boundaries, b θ b_\theta b θ follows a standard normal distribution across realisations; both conditions are satisfied here. We repeat the test at two values of the intrinsic scatter: σ i n t = 0.06 \sigma_{\mathrm{int}}=0.06 σ int = 0.06 mag, consistent with the value inferred from the real data, and an artificially inflated σ i n t = 0.15 \sigma_{\mathrm{int}}=0.15 σ int = 0.15 mag to probe the regime in which the approximations of Appendix B begin to break down.
Figure C1 shows the distribution of b θ b_\theta b θ for all inferred parameters over 10 000 mock realisations. At the baseline scatter (Figure C1 a), all three methods recover the input parameters without significant bias for both C22 and C27, with the χ 2 \chi^2 χ 2 method showing only a modest 0.26 σ 0.26\sigma 0.26 σ bias in δ ϖ \delta\varpi δ ϖ for C27, consistent with the parallax truncation effect derived in § 10.1 . The slope b W b_W b W is similarly unbiased across all configurations. The metallicity coefficient Z W Z_W Z W shows a ∼ 0.3 σ \sim0.3\sigma ∼ 0.3 σ bias under both the χ 2 \chi^2 χ 2 and linearised Gaussian methods, because neither accounts for the intrinsic scatter of the metallicity values; the forward model, which does, recovers Z W Z_W Z W without bias.
Figure C1. Normalised bias b θ = ( θ ^ − θ t r u e ) / σ θ b_\theta= (\hat{\theta}-\theta_{\mathrm{true}})/\sigma_\theta b θ = ( θ ^ − θ true ) / σ θ over 10 000 mock realisations of C22 (upper rows) and C27 (lower rows), for the linearised Gaussian (red), the R21 χ 2 \chi^2 χ 2 (green), and the forward model (blue). The dashed curve is N ( 0 , 1 ) \mathcal{N}(0,1) N ( 0 , 1 ) . At the baseline scatter (panel a), all three methods are approximately unbiased (Appendix § 10 ). At inflated scatter (panel b), the χ 2 \chi^2 χ 2 method develops significant biases in M H , 1 W M^{W}_{H,1} M H , 1 W and δ ϖ \delta_\varpi δ ϖ for C22, while the other two remain well calibrated. Annotations give the mean and standard deviation of b θ b_\theta b θ .
At the inflated scatter (Figure C1 b), the χ 2 \chi^2 χ 2 method develops mild biases for C22: 0.69 σ 0.69\sigma 0.69 σ in M H , 1 W M^{W}_{H,1} M H , 1 W and 1.03 σ 1.03\sigma 1.03 σ in δ ϖ \delta\varpi δ ϖ , while the linearised Gaussian shows a smaller 0.43 σ 0.43\sigma 0.43 σ bias in M H , 1 W M^{W}_{H,1} M H , 1 W . The forward model remains well calibrated throughout. This demonstrates that, at the baseline scatter of the real data, the approximations underlying the χ 2 \chi^2 χ 2 and linearised Gaussian methods are reasonable, but would break down were the intrinsic scatter substantially larger.
Posterior robustness checks
Figure D1 compares the baseline posterior—with separate per-campaign MW intrinsic scatters σ i n t C 22 = 0.071 ± 0.022 \sigma_{\mathrm{int}}^{\mathrm{C22}}=0.071\pm0.022 σ int C22 = 0.071 ± 0.022 mag and σ i n t C 27 = 0.041 ± 0.015 \sigma_{\mathrm{int}}^{\mathrm{C27}}=0.041\pm0.015 σ int C27 = 0.041 ± 0.015 mag (§ 4.1 )—with the variant that collapses these into a single shared MW value. The posteriors of M H , 1 W M^{W}_{H,1} M H , 1 W , b W b_W b W , and δ ϖ \delta\varpi δ ϖ are nearly unchanged: the posterior-mean shifts are 0.006 0.006 0.006 mag in M H , 1 W M^{W}_{H,1} M H , 1 W , 0.002 0.002 0.002 in b W b_W b W , and 0.2 μ a s 0.2\,\mu\mathrm{as} 0.2 μ as in δ ϖ \delta\varpi δ ϖ , corresponding to 0.19 0.19 0.19 , 0.06 0.06 0.06 , and 0.02 0.02 0.02 times the combined posterior standard deviation, respectively. The period–luminosity calibration is therefore insensitive to this choice of intrinsic-scatter parametrisation.
Figure D2 extends the baseline contour of Figure 4 (C22 + C27 + LMC + N4258 with the disc prior and selection modelling) by also showing the inferred selection thresholds jointly with the period–luminosity parameters. The thresholds are only weakly correlated with the physical calibration: the largest linear (Pearson) correlation is ρ = 0.11 \rho=0.11 ρ = 0.11 between the C22 magnitude cut and δ W \delta_W δ W , followed by ρ = 0.08 \rho=0.08 ρ = 0.08 between the C22 parallax cut and δ ϖ \delta_\varpi δ ϖ , while all remaining threshold–calibration coefficients have ∣ ρ ∣ < 0.03 |\rho|<0.03 ∣ ρ ∣ < 0.03 , though some of the posteriors are non-Gaussian. The inferred period–luminosity parameters are therefore at most weakly degenerate with the selection thresholds.
Figure D2. Joint posterior of the inferred selection thresholds and the period–luminosity parameters in the baseline forward model (C22 + C27 + LMC + N4258), extending the red contour of Figure 4 . The parallax offset δ ϖ \delta\varpi δ ϖ is in μ a s \mu\mathrm{as} μ as ; contours show the 1 σ 1\sigma 1 σ and 2 σ 2\sigma 2 σ credible regions.
Spiral arm modulation of the distance prior
MW Cepheids are young stars that trace the Galactic spiral structure. This axisymmetric disc prior of Eq. (2) does not capture this azimuthal dependence and may therefore assign non-negligible probability to inter-arm regions where few Cepheids reside. We optionally modulate the disc prior with a spiral arm density profile to test whether accounting for this structure affects the inferred parameters.
We adopt the four-arm log-periodic spiral model of Drimmel et al. (2025), derived from 2857 classical Cepheids with WISE mid-infrared distances (Skowron et al. 2025). The four arms—Scutum, Sagittarius–Carina, Local (Orion), and Perseus—are each described by a trace in the Galactic plane, parametrised as
ln R = ln R 0 , k − tan ψ k ϕ , (80) \ln R=\ln R_{0,k}-\tan\psi_k\,\phi, \tag*{(80)} ln R = ln R 0 , k − tan ψ k ϕ , (80)
where R R R is the Galactocentric radius, ϕ \phi ϕ the azimuthal angle, R 0 , k R_{0,k} R 0 , k the reference radius, and ψ k \psi_k ψ k the pitch angle of the k t h k^{\mathrm{th}} k th arm.
The spiral-modulated prior is the joint position density of Eq. (2) scaled by a factor that enhances the density near the arm traces:
π ( d i , ℓ i , b i ) ∝ π d i s c ( d i , ℓ i , b i ) S a r m ( d i , ℓ i , b i ) , (81) \pi(d_i,\ell_i,b_i)\propto\pi_{\mathrm{disc}}(d_i,\ell_i,b_i)\,S_{\mathrm{arm}}(d_i,\ell_i,b_i), \tag*{(81)} π ( d i , ℓ i , b i ) ∝ π disc ( d i , ℓ i , b i ) S arm ( d i , ℓ i , b i ) , (81)
where the spiral modulation factor is
S a r m = ( 1 − f a r m ) + f a r m ∑ k = 1 4 exp ( − Δ k 2 2 σ a r m 2 ) , (82) S_{\mathrm{arm}}=(1-f_{\mathrm{arm}})+f_{\mathrm{arm}}\sum_{k=1}^{4}\exp\left(-\frac{\Delta_k^2}{2\sigma_{\mathrm{arm}}^2}\right), \tag*{(82)} S arm = ( 1 − f arm ) + f arm k = 1 ∑ 4 exp ( − 2 σ arm 2 Δ k 2 ) , (82)
π d i s c \pi_{\mathrm{disc}} π disc is the joint position density of Eq. (2) , Δ k ( d i , ℓ i , b i ) \Delta_k(d_i,\ell_i,b_i) Δ k ( d i , ℓ i , b i ) is the projected distance in the Galactic plane from the Cepheid to the nearest point on the k t h k^{\mathrm{th}} k th arm trace, f a r m ∈ [ 0 , 1 ] f_{\mathrm{arm}}\in[0,1] f arm ∈ [ 0 , 1 ] is the fraction of the Cepheid surface density attributed to spiral arms, and σ a r m \sigma_{\mathrm{arm}} σ arm is the Gaussian arm width. When f a r m = 0 f_{\mathrm{arm}}=0 f arm = 0 , the spiral factor reduces to unity and the axisymmetric disc prior is recovered. At the opposite limit f a r m = 1 f_{\mathrm{arm}}=1 f arm = 1 , the prior is concentrated entirely on the arm traces. Both f a r m f_{\mathrm{arm}} f arm and σ a r m \sigma_{\mathrm{arm}} σ arm are sampled as free parameters: f a r m f_{\mathrm{arm}} f arm with a uniform prior on [ 0 , 1 ] [0,1] [ 0 , 1 ] and σ a r m \sigma_{\mathrm{arm}} σ arm with a half-normal prior N + ( 0.3 , 0.2 2 ) \mathcal{N}^{+}(0.3,0.2^2) N + ( 0.3 , 0. 2 2 ) kpc, truncated at zero.
The nearest-point distances Δ k \Delta_k Δ k are computed by converting the heliocentric coordinates ( d i , ℓ i , b i ) (d_i,\ell_i,b_i) ( d i , ℓ i , b i ) to Galactocentric Cartesian coordinates ( x G C , y G C ) (x_{\mathrm{GC}},y_{\mathrm{GC}}) ( x GC , y GC ) in the midplane and querying a KD-tree built from the densified arm traces of Drimmel et al. (2025). Because the arm traces are fixed, the squared distances Δ k 2 \Delta_k^2 Δ k 2 for each sightline on a fine distance grid are precomputed and cached; at inference time, the spiral factor is evaluated by interpolating Δ k 2 \Delta_k^2 Δ k 2 to the sampled distance d i d_i d i . The prior of Eq. (81) is normalised numerically per sightline via Simpson’s rule on the same grid. An analogous precomputation is performed for the Monte Carlo sightlines entering the detection probability of Eq. (38) , ensuring that the spiral modulation propagates consistently into both the per-star prior and the selection modelling. As reported in Table 4 , the spiral-arm-modulated prior leaves
the posteriors virtually unchanged relative to the axisymmetric disc prior.
Per-star distance comparison
The forward model samples a distance d i d_i d i for each MW Cepheid. Converting these to distance moduli μ f o r w a r d , i = 5 log ( d i / k p c ) + 10 \mu_{\mathrm{forward},i} = 5\log(d_i/\mathrm{kpc})+10 μ forward , i = 5 log ( d i / kpc ) + 10 provides a direct comparison with the photometric distance moduli μ S H 0 E S \mu_{\mathrm{SH0ES}} μ SH0ES predicted from the baseline SH0ES period–luminosity parameters (M H , 1 W = − 5.894 M^{W}_{H,1}=-5.894 M H , 1 W = − 5.894 mag, b W = − 3.299 b_W=-3.299 b W = − 3.299 , Z W = − 0.217 Z_W=-0.217 Z W = − 0.217 ). Figure F1 shows the per-star residuals ⟨ μ f o r w a r d ⟩ − μ S H 0 E S \langle\mu_{\mathrm{forward}}\rangle-\mu_{\mathrm{SH0ES}} ⟨ μ forward ⟩ − μ SH0ES for both the MW-only and baseline models. The residuals scatter about zero with only a minor systematic offset. Including the LMC and N4258 tightens the period–luminosity relation but does not shift the per-star distance posteriors.
Figure F1. Per-star distance modulus residuals ⟨ μ f o r w a r d ⟩ − μ S H 0 E S \langle\mu_{\mathrm{forward}}\rangle- \mu_{\mathrm{SH0ES}} ⟨ μ forward ⟩ − μ SH0ES for each MW Cepheid, comparing the MW-only model (blue) and the baseline model including the LMC and N4258 (red). The reference μ S H 0 E S \mu_{\mathrm{SH0ES}} μ SH0ES is computed from the observed Wesenheit magnitude and the baseline SH0ES period–luminosity parameters. Error bars span the 16th–84th percentiles of the posterior. Stars are sorted alphabetically by name; vertical grid lines indicate individual Cepheids.
Figure F2 shows the distribution of the posterior-mean residuals from the baseline C22 + C27 + LMC + N4258 inference, split by campaign. The C22 residuals have a mean offset of +0.004 mag with a standard deviation of 0.042 mag, while the C27 residuals have a mean of +0.025 mag and a standard deviation of 0.030 mag. The positive C27 offset is expected: the reference μ S H 0 E S \mu_{\mathrm{SH0ES}} μ SH0ES is computed from the baseline SH0ES zero-point (M H , 1 W = − 5.894 M^{W}_{H,1}=-5.894 M H , 1 W = − 5.894 mag), which is 0.015 mag fainter than our baseline value (M H , 1 W = − 5.909 M^{W}_{H,1}=-5.909 M H , 1 W = − 5.909 mag), predicting systematically shorter SH0ES distances and hence positive residuals.
Figure F2. Distribution of per-star posterior-mean distance modulus residuals ⟨ μ f o r w a r d ⟩ − μ S H 0 E S \langle\mu_{\mathrm{forward}}\rangle- \mu_{\mathrm{SH0ES}} ⟨ μ forward ⟩ − μ SH0ES for C22 (red) and C27 (blue) from the baseline model. Dashed curves show zero-mean Gaussians with standard deviations matched to each campaign.
This paper has been typeset from a TeX/LaTeX file prepared by the author.