Why im getting standard deviation is zero

207 Views Asked by At

I have 10 values and I'm trying to find the standard deviation of these numbers

I am trying to find the standard deviation in Matlab, I'm getting the standard deviation is zero

here are my data points

X=[2.2048e-191,5.7885e-194,3.7234e-197,7.7282e-195,9.4038e-198,5.6247e-192,5.4204e-192,9.1158e-194,7.766e-193,4.2472e-193]

here mean(X)=3.4451e-192

standard deviation zero means the points which are equal to the mean but here all the points are different

can someone help me with this

2

There are 2 best solutions below

2
On BEST ANSWER

The numbers are too small. When Squared, the number would be rounded down to zero.

A Simple solution would be to multiply each element in the array with $1.0 \times 10^{198} $ first, then find the standard deviation.

Afterwwords, multiply the solution with $1.0 \times 10^{-198}$.

3
On

As @Sean Roberson said, the standard deviation is probably $0$ since the numbers are so small (the computer approximates).

Since $$\sigma=\sqrt{\frac{\sum(x_i-\mu)^2}{N}}$$ Is standard deviation, you should always get $\sigma\ne 0$ when some $x_i \ne \mu$ provided there are not approximations.

You might be able to calculate the correct standard deviation by multiplying all values by say $10^{191}$ to account for such small numbers, then just divide that standard deviation by $10^{191}$

This is equivalent because $$\sigma_2=\sqrt{\frac{\sum(ax_i-a\mu)^2}{N}}= a\sqrt{\frac{\sum(x_i-\mu)^2}{N}}=a\sigma$$