The expected value is the weighted average of the possible outcomes of a random variable, where the weights are the probabilities that the outcomes will occur.less
The degree of disperation of outcomes around the expected value off a random variable is measured using the variance and standard deviation. When pairs of random variables are being observed, the covariance and correlation are used to measure the extent of the relationship between the observed values for the two variables from one observation to the next.dom
The variance is calculated as the probability-weighted sum of the squared differences between each possible outcome and expected value.ide
Var(R)=E([R-E(R)]^2) = w1(R1-E1)^2 + w2(R2-E2)^2 + ... + wn(Rn-En)^2
Note: 普通統計中的方差是平方和直接除以N,這裏面假設每一個值出現的機率(權重)是同樣的,因此除以N就能夠了。並且平方和中是每一個值減去平均值,而不是指望。一樣是就假設每一個值的權重是同樣的。3d
The variance and standard deviation measure the disperation, or valatility, of only one variable. In many finance situations, however, we are interested in how two random variables move in relation to each other.rest
Covariance is a measure of how two assets move together. It is the expected value of the product of the deviations of two random variables from their respective expected values.code
Cov(Ri,Rj) = E{[Ri-E(Ri)][Rj-E(Rj)]}
Note 1: The variance measures how a random variable moves with itself, and the covariance measures how one random variable move with another random variable.orm
Note 2: The covariance may range from negative infinity to positive infinityblog
Correlation Coefficient, or simply, correlation is calculate by the covariance of two random variables divided by the product of the random variable's standard deviations.ip
Corr(Ri, Rj)=Cov(Ri, Rj)/[σ(Ri)σ(Rj)]
Note 1: Correlation measures the strength of the linear relationship between two random variables.
Note 2: Correlation has no units.
Note 3: The correlation ranges from -1 to 1.
Note 4: If Corr(Ri, Rj)=1.0, the random variables have perfect positive correlation.
Note 5: If Corr(Ri, Rj)=-1.0, the random variables have perfect negative correlation.
Note 5: If Corr(Ri, Rj)=0, there is no linear relationship between the variables, indicating that prediction of Ri cannot be made on the basis of Rj using linear method.ci
*Portfolio expected value
*Portfolio variance
Note: specially for two assets, the portfolio variance is calculated:
Bayers' formula is used to update a given set of prior probabilities for a given event in response to the arrival of new new information.
階乘,組合 和排列