# Continuous probability distribution: needle on a pivot

Reference: Griffiths, David J. (2005), Introduction to Quantum Mechanics, 2nd Edition; Pearson Education – Problems 1.11-12.

This exercise in continuous probability distributions actually precedes the problem on Buffon’s needle, so it uses the same logic.

Suppose we have a needle mounted on a pivot so that the needle is free to swing anywhere in the top semicircle, so that when it comes to rest, its angular coordinate is equally likely to be any value between 0 and ${\pi}$. In that case, the probability density ${\rho\left(\theta\right)}$ is a constant in this range, and zero outside it. That is

$\displaystyle \rho\left(\theta\right)=\begin{cases} A & 0\le\theta\le\pi\\ 0 & \mbox{otherwise} \end{cases} \ \ \ \ \ (1)$

From normalization, we must have

 $\displaystyle \int_{0}^{\pi}\rho\left(\theta\right)d\theta$ $\displaystyle =$ $\displaystyle 1\ \ \ \ \ (2)$ $\displaystyle A$ $\displaystyle =$ $\displaystyle \frac{1}{\pi} \ \ \ \ \ (3)$

The statistics of the distribution are

 $\displaystyle \left\langle \theta\right\rangle$ $\displaystyle =$ $\displaystyle \frac{1}{\pi}\int_{0}^{\pi}\theta d\theta=\frac{\pi}{2}\ \ \ \ \ (4)$ $\displaystyle \left\langle \theta^{2}\right\rangle$ $\displaystyle =$ $\displaystyle \frac{1}{\pi}\int_{0}^{\pi}\theta^{2}d\theta=\frac{\pi^{2}}{3}\ \ \ \ \ (5)$ $\displaystyle \sigma$ $\displaystyle =$ $\displaystyle \sqrt{\left\langle \theta^{2}\right\rangle -\left\langle \theta\right\rangle ^{2}}=\frac{\pi}{2\sqrt{3}}\ \ \ \ \ (6)$ $\displaystyle \left\langle \sin\theta\right\rangle$ $\displaystyle =$ $\displaystyle \frac{1}{\pi}\int_{0}^{\pi}\sin\theta d\theta=\frac{2}{\pi}\ \ \ \ \ (7)$ $\displaystyle \left\langle \cos\theta\right\rangle$ $\displaystyle =$ $\displaystyle \frac{1}{\pi}\int_{0}^{\pi}\cos\theta d\theta=0\ \ \ \ \ (8)$ $\displaystyle \left\langle \cos^{2}\theta\right\rangle$ $\displaystyle =$ $\displaystyle \frac{1}{\pi}\int_{0}^{\pi}\cos^{2}\theta d\theta=\frac{1}{2} \ \ \ \ \ (9)$

We now want the probability that the projection of the needle onto the ${x}$ axis lies between ${x}$ and ${x+dx}$. If the needle is at angle ${\theta}$, then its ${x}$ coordinate is ${r\cos\theta}$ (where ${r}$ is the length of the needle). If the angle changes by ${d\theta}$, its ${x}$ coordinate changes by ${dx=-r\sin\theta\; d\theta}$ so for the probability density, we take absolute values and get

 $\displaystyle \rho\left(\theta\right)d\theta$ $\displaystyle =$ $\displaystyle \frac{1}{\pi}\frac{dx}{r\sin\theta}\ \ \ \ \ (10)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{dx}{\pi y}\ \ \ \ \ (11)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{dx}{\pi\sqrt{r^{2}-x^{2}}}\ \ \ \ \ (12)$ $\displaystyle \rho\left(x\right)$ $\displaystyle =$ $\displaystyle \frac{1}{\pi\sqrt{r^{2}-x^{2}}} \ \ \ \ \ (13)$

