In a state of dynamical equilibrium, this speed must also be equal to v = μmg. Both expressions for v are proportional to mg, reflecting that the derivation is independent of the type of forces considered. Similarly, one can derive an equivalent formula for identical charged particles of charge q in a uniform electric field of magnitude E, where mg is replaced with the electrostatic force qE. Equating these two expressions yields the Einstein relation for the diffusivity, independent of mg or qE or other such forces: E [ x 2 ] 2 t = D = μ μ k B T = μ μ R T N A = R T 6 π π η η r N A . Here the first equality follows from the first part of Einstein's theory, the third equality follows from the definition of the Boltzmann constant as k B = R / N A, and the fourth equality follows from Stokes's formula for the mobility. By measuring the mean squared displacement over a time interval along with the universal gas constant R, the temperature T, the viscosity η, and the particle radius r, the Avogadro constant N A can be determined.