# 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)$

## 2 thoughts on “Continuous probability distribution: needle on a pivot”

1. Joey Contreras

On (14)-(15) how did you get arctan?

I used trig substitution with x=rcos(theta) and eventually got the same answer. I felt weird about it because I ended up with the original integral before going back to using ‘x’ as the variable, so I’m not sure if it was okay or not.

1. gwrowe Post author

I just used Maple to do the integral. If I’d done it by hand, I’d probably have used the substitution ${x=ru}$ and ended up with an arcsin rather than an arctan.