2011年10月31日 星期一

Level 1 - Quantitative Method - Hypothesis Testing

Hypothesis Testing


Null and Alternative Hypothesis
- Null (Ho): 希望被推翻的立論
- Alternative (HA): 希望成立的立論
 

General Process of Testing
1.      Define one or two tail test:
-          Two tail : H0: x = 0, HA: x ≠ 0
-          One tail : H0: x >= 0, HA: x < 0
2.      決定test statistics:
假設要test的是population mean是否等於0
è Test statistics = (sample value – hypothesized value)/S.D. or S.E.
3.      決定level of significance and its critical value (normal distribution)

Level of significance
One tail
Two tail
1%
2.33
2.58
5%
1.65
1.96
10%
1.28
1.65

 4.      比較 test statisticscritical value決定是否能reject null hypothesis


Error and Power of Test
Type 1 Error:
錯誤地 reject 了真的 null hypothesislevel of significance愈大,錯的機會愈大
Type 2 Error:
Reject 不到錯的 null hypothesis
Power of Test:
正確地 reject 了錯的 null hypothesis 的機會率
P value:
Level of significant 要達到幾大,才可將 rejectnull hypothesis, e.g.:
In a two tail test, the observation is 1 S.D. from the mean, critical value indicates there’s 68% chance ± 1 S.D.中,所以 level of significance 32% 或以上才可 reject null hypothesis

Typical test in exam
考試主要focus on testing observation (population mean) 是否在某一個range> < 某數值,然後再用sample sizepopulation variance known or not而決定使用T or Z statistics,最後make decision on reject or not


 
Other tests
考試中,一般都不會問及以下test的計算方法,只要大概知道一下,就可以了
1.      Difference in Mean test
-          Test 兩個 population mean 是否一樣或是否相差一個指定的數值
-          Use T statistics
2.      Paired Comparison test
-          Test 兩個 population 是否 independent
-          Use T statistics
3.      Difference in Variance test
a.      Test sample population variance 是否一樣 à use Chi square (X2) statistics
b.      Test 兩個 population variance 是否一樣 à use F statistics

Level 1 - Quantitative Method - Sampling and Estimation

Sampling and Estimation
 

Standard Error


-     不同 sample 計出來的 sample mean population mean 都會有偏差的,利用這些 sample mean去產生一個 Distribution,所計出來的S.D.àStandard Error (S.E.)
 
               S.E. = S.D./n1/2 
-          Use population S.D., if N/A à use sample S.D.
-          Sample size愈大 à SE 愈小


Confidence Interval Estimation
-  在某個 % 的信心之下,一個observation/population meanrange
Degree of Confidence = 1 – Level of Significance
-  Confidence interval = Point Estimate ± Reliability Factor * SD or SE
   Use S.E. when estimating population mean
       Use S.D. when estimating observations
-   Reliability Factor:
  1. Z value: Z table, assume standard normal distribution, e.g. 95% two tail à1.96
  2. T value: T table, degree of freedom (n-1)confidence level 去查表

T Distribution
For sample,可能會有及生偏差,所以需要一個較保守的的distribution
Characteristics of T distribution:
-          Less peak à 較少central tendency
-          Fatter tail à 較多extreme value
-          Sample size increase à more peaked and thin tail à approach normal distribution

Decision rule of Z or T

Safe First Criterion
找出最低機會低於 lowest acceptable return (threshold return)的機會:
(expected return – threshold return)/S.D.
à愈大,代表 mean/expected return threshold return距離愈大,較少機會低於 threshold return
 
Lognormal and Normal
假設 asset returnnormally distributedreturn 可以+ve-ve,但 asset price 只可以是+velognormal distribution就是將 return 變成一個price multiple (eR)distribution 0 開始及 positively skewed


Level 1 - Quantitative Method - Probability Distribution

Probability Distribution


Discrete Random Variable vs. Continuous Random Variable
- Discrete observations 的可能性有限,例如(1, 2, 3, 4, … 10),假設 probability 相同,每個數字可能性為1/10
  ※Limited outcome, equal probability à Discrete Uniform Random Variable
-  Continuous observations range 中,可以有限個小數位,所以每一個observationprobability = 1/ à approximate = 0


Binomial Distribution
重覆只有兩個outcomeevente.g.擲銀仔
Example:

        假設擲銀仔,probability = 0.4probability = 0.6,擲7:
a.      Expected value of :
P() * n à 0.4 * 7 = 2.8
7次預計會有8

b.      抽中exactly 4probability


Confidence Interval
% of observation within specific rangesome critical values:
- 90% confidence interval à mean ± 1.65 S.D.
- 95% confidence interval à mean ± 1.96 S.D.
- 99% confidence interval à mean ± 2.58 S.D.
- Within ± 1 S.D. à 68% confidence interval
- Within ± 2 S.D. à Approximate 95% confidence interval


Standard Normal Distribution


Features:
- Mean, median, mode = 0
- 50% below 0, 50% above 0 à symmetric
- S.D.作為量度距離的 measure
- No skewness and kurtosis = 3
- Tail 會不斷向 +ve -ve 伸展 à getting thin and infinite

有了這個 assumption,量度 observation mean 的距離,可計算出 > < value within a range probability

Using Z table to find probability
1.      observation 變成一個 Standardize value à Z
 Z = (observation – mean)/S.D.

2.      查表:

a.      N(Z) for Z >= 0
量度(1-upper tail) area/probability
Total area = 1,因為已包含所有的可能性
b.      N(Z) for Z <=0
量度 lower tail area
一般考試都不用查表,題目大多都已把表上的 valu e提供

3.      Application
a.      (1 – tail)sizee.g. observation above -Z or below +Z à table (a)
b.      tail sizee.g. observation >= +Z or <= -Z à table (b)
c.       rangee.g. – Z <= observation <= Z à table (b)計兩條tail size à 1 – 2 tails