Sei sulla pagina 1di 4

Submitted to Sir Imran

Submitted by Haad Ali


ID 01-241181-008
Program MS-SE
Department Software Engineering
Assignment No 1(Small Assignment)
Course Software Metrics
Assignment 1
Take 10 data points and compute index of variation(IV).
2 4 8 6 10 12 14 16 18 20
𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝐷𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛
𝐼𝑉 =
𝑀𝑒𝑎𝑛
Step 1:
Compute Mean
∑𝑋
𝑀𝑒𝑎𝑛(𝑥̅ ) =
𝑁

2 + 4 + 8 + 6 + 10 + 12 + 14 + 16 + 18 + 20
𝑀𝑒𝑎𝑛(𝑥̅ ) =
10

110
𝑀𝑒𝑎𝑛(𝑥̅ ) =
10

𝑀𝑒𝑎𝑛(𝑥̅ ) = 11
Step 2:
Compute Standard Deviation

𝑁
1
𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝐷𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛 = √ ∑(𝑥 − 𝑥̅ )^2
𝑁
𝑖=1

𝑥 𝑥̅ (𝑥 − 𝑥̅ ) (𝑥 − 𝑥̅ )^2
2 11 2-11=-9 81
4 11 4-11=-7 49
8 11 8-11=-3 9
6 11 6-11=-5 25
10 11 10-11=-1 1
12 11 12-11=1 1
14 11 14-11=3 9
16 11 16-11=5 25
18 11 18-11=7 49
20 11 20-11=9 81

∑(𝑥 − 𝑥̅ )2 = 81 + 49 + 9 + 25 + 1 + 1 + 9 + 25 + 49 + 81
𝑖=1
𝑁

∑(𝑥 − 𝑥̅ )^2 = 330


𝑖=1

330
𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝐷𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛 = √
10

𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝐷𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛 = √33

𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝐷𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛 = 5.74


Step 3:
Compute index of variation
𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝐷𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛
𝐼𝑉 =
𝑀𝑒𝑎𝑛

5.74
𝐼𝑉 =
11
𝐼𝑉 = 0.52
Index of Variation =0.52
END

Potrebbero piacerti anche