Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

function modle for calculate standard deviation

srajendran
Explorer
0 Likes
2,845

hai friends,

i want to calculate standard deviation for the following data. is there any function module for calculating standard deviation? pls let me know.

no. qty.

1 10

2 20

3 50

4 90

5 40

with regards,

senthil kumar.r

7 REPLIES 7
Read only

Former Member
0 Likes
1,365

Try these FMs:

QRKT_STD_DEVIATION_SHEWHART

QRKT_STD_DEVIATION_SHEWHART_2

Read only

Former Member
0 Likes
1,365

Check out using these two FM to calculate the standard deviation which is used for the track of a quality control chart, if you want to use the standard deviation as a control value for a quantitative characteristic in order to detect the dispersion changes for a characteristic. The second one uses the multiplicative factor for the chi-square distribution required for the calculation of the control limits is estimated on the basis of the total dispersion of all original values.

1)QRKT_STD_DEVIATION_SHEWHART

2)QRKT_STD_DEVIATION_SHEWHART_2

Read only

0 Likes
1,365

HAI Judith Jessie Selvi ,

thanks for your reply. here i want to calculate std deviation for qty. how will you pass the values in this fn. module. can u give my any example.

with regards,

senthil kumar.r

Read only

0 Likes
1,365

Hi,

U can refer to the documentation of the function module, i too havent used this FM.

Kindly reward points if u find this as helpful.

Read only

Former Member
0 Likes
1,365

Hi senthil,

1. I don't there is any direct FM/functionality,

for such MATHEMATICAL calculations.

2. INDEPENDENT FORM

3. I have developed one independent

form which will calculate STANDARD DEVIATION.

4. copy paste in new program.

REPORT abc.

DATA : BEGIN OF itab OCCURS 0,

num TYPE i,

END OF itab.

data : std type p decimals 2.

*----


itab-num = 8. APPEND itab.

itab-num = 25. APPEND itab.

itab-num = 7. APPEND itab.

itab-num = 5. APPEND itab.

itab-num = 8. APPEND itab.

itab-num = 3. APPEND itab.

itab-num = 10. APPEND itab.

itab-num = 12. APPEND itab.

itab-num = 9. APPEND itab.

PERFORM stdev changing std..

write 😕 std.

*----


*----


*

*----


FORM stdev CHANGING std.

DATA : mn TYPE p DECIMALS 2.

DATA : sm TYPE i.

DATA : sm2 TYPE i.

DATA : dev TYPE p DECIMALS 2.

DATA : cnt TYPE i.

LOOP AT itab.

sm = sm + itab-num.

cnt = cnt + 1.

sm2 = sm2 + ( itab-num * itab-num ).

ENDLOOP.

mn = sm / cnt.

dev = ( sm2 - ( ( ( sm * sm ) / cnt ) ) ) / ( cnt - 1 ) .

dev = SQRT( dev ).

std = dev.

ENDFORM. "stdev

regards,

amit m.

Read only

Former Member
0 Likes
1,365

Hi again,

1. To verify the formula and correctness,

(also the example, which i have taken)

2. goto this site.

and see the formula as well as the SAME example

6.32

http://www.med.umkc.edu/tlwbiostats/variability.html

regards,

amit m.

Read only

0 Likes
1,365

thanks amit