2011年6月20日 星期一

初探 Internet Component Download

這幾天都在研究 "Internet Component Download” 的資料,以下是一些網上資料的整理 :

MSDN offical defination
Internet Component Download is a system service for downloading and installing software from Web sites on the Internet and intranets. This service also provides certificate checking. Internet Component Download is supported by Microsoft Internet Explorer 3.0 and later.
You, the software provider or Web master, can "package" components and place them on your Web servers for download. When users visit your Web site, Internet Component Download enables their browsers to pull down and install the programs.
Key Concept

2011年6月13日 星期一

Covariance and Correlation Coefficient

Covariance

In probability theory and statistics, covariance is a measure of how much two variables change together.
Variance is a special case of the covariance when the two variables are identical.

For any two assets A & B, the covariance of the return of these two asset in n months is calculated by the following formula:

Cov = 1/(n-1) * Σ i = 1 to n (RAi – avgRAi) * (RBi – avgRBi)

where
RAi = Return of asset A in month i
avgRAi = Average return of asset A in n months
RBi = Return of asset B in month i
avgRBi = Average return of asset B in n months

Large positive covariance does not meaning two asset have high correlation. It also depends on their volatility (standard deviation). If the volatility is high, then the corrlation is not high. To solve this problem, we can make use of correlation coefficient of these two assets.

Correlation Coefficient

Correlation coefficient = Cov / (StdA * StdB)

where
StdA = Standard deviation of A
StdB = Standard deviation of B

The value of correlation coefficient will be lie between –1  to +1, for positive value, it mean positive correlation, vice versa.

 

Reference:
綠角財經筆記: 共變異數與相關係數(Covariance and Correlation Cofficient of Financial Assets)
Covariance - Wikipedia, the free encyclopedia
Correlation and dependence - Wikipedia, the free encyclopedia

Statistics Formulas

Parameters

  • Population mean = μ = ( Σ Xi ) / N
  • Population standard deviation = σ = sqrt [ Σ ( Xi - μ )2 / N ]
  • Population variance = σ2 = Σ ( Xi - μ )2 / N
  • Variance of population proportion = σP2 = PQ / n
  • Standardized score = Z = (X - μ) / σ
  • Population correlation coefficient = ρ = [ 1 / N ] * Σ { [ (Xi - μX) / σx ] * [ (Yi - μY) / σy ] }

Statistics

Unless otherwise noted, these formulas assume simple random sampling.

  • Sample mean = x = ( Σ xi ) / n
  • Sample standard deviation = s = sqrt [ Σ ( xi - x )2 / ( n - 1 ) ]
  • Sample variance = s2 = Σ ( xi - x )2 / ( n - 1 )
  • Variance of sample proportion = sp2 = pq / (n - 1)
  • Pooled sample proportion = p = (p1 * n1 + p2 * n2) / (n1 + n2)
  • Pooled sample standard deviation = sp = sqrt [ (n1 - 1) * s12 + (n2 - 1) * s22 ] / (n1 + n2 - 2) ]
  • Sample correlation coefficient = r = [ 1 / (n - 1) ] * Σ { [ (xi - x) / sx ] * [ (yi - y) / sy ] }

Correlation

  • Pearson product-moment correlation = r = Σ (xy) / sqrt [ ( Σ x2 ) * ( Σ y2 ) ]
  • Linear correlation (sample data) = r = [ 1 / (n - 1) ] * Σ { [ (xi - x) / sx ] * [ (yi - y) / sy ] }
  • Linear correlation (population data) = ρ = [ 1 / N ] * Σ { [ (Xi - μX) / σx ] * [ (Yi - μY) / σy ] }

 

Reference: http://stattrek.com/Lesson1/Formulas.aspx?Tutorial=Stat