You are on page 1of 17

NAME: FUNGAYI JOHANE MAJURIRA

STUDENT ID: 21981559

COURSE: BUSINESS DATA ANALYSIS II

COURSE CODE: BBAC 322

PROGRAM: BACHELOR OF BUSINESS IN ACCOUNTING

LECTURER MR.L.SIMATAA

DATE: 25 MARCH 2022

ASSIGNMENT NUMBER: ONE

1
QUESTION ONE
The supply, x and price y (in kwacha), in nine different years were as follows:

Year 1981 1982 1983 1984 1985 1986 1987 1988 1989
Supply 80 82 86 91 83 85 89 96 93
Price 146 140 130 117 133 127 115 94 100

(a) Calculate the correlation coefficient


(b) Find the equation of regression line
(c) What practical use could be made of this equation
(d) Suppose that the price for the following year is estimated to be K135, what would be
the supply?
(e) At the 5 % level of significance would you conclude that there is a linear relationship
between x and y?
(f) Construct a 95 % confidence interval for the slope parameter 1 β .
(g) Estimate the mean price for the supply of 278 units.
(h) Give the ANOVA table for the data.
(i) Use the ANOVA table to test for a significant linear relationship between supply and
price.

a) Calculate the correlation coefficient


x y xy x² y²
80 146 11680 6400 21316
82 140 11480 6724 19600
86 130 11180 7396 16900
91 117 10647 8281 13689
83 133 11039 6889 17689
85 127 10795 7225 16129
89 115 10235 7921 13225
96 94 9024 9216 8836
93 100 9300 8649 10000
785 1102 95380 68701 137384

r = nΣxy - ΣxΣy
Ѵ(nΣx² - (Σx)²)(nΣy² - (Σy)²)

= 9(95,380) – 785*1102
Ѵ((9*68701) – (785)²)(9*137384 – (1102)²

= 858,420 – 865,070
Ѵ(618,309 – 616,225)(1,236,456 – 1,214,404

2
= -6,650
Ѵ2,084*22,052

= -6,650
Ѵ45,956,368

= -6,650
6779.11

r = -0.98095

(b) Find the equation of regression line

yˆ = xb + a

b = nΣxy - ΣxΣy
nΣx² - (Σx)²

a = y̅ - bx̅

b = 9(95,380) - (1102)(785)
9(137,384) - (1,102)²

= -6,650
22,052

= -0.30155

= ≈ -0.3016

x̅ = 1,102 y̅ = 785
9 9

= 122.44 = 87.22

a = 785 - (-0.3016)(1,102)
9 9

= 124.147

∴y = 124.147 - 0.3016x where x = price and y = supply

3
c) Estimation of supply at a given price therefore can well relate to measure of elasticity
of demand

d) Given Price(x) = K135

Supply(y) = 124.147 – (0.3016)(135)

= 83.4305

≈ 83

e) At the 5 % level of significance would you conclude that there is a linear relationship
between x and y?

Ho : B = 0

H₁ : B # 0

𝛼 = 0.05

Reject H₀ and conclude that there is no relationship at 0.05 level of significance. That is if
tcall > tcritical or tcall < -tcritical
The distribution follows t distribution df = n-2 = 9-2 = 7

t0.05/2(7) = t0.025(7) = 2.365 or -2.365

tcall = b - β
S.E (b)

b = -0.30155

β = 0

S.E(b) = S
ѴΣ(x-x̅ )²

S = ѴΣ(y-y̅ )² - b²Σ(x-x̅ )²
n-2

= Σ(y-y̅ )² = Σy² - (Σy)² = 68,701 - (785)² = 7,078.5


n 10

