def mean(self, setting: InitObsSetting, *, atol: float = 1e-8):
        """Estimates of the mean of `setting`."""
        if len(self.bitstrings) == 0:
            raise ValueError("No measurements")
        self._validate_setting(setting, what='mean')

        mean, _ = _stats_from_measurements(
            bitstrings=self.bitstrings,
            qubit_to_index=self._qubit_to_index,
            observable=setting.observable,
            atol=atol,
        )

        if self._readout_calibration is not None:
            ro_setting = _setting_to_z_observable(setting)
            return mean / self._readout_calibration.mean(ro_setting, atol=atol)

        return mean
Estimates of the mean of `setting`.
cirq-core/cirq/work/observable_measurement_data.py