GATE CS - ENGINEERING MATHEMATICS:Probability & Statistics

Mastering probability & statistics concepts and implementation.

Probability & Statistics for GATE CS

Probability usually contributes about 3–4 marks. Expect conditional probability, Bayes’ theorem, a discrete distribution (binomial / Poisson / geometric), and expectation/variance of a simple random variable. Write the sample space before plugging into a formula.


1. Basic Probability (Foundation for 80% of Questions)

Probability tells how likely an event is.

  • 0≤P(A)≤10 \le P(A) \le 1
  • Favourable outcomes → numerator
  • Total outcomes → denominator

1.1 Complement Rule

P(A′)=1−P(A)P(A') = 1 - P(A)

Useful when it’s easier to compute “not happening” than “happening”.

GATE Pattern:

Probability of “at least one success”:

P(at least one success)=1−P(no success)P(\text{at least one success}) = 1 - P(\text{no success})

1.2 Addition Rule

P(A∪B)=P(A)+P(B)−P(A∩B)P(A \cup B) = P(A) + P(B) - P(A \cap B)

If AA and BB are mutually exclusive:

P(A∪B)=P(A)+P(B)P(A \cup B) = P(A) + P(B)

1.3 Multiplication Rule

For independent events:

P(A∩B)=P(A) P(B)P(A \cap B) = P(A)\,P(B)

Tip:

Two events are independent iff:

P(A∣B)=P(A)P(A \mid B) = P(A)

2. Conditional Probability

Conditional probability measures the chance of an event given that another has already occurred.

P(A∣B)=P(A∩B)P(B)P(A \mid B) = \frac{P(A \cap B)}{P(B)}

Most GATE probability questions revolve around this idea.

2.1 Bayes’ Theorem (Most Tested Formula)

P(A∣B)=P(B∣A) P(A)P(B)P(A \mid B) = \frac{P(B \mid A)\,P(A)}{P(B)}

Expanded:

P(Ai∣B)=P(B∣Ai) P(Ai)∑jP(B∣Aj) P(Aj)P(A_i \mid B) = \frac{P(B \mid A_i)\,P(A_i)}{\sum_j P(B \mid A_j)\,P(A_j)}

Where GATE uses this:

  • Naive Bayes classifier
  • Spam filtering
  • Fraud detection
  • Probability-based algorithms

This theorem shows up often enough that it is worth automatic recall.


3. Random Variables (Discrete & Continuous)

A random variable (RV) assigns numbers to outcomes of a probabilistic experiment.

3.1 Discrete Random Variable

Values are countable.

Examples:

  • Number of heads in tosses
  • Number of packets arriving
  • Rolling a die

Defined using PMF (Probability Mass Function).

Expected Value (Mean):

E[X]=∑ixi P(X=xi)E[X] = \sum_i x_i\,P(X = x_i)

Variance:

Var⁡(X)=E[X2]−(E[X])2\operatorname{Var}(X) = E[X^2] - (E[X])^2

3.2 Continuous Random Variable

Values are uncountable (e.g. height, time, latency).

Defined using PDF (Probability Density Function).

Expected Value:

E[X]=∫−∞∞x f(x) dxE[X] = \int_{-\infty}^{\infty} x\,f(x)\,dx

4. Probability Distributions (High-Yield Section)

4.1 Binomial Distribution (Most Important Discrete Distribution)

Models “number of successes in \(n\) independent Bernoulli trials”.

P(X=k)=(nk)pk(1−p)n−kP(X = k) = \binom{n}{k} p^k (1-p)^{n-k}

Parameters:

  • nn: number of trials
  • pp: probability of success

Mean:

E[X]=npE[X] = np

Variance:

Var⁡(X)=np(1−p)\operatorname{Var}(X) = np(1-p)

GATE Usage: coin tosses, packet drops, success/failure models.

4.2 Poisson Distribution (Very Frequent)

Used for counting rare events in a time/space interval.

P(X=k)=λke−λk!P(X = k) = \frac{\lambda^k e^{-\lambda}}{k!}

Parameter:

  • λ\lambda: average rate

Mean = λ\lambda

Variance = λ\lambda

GATE Usage:

Queue arrivals, number of messages per second, number of failures, etc.

4.3 Normal Distribution (Conceptual Questions)

PDF:

f(x)=1σ2πe−(x−μ)22σ2f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(x-\mu)^2}{2\sigma^2}}

Standard normal:

Z=X−μσZ = \frac{X - \mu}{\sigma}

Properties:

  • Symmetric
  • Mean = median = mode = μ\mu
  • 68–95–99.7 rule (1σ, 2σ, 3σ coverage)

GATE typically tests:

  • Symmetry and shape
  • Mean/variance
  • Transformation to standard normal

