  We investigate the fraction of baryon mass in intergalactic medium
($f_\mathrm{IGM}$), using 18 well-localized FRBs in the redshift range $z\in
(0.0039,0.66)$. We construct a five-parameter Bayesian inference model, with
the probability distributions of dispersion measures (DM) of IGM and host
galaxy properly taken into account. To check the possible redshift evolution,
we parameterize $f_\mathrm{IGM}$ as a mildly evolving function of redshift,
$f_\mathrm{IGM}=f_\mathrm{IGM,0}[1+\alpha z/(1+z)]$. By simultaneously
constraining five parameters, we get $f_\mathrm{IGM,0} = 0.92^{+0.06}_{-0.12}$
and $\alpha = 0.49^{+0.59}_{-0.47}$, and the median value of DM of host galaxy
is $\exp(\mu)=72.49^{+33.31}_{-25.62}~{\rm pc ~ cm ^ {-3}}$. By fixing two
parameters which can be constrained independently with other observations, we
obtain $\alpha =0.11^{+0.24}_{-0.27}$ in the three-parameter fit, which is
consistent with zero within $1\sigma$ uncertainty. Monte Carlo simulations show
that even 300 FRBs are not enough to tightly constrain five parameters
simultaneously. This is mainly caused by the correlation between parameters.
Only if two parameters are fixed, 100 FRBs are necessary to achieve unbiased
constraints on the remaining parameters.
