# Probability and expectation values

1. Sep 19, 2011

### mathman44

1. The problem statement, all variables and given/known data

2. Relevant equations

I have that $$p(\theta)d\theta = \frac{1}{\pi}d\theta$$, this is definitely correct.

Also y=r*sin(theta) so dy=r*cos(theta)*d(theta).

Substituting d(theta) in above and simplifying, I have:

$$p(y)dy = \frac{1}{pi} \frac{dy}{\sqrt{r^2-y^2}}$$

The problem is, integrating this from y=0 to y=r, I obtain 1/2, and not 1, as expected. I don't understand why this is.... anyone?

Last edited: Sep 19, 2011
2. Sep 19, 2011

### CFede

I'm not totally sure, but I think the problem is that in your integration your considering only half of the posibilities, I mean, you are only considering one half of the semi circle that can be described by the needle.

The min and max angles are \pi and 0. since y=r sin(\theta), you have y=0 for theta=0 or pi. This means that, when integrating between 0 and r, you need to multiply by a factor 2 to consider the whole spectrum.

Hope it helps...

3. Sep 19, 2011

### mathman44

Thanks, I thought exactly what you wrote. Still, is there any reason mathematically why this is so? When I do the same problem, but for the x-projection, this isn't an issue since the integration runs from -r to r.

4. Sep 19, 2011

### CFede

Yes... the mathemathical reason is that the satisfied relation for trigonometric functions is $\cos^2(\theta)=1-\sin^2(\theta)$, but when you replace $\cos(\theta)=\sqrt{1-\sin^2(theta)}$ you are leaving out all negative values of cos(theta), i.e. all angles between pi/2 and pi.... and so... you are considering only half of the posibilities.

5. Sep 19, 2011

### mathman44

Perfect. Thanks!