Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Standard Deviation

Status
Not open for further replies.

heather473

Technical User
Dec 2, 2000
8
0
0
US
I need help figuring out how to input the equation for standard deviation. I'm not allowed to use the one given in my cobol software for my class assignment. thanks
 
I guess there is some software in MicroFocus cobol that automatically does the standard deviation. I'm not supposed to use that. I know the equation is (((x-mean)**2) /N )**.5. I just don't know how to get it into a statement to get it to run. I've tried compute statements for each bracket() individually but that doesn't seem to work. HELP.
Thanks
 
Option 1:
COMPUTE STD-DEV ROUNDED = (((x-mean)**2) / N ) ** .5

Option 2:
MULTIPLY X-MEAN BY X-MEAN GIVING X-MEAN-SQD ROUNDED.
DIVIDE N INTO X-MEAN-SQD GIVING STD-DEV-SQD ROUNDED
COMPUTE STD-DEV ROUNDED = STD-DEV-SQD ** .5.

Both should do exactly the same thing. Choose whichever one you think gets you far enough away from the one you're not supposed to use. Betty Scherber
Brainbench MVP for COBOL II
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top