Friday, November 23

Variance Covariance Formula


Variance: Variance is used in the statistical analysis to find the the extent to which a single variable is varying from its mean value given a set of values.

Variance of a random variable X is often denoted as VAR ( X). It is also denoted by the symbol `sigma` 2X

Covariance: Co-variance is used in statistical analysis to find the extent to which 2 variable are varying together given a set of values for both these variables.

Covariance of two random variable X and Y is denoted as COV ( X,Y). Unlike variance which has the mathematical symbol sigma ( `sigma` ), Covariance doesn't have any kind of symbol to depict it.
Formulae for Variance and Covariance.

Lets consider 2 sets of data namely X and Y such that the values in X are x1 , x2 , x3 , x4 , ......xn and similarly the values in Y are y1 , y2 , y3 , y4 , .......yn

Now lets denote the mean of the X set of variables to be    Xm

Mean Xm = X1 + X2 + X3 +........ + Xn / n

Similarly lets denote the mean of the Y set of variables to be Ym

Mean Ym = Y1 + Y2 + Y3 +.......+ Yn / n

Formulae for Variance of X = ( x1 - xm)2 + (x2 - xm)2 + ( x3 - xm)2 + .......+ (xn - xm)2 / n

VAR ( X ) = (1/n) `sum` (xi - xm)2

Formulae for Variance of Y = ( y1 - ym)2 + (y2 - ym)2 + ( y3 - ym)2 + .......+ (yn - ym)2 / n

VAR ( Y ) = (1/n) `sum` (yi - ym)2

Formulae for Covariance of (X,Y) = ( x1 - xm) ( y1 - ym) + (x2 - xm)(y2 - ym) + ( x3 - xm)( y3 - ym) + .......+ (xn - xm)(yn - ym) / n

COV ( X , Y ) = (1/n) `sum` (xi - xm)(yi - ym)
Example Problem 1 on Variance and co Variance

Lets assume the below set of marks received by Bill and Bob in Maths, Physics, Chemistry, English and Biology for the purpose of solving Variance and Co Variance

table

Based on the Formulae given in the previous paragraph, Lets calculate the Mean Marks for Bill and Bob

Mean Marks for Bill = 16+12+14+18+20 /5 = 16.00

Mean Marks for Bob = 14+18+15+18+20 /5 = 17.00

Now lets apply the formulae of variance and find out the Variance of Bill and Bob

Variance of Bill = (16-16)2 + (12-16)2 + (14-16)2 + (18-16)2 + (20 - 16)2 / 5 = 40 / 5 = 8

Variance of Bob = (14-17)2 + ( 18-17)2 + (15-17)2 + (18-17)2 + (20-17)2 / 5 = 24 / 5 = 4.8

Co variance of ( Bill , Bob ) = (16-16)*(14-17) + (12-16)*(18-17) + (14-16)*(15-17) + (18-16)(18-17) + (20-16)*(20-17) / 5

Co Variance of ( Bill , Bob ) = 21/5 = 4.2

I am planning to write more post on What are Line Segments and Perpendicular and Parallel Lines. Keep checking my blog.

Example Problem 2 on Variance and co Variance

Lets assume a class of 4 student who have been asked to rate their liking toward 2 musical instruments Guitar and Piano on a scale of 10




Based on the above data, lets calculate the Mean of the people liking Guitar and Mean of people liking Piano.

Mean(Guitar) = ( 5+3+7+9)/4 = 24/4 = 6

Mean(Piano) = (5+9+9+5)/4 = 28/4 = 7

Var(Guitar) = ((5-6)2 + (3-6)2 + (7-6)2 + (9-7)2 )/ 4 = (1+9+1+4)/4 = 15/4 = 3.75

Var(Piano) = ((5-7)2 + (9-7)2 + (9-7)2 + (5-7)2 ) / 4 = (4+4+4+4)/4 = 16/4 = 4

Cov(Guitar,Piano) = [(5-6)(5-7) + (3-6)(9-7) + (7-6)(9-7) + (9-7)(5-7) ] / 4 = (2+(-6)+2+(-4))/4 = -6/4 = -1.5

Friday, November 9

Binomial Probability Function


Binomial probability Problems represented by B(n,p,x). It gives the probability of exactly x successes in ‘n’ Bernoullian trials, p being the probability of success in a trial. The constants n and p are called the parameters of the distribution. A Binomial distribution can be used under the following condition.

(i) any trial, result in a success or a failure

(ii) There are a finite number of trials which are independent.

(iii) The probability of success is the same in each trial.

In a Binomial distribution function mean is always greater than the variance. The binomial probability function example problems and practice problems are given below.
Example Problems - Binomial Probability Function:

Ex 1:  By using the binomial distribution. If the sum of mean and variance is 4.8 for  5 trials find the distribution

Solution:  np + npq = 4.8 , np(1 + q) = 4.8

5 p [1 + (1 − p) = 4.8

p2 − 2p + 0.96 = 0 , p = 1.2 , 0.8

p = 0.8 ; q = 0.2 [p cannot be greater than 1]

The Binomial distribution is P[X = x] = 5Cx (0.8)x (0.2)5−x,  x = 0 to 5

Practice Problem - Binomial Probability Function:

Pro 1: Find the value for p by using the Binomial distribution if n = 5and P(X = 3) = 2P(X = 2).

Ans: p = `(2)/(3)`

Pro 2: Find the probability values by using the binomial distribution.  A pair of dice is thrown 10 times. If getting a doublet is considered a success (i) 4 success (ii) No success.

Ans: (a) (35/216)(5/6)6

(b) (5/6)10

Monday, November 5

Proportion Equation


The data is obtaining by the comparison of two ratios is called proportion data. Proportion data is represented as a:b = c:d. This proportion data can be written in the form of fraction as `a/b` = `c/d` . Where the pairs of data (a,b) and (c,d) are in proportion. When the proportions are equal, the cross product of the proportion will be also equal. That is, `a/b` = `c/d` can be written as ad=bc.

Examples for Proportion Equation:

Example 1 for proportion equation:

Martin read 63 pages of the book in 33 minutes. How many pages will he be able to read in 43 minutes?

Solution:

Martin takes 33 minutes to read 63 pages.

Martin will take 43 minutes to read x pages.

This can be written as,

`63/33` = `x/43`

Now we have to do the cross multiplication.

63 `xx ` 43 = x `xx` 33

2709 = 33x

This can be written as,

33x = 2709

Now we have to divide both sides by 33.

`(33x)/33` = `2709/33`

x = 82.09 now we have to round it to the unit place.

x = 82

Therefore, Martin will read 90 pages in 45 minutes.

Example 2 for proportion equation:

Paul bought 12 apples for dollar 48.  How many apples will he be able to buy in $ 93?

Solution:

Paul spends $48 for 12 apples.

Paul will spend $93 for x apples.

This can be written as,

`12/48` = `x/93`

Now we have to do the cross multiplication.

12 `xx` 93 = x `xx` 48

1116 = 48x

This can be written as,

48x = 1116

Now we have to divide both sides by 48.

`(48x)/48` = `1116/48`

x = 23

Therefore, Paul can buy 23 apples for $ 93.

Practice Problems for Proportion Equation:

Problem 1 for proportion equation:

Martin read 40 pages of the book in 28 minutes. How many pages will he be able to read in 52 minutes?

Solution: Martin will read 74 pages in 52 minutes.

Problem 2 for proportion equation:

Paul bought 8 apples for dollar 22. How many apples will he be able to buy in $ 66?

Solution: Paul can buy 24 apples for $ 66