0% found this document useful (0 votes)
3 views15 pages

Understanding Probability & Random Variables

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views15 pages

Understanding Probability & Random Variables

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Probability & Random Variables

Turning uncertainty into soft, precise numbers

All examples are gentle, step‑by‑step, and pastel‑coded so nothing feels scary ♡

Unit II – Big Picture


We move from linear algebra to the language of chance. This unit covers probability axioms, conditional
probability and Bayes’ theorem, discrete and continuous random variables, expectation, variance, moment
generating functions, and standard distributions such as Binomial, Poisson, Normal, Exponential, Gamma
and Uniform.

1. What is Probability? BEGINNER

Intuition

Probability is a number between 0 and 1 telling how likely an event is. 0 = impossible, 1 = certain,
cute middle values (like 0.3 or 0.7) represent different shades of “maybe”.

Sample space & events

• Sample space S : set of all possible outcomes. • Event A : a subset of S we care about (like “getting
an even number”). Example: rolling a die → S = {1,2,3,4,5,6}, event “even” = {2,4,6}.

✧ For equally likely outcomes: P(A) = number of favorable outcomes ÷ total outcomes.

Unit II • Page 1 / 15
Foundations – Axioms of Probability
These are the soft rules every probability must obey. Everything else is derived from here.

2. Kolmogorov’s Three Axioms CORE

The Axioms

For any event A in sample space S: 1. Non‑negativity: P(A) ≥ 0. 2. Normalization: P(S) = 1. 3.


Additivity: If A and B are disjoint, P(A ∪ B) = P(A) + P(B).

Problem 1 – Simple die example

A fair die is rolled once. Let A = {1,2}, B = {3,4,5,6}. (a) Show P(A) + P(B) = 1. (b) Check additivity.

Solution:

(a) P(A) = 2/6 = 1/3, P(B) = 4/6 = 2/3, so P(A)+P(B)=1.

(b) A and B are disjoint and A∪B = S. Axiom 3 says P(A∪B)=P(A)+P(B)=1 = P(S). ✔

✧ From these axioms we can prove all familiar rules: complement, inclusion‑exclusion, etc.

Unit II • Page 2 / 15
Events – Unions, Intersections, Complements
We now combine events like pastel stickers: “A or B”, “A and B”, “not A”.

3. Basic Identities CORE

P(Aᶜ) = 1 − P(A) P(A ∪ B) = P(A) + P(B) − P(A ∩ B)

Problem 2 – At least one six

Roll a fair die twice. What is the probability of getting at least one 6?

Solution:

Let A = “at least one 6”. Its complement Aᶜ is “no 6 at all”.

P(Aᶜ) = (5/6)·(5/6) = 25/36.

So P(A) = 1 − 25/36 = 11/36 .

Problem 3 – Union formula

In a college, 60% like tea, 50% like coffee, and 20% like both. What proportion like at least one of tea or
coffee?

Solution:

Let T = tea, C = coffee. P(T ∪ C) = P(T) + P(C) − P(T ∩ C) = 0.6 + 0.5 − 0.2 = 0.9 .

Unit II • Page 3 / 15
Conditional Probability
Sometimes we already know something happened; conditional probability updates our belief gently.

4. P(A | B) – Given B CORE

P(A | B) = P(A ∩ B) / P(B) (if P(B) > 0)

Problem 4 – Red card given face

A standard 52‑card deck. Let R = “red card”, F = “face card”. Find P(R | F).

Solution:

Face cards: J,Q,K in four suits ⇒ 12 cards total.

Red face cards: hearts & diamonds ⇒ 6 cards.

P(R | F) = 6/12 = 1/2 . Once we know “face”, only colour matters and it’s perfectly balanced.

Problem 5 – Die example

A die is rolled. Let A = “even”, B = “> 3”. Compute P(A | B).

Solution:

B = {4,5,6}, so P(B) = 3/6 = 1/2.

A ∩ B = {4,6} ⇒ P(A ∩ B) = 2/6 = 1/3.

P(A | B) = (1/3)/(1/2) = 2/3 .

