Help - Search - Members - Calendar
Full Version: SLC5/03 Calc Standard Deviation help needed
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
TerryRWood
Hey Guys....

Looking for alternative ways of calculating STD DEV since the SLC5/03 does not have that it in it's instruction set.

I know how to calculate it... I'm just looking to pick your brains... Everyone has a different approach.

For those who don't know how to calculate it, there are 2 ways....



Deviation method for calculating standard deviation
Consider the observations 8,25,7,5,8,3,10,12,9.
  1. First, calculate the mean and determine N.
  2. Remember, the mean is the sum of scores divided by N where N is the number of scores.
  3. Therefore, the mean = (8+25+7+5+8+3+10+12+9) / 9 or 9.67
  4. Then, calculate the standard deviation as illustrated below.
Score__ Mean____ Deviation__ *SquaredDeviation
8_______9.67_____ -1.67________ 2.79
25______ 9.67____+15.33______ 235.01
7_______ 9.67____ -2.67________ 7.13
5_______ 9.67____ -4.67_______ 21.81
8_______ 9.67____ -1.67________ 2.79
3_______ 9.67____ -6.67_______ 44.49
10______ 9.67__ __+.33_________ .11
12 ______9.67___ +2.33________ 5.43
9 _______9.67_____ -.67_________ .45

Sum of squared dev = 320.01*Deviation = Score - Mean
Standard Deviation = Square root(sum of squared deviations / (N-1)
= Square root(320.01/(9-1)) = Square root(40) = 6.32

Raw score method for calculating standard deviation
Again, consider the observations 8,25,7,5,8,3,10,12,9.
  1. First, square each of the scores.
  2. Determine N, which is the number of scores.
  3. Compute the sum of X and the sum of X-squared.
  4. Then, calculate the standard deviation as illustrated below.
Score_______ X2
8___________ 64
25_________ 625
7___________ 49.................N=9
5___________ 25
8___________ 64................ Sum of X=87
3____________ 9
10_________ 100................ Sum of X2=1161
12__________144
9____________ 81
---------------------------
87_________ 1161

Standard Deviation = square root[(sum of X2)-((sum of X)*(sum of X)/N)/(N-1)]

= square root[(1161)-(87*87)/9)/(9-1)]
= square root[(1161-(7569/9)/8)]
= square root[(1161-841)/8]
= square root[320/8]
= square root[40] = 6.32


THANX
TRW
rpraveenkum
Use CPT instruction avalible in the SLC 5/03
BobLfoot
QUOTE(TerryRWood @ Oct 3 2006, 04:53 PM) [snapback]41145[/snapback]

Hey Guys....

Looking for alternative ways of calculating STD DEV since the SLC5/03 does not have that it in it's instruction set.

I know how to calculate it... I'm just looking to pick your brains... Everyone has a different approach.

THANX
TRW

Are you wanting to do it for a Fixed N or will N cahnge each time you need to calculate STDEV?
TerryRWood
Hey Bob....

I need to do a Std Dev on a running average of at least 6 numbers.
The application is to determine batch consistancy from a vibrating feeder, my numbers are final tare weights.
I will evoke an action if the STD DEV exceeds 1.0

TRW


QUOTE(BobLfoot @ Oct 4 2006, 01:53 AM) [snapback]41168[/snapback]
QUOTE(TerryRWood @ Oct 3 2006, 04:53 PM) [snapback]41145[/snapback]

Hey Guys....

Looking for alternative ways of calculating STD DEV since the SLC5/03 does not have that it in it's instruction set.

I know how to calculate it... I'm just looking to pick your brains... Everyone has a different approach.

THANX
TRW

Are you wanting to do it for a Fixed N or will N cahnge each time you need to calculate STDEV?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.