summaryrefslogtreecommitdiff
path: root/3308/CH36/EX36.2/Ex36_2.sce
blob: fbd5d19a5c7086d6d411c103d4e3009939819502 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
clc 
// Given that
n=5// in inch sample size
m=10// in inch number of samples
// The table of the queston is given of page no.990 Table 36.3

// Sample Problem on page no. 990

printf("\n # Calculation of Control Limits and Standard Deviation# \n")
avgx=44.296 //from the table 36.3 by adding values of mean of x
x = avgx/m
avgR=1.03 //from the table 36.3 by adding values of R
R = avgR/m
//from the data in the book 
A2=0.577
D4=2.115
D3=0
UCLx = x+(A2*R)
LCLx = x-(A2*R)
printf("\n\n Control Limits for Averages are =\n UCLx =  %f in \n UCLy =  %f in",UCLx,LCLx) 

UCLR =D3*R
LCLR =D4*R

printf("\n\n Control Limits for Ranges are =\n UCLR =  %f in \n UCLR =  %f in",UCLR,LCLR) 

//from table
d2=2.326
sigma= R/d2
printf("\n\n Standard Deviation = %f in",sigma)