4
= Σ(x-x̅ )² = Σx – (Σx)² = 137,384 - 1,102² = 15,943.6
n 10
S = Ѵ7,078.5 - (-0.30155)²(15,943.6 = Ѵ(804.10) = 10.7178
7 7

S.E(b) = 10.7178
15,943.6

= 0.00067

tcall = -0.30155 - 0
0.00067

= 450

tcall < tcritical we do not accept H₀ at 0.05% level of significance and conclude that there is a
relationship between Price and Supply

(f) Construct a 95 % confidence interval for the slope parameter 1 β .

95% CI b ± t₁ ̵ ̵ 𝛼 ̷₂ (S.E(b)

-0.30155 ± t 0.9975(0.00067)

-0.30155 ± 2.365(0.0067)

-0.30155 ± 0.0158

(-0.31735; -0.28575)

(g) Estimate the mean price for the supply of 278 units.

If supply = 278 units

y = 124.1515 + 0.3016x

= 278 - 124.1515
0.3016

Price = 510.11

(h) Give the ANOVA table for the data.

5
X y ȳ
80 146 113
82 140 111
86 130 108
91 117 104
83 133 108
85 127 106
89 115 102
96 94 95
93 100 96.5
785 122.4 104.83
𝑖
SS Total = Σ(y𝑖₀ - ȳ) =

(80-104.83)²+(82+104.83)²+(86+104.83)²+(91+104)²+(83+104.83)²+(85+104)²

+(89+104)²+(96+104)²+(93+104)²+(146+104)²+(140+104)²+(130+104)²+(117+104)²

+(133+104)²+(127+104)²+(115+104)²+(94+104)²+(100+104)² = 3,323.917

SS treatment = nΣ(x̄ -x̿ )

= 2(87.22 -104.83)2 + 2(122.4-104.83)²

= 1,237.634

Source df SS Ms F
Treatment 1 1,237.634 1,237.634 9.49
Error 16 2,086.28 130.39
Total 17 3,323.914    

(i) Use the ANOVA table to test for a significant linear relationship between supply and
price.
H₀ = There is no relationship between supply and price

H₁ = There is a relationship between supply and price

𝛼 = 0.05

Reject H₀ if Fcall < Fcritical = 9.49


Fcall = F 0.05 ; (1,16) = 4.49

Since 4.49 < 9.49 we do not reject H₀ and conclude that there is no relationship between
supply and price

6
QUESTION TWO

x
       
Y 0 1 2 3 Total
0 0.07 0.09 0.06 0.01 0.23
1 0.07 0.06 0.07 0.01 0.21
2 0.06 0.07 0.14 0.03 0.3
3 0.02 0.04 0.16 0.04 0.26
Total 0.22 0.26 0.43 0.09 1

(a) Marginal probability of = (0.22;0.26;0.43;0.09)

(b) Mean number of test taken = Ex.p

= 0(0.22)+1(0.26)+2(0.43)+3(0.09)
= 1.39

(c) Marginal probability of y = (0.23;0.21;0.3;0.26)

(d) Mean number of snacks = 0(0.23)+1(0.21)+2(0.3)+3(0.26)

= 1.59

(e) P(y/x) = 3) = 0.09 Given that x values total of probability of y ( p(y=y) is


always > 0.09 thus its probability of p(y/x) its 0.09

(f) Cov (x : y ) = E(xy) – E(x)E(y)

E(x) = Σp.x = 1.39

E(y) = Σp.x = 1.59

Exy) = (0)(0)(0.07)+(0)(1)(0.09)+(0)(2)(0.06)+(0)(3)(0.01) =0

+(1)(0)(0.07)+(1)(1)(0.06)+(1)(2)(0.07)+(1)(3)(0.01) = 0.23

+ (2)(0)(0.06)+(2)(1)(0.07)+(2)(2)(0.14)+(0)(3)(0.03) = 0.88

+ (3)(0)(0.02)+(3)(1)0.04)+(3)(2)(0.16)+(3)(3)(0.04) = 1.44

E(xy) = 2.55

7
Cov (xv) = 2.55 –(1.39)1.59

= 0.3399
(g) Correlation coefficient between x and y = Cov (x;y)
√(var x)(var y)

Var x = E(x²) - (E(x))²

Ex² = 0²(0.22)+1²(0.26)+2²(0.43)+3²(0.09)

= 3.75
Ey² = 0²(0.23)+1²(0.21)+2²(0.3)+3²(0.26)

= 3.75

Var (x) = 2.79 - (1.39)² = 0.8579

Var(y) = 3.75 - (1.59)² = 1.2219

P = 0.3399
√(0.8579)(1.2219)

= 0.3319
(h) The number of snacks and number of tests are 33.19% related, therefore these are
not fully independent

8
QUESTION THREE

Type of   Firm    
labour A B C D Total
Skilled 24 24 23 49 120
Semi-skilled 32 60 37 51 180
Manual 24 56 40 80 200
Total 80 140 100 180 500

e₁₁ = 120*80 = 19.2 e₃₁ = 80*200 = 32


500 500
e₁₂ = 140*120 = 33.6 e₃₂ = 140*200 = 56
500 500
e₁₃ = 100*120 = 24 e₃₃ = 100*200 = 40
500 500
e₁₄ = 120*180 = 43.2 e₃₄ = 180*200 =72
200 500
e₂₁ = 80*180 = 28.8
500
e₂₂ = 140*180 = 50.4
500
e₂₃ = 180*100 = 36
500
e₂₄ = 180*180 = 64.8
500

