Академический Документы
Профессиональный Документы
Культура Документы
Y Y Y
X X X
Cov > 0 Cov < 0 Cov = 0
MSF © 6
Covariance of random variables X, Y
Cov( X , Y ) pij ( xi x )( y j y )
ij
where,
MSF © 7
Example:
Let us calculate the covariance in the last example
where a coin was flipped 3 times.
Y P(x)
0 1 2 3
X 0 1/8 1/4 1/8 0 1/2
1 0 1/8 1/4 1/8 1/2
P(y) 1/8 3/8 3/8 1/8
MSF © 8
Example(cont..)
1 1
E (X ) 0 1 0.5
2 2
1 3 3 1
E (Y ) 0 1 2 3 1.5
8 8 8 8
1 1
Cov( X , Y ) (0 0.5)(0 1.5) (0 0.5)(1 1.5)
8 4
1
(1 0.5)(3 1.5)
8
0.25
MSF © 9
• Alternate formula for covariance:
Cov( X , Y ) pij xi y j x y
i, j
• Cov(X,X) = Var(X)
MSF © 10
Correlation
Cov( A, B)
A B
MSF © 12
Properties of r:
• r ranges between +1 and −1.
• r > 0 , termed as positive correlation, indicates
that the two variables move up or down together ,
i.e. if one moves up then the other is also expected
to move up. However, the strength of the positive
linear relationship is more when r > 0.7.
MSF © 15
Variance of Sum
Recollect:
It turns out:
2 2 2 2
Var(aX+bY) = a X b Y 2a.b.Cov( X , Y )
2 2
Var wi X i w
i Xi 2 wi w j Cov( X i , X j )
i i i j
MSF © 17
Sampling
MSF © 18
There are times when one has to use the
observed data to draw conclusions about the
properties of the distribution in a population.
MSF © 19
Sample
It is a subset of elements, from the population
of interest.
Population
Sample
MSF © 20
Sample Mean
Suppose we pick a random sample x1, x2, ... , xn
from a population, then the sample mean is
defined as
n
1
x xi
n i 1
MSF © 21
Sample Variance and Standard Deviation
A random sample x1, x2, ... , xn is picked from a
population, then the sample variance is defined as
n
1
S2 ( xi x ) 2 , where x is the sample mean,
n 1i 1
n
2 1 2
S S ( xi x)
n 1i 1
MSF © 22
Note:
Sample mean/variance/standard deviation depends
on the sample size and the sample values.
Therefore, an estimate of the population
mean/variance/standard deviation changes every
time you pick a new sample. For a good estimate, it
is recommended that a larger sample size must be
taken.
MSF © 23
Sample Mean, Variance and Standard
Deviation in Open Office Calc
MSF © 24
Covariance and Correlation in Open
Office Calc
MSF © 25
INT function in Open Office Calc
Example:
• INT(4.7) = 4
• INT(-4.7) = -5
MSF © 26
INDIRECT function in Open Office Calc
Returns the reference specified by a text string.
Syntax: INDIRECT(reference)
MSF © 27
VLOOKUP function in Open Office Calc
This function checks if a specific value is contained
in the first column of an array and then returns the
value in the same row of the column asked for.
Syntax:
VLOOKUP(SearchCriterion, Array, Index, SortOrder)
SearchCriterion is the value searched for in the first column of the array.
Index is the number of the column in the array that contains the value to
be returned. The first column has the number 1.
MSF © 28
RAND function in Open Office Calc
Remark:
MSF © 30
Multiple Operation Tool in Open Office Calc
Cell reference
to the formula
{
Enter the cell reference to the corresponding cell
that is part of the formula 31
MSF ©