5. Statistics (Mean, Variance, SD)

5.1 Mean

μ=∑xin\mu = \frac{\sum x_i}{n}

5.2 Median

Middle value when data is sorted.

5.3 Mode

Most frequent value.

5.4 Variance

σ2=∑(xi−μ)2n\sigma^2 = \frac{\sum (x_i - \mu)^2}{n}

5.5 Standard Deviation

σ=σ2\sigma = \sqrt{\sigma^2}

6. GATE PYQ‑Style Solved Problems

Q1. Conditional Probability

A data packet is corrupted with probability 0.1.

Given that a packet is corrupted, the probability it gets detected is 0.9.

Find P(detected)P(\text{detected}).

P(detected)=P(corrupted)⋅P(detected∣corrupted)=0.1×0.9=0.09P(\text{detected}) = P(\text{corrupted}) \cdot P(\text{detected} \mid \text{corrupted}) = 0.1 \times 0.9 = 0.09

Q2. Bayes’ Theorem (Classic GATE Problem)

  • P(S)=0.3P(S) = 0.3 (message is spam)
  • P(FREE∣S)=0.8P(\text{FREE} \mid S) = 0.8
  • P(FREE∣N)=0.1P(\text{FREE} \mid N) = 0.1, where NN = not spam

Find P(S∣FREE)P(S \mid \text{FREE}).

P(S∣F)=P(F∣S)P(S)P(F∣S)P(S)+P(F∣N)P(N)=0.8⋅0.30.8⋅0.3+0.1⋅0.7=0.240.31≈0.774P(S \mid F) = \frac{P(F \mid S)P(S)}{P(F \mid S)P(S) + P(F \mid N)P(N)} = \frac{0.8 \cdot 0.3}{0.8 \cdot 0.3 + 0.1 \cdot 0.7} = \frac{0.24}{0.31} \approx 0.774

Q3. Binomial Distribution

Let XX = number of heads in 5 tosses of a fair coin (p=0.5p = 0.5).

P(X=3)=(53)(0.5)3(0.5)2=1032=0.3125P(X = 3) = \binom{5}{3} (0.5)^3 (0.5)^2 = \frac{10}{32} = 0.3125

Q4. Poisson Distribution

For λ=4\lambda = 4, find P(X=0)P(X = 0).

P(0)=40e−40!=e−4P(0) = \frac{4^0 e^{-4}}{0!} = e^{-4}

Q5. Expected Value

RV XX takes values 1, 2, 3 with probabilities 0.2, 0.5, 0.3.

E[X]=1(0.2)+2(0.5)+3(0.3)=0.2+1.0+0.9=2.1E[X] = 1(0.2) + 2(0.5) + 3(0.3) = 0.2 + 1.0 + 0.9 = 2.1

7. Common Mistakes to Avoid

  • Thinking independence implies mutual exclusivity (they are different concepts)
  • Misapplying Bayes’ theorem without a proper denominator (normalisation)
  • Using binomial when Poisson is more appropriate (rare events / arrival processes)
  • Forgetting that PDF values can exceed 1 (only area under the curve matters)
  • Confusing variance and standard deviation

These small mistakes often cost 1 mark in GATE.


8. Fast Revision Sheet (Last-Minute Notes)

Binomial

P(X=k)=(nk)pk(1−p)n−kP(X = k) = \binom{n}{k} p^k (1-p)^{n-k}
  • Mean = npnp
  • Var = np(1−p)np(1-p)

Poisson

  • Mean = λ\lambda
  • Var = λ\lambda
  • Use for “rare events” / counts in intervals

Bayes’ Theorem

P(A∣B)=P(B∣A)P(A)P(B)P(A \mid B) = \frac{P(B \mid A)P(A)}{P(B)}

Expected Value

E[X]=∑xipiE[X] = \sum x_i p_i

Variance

Var⁡(X)=E[X2]−(E[X])2\operatorname{Var}(X) = E[X^2] - (E[X])^2

9. Practice problems

You can add these as premium practice items:

  1. A coin is tossed 10 times. Find P(X=5)P(X = 5) for X∼Binomial(10,0.5)X \sim \text{Binomial}(10, 0.5).
  2. A Poisson process has λ=3\lambda = 3. Find P(X>2)P(X > 2).
  3. Compute P(A∣B)P(A \mid B) when P(A∩B)=0.2P(A \cap B) = 0.2, P(B)=0.5P(B) = 0.5.
  4. Find mean and variance of X∼Binomial(20,0.25)X \sim \text{Binomial}(20, 0.25).
  5. A transaction is fraud with probability 0.2. Probability it triggers a warning is 0.7 if fraud and 0.1 if not. Find P(fraud∣warning)P(\text{fraud} \mid \text{warning}).