Conditional Expectation: 7 Facts You Should Know

For the random variable dependent on one another requires the calculation of conditional probabilities which we already discussed, now we will discuss some more parameters for such random variables or experiments like conditional expectation and conditional variance for different types of random variables.

Conditional Expectation

   The definition of conditional probability mass function of discrete random variable X given Y is

here pY(y)>0 , so the conditional expectation for the discrete random variable X given Y when pY (y)>0 is

in the above expectation probability is the conditional probability.

  In similar way if X and Y are continuous then the conditional probability density function of the random variable X given Y is

where f(x,y) is joint probability density function and for all yfY(y)>0 , so the conditional expectation for the random variable X given y will be

for all yfY(y)>0.

   As we know that all the properties of probability are applicable to conditional probability same is the case for the conditional expectation, all the properties of mathematical expectation are satisfied by conditional expectation, for example conditional expectation of function of random variable will be

and the sum of random variables in conditional expectation will be

Conditional Expectation for the sum of binomial random variables

    To find conditional expectation of the sum of binomial random variables X and Y with parameters n and p which are independent, we know that X+Y will be also binomial random variable with the parameters 2n and p, so for random variable X given X+Y=m the conditional expectation will be obtained by calculating the probability

since we know that

thus the conditional expectation of X given X+Y=m is


Find the conditional expectation

if the joint probability density function of continuous random variables X and Y is given as


To calculate the conditional expectation we require conditional probability density function, so

since for the continuous random variable the conditional expectation is

hence for the given density function the conditional expectation would be

Expectation by conditioning||Expectation by conditional expectation

                We can calculate the mathematical expectation with the help of conditional expectation of X given Y as

for the discrete random variables this will be

which can be obtained as

and for the continuous random we can similarly show


                A person is trapped in his building underground as the entrance is blocked due to some heavy load fortunately there are three pipelines from which he can come out the first pipe take him safely out after 3 hours, the second after 5 hours and the third pipeline  after 7 hours, If any of these pipeline chosen equally likely by him, then what would be the expected time he will come outside safely.


Let X be the random variable that denote the time in hours until the person came out safely and Y denote the pipe he chooses initially, so


If the person chooses the second pipe , he spends 5 hous in that but  he come outside with expected time

so the expectation  will be

Expectation of sum of random number of random variables using conditional expectation

                Let N be the random number of random variable and sum of random variables is     then the expectation  




Correlation of bivariate distribution

If the probability density function of the bivariate random variable X and Y is


then the correlation between random variable X and Y for the bivariate distribution with density function is

since correlation is defined as

since the expectation using conditional expectation is

for the normal distribution the conditional  distribution X given Y is having mean

now the expectation of  XY given Y is

this gives


Variance of geometric distribution

    In the geometric distribution let us perform successively independent trials which results in success with probability p , If N represents the time of first success in these succession then the variance of N as by definition will be

Let the random variable Y=1 if the first trial results in success and Y=0 if first trial results in failure, now to find the mathematical expectation here we apply the conditional expectation as


if success is in first trial then N=1 and N2=1 if failure occur in first trial , then to get the first success  the total number of trials will have the same distribution as 1 i.e the first trial that results in failure with  plus the necessary number of additional trials,  that is

Thus the expectation will be

since the expectation of geometric distribution is so




so the variance of geometric distribution will be

Expectation of Minimum of sequence of uniform random variables

   The sequence of uniform random variables U1, U2 … .. over the interval (0, 1) and N is defined as

then for the expectation of N, for any x ∈ [0, 1] the value of N

we will set the expectation of N as

to find the expectation we use the definition of conditional expectation on continuous random variable

now conditioning for the first term of the sequence  we have

here we get

the remaining number of uniform random variable is same at the point where the first uniform value is y,in starting and then were going to add uniform random variables until their sum surpassed x − y.

so using this value of expectation the value of integral will be

if we differentiate this equation


now integrating this gives


the value of k=1 if x=0 , so


and m(1) =e, the expected number of uniform  random variables over the interval (0, 1) that need to be added until their sum surpasses 1, is equal to e

Probability using conditional Expectation || probabilities using conditioning

   We can find the probability also by using conditional expectation like expectation we found with conditional expectation, to get this consider an event and a random variable X as

from the definition of this random variable and expectation clearly

now by conditional expectation in any sense we have


compute the probability mass function of random variable X , if U is the uniform random variable on the interval (0,1), and consider the conditional distribution of X given U=p as binomial  with parameters n and p.


For the value of U the probability by conditioning is

we have the result

so we will get


what is the probability of X < Y, If X and Y are the continuous random variables with probability density functions fX and fY respectively.


By using conditional expectation and conditional probability



Calculate the distribution of sum of continuous independent random variables X and Y.


To find the distribution of X+Y we have to find the probability of the sum by using the conditioning as follows


The conditional Expectation for the discrete and continuous random variable with different examples considering some of the types of these random variables discussed using the independent random variable and the joint distribution in different conditions, Also the expectation and probability how to find using conditional expectation is explained with examples, if you require further reading go through below books or for more Article on Probability, please follow our Mathematics pages.

A first course in probability by Sheldon Ross

Schaum’s Outlines of Probability and Statistics

An introduction to probability and statistics by ROHATGI and SALEH


I am DR. Mohammed Mazhar Ul Haque. I have completed my Ph.D. in Mathematics and working as an Assistant professor in Mathematics. Having 12 years of experience in teaching. Having vast knowledge in Pure Mathematics, precisely on Algebra. Having the immense ability of problem design and solving. Capable of Motivating candidates to enhance their performance. I love to contribute to Lambdageeks to make Mathematics Simple, Interesting & Self Explanatory for beginners as well as experts. Let's connect through LinkedIn -

Recent Posts