ExamplesCh33 24jan2017
ExamplesCh33 24jan2017
25
31 Apr-02 -7.29%
32 May-02 -17.35% 20
33 Jun-02 -2.20%
34 Jul-02 -14.92% 15
35 Aug-02 -25.01% 10
36 Sep-02 7.55%
37 Oct-02 26.11% 5
38 Nov-02 -24.97%
0
39 Dec-02 6.05%
40 Jan-03 5.37% 5% 30% 25% 20% 15% 10% -5% 0% 5% 10% 15% 20% 25% 30% 35% 40% 45% 50% 55%
-3 - - - - -
41 Feb-03 -2.26%
42 Mar-03 13.06% Return
43 Apr-03 10.85%
44 May-03 -14.11%
Ex33.1
A B C D E F G H I J K L M
45 Jun-03 7.29%
46 Jul-03 26.38%
47 Aug-03 -4.38%
48 Sep-03 26.94%
49 Oct-03 2.90%
50 Nov-03 -1.27%
51 Dec-03 6.78%
52 Jan-04 -2.26%
53 Feb-04 -4.63%
54 Mar-04 -14.06%
55 Apr-04 4.03%
56 May-04 -7.37%
57 Jun-04 -11.69%
58 Jul-04 -8.41%
59 Aug-04 8.91%
60 Sep-04 15.04%
61 Oct-04 -1.10%
62 Nov-04 1.82%
63 Dec-04 -5.62%
64 Jan-05 14.04%
65 Feb-05 -3.68%
66 Mar-05 -2.02%
67 Apr-05 10.77%
68 May-05 1.55%
69 Jun-05 13.16%
70 Jul-05 2.90%
71 Aug-05 3.70%
72 Sep-05 -15.67%
73 Oct-05 13.75%
74 Nov-05 -1.25%
75 Dec-05 -8.77%
76 Jan-06 2.12%
77 Feb-06 8.77%
78 Mar-06 7.01%
79 Apr-06 -10.02%
80 May-06 -3.01%
81 Jun-06 -1.59%
82 Jul-06 9.42%
83 Aug-06 2.03%
84 Sep-06 -9.11%
85 Oct-06 -2.08%
86 Nov-06 -2.56%
87 Dec-06 8.43%
88 Jan-07 -0.72%
Ex33.1
A B C D E F G H I J K L M
89 Feb-07 -2.78%
90 Mar-07 14.45%
91 Apr-07 2.87%
92 May-07 6.42%
93 Jun-07 -6.29%
94 Jul-07 -2.68%
95 Aug-07 6.86%
96 Sep-07 -10.62%
97 Oct-07 -3.17%
98 Nov-07 5.78%
99 Dec-07 -7.02%
100 Jan-08 -3.20%
101 Feb-08 -5.65%
102 Mar-08 3.50%
103 Apr-08 11.40%
104 May-08 -13.30%
105 Jun-08 -13.07%
106 Jul-08 0.51%
107 Aug-08 -12.27%
108 Sep-08 -8.50%
109 Oct-08 -20.38%
110 Nov-08 -0.33%
111 Dec-08 -3.01%
112 Jan-09 -4.00%
113 Feb-09 15.09%
114 Mar-09 10.05%
115 Apr-09 7.43%
116 May-09 9.82%
117 Jun-09 13.41%
118 Jul-09 2.25%
119 Aug-09 -3.69%
120 Sep-09 -0.47%
121 Oct-09 7.83%
122 Nov-09 3.05%
123 Dec-09 -11.09%
Ex33.1
UN-22M
A B C D E F G H I J K L M N
1 Ex 33.2: Pick an entry from an array (Index function)
2 We are given below a 12 x 3 array of monthly returns during 2006
3 on stocks of Apple, GM, and Walmart.
4 We want to identify the return during June 2006 on the stock of GM.
5 Another Example
6 Apple Comp. General Motors Walmart
7 The elements of the array could be a mix of text and numbers.
8 Jan-06 5.0% 23.9% -1.5% We are given below a 3 x 3 array.
9 Feb-06 -9.3% -14.5% -1.6% We want to find out the element in the 2nd row & 3rd column.
10 Mar-06 -8.4% 4.7% 4.5%
11 Apr-06 12.2% 7.6% -4.7% a b 3
12 May-06 -15.1% 18.8% 8.0% Simon 6 Howie
13 Jun-06 -4.2% 10.6% -0.6% q 7 Jack
14 Jul-06 18.7% 8.2% -7.6%
15 Aug-06 -0.2% -8.7% 0.9% Howie #VALUE!
16 Sep-06 13.5% 14.0% 10.3%
17 Oct-06 5.3% 5.0% -0.1%
18 Nov-06 13.0% -15.6% -6.5%
19 Dec-06 -7.4% 5.1% 0.5%
20
21 10.6% #VALUE!
UN-22S
A B C D E
1 Example 33.3: Basic statistical functions (variance, std. dev, correlation, etc.)
2 (X) (Y)
3 Return on S&P 500 Return on stock of Target
4 Jan-06 2.5% -0.4%
5 Feb-06 0.0% -0.5%
6 Mar-06 1.1% -4.4%
7 Apr-06 1.2% 2.1%
8 May-06 -3.1% -7.7%
9 Jun-06 0.0% -0.1%
10 Jul-06 0.5% -6.0%
11 Aug-06 2.1% 5.6%
12 Sep-06 2.5% 14.2%
13 Oct-06 3.2% 7.1%
14 Nov-06 1.6% -1.6%
15 Dec-06 1.3% -1.8%
16
17 Average 0.0108 0.0054 #VALUE!
18 Sample Variance 0.0003 0.0037 #VALUE!
19 Population Variance 0.0002 0.0034 #VALUE!
20 Sample Std. Deviation 0.0164 0.0607 #VALUE!
21 Population Std. Deviation 0.0157 0.0581 #VALUE!
22
23 Correlation 0.6790 #VALUE!
24 Covariance (Sample) 0.0007 #VALUE!
Page 7
UN-22S
A B C D E F G H I J
1 Example 33.4: Linear Regression using (1) Basic formulas (2) Data-Data Analysis (3) Linest
2 (X) (Y)
3 Return on S&P 500 Return on stock of Target
4 Jan-06 2.5% -0.4%
5 Feb-06 0.0% -0.5%
6 Mar-06 1.1% -4.4%
7 Apr-06 1.2% 2.1%
8 May-06 -3.1% -7.7%
9 Jun-06 0.0% -0.1%
10 Jul-06 0.5% -6.0%
11 Aug-06 2.1% 5.6%
12 Sep-06 2.5% 14.2%
13 Oct-06 3.2% 7.1%
14 Nov-06 1.6% -1.6%
15 Dec-06 1.3% -1.8%
16
17 (1) Basic Formulas
18
19 Regression intercept -0.0217 #VALUE!
20 Regression slope 2.5058 #VALUE!
21 Regression r-squared 0.4610 #VALUE!
22 Regression r-squared (as the square of the correlation 0.4610 #VALUE!
23
24 (2) Data-Data Analysis-Regression
25
26 SUMMARY OUTPUT
27
28 Regression Statistics
29 Multiple R 0.6789598573
30 R Square 0.4609864878
31 Adjusted R Square 0.4070851366
32 Standard Error 0.0467385741
33 Observations 12
34
35 ANOVA
36 df SS MS F Significance F
37 Regression 1 0.0186826923 0.0186826923 8.5524106 0.0151843333
38 Residual 10 0.0218449431 0.0021844943
39 Total 11 0.0405276353
40
41 Coefficients Standard Error t Stat P-value Lower 95% Upper 95% Lower 95.0%Upper 95.0%
42 Intercept -0.0216806034 0.016371346 -1.324301827 0.21487191 -0.058158235 0.0147970286 -0.058158 0.014797
43 X Variable 1 2.5058300886 0.8568550251 2.9244504791 0.01518433 0.5966381167 4.4150220605 0.5966381 4.415022
44
45
46
47 (3) Using Linest
48
49
50
51 Slope --> 2.5058300886 -0.0216806034 <-- Intercept
52 Standard error of slope --> 0.8568550251 0.016371346 <-- Standard error of intercept
53 R2 --> 0.4609864878 0.0467385741 <-- Std error of y values (also =Steyx(D4:D13,C4:C13) )
54 F statistic --> 8.5524106047 10 <-- Degrees of freedom
55 SSxy = Slope*(summed product of observations from means) --> 0.0186826923 0.0218449431 <-- SSE = Residual sum of squares
Page 8
Example 33.5: Multiple Linear Regression using (1) Data-Data Analysis (2) Linest
We want to model the relationship between the number of financial analysts that follow a firm and firm size, % institutional own
SUMMARY OUTPUT
Regression Statistics
Multiple R 0.4353502634
R Square 0.1895298518
Adjusted R Square 0.1705344577
Standard Error 6.644232351
Observations 132
ANOVA
df SS MS F Significance F
Regression 3 1321.41792098 440.47264 9.977674 5.884772E-06
Residual 128 5650.66541235 44.1458235
Total 131 6972.08333333
Observation X1 X2 Y Predicted Y
1 35.3 81.2 10.98 11.4071 #VALUE!
2 29.7 22.5 11.13 11.4394
3 30.8 77.3 12.51 11.8166
4 58.8 34.8 8.4 8.6770
5 61.4 55.1 9.27 8.6004
6 71.3 124.8 8.73 8.2413
7 74.4 18.5 6.36 6.9932
8 76.7 234.6 8.5 8.6817
9 70.7 22.5 7.82 7.3937
10 57.5 123.3 9.14 9.5897
X2 X1 Intercept
0.008864 -0.098674 14.17054
0.002995 0.011037 0.627107
0.919582 0.578275 #N/A
40.02283 7 #N/A
26.76743 2.340814 #N/A
ions against the actual values of Y.
Chart Title
14.0000
12.0000
10.0000
8.0000
6.0000
4.0000
2.0000
0.0000
6 7 8 9 10 11 12 13
1 12 13
Example 33.7: Using VLOOKUP function
You are given a grading scheme. You are also given the scores earned by students. Use VLOOKUP to determine student grad
In the above example, we were not looking for an exact match of the score.
In such a case, the source table (grading scheme) has to be sorted in ascending order (by score).
to determine student grades.
Example 33.8: Using VLOOKUP function when an exact match is required
An investment advisory firm has prepared a report on 5 stocks. The report includes the ticker, classification into foreign or dom
over the next year. Your portfolio has 8 stocks. Use VLOOKUP to extract information for these stocks.
Foreign Forecast
--- ---
--- ---
No 3%
--- ---
No 10%
--- ---
No 5%
Yes 8%