---
title: "Adding up electrons across an expanding universe"
description: "Derive the mean dispersion-redshift relation from the baryon density, check it against closed-form limits, and see how it measures the diffuse gas."
canonical_url: "https://sandboxphysics.com/stories/frb-baryon-census/adding-up-electrons-across-the-universe/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/frb-baryon-census/adding-up-electrons-across-the-universe/"
last_modified: "2026-11-14"
---

[Fast radio bursts and the cosmic baryon census](https://sandboxphysics.com/stories/frb-baryon-census/)

# Adding up electrons across an expanding universe

Sandbox Physics · 2026-11-14

The average cosmic dispersion measure out to redshift $z$ is the mean free-electron density today times the Hubble distance times one integral over redshift. With the Planck 2015 baryon density and 85 percent of the baryons in diffuse ionised gas, it is $84\,\mathrm{pc\,cm^{-3}}$ at $z=0.1$, $449$ at $z=0.5$ and $918$ at $z=1$. This chapter builds that curve from the baryon density, checks it against two universes where the integral has a closed form, and shows what a measurement of the curve tells you: the product of the diffuse fraction and $\Omega_{\mathrm b}h_{70}$.

The previous chapter, [How free electrons delay a radio burst](https://sandboxphysics.com/stories/frb-baryon-census/how-plasma-delays-a-radio-burst/), defined the dispersion measure. Here you also need the Hubble parameter $H(z)$ and the comoving distance.

## How many free electrons there are per cubic metre

Today's mean baryon density is $\rho_{\mathrm b,0}=\Omega_{\mathrm b}\rho_{\mathrm c,0}$, with $\rho_{\mathrm c,0}=3H_0^2/(8\pi G)$. Ionised hydrogen gives one electron per proton mass. Helium, with mass fraction $Y$, gives two electrons per four proton masses. The free-electron density of the diffuse gas is therefore

$$
\bar n_{\mathrm e,0}=f_{\mathrm d}\,\frac{\rho_{\mathrm b,0}}{m_{\mathrm p}}\left(1-\frac{Y}{2}\right),
$$

where $f_{\mathrm d}$ is the share of baryons in diffuse ionised gas rather than in stars or cold neutral gas. [Macquart et al., 2020, eq. 2](https://arxiv.org/abs/2005.13161v1)

Worked example: the electron density of the universe today

With $H_0=67.74\,\mathrm{km\,s^{-1}\,Mpc^{-1}}$, $\rho_{\mathrm c,0}=8.619\times10^{-27}\,\mathrm{kg\,m^{-3}}$. Multiplying by $\Omega_{\mathrm b}=0.0486$ gives $\rho_{\mathrm b,0}=4.19\times10^{-28}\,\mathrm{kg\,m^{-3}}$, a quarter of a proton per cubic metre. With $Y=0.25$ the factor $1-Y/2$ is $0.875$, so $\bar n_{\mathrm e,0}=0.219\,\mathrm{m^{-3}}=2.19\times10^{-7}\,\mathrm{cm^{-3}}$ if every baryon were diffuse. With $f_{\mathrm d}=0.85$ it is $1.86\times10^{-7}\,\mathrm{cm^{-3}}$.

## Each slice of the path, carried to today

Take a slice of the path at redshift $z$ with proper length $\mathrm dl$. Its electron density is higher than today by $(1+z)^3$, since the same electrons filled a smaller universe. Its contribution to the observed dispersion measure carries the factor $1/(1+z)$ derived in the previous chapter. The proper length of the slice is $\mathrm dl=c\,\mathrm dz/[(1+z)H(z)]$. Putting the three together,

$$
\mathrm d\langle\mathrm{DM}\rangle=\frac{\bar n_{\mathrm e,0}(1+z)^3}{1+z}\,\frac{c\,\mathrm dz}{(1+z)H(z)}=\frac{\bar n_{\mathrm e,0}\,c}{H_0}\,\frac{(1+z)\,\mathrm dz}{E(z)},
$$

with $E(z)=\sqrt{\Omega_{\mathrm m}(1+z)^3+\Omega_\Lambda}$ for a flat universe of matter and a cosmological constant. Integrating,

$$
\langle\mathrm{DM}_{\mathrm{cosmic}}\rangle(z)=K\int_0^z\frac{1+z'}{E(z')}\,\mathrm dz',\qquad K=\frac{\bar n_{\mathrm e,0}\,c}{H_0}.
$$

For Planck 2015 and $f_{\mathrm d}=0.85$, the Hubble distance $c/H_0$ is $4426\,\mathrm{Mpc}$ and $K=824.3\,\mathrm{pc\,cm^{-3}}$. This is the mean relation drawn as the solid line in Fig. 2 of [Macquart et al., 2020](https://arxiv.org/abs/2005.13161v1), which keeps a slowly varying $f_{\mathrm d}(z)$ where this chapter holds it constant.

**Table 3.1** Mean cosmic dispersion and comoving distance for Planck 2015 with $f_{\mathrm d}=0.85$.

| Redshift | Comoving distance (Mpc) | Mean cosmic DM $(\mathrm{pc\,cm^{-3}})$ |
| --- | --- | --- |
| 0.1 | 432.1 | 84.48 |
| 0.25 | 1040.1 | 217.4 |
| 0.5 | 1945.6 | 448.8 |
| 0.75 | 2725.4 | 684.4 |
| 1.0 | 3396.0 | 918.2 |

## Two universes that check the integral

The integral has a closed form in two limits. In a universe of matter only, $E=(1+z)^{3/2}$ and the integrand is $(1+z)^{-1/2}$. In a universe of vacuum energy only, $E=1$ and the integrand is $1+z$:

$$
\int_0^z\frac{\mathrm dz'}{\sqrt{1+z'}}=2\left(\sqrt{1+z}-1\right),\qquad \int_0^z(1+z')\,\mathrm dz'=z+\frac{z^2}{2}.
$$

At $z=0.5$ these give $0.4495$ and $0.6250$; at $z=1$, $0.8284$ and $1.5000$. Our universe, with $\Omega_{\mathrm m}=0.309$, gives $0.5445$ and $1.1139$, between the two as it must. Matter slows expansion, so a matter-only universe reaches a given redshift over a shorter path and collects fewer electrons.

At low redshift, expanding the integrand gives $\langle\mathrm{DM}\rangle\approx Kz\,[1+(1-\tfrac32\Omega_{\mathrm m})\,z/2]=Kz\,(1+0.268\,z)$. At $z=0.1$ this gives $84.6$, within $0.2\,\%$ of the full integral. The saved materials evaluate the integral by Simpson's rule and by a separately written Gauss–Legendre rule; the two agree to one part in $10^{15}$.

## What a measured curve tells you

Since $\bar n_{\mathrm e,0}\propto\Omega_{\mathrm b}H_0^2$, the constant $K$ is proportional to $f_{\mathrm d}\,\Omega_{\mathrm b}H_0$. $H_0$ does not appear in $E(z)$, so localised bursts measure the product $f_{\mathrm d}\,\Omega_{\mathrm b}h_{70}$, with $h_{70}=H_0/(70\,\mathrm{km\,s^{-1}\,Mpc^{-1}})$. For Planck 2015, $\Omega_{\mathrm b}h_{70}=0.04703$. Fixing $f_{\mathrm d}$ from an independent census of stars and cold gas turns the curve into a measurement of the baryon density. [Macquart et al., 2020, main text after eq. 2](https://arxiv.org/abs/2005.13161v1)

Two shorthand forms circulate. [Petroff et al., 2022, Section 4.1](https://arxiv.org/abs/2107.10113v2) quotes about $1000\,z$ for the intergalactic part with all baryons in the intergalactic medium. Our low-redshift slope with $f_{\mathrm d}=1$ is $969.8$, 3 percent lower. [Connor et al., 2025, eq. 2](https://arxiv.org/abs/2409.16952v2) quotes $1085\,z\,f_{\mathrm d}\,(\Omega_{\mathrm b}h_{70}/0.04703)$ for $z\lesssim1$. That is a chord, not a tangent: at $z=1$ with $f_{\mathrm d}=0.85$ it gives $922.3$, within $0.44\,\%$ of the integral, but at $z=0.1$ it gives $92.2$, 9 percent high.

Worked example: one real burst against the curve

FRB 190711 sits at $z=0.522$ with $\mathrm{DM}=593.1\,\mathrm{pc\,cm^{-3}}$. Removing $80\,\mathrm{pc\,cm^{-3}}$ for the Milky Way leaves $513.1$. The mean cosmic value at that redshift is $469.5$. The remaining $43.6$ is what the host must supply, which corresponds to $43.6\times1.522=66.4\,\mathrm{pc\,cm^{-3}}$ in the host's own frame. The burst agrees with the curve if its host is modest and its sightline is typical.

## Lab task

Lower the diffuse fraction in the Lab from $0.85$ to about $0.4$, the Half the baryons missing preset. The mean curve in the dispersion–redshift chart drops below the real ASKAP bursts. Return to $0.85$ and the bursts sit on or above it, with the host term filling the gap.

## Exercises

1. Show that $1-Y/2$ is the number of free electrons per proton mass in fully ionised gas of hydrogen and helium.
2. By how much does the mean cosmic dispersion at $z=0.3$ fall if $f_{\mathrm d}$ drops from $0.85$ to $0.6$?
3. Use the low-redshift form to estimate the mean at $z=0.25$ and compare with Table 3.1.
4. A colleague uses $1085\,z$ with $f_{\mathrm d}=1$ to predict a burst at $z=0.1$. How large is the error compared with the integral?

Answers

1. Per unit mass, hydrogen contributes $(1-Y)/m_{\mathrm p}$ electrons and helium $2\times Y/(4m_{\mathrm p})=Y/(2m_{\mathrm p})$. The sum is $(1-Y/2)/m_{\mathrm p}$.
2. The mean is proportional to $f_{\mathrm d}$: $263.0\times0.6/0.85=185.6\,\mathrm{pc\,cm^{-3}}$, down by $77.4$.
3. $824.3\times0.25\times(1+0.268\times0.25)=219.9$, against $217.4$ from the full integral: $1.1\,\%$ high, because the next term in $z$ is negative.
4. The integral with $f_{\mathrm d}=1$ at $z=0.1$ is $84.48/0.85=99.4$. The shorthand gives $108.5$, $9\,\%$ too high. Over a large sample this would bias the inferred host contribution low.

## [Try it in the FRB baryon-census Lab](https://sandboxphysics.com/labs/frb-baryon-census/)

Lower the diffuse fraction and watch the mean curve leave the real bursts.

## Sources

1. [Macquart et al., 2020, eq. 2](https://arxiv.org/abs/2005.13161v1)
2. [Petroff et al., 2022, Section 4.1](https://arxiv.org/abs/2107.10113v2)
3. [Connor et al., 2025, eq. 2](https://arxiv.org/abs/2409.16952v2)

## Keep reading

Fast radio bursts and the cosmic baryon census · Reading path

### From one delayed pulse to the missing baryons

1. [Article **How do fast radio bursts count the ordinary matter between galaxies?**](https://sandboxphysics.com/stories/frb-baryon-census/late-radio-waves-count-hidden-electrons/)
2. [Article **How free electrons delay a radio burst**](https://sandboxphysics.com/stories/frb-baryon-census/how-plasma-delays-a-radio-burst/)
3. [You are here **Adding up electrons across an expanding universe**](https://sandboxphysics.com/stories/frb-baryon-census/adding-up-electrons-across-the-universe/)
4. [Article **Why every sightline gives a different dispersion**](https://sandboxphysics.com/stories/frb-baryon-census/why-every-sightline-differs/)
5. [Article **Recompute the localized-burst baryon census**](https://sandboxphysics.com/stories/frb-baryon-census/recompute-the-localized-frb-census/)
6. [Article **Reading the FRB baryon census papers**](https://sandboxphysics.com/stories/frb-baryon-census/reading-the-frb-baryon-census/)