Unit II • Page 4 / 15
Independence & Bayes’ Theorem
Independence: knowing B doesn’t change the chance of A. Bayes: we reverse the conditioning in a
pastel‑precise way.

5. Independence & Bayes IMPORTANT

Independence

A and B are independent if P(A ∩ B) = P(A) P(B) ⇔ P(A | B) = P(A).

Bayes: P(A | B) = [P(B | A) P(A)] / P(B)

Problem 6 – Defective item from which machine?

Machine M₁ produces 60% of items with 2% defective rate. Machine M₂ produces 40% with 5% defective rate.
Given an item is defective, find P(it came from M₂).

Solution:

Let A = “from M₂”, B = “defective”. P(A) = 0.4, P(Aᶜ)=0.6, P(B|A)=0.05, P(B|Aᶜ)=0.02.

P(B) = 0.6·0.02 + 0.4·0.05 = 0.012 + 0.02 = 0.032.

P(A|B) = 0.4·0.05 / 0.032 = 0.625 (62.5%).

Unit II • Page 5 / 15
Discrete Random Variables
Random variables turn outcomes into numbers. Discrete ones take separate, countable values.

6. PMF – Probability Mass Function CORE

Definition

A discrete random variable X has a PMF p(x) = P(X = x) such that p(x) ≥ 0 and Σₓ p(x) = 1 over all
possible values.

Problem 7 – Coin tosses

Toss a fair coin three times. Let X = number of heads. Find the PMF of X.

Solution:

Possible values: 0,1,2,3.

Use binomial with n=3, p=0.5: P(X=k) = C(3,k)(0.5)³.

So p(0)=1/8, p(1)=3/8, p(2)=3/8, p(3)=1/8.

These probabilities sum to 1 – check!

Unit II • Page 6 / 15
Continuous Random Variables
For continuous variables we talk about densities and integrals instead of discrete sums.

7. PDF – Probability Density Function CORE

Definition

A continuous X has PDF f(x) where f(x) ≥ 0, ∫ f(x) dx over all x = 1, and P(a ≤ X ≤ b) = ∫ₐᵇ f(x) dx.

Problem 8 – Uniform(0, 10)

Let X be uniformly distributed on [0, 10]. Find (a) f(x), (b) P(2 ≤ X ≤ 7).

Solution:

(a) f(x) = 1/10 for 0 ≤ x ≤ 10, 0 otherwise.

(b) P(2 ≤ X ≤ 7) = ∫₂⁷ (1/10) dx = 5/10 = 0.5 .

Unit II • Page 7 / 15
Expectation & Variance
Expectation is the soft “center” of a distribution; variance measures spread in a lilac cloud.

8. Mean and Spread CORE

E[X] = Σ x p(x) (discrete) Var(X) = E[X²] − (E[X])²

Problem 9 – Small discrete example

X takes values 1, 2, 3 with probabilities 1/4, 1/2, 1/4. Find E[X] and Var(X).

Solution:

E[X] = 1(1/4) + 2(1/2) + 3(1/4) = 0.25 + 1 + 0.75 = 2 .

E[X²] = 1(1/4) + 4(1/2) + 9(1/4) = 0.25 + 2 + 2.25 = 4.5.

Var(X) = 4.5 − 4 = 0.5 .

Unit II • Page 8 / 15
Binomial Distribution
Binomial models the number of successes in n independent “yes/no” trials.

9. X ~ Binomial(n, p) IMPORTANT

P(X = k) = C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ

Problem 10 – Ten pastel trials

A quiz has 10 true/false questions guessed at random. Let X = number of correct answers. Find P(X = 7).

Solution:

n=10, p=0.5. P(X=7) = C(10,7)(0.5)¹⁰ = C(10,3)/1024 = 120/1024 ≈ 0.117 .

Problem 11 – Mean & variance

For X ~ Binomial(n, p), write formulas for E[X] and Var(X).

Answer:

E[X] = n p, Var(X) = n p (1 − p).

Unit II • Page 9 / 15
Poisson Distribution
Poisson is for counts of rare events over a fixed time or space (like cute shooting stars).

