Вы находитесь на странице: 1из 4

Date : 08/31/15

1. For three random variables A, B and C, show with a counterexample

that the statement A is independent of B does not imply the
statement A is independent of B given C.
Taking the example of roll of a die. Let A be the random variable associated with
the outcomes of the roll of one die and B be the random variable associated with
the outcome of the roll of another die. And Let C be the random variable
associated with the possible sum of the numbers on both the die.
Observing this, if we have only A we can get no information about the outcomes
of B and vice versa if we have B we cannot know the outcome of A. This shows
that both are independent of each other. However If we have Lets say B and C
given to us, we can very easily find out the value of A which makes A not
independent of B given C.

2. Points are sampled uniformly at random from the interval (0,1) 2 so

that they lie on the line x+y=1. Determine the expected squared
distance between any two sampled points.
Let us consider the 2 points as, r.v. X and Y.
Given that they lie on the line x+y=1, we can say y=1-x;
So we have X = (x,1-x) as one point and Y = (y, 1-y) as the second point on the
line. Knowing that the points are sampled uniformly over the range (0,1)
So the squared distance between the two points X and Y =

XY 2

( yx )2

The expected value for

+ ( x y )

XY 2

XY 2
= E[
] = E[ ( yx ) +

(x y )2 ]

= E[ ( yx )
= E[ y

= 2E[ x

] + E[ ( x y )

] E[2xy] + E[ x

] + 2E[ y

] = E[ y
] + E[ x

] 2E[2xy]

2xy +

] + E[ x

] E[2xy] + E[ y

2xy +

Now we know that variance X = E[ X

]E .

A uniform distribution between (0,1) has a variance of 1/12


= 1/12

And Expectation of 1/2 (0+1) =

Therefore, E[ x

] = Var x + E

This gives us, 2 (Var x + E ) + 2 (Var y + E

) 4E[x]E[y]

(as every point

is independent)
= 2(1/12 + ) + 2 (1/12 + ) 4(1/2 x 1/2)
=4/3 1 = 1/3
3. For any two random variables X and Y, the conditional expectation of
X given Y=y is defined by E(X|Y=y)=xpX(x|Y=y) for a fixed y. Show
that, for any three random variables A, B and C, E(A+B|C=c)=E(A|C=c)
E(A+B|C=c) =

( a+b ) p(a+ bC=c)


ap(a+ bC=c)+ bp (a+bC=c )


ap ( a|C=c ) p (bC=c)+ bp ( b|C=c ) p (aC=c)


Solving this further,



ap (aC=c) p(bC=c )+ bp(bC=c ) p (aC=c)


p ( a|C=c ) =1

for all the values of C=c, similarly

all values of C=c.

Therefore, it simplifies to,

p( bC=c )=1


E(A+B|C=c) =

ap (aC=c)+ bp(bC=c)

= E(A|C=c) + E(B|C=c)

4. A new, rare disease has arisen that affects 1 in every 100,000

people. A medical test has been invented to diagnose the disease. For
any person with the disease, the test successfully diagnoses the
disease with probability 0.98. However, if someone does not have the
disease, the test misdiagnoses them as having the disease with
probability 0.002 (called the false positive rate). Person X is tested and
the test indicates X has the disease. What is the probability that X
actually has the disease?
Let the probability of having the disease be defined by P(D) = 1/100,000 =

The probability of not having the disease be P( D ) = 1 - (1/100,000) = 0.99999

Then let the probability of getting the test positive when someone has the
disease P(tpos|D) = 0.98
Where tpos is the test being positive and subsequently tneg will be the test
being negative.
We are also given that the probability of the getting the test positive when not

having the disease P(tpos| D ) = 0.002

So the probability that the patient has the disease given the test is positive can
be given as,
P(D|tpos) = {P(tpos|D) P(D)}/{P(tpos)}
Now we have P(tpos|D) and P(D) and we need to find P(tpos)

We get that by, P(tpos) = P(tpos|D) P(D) + P(tpos| D ) P( D

P(tpos) = 0.98 * 0.00001 + 0.002 * 0.99999
P(tpos) = 0.00200978
Putting this in above equation we get,
P(D|tpos) = {0.98 * 0.00001}/0.00200978 = 0.004876

5. Every package of some unhealthy cereal includes an exciting and

shiny plastic animal. There are c different types of animal, and each
package is equally likely to contain any type. Your children make you
buy one package of the cereal daily until they have collected all the
animals. Find the expected number of days that elapse before you can
stop buying this cereal.
Let us assume that X is the expected number of days to collect the c different
Now, the probability of collecting a new animal at first chance is 1, as there are c
types of animals and on the first time any pick will be new, however after this
chance, we have a probability of getting a new animal as p(new) =

(c1)/c ,

and subsequently as we keep getting the new animals one by one the probability
progresses as

(c2)/c ,

(c3)/c , ...,

(c(c2))/c ,

(c(c1))/ c .

This if simplified goes as let X be a random variable having elements



x1 , x2

where 0 < i <= c.

Now we see the above probabilities to be geometric distribution with expectation

1/ p .
Thus we have E(X) = E(

i.e. E(X) =

which is ,

px 1
c /c

px 2

x 1 ) + E( x 2 ) + E( x 3 ) +... + E( x i )

c /(c1)

px 3

+ ... +

c /(c2)

p xi
+ ... +

c /1

1 1 1
c [ 1+ + + + + ]
2 3 4


E(X) = c

for all c, 0 < c <

Putting in the known value of c and calculating, we can get the number of days.