Continuous distribution · also called Maxwell

Maxwell–Boltzmann distribution

The length of a three-dimensional vector whose components are independent normals with mean 0 and standard deviation . In physics it is the distribution of molecular speeds in an ideal gas, with for temperature and molecular mass . It is the three-dimensional cousin of the Rayleigh distribution, and times the square root of a Chi-squared().

Maxwell–Boltzmann probability calculator

P(X ≤ 1.5) = 0.477833

At the parameters set by the sliders. The shaded region on the plot is the probability; the dots on the CDF mark F at its ends.

PDF

00.20.40.602468f(x)mean

CDF

00.250.50.75102468F(x)

mean 1.596 · variance 0.4535 · sd 0.6734 · mode 1.414 · entropy 0.9962 nats

Formulas

Parameters
  • , the scale (the standard deviation of each component)
Support
PDF
CDF
Mean
Variance
Mode
Entropy

is the Euler–Mascheroni constant. SciPy's maxwell takes as scale.

Worked example

Nitrogen molecules ( u) in air at 300 K. What is their mean speed?

m/s, so the mean speed is m/s. The most likely speed is lower, m/s. answer checked by code

How it relates to others

All the relationships, as a diagram →

In Python

from scipy import stats
import numpy as np

X = stats.maxwell(scale=1)
X.pdf(1.5)  # f(1.5) = 0.5828
X.cdf(1.5)  # P(X ≤ 1.5) = 0.4778
X.mean(), X.var()  # 1.596, 0.4535
X.ppf(0.95)  # 95th percentile
X.rvs(size=10, random_state=0)

rng = np.random.default_rng(0)
np.sqrt(rng.chisquare(df=3, size=10))

NumPy has no Maxwell sampler: multiply the square root of a chi-squared(3) by a.

Choosing between this and its neighbours? Which distribution for measurements and errors?

← RiceGompertz →