Professional Documents
Culture Documents
Practical No 4 PDF
Practical No 4 PDF
PRACTICAL NO. 04
Introduction to Global Macro
Sohail Ahmed
Lecturer,
Department of Mathematics
NED university of Engineering & Technology, Karachi
APPLIED PROBABILITY & STATISTICS (MT-330)
https://www.sites.google.com/site/mt330statistics
1. Write a Global macro for weekly sales ( in $) of four different
brands, Calculate following measures for each brand & determine
which brand gives more consistent sales.
Application
Macros are used to repeat the same task several times without
typing session commands each time.
Types
1. Global Macros
2. Local Macros
Global Macro Structure
Gmacro
Template
Endmacro
Example
SAVE
INVOKE
SAVE
C:\Users\Desktop\Sohail\Lab4.txt
INVOKE
x i
A.M = x = i =1
n
n
logx i
G.M = Antilog i =1
n
n
H.M =
n
1
i =1
xi
Range = Maximum Minimum
n
( xi x )2
Variance= i =1
n 1
xi x
Mean AbsoluteDeviation= i =1
n
S. D
Coefficient of Variation = 100
A.M
Entering Data for Brand A
A.M= 93.6000
G.M= 79.3498
H.M= 58.3285
RANGE= 94.0000
VARIANCE= 1356.24
S.D= 36.8272
M.A.D= 29.4400
C.V= 39.3453
Brand A Brand C
A.M= 93.6000 A.M= 110.600
G.M= 79.3498 G.M= 110.432
H.M= 58.3285 H.M= 110.260
RANGE= 94.0000 RANGE= 16.0000
VARIANCE= 1356.24 VARIANCE= 35.8400
S.D= 36.8272 S.D= 5.98665
M.A.D= 29.4400 M.A.D= 5.28000
C.V= 39.3453 C.V= 5.41289
Brand B Brand D
A.M= 115.200 A.M= 124.200
G.M= 115.187 G.M= 123.501
H.M= 115.174 H.M= 122.853
RANGE= 5.00000 RANGE= 40.0000
VARIANCE= 2.96000 VARIANCE= 186.160
S.D= 1.72047 S.D= 13.6440
M.A.D= 1.44000 M.A.D= 10.3200
C.V= 1.49346 (Smallest) C.V= 10.9855
2. Write a global macro for the following frequency distribution
to calculate
C.I 07 09 10 12 13 15 16 18 19 21 Total
Freq 02 08 14 09 01 34
MTB > SET C1
DATA> 7:19/3
DATA> END
fi
4th Moment about Origin = 4 =
i i
f x 4
fi
where i = 1, 2 , 3 , ..., k
1ST MOMENT ABOUT ORIGIN= 13.9118
3
Measure of Skewness = 1 = 3
2
2
4
Measure of Kurtosis = 2 = 2
2
SKEWNESS = SQRT BETA 1 = -0.166139
Since,