I want to get a Boltzmann distribution of the $v_x$, $v_y$ and $v_z$ velocity components (please, notice that the distribution is one-dimensional). To do so, I need the cumulative distribution function $F(v_x)$. I can get a random number and set it as $F(v_x)$. After that, how can I get $v_x$ with this information? Is there any other way to get $v_x$ using both, the $F(v_x)$ and the Boltzmann distribution itself?
-
Why do you need cumulative distribution function to obtain the Boltzmann distribution? Why not find the probability density function of velocity straight away, what is the point in finding a cumulative distribution function? And what do you mean by "I can get a random number and set it as $F(v_x)$"? – Ilya Lapan May 18 '16 at 18:26
-
I mean, you can obviously derive Boltzmann-Distribution from canonical ensemble, but I am not sure whether this is what you are looking for. – Ilya Lapan May 18 '16 at 18:38
-
If I pick the velocities from the probability density function straight away I think the final distribution will not follow the Maxwell-Boltzmann distribution. I may need "weighted" random numbers or the CDF to get the distribution I want. – Manuel May 18 '16 at 18:49
-
1I think you are confusing the individual particle velocities with the velocity moments of the distribution function. The argument of $F$ is something you arbitrarily choose. You can leave it as a general expression, e.g., $F = F(v)$, or find the numerical solution at a specific value, e.g., $F(5.5)$ = [some number]. – honeste_vivere May 22 '16 at 18:04
-
3Possible duplicate of Velocity Maxwell-Boltzmann distribution for dummies – Kyle Kanos Oct 27 '17 at 21:30
2 Answers
A Boltzmann distribution is system dependent--it depends on the energy eigenstates. Moreover, if the system lacks symmetry, then Vx, Vy, and Vz may have very different distributions. However, if you're talking about an ideal gas--then it's the standard Maxwell-Boltzmann distribution. To get just Vx, you can use the equal-parition property, and rewrite a 1-d distribution accordingly. Or: you can compute a 3D distribution's magnitude and randomly orient it on a sphere (uniform in cos(theta) and phi), taking the x-projection.
To compute Vx from the inverse CDF (also called the PPF, percentile point function): generate uniform random numbers x on [0, 1], then Vx = F^(-1)(x) should be distributed according to the pdf, f(Vx).

- 33,420
-
If I am right, CDF has almost the same value within the [0,1] interval, and then vx=F^(-1)(x)=2 if 0 < x < 1. – Manuel May 18 '16 at 18:58
Let $f(v_x)$ be the p.d.f. for $x$-component of velocity, and let $g(v)$ be the p.d.f. for total velocity magnitude (Maxwell-Boltzmann distribution) which is given. Then Bayes theorem gives: \begin{align} f(v_x)=\int_0^\infty dv~g(v)h(v_x|v) \end{align} in which $h(v_x|v)$ is the conditional p.d.f. such that $h(v_x|v)\delta v_x$ gives the probability that the $x$-component of velocity lies in the interval $(v_x,v_x+\delta v_x)$ given that its total velocity magnitude is $v$. Once we know $h(v_x|v)$ the problem is solved.
Obviously since we must have $v_x\leq v$, $h(v_x|v)=0$ for $v_x>v$. In what follows we shall deal with the case where $v_x\leq v$.
To derive the form of $h(v_x|v)$ we shall assume isotropy as regards the orientation of the velocity vector (whose length is given to be $v$). This means that if we take our origin at the tail of the velocity vector then the probability that the tip of the vector shall be located on any point on the surface of the sphere of radius $v$ is uniformly distributed over the surface area of the sphere. In other words the probability that the tip of velocity vector shall lie in the area neighborhood $\delta A$ of point $\mathbf{r}$ on the surface of the sphere (of radius $v$) is $(1/4\pi v^2)\delta A$. If $p(\mathbf{r})$ is the p.d.f. such that $p(\mathbf{r})\delta A$ gives the probability that the tip of velocity vector lies in the area neighborhood $\delta A$ of point $\mathbf{r}$ on the surface of the sphere (of radius $v$) then $p(\mathbf{r})=\frac{1}{4\pi v^2}$.
Applying Bayes theorem again we get: \begin{align} h(v_x|v)=\int_A dA~p(\mathbf{r})q(v_x|\mathbf{r},v) \end{align} in which $q(v_x|\mathbf{r},v)$ is the p.d.f. such that $q(v_x|\mathbf{r},v)\delta v_x$ gives the the probability that the $x$-component of velocity lies in the interval $(v_x,v_x+\delta v_x)$ given that its total velocity magnitude is $v$ in direction $\mathbf{r}$. The problem is now simplified to obtaining $q(v_x|\mathbf{r},v)$ which is easy. Let $\hat{\mathbf{x}}$ be the unit vector along +X-axis and $\hat{\mathbf{r}}\equiv\mathbf{r}/|\mathbf{r}|$. Then \begin{align} q(v_x|\mathbf{r},v)=\delta(v_x-|v\hat{\mathbf{r}}\cdot\hat{\mathbf{x}}|) \end{align} in which $\delta ()$ is the Dirac-delta function. The problem is in principle solved. Needless to say, actual integration to obtain $f(v_x)$ is most likely tedious and I shall not attempt it.

- 6,504