H₀ : there is no relationship between the firm and the type of labor


H₁ : there is a relationship between the firm and the type of labor
𝛼 = 0.05
Reject H₀ if 𝛼²call > 𝛼²critical

df = (R-1)(C-1) = (3-1)(4-1)
= 2*3 = 6
𝛼²critical(0.05)(6) = 12.592

𝛼²call = Σ(O-E)² = (24 -19.2)²+ (24-33.6)² + (23-24)² + (49-43.2)² + (32-28.8)²+


E 19.2 33.6 24 43.2 28.8

(60-50.4)² + (37-36)²+(51-64.8)²+(24-32)²+(56-56)²+(40-40)²+(80-72)²
50.4 36 64.8 32 56 40 72

= 12.8029

𝛼²call = 12.8029 > 𝛼²critical = 12.592

9
We reject H₀ and conclude that at 0.05 level of significance there is a relationship between
firm and the type of labor.

(b) H₀ : Ratio is 9:3:3:1


H₁ : Ratio is not 9:3:3:1
𝛼 = 0.05

O Proportion E
882 9/16 900
313 3/16 300
287 3/16 300
118 1/16 100
1600 1 1600

Reject o H₀ if 𝛼²call > 𝛼²critical

𝛼²critical = 𝛼²(𝛼 = 0.05 df = 3) = 7.8

𝛼²call = (882-900)²+(313-300)²+(287-300)²+(118-100)²
900 300 300 100

= 4.7266

𝛼²call = 4.7266 and is less than 𝛼²critical = 7.8

We accept H₀ and conclude that the experiment support the theory at 0.05 level of
significance.

(c) Cost of living index = ΣI.W


ΣW

= (382)(48) + (220)(10)+(230)(8)+(160)(12)+(190)(15)
48+10+8+12+15

= 25706
93

= 276.4086

≈ 276

10
QUESTION FOUR

(a) Y𝑖𝗃 = μ + β𝑖 + τ𝗃 + ε𝑖𝗃

Y𝑖𝗃 is the j ͭ ͪ observation of the i ͭ ͪ treatment

μ is the population mean

β𝑖 is j ͭ ͪ block effect

τ𝗃 is the treatment effect of the i ͭ ͪ treatment

ε𝑖𝗃 is the random error

(b) (i) μ = 34+50+42+38 + 38+38+36+44 + 44+46+50+52 + 40+52+46+36


4 4 4 4
+42+44+48+42 + 41+39+48+43.5+44
4 5
μ = 43.1

(ii)
(iii) τ𝗃 = ȳ𝑖 - ȳ = 48-43.1 = 4.9
(iv) ΣD3 = (y𝑖𝗃 - ȳ𝑖) = (52-48) = 4

(c) Potatoes is the blocking variable and fertilizers is the treatment in this experiment

(d) The purpose of the blocks in this experiment

(e) Sum of Squares DF Mean Square F Ratio

SSA = b ² a–1 MSA = P=

SSB = a ² b–1 MSB = P=

SSE = Σ𝑖Σ𝗃 (x𝑖𝗃-x̄ -x̄ 𝗃+x̿ )² (a-1)(b-1) MSE =

11
SST = (xy-x̿ )² (ab-1)

Potatoes Fertilizers x̄𝗃


  1 2 3 4 5  
A 34 38 44 40 42 89.6
B 50 38 46 52 44 46
C 42 36 50 46 48 44.4
D 38 44 52 36 42 42.4
x̄𝑖 41 39 48 43.5 44 43.1 = x̿

SSA = b ²= 4((41-43.1)²+(39-43.1)²+(43-43.1)²+(43.5-43.1)²+(44-
43.1)²)
= 4(46.2)

= 92.4

SSB = a ² = 5(39.6-43.1)²+(46-43.1)²+(44.4-43.1)²+(42.4-43.1)²

= 5(22.84)

= 114.2

SSE = Σ𝑖Σ𝗃 (x𝑖𝗃-x̄ -x̄ 𝗃+x̿ )² = (34-43.1)²+(38-43.1)²+(44-43.1)²+(40-43.1)²+(42-


43.1)²+(50-43.1)²+(38-43.1)²+(46-43.1)²+(52-43.1)²+(44-43.1)²+(42-43.1)²+(36-
43.1)²+(50-43.1)²+(46-43.1)²+(48-43.1)²+(38-43.1)²+(44-43.1)²+(52-43.1)²+(36-
43.1)²+(42-43.1)² = 571.8

Two way Anova Table