As a check:

 $\displaystyle \int_{-r}^{r}\rho\left(x\right)dx$ $\displaystyle =$ $\displaystyle \frac{1}{\pi}\int_{-r}^{r}\frac{dx}{\sqrt{r^{2}-x^{2}}}\ \ \ \ \ (14)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{1}{\pi}\left.\arctan\frac{x}{\sqrt{r^{2}-x^{2}}}\right|_{-r}^{r}\ \ \ \ \ (15)$ $\displaystyle$ $\displaystyle =$ $\displaystyle 1 \ \ \ \ \ (16)$

Since ${x=r\cos\theta}$, we can get ${\left\langle x\right\rangle }$ and ${\left\langle x^{2}\right\rangle }$ from 8 and 9, but we can also calculate it the hard way, using ${\rho\left(x\right)}$:

 $\displaystyle \left\langle x\right\rangle$ $\displaystyle =$ $\displaystyle \int_{-r}^{r}x\rho\left(x\right)dx\ \ \ \ \ (17)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{1}{\pi}\int_{-r}^{r}\frac{x\; dx}{\sqrt{r^{2}-x^{2}}}\ \ \ \ \ (18)$ $\displaystyle$ $\displaystyle =$ $\displaystyle 0\ \ \ \ \ (19)$ $\displaystyle \left\langle x^{2}\right\rangle$ $\displaystyle =$ $\displaystyle \int_{-r}^{r}x^{2}\rho\left(x\right)dx\ \ \ \ \ (20)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{1}{\pi}\int_{-r}^{r}\frac{x^{2}\; dx}{\sqrt{r^{2}-x^{2}}}\ \ \ \ \ (21)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{1}{2\pi}\left.r^{2}\arctan\frac{x}{\sqrt{r^{2}-x^{2}}}-x\sqrt{r^{2}-x^{2}}\right|_{-r}^{r}\ \ \ \ \ (22)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{r^{2}}{2} \ \ \ \ \ (23)$

# A few statistics on the first 25 digits of pi

Reference: Griffiths, David J. (2005), Introduction to Quantum Mechanics, 2nd Edition; Pearson Education – Problem 1.10.

Here are a few statistical properties of the first 25 digits of ${\pi}$ (if you want more digits, here’s a link to the first million digits):

$\displaystyle \pi=3.141592653589793238462643\ldots \ \ \ \ \ (1)$

The frequency of each digit and the probability of getting each one are:

 Digit ${j}$ ${N_{j}}$ ${P_{j}}$ 0 0 0 1 2 0.08 2 3 0.12 3 5 0.2 4 3 0.12 5 3 0.12 6 3 0.12 7 1 0.04 8 2 0.08 9 3 0.12

The most probable digit is 3, the median is 4 (there are 10 digits ${<4}$ and 12 digits ${>4}$ so that’s as close as we can get to dividing the distribution equally) and the average is 4.72.

We can get the variance by calculating ${\left\langle N^{2}\right\rangle -\left\langle N\right\rangle ^{2}}$, so we get ${\left\langle N^{2}\right\rangle =\frac{710}{25}=28.4}$; ${\sigma^{2}=28.4-\left(4.72\right)^{2}=6.1216}$. The standard deviation is

$\displaystyle \sigma=2.474 \ \ \ \ \ (2)$

We’d need to use quite a few more digits to get a properly random collection of numbers.

# Harmonic oscillator: statistics

Required math: algebra, calculus (partial derivatives and integration by parts), complex numbers

Required physics: Schrödinger equation, probability density

Reference: Griffiths, David J. (2005), Introduction to Quantum Mechanics, 2nd Edition; Pearson Education – Problem 1.9.

Suppose a particle is in the quantum state

$\displaystyle \Psi\left(x,t\right)=Ae^{-amx^{2}/\hbar}e^{-iat} \ \ \ \ \ (1)$

