```Abdul,

variables have a continuous probability density function and so you
should compute its variance using that definition (look this up in any
probability book):

Variance(x) = integral of (x - 0.5)*(x - 0.5) dx

where the integration is over the interval zero to one.

You can use the samples to estimate the variance of your samples, but
you cannot use them to compute the variance of the "underlying process".

Mike

Abdul Nasir Khan wrote:
> I am reading a digital signal processing book
>
> "The Scientist and Engineer's Guide to Digital Signal Processing"
> 2nd Edition
> by "Steven W. Smith"
>
>
> I could not understand the following concept in its second chapter
>
> QUOTE
> Each random number has a value between zero and one, with an equal
> probability of being anywhere between these two extremes. Figure 2-10a
> shows a signal formed by taking 128 samples from this type of random
> number generator. The mean of the underlying process that generated
> this signal is 0.5, the standard deviation is, and the 1 / (12)^0.5 =
> 0.29 distribution is uniform between zero and one.
> UNQUOTE
>
> I couldn't derive
>
> standard deviation = 1 / (12)^0.5
>
> my derivation is as follows
>
> Mean = Sum(xi, i=0 to n-1) / n = 0.5
>
> variance= (1/n)*Sum( (xi-Mean)^2) 						{i=0 to n-1}
>     	= (1/n)*Sum( (xi^2 + Mean^2 - 2*xi*Mean)) 			{i=0 to n-1}
> 	= (1/n)*(Sum(xi^2) + Sum(Mean^2) - Sum(2*xi*Mean))		{i=0 to n-1}
> 	= (1/n)*Sum(xi^2) + (1/n)*Sum(Mean^2) -(1/n)*Sum(2*xi*Mean) {i=0 to
> n-1}
> 	= (1/n)*Sum(xi^2) + (Mean^2) - (2*Mean)(1/n)*Sum(xi)		{i=0 to n-1}
> 	= (1/n)*Sum(xi^2) + (Mean^2) - (2*Mean^2)				{i=0 to n-1}
> 	= (1/n)*Sum(xi^2) - (Mean^2)						{i=0 to n-1}
>
>
> Now we know the value of mean (which is 0.5) but how can we know the
> value for Sum(xi^2)
```
```Abdul Nasir Khan wrote:
> I am reading a digital signal processing book
>
> "The Scientist and Engineer's Guide to Digital Signal Processing"
> 2nd Edition
> by "Steven W. Smith"
>
>
> I could not understand the following concept in its second chapter
>
> QUOTE
> Each random number has a value between zero and one, with an equal
> probability of being anywhere between these two extremes. Figure 2-10a
> shows a signal formed by taking 128 samples from this type of random
> number generator. The mean of the underlying process that generated
> this signal is 0.5, the standard deviation is, and the 1 / (12)^0.5 =
> 0.29 distribution is uniform between zero and one.
> UNQUOTE
>
> I couldn't derive
>
> standard deviation = 1 / (12)^0.5
>
> my derivation is as follows
>
> Mean = Sum(xi, i=0 to n-1) / n = 0.5
>
> variance= (1/n)*Sum( (xi-Mean)^2) 						{i=0 to n-1}
>     	= (1/n)*Sum( (xi^2 + Mean^2 - 2*xi*Mean)) 			{i=0 to n-1}
> 	= (1/n)*(Sum(xi^2) + Sum(Mean^2) - Sum(2*xi*Mean))		{i=0 to n-1}
> 	= (1/n)*Sum(xi^2) + (1/n)*Sum(Mean^2) -(1/n)*Sum(2*xi*Mean) {i=0 to
> n-1}
> 	= (1/n)*Sum(xi^2) + (Mean^2) - (2*Mean)(1/n)*Sum(xi)		{i=0 to n-1}
> 	= (1/n)*Sum(xi^2) + (Mean^2) - (2*Mean^2)				{i=0 to n-1}
> 	= (1/n)*Sum(xi^2) - (Mean^2)						{i=0 to n-1}
>
>
> Now we know the value of mean (which is 0.5) but how can we know the
> value for Sum(xi^2)

You have a "uniform distribution". The mean and variance of a uniform
distribution between 'a' and 'b' are:

1/2 * (a + b)  <-- mean

1/12 * (b - a)^2   <-- variance

See this site:
http://mathworld.wolfram.com/UniformDistribution.html

Good luck,
OUP
```
```Abdul Nasir Khan wrote:

> I am reading a digital signal processing book
>
> "The Scientist and Engineer's Guide to Digital Signal Processing"
> 2nd Edition
> by "Steven W. Smith"
>
>
> I could not understand the following concept in its second chapter
>
> QUOTE
> Each random number has a value between zero and one, with an equal
> probability of being anywhere between these two extremes. Figure 2-10a
> shows a signal formed by taking 128 samples from this type of random
> number generator. The mean of the underlying process that generated
> this signal is 0.5, the standard deviation is, and the 1 / (12)^0.5 =
> 0.29 distribution is uniform between zero and one.
> UNQUOTE
>
> I couldn't derive
>
> standard deviation = 1 / (12)^0.5
>
> my derivation is as follows
>
> Mean = Sum(xi, i=0 to n-1) / n = 0.5
>
> variance= (1/n)*Sum( (xi-Mean)^2) 						{i=0 to n-1}
>     	= (1/n)*Sum( (xi^2 + Mean^2 - 2*xi*Mean)) 			{i=0 to n-1}
> 	= (1/n)*(Sum(xi^2) + Sum(Mean^2) - Sum(2*xi*Mean))		{i=0 to n-1}
> 	= (1/n)*Sum(xi^2) + (1/n)*Sum(Mean^2) -(1/n)*Sum(2*xi*Mean) {i=0 to
> n-1}
> 	= (1/n)*Sum(xi^2) + (Mean^2) - (2*Mean)(1/n)*Sum(xi)		{i=0 to n-1}
> 	= (1/n)*Sum(xi^2) + (Mean^2) - (2*Mean^2)				{i=0 to n-1}
> 	= (1/n)*Sum(xi^2) - (Mean^2)						{i=0 to n-1}
>
>
> Now we know the value of mean (which is 0.5) but how can we know the
> value for Sum(xi^2)

The claim of uniform distribution allows you to reorder the sequence to
make an arithmetic series. You are effectively calculating the moment of
inertia of a stick about its center of gravity.

Does that help?

Jerry
--
Engineering is the art of making what you want from things you can get.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;

```
```I am reading a digital signal processing book

"The Scientist and Engineer's Guide to Digital Signal Processing"
2nd Edition
by "Steven W. Smith"

I could not understand the following concept in its second chapter

QUOTE
Each random number has a value between zero and one, with an equal
probability of being anywhere between these two extremes. Figure 2-10a
shows a signal formed by taking 128 samples from this type of random
number generator. The mean of the underlying process that generated
this signal is 0.5, the standard deviation is, and the 1 / (12)^0.5 =
0.29 distribution is uniform between zero and one.
UNQUOTE

I couldn't derive

standard deviation = 1 / (12)^0.5

my derivation is as follows

Mean = Sum(xi, i=0 to n-1) / n = 0.5

variance= (1/n)*Sum( (xi-Mean)^2) 						{i=0 to n-1}
= (1/n)*Sum( (xi^2 + Mean^2 - 2*xi*Mean)) 			{i=0 to n-1}
= (1/n)*(Sum(xi^2) + Sum(Mean^2) - Sum(2*xi*Mean))		{i=0 to n-1}
= (1/n)*Sum(xi^2) + (1/n)*Sum(Mean^2) -(1/n)*Sum(2*xi*Mean) {i=0 to
n-1}
= (1/n)*Sum(xi^2) + (Mean^2) - (2*Mean)(1/n)*Sum(xi)		{i=0 to n-1}
= (1/n)*Sum(xi^2) + (Mean^2) - (2*Mean^2)				{i=0 to n-1}
= (1/n)*Sum(xi^2) - (Mean^2)						{i=0 to n-1}

Now we know the value of mean (which is 0.5) but how can we know the
value for Sum(xi^2)
```