Sum of Sum of
Square Square DF Mean Square F Ratio
SSA 92.4 4 23.1 0.7591
SSB 114.2 3 38.067 1.2509
SSE 365.2 12 30.43
SST 571.8 19

H₀ : U₁ = U₂ = U₃

F4:12 = 3.86 and F3:12 = 40.39 form tables

12
f) Since 0.7591 < 3.36 we conclude that we have no sufficient evidence to reject H₀ that
fertilizers are significant on the yield of potatoes

g) Since 1.2509 < 4.39 we conclude that we have no sufficient evidence to reject H₀ and
conclude that potatoes variety have no significance on the yield of potatoes.

QUESTION FIVE

(a)(i) a = Σy b = Σxy
n n

Trend
Year pd x x² xy yc
8 70 -3 9 -210 74.3
9 75 -2 4 -150 79.0
0 90 -1 1 -90 83.72
1 91 0 0 0 88.43
2 95 1 1 15 93.14
3 98 2 4 196 97.85
4 100 3 9 300 102.56
  619 Σx=0  Σx²=28  132 619

a = 619/7 b = Σxy /Σx² = 132/28 = 4.71

yc = 88.43+4.71x

(ii) y7 = 88.43+4.71(7) = 121.4

(iii) yc = 88.43/12 + (43.71)x/144

7.369 + 0.0327x

13
(b)
4 4
centre centre   (i)
    moving moving   Seasonal Deseasonable
Year φ Series total average yt/cma index data
1 1 54       0.4200 128.57
2 50       1.1056 45.22
3 106 280 70 1.5142 1.3885 76.34
  4 70 260 65 1.0769 1.1220 62.38
2 1 34 269 67.25 0.5055 0.4200 80.95
2 59 241 60.25 0.9792 1.1056 53.36
3 78 233 58.25 1.3390 1.3885 56.17
  4 62 209 52.25 1.1866 1.1220 355.25
3 1 10 232 58 0.1724 0.4200 23.80
2 82 252 63 1.3015 1.1056 74.16
3 98 276 69 1.4202 1.3885 70.57
  4 86 312 78 1.1025 1.1220 76.64
4 1 46 316 79 0.5822 0.4200 109.52
2 86 332 83 1.0361 1.1056 77.78
3 114 356 89 1.2808 1.3885 82.10
  4 110       1.1220 98.03

1 = 0.5055+0.1724+0.5822 = 0.4200
3

2 = 0.9792+1.3015+1.03614 = 1.1056
3

3 = = 1.38855

4 = = 1.1220

(ii) Trend forecast

X y
1 128.57
2 45.55

14
3 76.34
4 62.38
5 90.95
6 53.36
7 56.17
8 55.25
9 23.8
10 74.16
11 70.57
12 76.64
13 109.52
14 77.78
15 82.1
16 98.03

Σx = 138
Σy =1176.3
Σx² = 1552
Σxy = 10,424.36

Trend y = bx + a = 66.87 + 0.77x

b = nΣxy – ΣxΣy = 16(10424.36) - (133)(1176.3)


nΣx² - (Σ)² 16(1552) - (133)2

= 0.77062

a = ȳ - bx̄ = 1176.3 - 0.77062(138)


16 16

= 66.87

15
(iii)
CYCLICAL
Year inflow CMA T CMA^ COMPONET
1 54 1 1.21
50 2 1.21
106 70 3 57.52198 1.216926
70 65 4 59.37088 1.094813
2 34 67.25 5 61.21978 1.098501
59 60.25 6 63.06868 0.955308
78 58.25 7 64.91758 0.897292
62 52.25 8 66.76648 0.782578
3 10 58 9 68.61538 0.845291
82 63 10 70.46429 0.89407
98 69 11 72.31319 0.954183
86 78 12 74.16209 1.05175
4 46 79 13 76.01099 1.039323
86 83 14 77.85989 1.066017
114 89 15 79.70879 1.116564
110 16 1.11

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.660797
R Square 0.436653
Adjusted R
Square 0.38544
Standard Error 8.542257
Observations 13

ANOVA
Significance
  df SS MS F F
Regression 1 622.1552198 622.1552 8.52616 0.013939
Residual 11 802.6717033 72.97015
Total 12 1424.826923      

16
Standard Upper Lower Upper
  Coefficients Error t Stat P-value Lower 95% 95% 95.0% 95.0%
Intercept 51.97527 6.171613816 8.421667 4E-06 38.39164 65.55891 38.39164 65.5589
X Variable 1 1.848901 0.633194217 2.919959 0.013939 0.45525 3.242552 0.45525 3.24255

17

You might also like