I looked it up online, and I have no idea if there if this is acurate, but it looks like it might be =). To calculate 6-sigma, you have to break it down into a few parts:
6-sigma = sigma * 6 + the calculated mean.
sigma = sqrt(1/N*SUM(x-AVG(x))^2)
You can do this in a few steps
- Calculate the average of your values
- Loop through your values, finding (value-average)^2 and adding them together
- Divide by the number of values
- Take the square root of that
so a python script would look something like:
[code]values = my set of values
#calculate average
mean = 0
count = 0
for value in values:
mean = mean + value
count = count + 1
mean = mean/count
#calculate sum
sum = 0
for value in values:
sum = sum + (value-mean)*(value-mean)
#calculate sigma
sigma = sqrt(sum/count)
#calculate 6-sigma
sixsigma = sigma/6 + mean
[/code]