  We make an in-depth comparison of the IllustrisTNG simulations with
observational data on the quenched fractions of central and satellite galaxies,
for $M_*=10^{9-12}M_{\odot}$ at $0\leq z\leq3$. We study how analysis
methodologies and observational effects impact this comparison. This includes
measurement choices -- aperture, quenched definition, star formation rate (SFR)
indicator timescale -- as well as observational uncertainties and sample
selection issues: projection effects, satellite/central misclassification, and
host mass distribution sampling. The definition used to separate quenched and
star-forming galaxies produces differences of up to 70 (30)$\%$ for centrals
(satellites) $>\sim 10^{10.5} M_{\odot}$. Increasing the aperture within which
SFR is measured can suppress the quenched fractions by up to $\sim50\%$,
particularly at $z\gtrsim2$. Proper consideration of the stellar and host mass
distributions is crucial: naive comparisons to volume-limited samples from
simulations lead to misinterpretation of the quenched fractions as a function
of $z$ by up to 20$\%$. Including observational uncertainties to theoretical
values of $M_*$ and SFR changes the quenched fraction values and their trend
and/or slope with mass. Taking projected rather than 3D distances for
satellites decreases the quenched fractions by up to 10$\%$ due to field
contamination. Comparing with data, TNG produces quenched fractions broadly
consistent with observations. TNG predicts quenched fractions up to
$\sim80-90\%$ for centrals at $z\leq2-3$, in line with recent observations, and
notably higher than other theoretical models. The quantitative agreement of TNG
and SDSS for satellite quenched fractions in groups and clusters depends
strongly on the galaxy and host mass range. Our mock comparison between TNG and
SDSS highlights the importance of properly accounting for observational effects
and biases.
