Skip to content
GATEiit

GATE EC · Engineering Mathematics

Joint and conditional probability

Joint, marginal and conditional probability of events and random variables: the multiplication rule, total probability, Bayes' theorem, independence, joint PMFs and PDFs, conditional expectation and covariance.

Before you start

  • Combinatorial probability →

    Counting equally likely outcomes gives the joint and conditional probabilities in dice, card and ball questions.

  • Probability distributions →

    Joint PDFs extend single-variable PDFs; marginals must be valid PDFs of the familiar kinds.

  • Double integrals

    Marginals and probabilities of regions for continuous variables are double integrals over a region.

This topic comes before: Autocorrelation and power spectral density, Correlation and regression analysis, Entropy, Exponential distribution, MAP, ML detection, Mutual information and channel capacity theorem

Concept notes

1. Conditional probability and independence of events

The joint probability P(A∩B) is the chance that both A and B occur. The conditional probability of A given B is P(A∣B)=P(A∩B)P(B),P(B)>0. It is the probability of A when the sample space shrinks to B.

Multiplication rule: P(A∩B)=P(A∣B)P(B)=P(B∣A)P(A), and for a chain, P(A1A2A3)=P(A1)P(A2∣A1)P(A3∣A1A2). Use it for draws without replacement.

Independence: A and B are independent if P(A∩B)=P(A)P(B), which is the same as P(A∣B)=P(A). Three events are mutually independent only if every pair satisfies this and P(ABC)=P(A)P(B)P(C); pairwise independence is not enough.

Do not confuse independent with mutually exclusive (A∩B=∅). Two mutually exclusive events with non-zero probabilities are always dependent: knowing A occurred makes P(B∣A)=0.

If A and B are independent, so are A and Bc, Ac and B, and Ac and Bc.

Useful identity: P(A∪B)=P(A)+P(B)−P(A∩B); for independent events, P(A∪B)=1−P(Ac)P(Bc).

2. Total probability and Bayes' theorem

If B1,…,Bn partition the sample space (mutually exclusive, together cover everything), then P(A)=∑iP(A∣Bi)P(Bi)(total probability), P(Bj∣A)=P(A∣Bj)P(Bj)∑iP(A∣Bi)P(Bi)(Bayes). P(Bj) is the prior, P(Bj∣A) the posterior, P(A∣Bj) the likelihood.

Tree method: draw the causes first (what was sent, which box, which machine), then the observed outcome. Multiply along each branch to get joint probabilities; add the branches that give the observed outcome for the denominator.

EC setting, the binary channel: inputs 0 and 1 with priors p0,p1; crossover probabilities P(1 rx∣0 tx) and P(0 rx∣1 tx). The probability of error is Pe=p0P(1∣0)+p1P(0∣1). The MAP receiver picks the input with the larger posterior, which is the larger joint probability on the tree.

Base-rate effect: with a rare cause, even an accurate test gives a small posterior, because false alarms from the common cause dominate the denominator.

start0 sent0.61 sent0.40 received0.540.91 received0.060.10 received0.080.21 received0.320.8jointP(1 received) = 0.06 + 0.32 = 0.38; P(1 sent | 1 received) = 0.32/0.38
A binary channel drawn as a tree: priors, then transition probabilities; multiply along a path for the joint probability.

3. Joint, marginal and conditional distributions

Discrete: the joint PMF pXY(x,y)=P(X=x,Y=y) is a table whose entries add to 1.

  • Marginal: pX(x)=∑ypXY(x,y) (row sums), pY(y)=∑xpXY(x,y) (column sums).
  • Conditional: pY∣X(y∣x)=pXY(x,y)/pX(x) (a row divided by its sum).

Continuous: the joint PDF fXY(x,y)≥0 with ∬fXY dx dy=1, and P((X,Y)∈R)=∬RfXY dx dy.

  • Marginal: fX(x)=∫−∞∞fXY(x,y) dy.
  • Conditional: fY∣X(y∣x)=fXY(x,y)/fX(x).
  • Joint CDF: FXY(x,y)=P(X≤x,Y≤y) and fXY=∂2FXY/∂x ∂y.

Independence of random variables: fXY(x,y)=fX(x)fY(y) for all x,y (or the PMF factors for every cell). A quick test: the joint PDF must factor into a function of x times a function of y and the support must be a rectangle. A PDF on a triangle such as 0<x<y<1 is never independent.

Method for "find k" questions: integrate over the support and set the result to 1. Draw the support first; the limits of the inner integral come from it.

