# Average and variance of a unit sphere

1. Jan 10, 2014

### unscientific

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

Consider the sphere x2 + y2 + z2 = 1

Find the mean and variance.

2. Relevant equations

3. The attempt at a solution

Mean = 0 (Symmetry)

Variance
Probability = $$\frac {dV}{\frac{4}{3} \pi R^3} = \frac {4 \pi r^2 dr}{\frac{4}{3} \pi R^3} = 3 \frac {r^2}{R^3} dr$$

Variance = $$\int_0^R r^2 * 3 \frac {r^2}{R^3} dr = \frac {3}{5R^3} = \frac {3}{5}$$

Not sure if this is right..

Last edited: Jan 10, 2014
2. Jan 10, 2014

### BruceW

'variance' is kinda strange given just the problem statement... I guess it means the moment of inertia about the centre of mass, when the total mass equals 1 ?

But then in your attempt, you use a probability distribution $3/4\pi R^3$ Where did this come from? This wasn't in the problem statement.

3. Jan 10, 2014

### unscientific

Ok, my answer is definitely wrong because $$μ = <x> = \int x P_{(x)} dx ≠ 0$$

This means that my pdf is wrong.

Last edited: Jan 10, 2014
4. Jan 10, 2014

### BruceW

what is your pdf supposed to be? was it specified?

5. Jan 10, 2014

### unscientific

Not at all...They wanted mean and variance of a point within a sphere.

6. Jan 10, 2014

### BruceW

hmm, interesting. what do you think they wanted? for the mean, you could calculate the centre of mass, where the density is only nonzero (and is constant) in the specified region. For the variance, it's not so simple. maybe use squared distance from the centre of mass? Also, for this problem, are you using all the points within the ball of some radius? Or all the points on the surface of this ball?

7. Jan 11, 2014

### unscientific

They want variance of a point at position r within the sphere.

8. Jan 12, 2014

### BruceW

In the first post, you wrote
which implies to me that they want you to consider the points only on the surface of the sphere. But now you are saying they want you to consider all the points within the sphere? well, I guess you just need to choose which one you think is most likely. Also, for 'variance of a point' I know what equation I would guess this means. But I don't really know. You should try to figure out what equation they want you to use. What would the variance be in 1d ? and try to extend that to something that is a similar equation in 3d.

9. Jan 12, 2014

### unscientific

Okay here is what they say: A point, randomly chosen within the sphere is at distance c from the origin. Find the mean and variance of c.

10. Jan 12, 2014

### BruceW

ah, that's much clearer! OK, since they say 'randomly chosen within the sphere', this implicitly tells us what the PDF is. As another example, if I said I will randomly choose a number between 0 and a given number $L$, then what is the PDF in this case? That is the 1d case, so then it is straightforward to go to the 3d case.

11. Jan 13, 2014

### unscientific

So are you saying that the pdf is $\frac{R}{2}$ ? I've just been wondering why the pdf between any two numbers is the average? Like pdf of numbers distributed from 0 to 10 is 5, 0 to 1 is 1/2 etc.?

12. Jan 13, 2014

### BruceW

almost right. The pdf should be a constant within the specified area or length or volume or whatever. But also, when you integrate the pdf over that total area, or length or volume, you should get 1 (since you will certainly choose a point, out of the possible options). So this means the pdf of numbers distributed from 0 to 10 is definitely not 5. and from 0 to 1 is not 1/2.

13. Jan 15, 2014

### unscientific

How do I figure out the pdf then? Is it a constant? So the pdf for length should be a function of R, the pdf for area and vol.?

Last edited: Jan 15, 2014
14. Jan 15, 2014

### BruceW

hmm. your teacher should have explained stuff like this before giving this kind of problem. Yes, the pdf is constant within the specified volume, and zero outside. And by the definition of a pdf, you know the volume integral of the pdf must equal 1. So le'ts call the constant $C$. Then:
$\int_{volume} C \ dV = 1$
where the volume integral is only over the specified volume, since the pdf is zero outside of the volume. And now, you know $C$ is a constant, so what is the next step?

15. Jan 16, 2014

### unscientific

Then the pdf for r, area and volume is simply $$1/r, \frac{1}{4\pi r^2}, \frac{1}{4/3 \pi r^3}$$.

16. Jan 16, 2014

### BruceW

yep, that's it! And be sure to keep in mind that $r$ in those equations is a constant, not a variable. i.e. for the volume, $r$ is the total radius of the sphere (a constant). Looking at your first post, I think you got it partly correct. They are asking for the mean distance from the origin. Not the mean position from the origin. So the mean will not be zero. Now you have the pdf, you can find the mean of the distance from the origin in the usual way.

17. Jan 17, 2014

### unscientific

Mean distance:

$$\int_0^R r\frac{1}{R} dr = \frac{1}{2}R$$

Variance:

$$\int_0^R (x-\frac{R}{2})^2 \frac{1}{R} dr = \frac{1}{36}R^2$$

18. Jan 17, 2014

### BruceW

that's roughly the right idea for 1d. although, I don't think the variance is quite right. Anyway, next you should try it for 3d.