10. X ~ Poisson(λ) IMPORTANT

P(X = k) = (e^{−λ} λᵏ) / k!, k = 0,1,2,… E[X] = Var(X) = λ

Problem 12 – Defect counts

A machine produces chips with an average of λ = 2 defects per meter. Assuming Poisson, find P(a meter has
exactly 3 defects).

Solution:

P(X=3) = e^{−2} 2³ / 3! = e^{−2} · 8/6 ≈ 0.180 .

Unit II • Page 10 / 15
Normal Distribution
The soft bell curve that appears everywhere: heights, marks, measurement errors, etc.

11. X ~ N(μ, σ²) IMPORTANT

Standard normal

Z ~ N(0,1). We use tables / software for its probabilities. Any N(μ,σ²) variable can be converted by Z =
(X − μ)/σ.

Problem 13 – 95% interval

For Z ~ N(0,1), find z such that P(−z ≤ Z ≤ z) ≈ 0.95.

Solution:

From standard normal tables, P(Z ≤ 1.96) ≈ 0.975.

Symmetry ⇒ P(−1.96 ≤ Z ≤ 1.96) ≈ 0.95.

So z ≈ 1.96 is the magic 95% value.

Unit II • Page 11 / 15
Exponential & Gamma
These describe waiting times and sums of waiting times – like soft pastel queues.

12. X ~ Exp(λ) CORE

f(x) = λ e^{−λx}, x ≥ 0 E[X] = 1/λ, Var(X)=1/λ²

Problem 14 – Waiting for a bus

Bus inter‑arrival times are Exp(λ = 1/10) minutes (mean 10 minutes). What is P(wait > 15 min)?

Solution:

P(X > t) = e^{−λt} ⇒ P(X > 15) = e^{−(1/10)·15} = e^{−1.5} ≈ 0.223 .

Unit II • Page 12 / 15
Moment Generating Functions (MGF)
MGFs are like delicate summary signatures of a distribution – they encode all moments.

13. Definition & Simple Example CONCEPT

M_X(t) = E[e^{tX}] M′(0) = E[X], M″(0) = E[X²], …

Problem 15 – MGF of Bernoulli(p)

Let X be 1 with probability p and 0 with probability 1 − p. Find M_X(t).

Solution:

M_X(t) = E[e^{tX}] = e^{t·1}p + e^{t·0}(1 − p) = p e^{t} + (1 − p).

Differentiate at 0 to check: M′(0) = p = E[X]. Works!

Unit II • Page 13 / 15
Mixed Practice – Probability & RV
These problems weave multiple ideas together so they stay rooted like a green tree.

14. Mixed Problems PRACTICE

Problem 16 – At least one success

X ~ Binomial(n = 5, p = 0.2). Find P(X ≥ 1).

Solution:

P(X ≥ 1) = 1 − P(X = 0) = 1 − (0.8)⁵ ≈ 0.6723 .

Problem 17 – Combining normal & linear transform

If X ~ N(10, 4) and Y = 3X − 5, find mean and variance of Y.

Solution:

E[Y] = 3E[X] − 5 = 3·10 − 5 = 25 .

Var(Y) = 3² Var(X) = 9·4 = 36 .

Unit II • Page 14 / 15
Unit II – Soft Summary Page
A pastel recap of probability & random variables

15. Wrap‑Up SUMMARY

Core memory points:

• Probability lives between 0 and 1 and obeys three axioms. • Complements, unions, intersections link
events algebraically. • Conditional probability and Bayes gently update beliefs with new info. • Discrete
random variables use PMFs; continuous ones use PDFs. • Expectation = long‑run average, variance =
spread of outcomes. • Binomial models repeated yes/no trials; Poisson models rare counts. • Normal
distribution is the ubiquitous bell curve. • Exponential models waiting times; Gamma sums such waits. •
MGFs encode all moments and uniquely identify many distributions.

✧ If you can calmly explain these ideas out loud to a friend, Unit II has rooted itself firmly – like a soft lilac tree
that will not be forgotten.

Unit II • Page 15 / 15

You might also like