where ${A}$ is the normalization constant and ${a}$ is a constant with dimensions of 1/time. We can find ${A}$ from normalization:

 $\displaystyle \int_{-\infty}^{\infty}\left|\Psi\right|^{2}dx$ $\displaystyle =$ $\displaystyle 1\ \ \ \ \ (2)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \left|A\right|^{2}\int_{-\infty}^{\infty}e^{-2amx^{2}/\hbar}dx\ \ \ \ \ (3)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \left|A\right|^{2}\sqrt{\frac{\pi\hbar}{2ma}}\ \ \ \ \ (4)$ $\displaystyle A$ $\displaystyle =$ $\displaystyle \left(\frac{2ma}{\pi\hbar}\right)^{1/4} \ \ \ \ \ (5)$

The spatial component of the wave function is

$\displaystyle \psi\left(x\right)=\left(\frac{2ma}{\pi\hbar}\right)^{1/4}e^{-amx^{2}/\hbar} \ \ \ \ \ (6)$

and it must satisfy the time-independent Schrödinger equation in one dimension

 $\displaystyle -\frac{\hbar^{2}}{2m}\frac{d^{2}\psi(x)}{dx^{2}}+V(x)\psi(x)$ $\displaystyle =$ $\displaystyle E\psi(x) \ \ \ \ \ (7)$

The energy ${E}$ can be found from the time equation:

$\displaystyle i\hbar\frac{\partial\Xi}{\partial t}=E\Xi \ \ \ \ \ (8)$

where

$\displaystyle \Xi\left(t\right)=e^{-iat} \ \ \ \ \ (9)$

Therefore

$\displaystyle E=\hbar a \ \ \ \ \ (10)$

From 7 we have

 $\displaystyle -\frac{\hbar^{2}}{2m}\frac{d^{2}\psi(x)}{dx^{2}}$ $\displaystyle =$ $\displaystyle \left(\frac{2ma}{\pi\hbar}\right)^{1/4}a\left(\hbar-2amx^{2}\right)e^{-amx^{2}/\hbar}\ \ \ \ \ (11)$ $\displaystyle V\left(x\right)$ $\displaystyle =$ $\displaystyle \frac{E\psi(x)+\frac{\hbar^{2}}{2m}\frac{d^{2}\psi(x)}{dx^{2}}}{\psi\left(x\right)}\ \ \ \ \ (12)$ $\displaystyle$ $\displaystyle =$ $\displaystyle 2ma^{2}x^{2} \ \ \ \ \ (13)$

This is the harmonic oscillator potential, and the wave function is actually the ground state of that potential.

We can work out a few average values:

$\displaystyle \left\langle x\right\rangle =0 \ \ \ \ \ (14)$

since ${\psi\left(x\right)}$ is even.

 $\displaystyle \left\langle x^{2}\right\rangle$ $\displaystyle =$ $\displaystyle \int_{-\infty}^{\infty}x^{2}\psi^{2}dx=\frac{\hbar}{4am}\ \ \ \ \ (15)$ $\displaystyle \left\langle p\right\rangle$ $\displaystyle =$ $\displaystyle -i\hbar\int_{-\infty}^{\infty}\psi\frac{\partial\psi}{\partial x}dx=0\ \ \ \ \ (16)$ $\displaystyle \left\langle p^{2}\right\rangle$ $\displaystyle =$ $\displaystyle -\hbar^{2}\int_{-\infty}^{\infty}\psi\frac{\partial^{2}\psi}{\partial x^{2}}dx=\hbar ma \ \ \ \ \ (17)$

The standard deviations are

 $\displaystyle \sigma_{x}$ $\displaystyle =$ $\displaystyle \sqrt{\left\langle x^{2}\right\rangle -\left\langle x\right\rangle ^{2}}=\frac{1}{2}\sqrt{\frac{\hbar}{ma}}\ \ \ \ \ (18)$ $\displaystyle \sigma_{p}$ $\displaystyle =$ $\displaystyle \sqrt{\left\langle p^{2}\right\rangle -\left\langle p\right\rangle ^{2}}=\sqrt{\hbar ma} \ \ \ \ \ (19)$

and the uncertainty principle is

$\displaystyle \sigma_{x}\sigma_{p}=\frac{\hbar}{2} \ \ \ \ \ (20)$

so in this case, the uncertainty is the minimum possible.