Sum of independent variables: if Z=X+Y with X,Y independent, fZ=fX∗fY (convolution). Two independent uniform(0, 1) variables give a triangular PDF on (0,2).

xy011x + y < 1line x + y = 1f(x, y) = x + y on the squareP(X + Y < 1) = ∫∫ over shadedtriangle = 1/3
A region probability: integrate the joint PDF over the part of the support where the event holds.

4. Conditional expectation, covariance and correlation

Conditional expectation: E[Y∣X=x]=∑yy pY∣X(y∣x) or ∫y fY∣X(y∣x) dy.

Law of total expectation: E[Y]=E[E[Y∣X]]=∑xE[Y∣X=x] pX(x).

Covariance and correlation coefficient: Cov(X,Y)=E[XY]−E[X]E[Y],ρ=Cov(X,Y)σXσY,−1≤ρ≤1. ∣ρ∣=1 only when Y=aX+b exactly.

Variance of a combination: Var(aX+bY)=a2Var(X)+b2Var(Y)+2ab Cov(X,Y).

Statement True?
Independent ⇒ uncorrelated (Cov=0) Yes
Uncorrelated ⇒ independent No, in general
Jointly Gaussian and uncorrelated ⇒ independent Yes
Independent ⇒E[XY]=E[X]E[Y] Yes

Classic counter-example: X uniform on {−1,0,1} and Y=X2. Then E[XY]=E[X3]=0=E[X]E[Y], so they are uncorrelated, yet Y is a function of X.

In signal terms, E[XY] is the correlation; two zero-mean signals are orthogonal when E[XY]=0.

Formulas to remember

Conditional probability
P(A∣B)=P(A∩B)P(B)
Independence
P(A∩B)=P(A) P(B)
Total probability
P(A)=∑iP(A∣Bi) P(Bi)
Bayes' theorem
P(Bj∣A)=P(A∣Bj)P(Bj)∑iP(A∣Bi)P(Bi)
Marginal PDF
fX(x)=∫−∞∞fXY(x,y) dy
Conditional PDF
fY∣X(y∣x)=fXY(x,y)fX(x)
Covariance
Cov(X,Y)=E[XY]−E[X] E[Y]
Correlation coefficient
ρ=Cov(X,Y)σX σY
Variance of a sum
Var(aX+bY)=a2σX2+b2σY2+2ab Cov(X,Y)
Total expectation
E[Y]=E[E[Y∣X]]

Common mistakes

  • Treating mutually exclusive events as independent; with non-zero probabilities they are dependent.
  • Swapping P(A | B) and P(B | A); Bayes' theorem is needed to go from one to the other.
  • Concluding independence from zero covariance; it holds only for special cases such as jointly Gaussian variables.
  • Declaring a joint PDF independent because its formula factors, while ignoring a non-rectangular support such as 0 < x < y < 1.
  • Using wrong limits in a region integral; sketch the support and the event region before writing the inner limits.
  • Subtracting variances for X − Y; Var(X − Y) = Var(X) + Var(Y) − 2 Cov(X, Y).

Worked examples

Try each step yourself, then reveal the working.

Example 1: Bayes on a binary channel

numerical

A source sends 0 with probability 0.6 and 1 with probability 0.4. A sent 0 is received as 1 with probability 0.1; a sent 1 is received as 0 with probability 0.2. Find P(1 received), P(1 sent∣1 received) and the probability of error.

  1. Step 1: Find the joint probabilities of the branches that end in 1 received.

    Try it on paper first.

Example 2: Working with a joint PMF table

numerical

X∈{0,1} and Y∈{0,1,2} have joint PMF: row X=0: 0.1,0.2,0.1; row X=1: 0.2,0.1,0.3 (for Y=0,1,2). Find the marginals, P(Y=2∣X=1), decide independence, and find Cov(X,Y).

  1. Step 1: Add rows and columns.

    Try it on paper first.

Example 3: A joint PDF on the unit square

numerical

fXY(x,y)=k(x+y) for 0≤x,y≤1 and zero elsewhere. Find k, fX(x) and P(X+Y<1).

  1. Step 1: Normalise.

    Try it on paper first.

Example 4: Uncorrelated but dependent

conceptual

X takes −1,0,1 with probability 13 each, and Y=X2. Are X and Y uncorrelated? Are they independent?

  1. Step 1: Find $E[X]$ and $E[XY]$.

    Try it on paper first.

Previous year questions

1 official GATE EC question on this topic, newest first.

Topic test

9 questions: up to 1 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE EC syllabus; being checked by a reviewer. Updated 2026-11-28. Spotted a mistake? Use Report an issue on any question, or contact us.