Skip to main content
Introduction to Statistical Methods

Random Variables — Discrete and Continuous Distributions

📅 Published: 2026-07-01
🎓 Level: postgraduate
👥 Audience: Postgraduate students in Introduction to Statistical Methods

Prerequisite Knowledge

This lecture builds on the following concepts from earlier lectures. If any feel unfamiliar, review the linked notes before proceeding.

Previously Covered in This Subject

  • Random Variables and Probability Distributions — introduced in Lecture 5 (Random Variables, Discrete vs. Continuous, Introduction to Probability Distributions)
  • Probability Distributions Preview — introduced in Lecture 1 (What is a Probability Distribution)
  • Variance and Spread — introduced in Lecture 2 (Variance — The Spread Around the Mean)
  • Validating Probability Assignments — introduced in Lecture 2 (Validating Probability Assignments)
  • Joint Probability — introduced in Lecture 3 (Joint Probability and the Term Joint)

Random Variables — Discrete and Continuous Distributions, Expectation, Variance, Joint and Marginal Distributions

Every time you flip a coin, measure a patient's blood pressure, or check how many customers walk into a store, you are watching a random variable in action. This lecture builds the vocabulary you need to describe randomness mathematically — from the toss of a coin all the way to modeling two traits (like education and age) simultaneously.

By the end of this session, you will be able to: tell discrete from continuous random variables and validate any probability distribution. You will compute expectation and variance, build cumulative distributions, work with joint probability tables, and extract marginal distributions. All these use the same formulas whether you sum (discrete) or integrate (continuous).

6.1 Review of Random Variables — Discrete and Continuous

6.1.1 Definition and Explanation

Hook. You roll a die. You get a number — but which one? The outcome is uncertain until the die stops. A random variable is simply the rule that says: "when the die shows three dots, call it 3." It turns messy experimental outcomes into clean numbers we can add, average, and graph.

Intuition + Analogy. Think of a random variable as a labeling machine. You feed in the raw outcome of an experiment (heads, tails, a measurement, a survey answer) and the machine spits out a number. If the machine can only print a few distinct numbers (like 0, 1, 2, 3), it is discrete — like counting apples. If the machine can print any number in a range (like any real number between 0 and 1), it is continuous — like measuring the exact length of a leaf. The counting-versus-measuring distinction is the only thing that matters.

A random variable is a variable whose value depends on the outcome of a random experiment. Instead of dealing with raw probabilities of events, we associate each outcome with a number — that number is the random variable.

There are two kinds of random variables:

- Discrete random variable — takes a finite (or countably infinite) set of distinct values. For example, X can take values 1, 2, 3, 4, 5. The values need not be positive; they can be negative as well. The key is that the values are distinct and countable. A practical test: if you can list all values one by one (even if the list never ends, like 0, 1, 2, …), the variable is discrete.

- Continuous random variable — takes infinitely many values within an interval. For example, any real number between 0 and 1. A practical test: if you pick any two possible values, every number between them is also a possible value, the variable is continuous.

Think of the workflow: you start with raw numbers (data), convert them to probabilities, then try to find a pattern (a distribution) that those probabilities follow. That pattern is what we study through random variables and their distributions.

Formal definitions (from T1 Ch04, T2 Ch03). A random variable X is a function from the sample space S to the real numbers: . For a discrete rv, the set of possible values is finite or countably infinite. For a continuous rv, the set of possible values is an interval (or union of intervals), and for any single value c.

The probability mass function (PMF) for a discrete rv is . The probability density function (PDF) for a continuous rv is a function such that .

Notation convention: For discrete distributions, most authors use (probability mass function). For continuous distributions, most use (probability density function). However, some authors use for both. How to tell them apart? Look at the values X takes — if X takes values like 0, 1, 2, 3, it is discrete. If X takes values in a continuous interval like , it is continuous.

Scope / Assumption. This course covers two types of random variables: discrete (both variables discrete) and continuous (both variables continuous). Mixed-type distributions (one discrete, one continuous) exist in practice — for example, rainfall amount (continuous) vs. whether it rained at all (discrete: 0/1) — but are beyond the scope of ISM.

Visual Intuition. Picture a number line. If X is discrete, you can put dots at each possible value — like 0, 1, 2, 3, 4 on a ruler. The probability "lives" only on those dots. If X is continuous, the probability "spreads" like paint across the whole interval — any point between, say, 0 and 1 is a possible value. The area under the curve (not the height) gives probability.

Pitfalls.

1. Don't judge by the function name. Whether the author writes or does NOT tell you discrete vs. continuous. Only the values x can take tell you.

2. Don't confuse the variable type with the measurement. A variable measured to 2 decimal places is still conceptually continuous if it could take any real value in an interval.

3. Don't assume discrete means "small range." A discrete variable can have infinitely many values (0, 1, 2, … — countably infinite). "Discrete" means "countable," not "finite."

Recap. A random variable turns experimental outcomes into numbers. Discrete = countable values (like counts); continuous = any value in an interval (like measurements). Notation differs across authors, so always check the VALUES, not the function name. Next: how do we check whether a table of numbers is a valid probability distribution?

Real-World & Domain Connection. Random variables are the fundamental building block of every statistical model. Insurance companies model claim amounts as continuous random variables; public health researchers model disease counts (number of new cases per week) as discrete random variables. The classification of a variable as discrete or continuous determines which probability distributions (binomial, Poisson, normal, exponential) you can use — and which formulas you apply to compute means, risks, and predictions.

6.1.2 Symbol Registry — Random Variables

Symbol Meaning Type Domain
A random variable variable depends on context
or Probability that random variable X takes value x function
Probability density function (continuous) function

6.2 Validating a Probability Distribution

6.2.1 The Two Conditions

Hook. Someone hands you a table of numbers and says "this is a probability distribution." How do you know they are telling the truth? Two simple checks — and if either fails, the table is mathematically impossible.

Intuition + Analogy. Think of probability as a pie cut into slices. Each slice represents one possible value of the random variable. Rule 1: no slice can be negative (you cannot have "−10% of the pie"). Rule 2: all slices together must make exactly one whole pie (100%). If either rule breaks, you do not have a valid probability distribution — you have a broken recipe.

Not every table of numbers qualifies as a probability distribution. Two conditions must be satisfied:

1. Range condition: Every probability value must lie between 0 and 1 (inclusive). That is, .

2. Total probability condition: The sum of all probabilities must equal exactly 1. That is, for discrete, and for continuous.

If both conditions hold, the representation is a valid probability distribution.

Formal statement (from R1 Ch04, R2 Ch05). A function (or ) is a valid probability distribution for a discrete random variable X if and only if:

1. for all (non-negativity)

2. (total probability sums to one)

For a continuous random variable, condition 2 becomes . These two conditions are both necessary and sufficient — any function satisfying both is a legitimate probability model.

Scope / Assumption. The two conditions apply universally to ALL probability distributions — discrete or continuous, univariate or joint. They are the mathematical minimum. However, satisfying these conditions does NOT mean the distribution is useful or realistic — it only means it is logically coherent. A distribution that assigns 0.999 probability to X = 1 and 0.001 to X = 2 passes both checks but may be a terrible model for your data.

Visual Intuition. Imagine a bar chart where each bar's height is a probability. The "range condition" means no bar dips below the horizontal axis. The "total probability condition" means if you stack all bars end-to-end, their combined height is exactly 1. For continuous distributions, imagine the same idea but with area under a smooth curve instead of bar heights.

Pitfalls.

1. Forgetting to sum ALL values. When validating, make sure you have included every possible value of X. Missing a value gives a sum less than 1 — a false negative.

2. Confusing "sums to 1" with "each value ≤ 1." Both conditions are independent. A distribution can have all values in but sum to 0.8 (invalid). Conversely, a distribution can sum to 1 but have a negative value (invalid). Check BOTH.

3. Assuming a constant function is automatically valid. If for values of x, then is required for the sum to be 1. If , the distribution is invalid.

Recap. A probability distribution is valid exactly when (1) every probability is between 0 and 1, and (2) all probabilities sum to 1. These two conditions are your first line of defense against mathematical nonsense. Next: four concrete examples of validation in action.

6.2.2 Worked Example — Tossing Three Coins

From the coin-tossing experiment (3 coins), the probability table for X = number of heads:

X (number of heads) P(X)
0
1
2
3

Validation:

- Range check: All values are between 0 and 1. ✓

- Total check: . ✓

- Conclusion: This is a valid probability distribution.

Sense-check: With three fair coins, getting 0 or 3 heads is rare (1/8 each); getting 1 or 2 heads is common (3/8 each). The symmetry of the probabilities reflects the fairness of the coins — the distribution is symmetric around X = 1.5.

6.2.3 Worked Example — Health Status

X is a random variable taking values 0 (healthy), 1, 2 (sick) with probabilities 0.7, 0.2, 0.1.

X P(X)
0 0.7
1 0.2
2 0.1

Validation:

- Range check: 0.7, 0.2, 0.1 are all in . ✓

- Total check: . ✓

- Conclusion: Valid.

Sense-check: The probabilities decrease as health worsens — 70% of the population is healthy, which matches a typical healthy-population scenario.

6.2.4 Worked Example — Constant Probability

for .

This describes a discrete random variable (x takes discrete values 1–6 — a fair die). Each probability is , which is between 0 and 1. Sum = . Valid.

Key observation: This is the uniform distribution over {1, 2, 3, 4, 5, 6}. Every face of a fair die is equally likely.

6.2.5 Worked Example — Function Form

for .

Evaluate each value:

-

-

-

Range check: 0.5, 0.333, 0.167 are all in . ✓

Total check: . ✓

Conclusion: Valid.

Sense-check: The probabilities decrease linearly as X increases — is a decreasing linear function. This kind of pattern appears when larger values are less likely.

6.2.6 Student Questions and Answers

Q: Is a constant function valid when the sum is zero? What if mean equals zero?

A: Mean equal to zero is an inference we draw — it does not determine validity. A distribution is valid if its probabilities sum to 1 and each lies in . Mean being zero is a property of the distribution, not a validity condition. For example, X can take values −1 and +1 each with probability 0.5. The distribution is valid (sum = 1, values in [0,1]) and the mean is 0. But the mean of 0 is a consequence, not a validator.

Q: Should we use P(X) or f(X) in exams when the professor might use different notation?

A: The notation does not matter. What matters is whether X takes discrete values or continuous values. If X takes 0, 1, 2, 3 — it is discrete regardless of whether the function is called P(X) or f(X). If X takes values in an interval like , it is continuous. Always check the domain of X, not the function letter.


6.3 Mathematical Expectation — The Mean of a Random Variable

6.3.1 Definition and Explanation

Hook. If you play a game of chance a thousand times, will you end up richer or poorer? You cannot predict any single play, but you CAN predict the long-run average. That long-run average is the expected value — and casinos, insurance companies, and data scientists bet billions on it every day.

Intuition + Analogy. Picture a slot machine. Each pull costs ₹1 and pays out according to some probabilities. You pull it 10,000 times. Some pulls win big, most lose. At the end, your average win per pull settles near a fixed number. That number is the expectation . It is the average payout you would get if you played forever. If , you profit long-term; if , the house wins. The analogy breaks in one way: expectation is a theoretical limit — you need infinitely many pulls to guarantee you hit it. In finite samples, luck still matters.

When we worked with raw numbers, we used mean and standard deviation to understand the data. Now that we are working with probabilities and distributions, we need the same kind of tools — but applied to random variables.

The mathematical expectation (or expected value) of a discrete random variable X is:

This is the mean of the random variable. The professor's verbal description: "X into P of X — what is the value that X takes and with what corresponding probability?"

Formal definition. For a discrete rv X with PMF , the expected value is , where the sum is over all possible values of X. For a continuous rv with PDF , the expected value is . In both cases, is a weighted average — each possible value is weighted by how likely it is.

The term "expectation" is slightly misleading. is not necessarily a value you "expect" to see on any single trial. It is the probability-weighted average over all possible outcomes. For a fair die, , but you will never roll a 3.5.

Important: The expected value is NOT a probability. It can be any real number. There is no bound on the expected value.

6.3.2 Connection to School Statistics — The Mean Formula

Recall how we computed mean in school. Suppose we have data:

Value Frequency
1 20
2 15
3 10
4 15
Total 60

The mean is:

Rewrite this as:

Notice: is the probability of value 1, is the probability of value 2, and so on. This is exactly . So the mean of raw data is exactly the same idea as the expectation of a random variable — the "divide by N" becomes the probability weight.

Q: In the expectation formula, why is there no division by N?

A: The division by N is already absorbed into the probabilities. For example, 10 is a raw number, but is a probability. When you compute , the probabilities already incorporate the division. This is the bridge from sample statistics (data) to population parameters (distributions).

6.3.3 Worked Example — Fair Game (Dice Sum)

A throws two dice. If the sum is 7, A wins ₹3 from B. If the sum is 8, A loses some amount. The question: is this a fair game?

Let X be the random variable representing the amount A wins (positive = win, negative = loss). We need to know all possible sums (2 through 12) and their probabilities.

For two dice (36 total outcomes):

Sum Probability Number of ways
2 1
3 2
4 3
5 4
6 5
7 6
8 5
9 4
10 3
11 2
12 1

Using the payoff structure (win ₹3 for sum 7, lose for sum 8, and so on), we build a table of X values and probabilities. Then compute .

In the worked scenario discussed, . This means the game is fair — neither player has a long-term advantage. No loss, no gain on average.

Sense-check: A fair game has by definition — the expected net gain is zero. If the game were biased toward one player, would be positive for that player and negative for the other.

Q: How does imply a fair game?

A: Zero expectation means no net gain or loss over many plays. If , the player gains on average (favorable game). If , the player loses on average (unfavorable game). Casinos design every game to have for the player — that is how they stay in business.

6.3.4 Properties of Expectation

For a constant and random variable X:

1. — the constant can be taken outside the summation.

2. — the expectation of a constant is the constant itself.

These follow directly from the definition:

Both properties also hold for continuous random variables (replace with ).

Scope / Assumption. The linearity property holds for ALL random variables — discrete or continuous. This is because expectation is a linear operator. However, this only works for linear transformations. in general — this inequality is the reason variance exists (covered next).

Pitfalls.

1. Confusing expectation with a probability. can be 2.5, −10, or 100. It is NOT constrained to . Many students panic when — don't.

2. Thinking must be a possible value of X. For a fair die, , but you will never roll a 3.5. The expectation is an average, not a possible outcome.

3. Forgetting to weight by probability. The formula is , not and not . The "x" values MUST be multiplied by their probabilities.

Recap. Expectation is the probability-weighted average — identical in spirit to the data mean you learned in school, with probabilities replacing "divide by N." It is a linear operator with simple algebraic properties. Next: variance — the measure of how spread out a distribution is around its expectation.

Real-World & Domain Connection. Expectation underpins every decision under uncertainty. Insurance companies compute to set premiums. Financial analysts compute to compare investments. In machine learning, the expected loss drives model training — you minimize over your training data. Even the "fair game" example is a direct ancestor of modern game theory and economic equilibrium concepts.


6.4 Variance of a Random Variable

6.4.1 Definition

Hook. Two investment portfolios both promise an average return of 8%. One bounces between −20% and +36%; the other stays between 5% and 11%. Which would you pick? The mean does not tell you the whole story — you need variance to measure the risk.

Intuition + Analogy. Picture throwing darts at a dartboard. The bullseye is the mean . Variance measures how far your darts scatter from the bullseye, on average. If your darts cluster tightly, variance is small — you are consistent. If they spray all over the wall, variance is large — you are erratic. But there is a catch: variance squares the distances, so its units are squared (e.g., "rupees squared"). That is why we often take the square root to get standard deviation, which has the same units as the original data.

The variance of a random variable X, denoted or , is:

In words: take the squared deviation of each value from the mean, weight it by its probability, and sum.

This is the direct analog of the data variance formula — except here the division by n is replaced by multiplication by the probability.

Formal definition. For a discrete rv X with PMF and mean :

For a continuous rv with PDF :

The standard deviation is . Variance is always ; it equals zero only when X is constant (no randomness).

6.4.2 The Computational Form (More Commonly Used)

Expanding the definition:

So the variance can be computed as:

This is the form most commonly used in problems. It requires computing (expectation of X squared) and then subtracting the square of the mean.

How to compute : For a discrete random variable:

Key: the probability stays the same — you square the x value, NOT the probability. For , you would use with the same probabilities, and so on.

6.4.3 Worked Example — Discrete Distribution (Finding Mean and Variance)

Given:

X 0 1 2 3 4
P(X) 0.1 0.2 0.4 0.2 0.1

Step 1: Find the mean .

So .

Step 2: Find the variance using the definition .

X P(X)
0 4 0.1 0.4
1 1 0.2 0.2
2 0 0.4 0.0
3 1 0.2 0.2
4 4 0.1 0.4

Step 3: Standard deviation.

Sense-check: The distribution is symmetric around X=2 with most mass at the center. A variance of 1.2 means a typical deviation from the mean is about 1.1 units — reasonable since most values are within 2 units of the mean.

Q: Can the expected value go beyond 1? Is that okay?

A: Yes. The expected value is NOT a probability. It is a mean — a measure of central tendency. It has no bound. It can be any real number.

Q: Should we use the basic definition or the computational form for variance?

A: Both are equivalent. The computational form is often easier because you already have from the first step and only need to compute . The definition form is good when working directly with tables. Pick whichever suits the problem.

6.4.4 Derivation of the Computational Form — Student Question

Q: How do we get from to ? What about the term?

A: Full derivation:

The key property used: the expectation of a constant is the constant itself. So and .

Scope / Assumption. Variance is defined for any random variable whose first two moments ( and ) exist. Some heavy-tailed distributions (like the Cauchy distribution) have infinite variance — the formula still "works" symbolically but the integral diverges. In ISM, all distributions we encounter have finite variance. Also, if and only if X is a constant (degenerate random variable) — a useful diagnostic.

Pitfalls.

1. Stopping at . This is the most common exam mistake. is NOT the variance. You MUST subtract . The professor explicitly flagged this: " is NOT the variance. This is a common exam mistake — stopping here."

2. Squaring the probability. , NOT . Only the x gets squared. The probability stays as-is.

3. Forgetting that variance has squared units. If X is in rupees, variance is in rupees². Standard deviation puts it back in rupees. Always report alongside for interpretability.

4. Thinking negative variance is possible. Variance is an expected squared deviation — it CANNOT be negative. If you get a negative variance, you have made a calculation error (likely forgot to square something, or used instead of ).

Recap. Variance measures spread: the average squared distance from the mean. Use the computational form for speed, but never forget the subtraction step. Standard deviation brings variance back to the original units. Next: the cumulative distribution function — a running total of probability.

Real-World & Domain Connection. Variance is the foundation of risk measurement. In finance, portfolio variance (and its square root, volatility) directly quantifies investment risk. In manufacturing, variance in product dimensions determines defect rates — Six Sigma methodology is built on reducing variance. In machine learning, the bias-variance tradeoff is a central concept: high-variance models overfit; high-bias models underfit. Understanding variance at the random-variable level is prerequisite to all of these.


6.5 Cumulative Probability Distribution

6.5.1 Definition

Hook. You are applying to a university that admits students in the top 20% of the entrance exam. You do not need your exact rank — you just need to know whether your score is above the 80th percentile. The cumulative distribution function (CDF) answers exactly this kind of question: "What is the probability of scoring at or below this value?"

Intuition + Analogy. Think of the CDF as a "running total" of probability — exactly like a bank balance that accumulates with each deposit. Each value of X deposits its probability into the running total. is the total deposited by the time you reach X = 3. adds the deposit from X = 4. The final balance is always 1. This is also how water fills a staircase — at each step, more water (probability) accumulates, and the top step is always full.

The cumulative probability distribution (or cumulative distribution function, CDF), denoted , gives the probability that the random variable X takes a value less than or equal to x:

For example, .

Formal definition (from R1 Ch04, T2 Ch04). The CDF of a random variable X is for all real . For a discrete rv: . For a continuous rv: . Key properties: (1) is non-decreasing, (2) and , (3) is right-continuous. The derivative of the CDF gives back the PDF: wherever the derivative exists.

Visual Intuition. Plot on the y-axis against on the x-axis. The curve starts at 0 on the far left (no probability accumulated yet), steps upward (or rises smoothly) as x increases, and eventually reaches 1 on the far right (all probability accounted for). For a discrete rv, the CDF looks like a staircase — flat between values, jumping up at each possible value. For a continuous rv, the CDF is a smooth S-shaped (or similar) curve.

6.5.2 Analogy — CGPA

The cumulative distribution works exactly like CGPA (Cumulative Grade Point Average). After the first semester, your CGPA equals your first-semester GPA. After the second semester, your CGPA is the cumulative performance of semesters 1 AND 2 — not a standalone second-semester measure. After the third semester, it cumulates semesters 1, 2, and 3.

Similarly, cumulates probabilities for X = 1, 2, and 3. cumulates for X = 1, 2, 3, and 4.

Q: If your CGPA fell from 8.5 to 7.4 after the second semester, does that mean you performed worse in the second semester?

A: Not necessarily. The 7.4 is the combined performance of both semesters. You cannot isolate the second semester's performance from the CGPA — just as you cannot isolate the probability at X=2 from without subtracting . To recover individual-semester GPA, you would need to subtract: GPA₂ = 2 × 7.4 − 8.5. Similarly, .

Scope / Assumption. The CDF exists for every random variable — discrete, continuous, or mixed. It is the most general way to describe a distribution. However, for continuous rvs, is continuous and differentiable almost everywhere; for discrete rvs, is a step function. The CDF uniquely determines the distribution — if two random variables have the same CDF, they have the same distribution.

Pitfalls.

1. Confusing with . is NOT the probability at X = 3; it is the sum of probabilities up to and including X = 3. To get , compute .

2. Thinking the CDF can decrease. The CDF is non-decreasing by definition — probability only accumulates, never drains. If your computed CDF goes down at some point, you have made an error.

3. Forgetting that . The CDF must asymptote to 1. If yours stops at 0.8, the distribution is incomplete or invalid.

Recap. The CDF is the running total of probability up to x. It works like CGPA — cumulative, not standalone. To recover individual probabilities from the CDF, subtract: . Next: a complete worked example that ties together validation, expectation, variance, AND the CDF.

Real-World & Domain Connection. CDFs are used everywhere percentiles matter. Medical growth charts report a child's height percentile — that is . Standardized test scores report your percentile rank. In reliability engineering, the CDF of time-to-failure gives the probability a component fails by time t — critical for warranty planning. In finance, Value-at-Risk (VaR) is a CDF quantile: "What loss level has a 5% chance of being exceeded?"


6.6 Worked Example — Finding K, Mean, and Variance

6.6.1 Problem Setup

Hook. What if a probability distribution is given in terms of an unknown constant K — and you need to find everything: K itself, the mean, the variance, and the CDF? This is the Swiss Army knife problem that tests every skill from this lecture in one go.

Given the probability distribution:

X 0 1 2 3 4
P(X) K 2K 3K 2K K

Find: (1) the value of K, (2) , (3) , (4) the cumulative distribution, (5) , (6) .

6.6.2 Finding K

Use the total probability condition: .

Range check: With :

-

-

-

-

-

All values are in . Both conditions satisfied. K = 1/9.

Key shortcut: When probabilities are given as multiples of K, the sum-of-coefficients method always works: , so , hence . The coefficients themselves tell you the shape of the distribution — symmetric and peaked at the center.

6.6.3 Finding

means X is strictly less than 3, so X = 0, 1, or 2.

Sense-check: Two-thirds of the probability lies below X = 3. Since the distribution is symmetric and X=2 is the center, this makes sense — X=3 and X=4 together account for the remaining 1/3.

6.6.4 Finding

means X is strictly between 0 and 4, so X = 1, 2, or 3.

Sense-check: This excludes only the endpoints X=0 and X=4, which each have probability 1/9. So — matches.

6.6.5 Cumulative Distribution

The CDF accumulates probabilities step by step:

X F(X) — cumulative Derivation
0
1
2
3
4

The value at X=2 () was omitted in the original lecture material — confirmed by arithmetic: . All CDF values are consistent with the running-total property.

Key check: — the CDF must always end at 1.

6.6.6 Finding (Mean)

With :

So .

Sense-check: The distribution is symmetric around X = 2 with the highest probability at X = 2. The mean equaling the mode (2) confirms symmetry.

6.6.7 Finding

Use the computational form .

Step 1: Compute .

With :

⚠️ Common Exam Trap. is NOT the variance. This is the most common mistake students make — computing and stopping. You must still subtract . The professor explicitly warned against this.

:::

Step 2: Compute variance.

Standard deviation: .

Sense-check: Variance is positive () and smaller than the range (0 to 4), which is consistent with a distribution concentrated near the center.

:::

6.6.8 Student Questions

Q: In the mean calculation, why did we multiply by 1/9 (the value of K)?

A: We first found K using the total probability condition (). Once K is known (), we substitute it into every expression. The mean in terms of K is ; substituting gives 2. You can also think of it as: each is its coefficient times .

Q: How is computed? Why doesn't the probability get squared?

A: The definition is . Only the x value gets squared. The probability remains the same. Think: the random variable is being transformed (squared), but the likelihood of each value occurring does not change. If you have a 20% chance of winning ₹5, then your expected squared win is , not . The probability is a weight — it does not get transformed.

Recap. This problem is a complete template for discrete distribution problems: (1) Find K from . (2) Compute probabilities for intervals by summing terms. (3) Build the CDF as a running total. (4) Compute and . (5) Compute . Next: the transition from discrete (sums) to continuous (integrals).


6.7 Transition to Continuous Random Variables

6.7.1 From Summation to Integration

Hook. Why do we switch from easy sums () to integrals () for continuous variables? Because between 0 and 1 there are infinitely many numbers — you cannot list them and sum them one by one. Integration is the mathematical tool for adding up infinitely many infinitely thin slices.

Intuition + Analogy. Imagine slicing a loaf of bread. Discrete probability is like counting individual slices — slice 1, slice 2, slice 3. Continuous probability is like measuring the loaf as a whole — the probability is the area under a curve, not the height at any single point. Just as you can weigh the whole loaf without counting every crumb, integration lets you compute total probability without listing every real number.

For a discrete random variable, everything uses summation (). For a continuous random variable, summation becomes integration () because there are infinitely many values.

Summary — Discrete vs. Continuous:

Concept Discrete Continuous
Function name PMF — or PDF —
Total probability = 1
Mean
Variance (same formula) (same formula)

The interval of integration is wherever the random variable is defined. If nothing is specified, the limits are to . If the function is defined on , integrate from to .

The big idea. The formula for variance is identical in both worlds: . The ONLY thing that changes is HOW you compute and — sums for discrete, integrals for continuous. This is the single most important structural insight: once you know the pattern, you can handle any distribution.

Scope / Assumption. The formulas in the table assume the integrals converge (i.e., the distribution has finite mean and variance). For well-behaved distributions like the normal, exponential, and uniform, this is always true. Some pathological distributions (Cauchy) have no finite mean — their integrals diverge. In ISM, all distributions have finite mean and variance.

Visual Intuition. Picture a histogram with narrower and narrower bars. As the bar width approaches zero, the jagged histogram top becomes a smooth curve — the PDF. The area of each bar was the discrete probability ; now the area under the curve segment is the continuous probability. The total area under the whole curve is always 1.

6.7.2 Integration Basics — Quick Review

The integrals encountered in this course are mostly of the form .

Examples:

-

-

For definite integrals from a to b: , where F is the antiderivative.

For exponential: .

Q: We have forgotten integration and derivatives. What should we do?

A: Only simple polynomial () and exponential () integrals are required. The teaching team (including teaching assistants) can help with any difficulties. Do not let integration hold you back from understanding concepts. The probability logic (when to integrate, what limits to use, what the result means) matters more than the mechanical integration.

Pitfalls.

1. Forgetting the constant when integrating . , NOT . The division by the coefficient of x in the exponent is essential.

2. Mixing up definite vs. indefinite integrals. In probability, you ALWAYS need definite integrals with limits. The answer must be a number (a probability), not an expression with .

3. Using wrong limits. The limits are the interval of X values you are interested in. If the PDF is zero outside , integrating from to is fine — but integrating only over is simpler and gives the same result.

Recap. Continuous random variables replace with — but the logic is identical. Mean, variance, and total probability follow the same formulas. Only polynomial and exponential integrals are needed. Next: two fully worked continuous examples — an exponential-type PDF and a piecewise PDF.

Real-World & Domain Connection. The discrete-to-continuous bridge is central to data science. When you have count data (number of website visits), use discrete models (Poisson). When you have measurement data (temperature, time, weight), use continuous models (normal, exponential). Many machine learning algorithms — from linear regression to neural networks — assume continuous inputs and use integration for their loss functions and probability estimates.


6.8 Worked Example — Continuous Distribution (Exponential-Type)

6.8.1 Problem

Hook. How long until the next earthquake? How much time passes between customer arrivals at a bank? These waiting-time questions are modeled by the exponential distribution — our first continuous probability model, and the simplest one to integrate.

Intuition + Analogy. Think of radioactive decay. Atoms decay randomly, but the waiting time between decays follows a pattern: short waits are more likely than long waits. The exponential PDF captures this — it starts high at and decays downward forever. The area under the whole curve is always 1, no matter how fast it decays. The "rate" (lambda) controls how steeply it drops: larger means events happen faster (shorter waits).

A continuous random variable X has probability density function:

Find: (a) , (b) .

This is the exponential distribution with rate parameter . The general form is for . The mean is and the variance is . The exponential distribution is the continuous analog of the geometric distribution — both model "waiting time until the first event."

6.8.2 Finding

Step 1: Integrate.

(Using ; here .)

Step 2: Apply limits.

Numerical approximation: , . So .

Sense-check: With a mean of 0.5, the interval (1, 3) is to the right of the mean — where the PDF is already low. A probability of about 0.13 is reasonable. Most of the probability (about 86%) lies below X = 1.

6.8.3 Finding

Since with no upper bound, the upper limit is :

Key limit: . This is one of the few limits you need to know for this course.

Numerical approximation: . So .

Sense-check: Since the mean is 0.5, the probability of exceeding the mean is — a clean result specific to the exponential distribution. For ANY exponential distribution, .

Q: In the first part, where does the minus sign come from when evaluating at the limits?

A: The antiderivative is . At the upper limit , substitute: . At the lower limit , substitute: . Then subtract: . The double negative at the lower limit becomes a positive. This is the standard pattern: .

Pitfalls.

1. Forgetting the division by the coefficient. , and multiplying by 2 gives . Always check: differentiate your answer — you should get the original integrand back.

2. Mishandling infinity. , not "undefined" or "infinity." Exponential decay always goes to zero as .

3. Sign errors with the antiderivative. The integral of is (negative sign!), because the derivative of is .

Recap. The exponential PDF is integrated using . Probabilities are areas under the curve. The limit handles unbounded intervals. Next: a piecewise continuous PDF — a triangular distribution — that requires splitting integrals.

Real-World & Domain Connection. The exponential distribution models waiting times in queues (banks, call centers, network packets), time-to-failure of electronic components (reliability engineering), and inter-arrival times in Poisson processes. When you hear "the average time between bus arrivals is 10 minutes," the exponential distribution with models the actual waiting time. The memoryless property of the exponential — that waiting 5 more minutes is just as likely whether you just arrived or have been waiting 30 minutes — makes it unique among continuous distributions.


6.9 Worked Example — Piecewise Continuous Distribution

6.9.1 Problem

Hook. Not all continuous distributions have a single nice formula. Some change behavior mid-range — like a triangular distribution that rises then falls. This problem teaches you the most important continuous-distribution skill: splitting integrals at the breakpoints.

Intuition + Analogy. Picture a tent. The left side rises from the ground (x = 0) to the peak (x = 1). The right side falls from the peak back to the ground (x = 2). The area under the tent is 1 — it is a valid PDF. To find any probability or the mean, you must treat the left slope and the right slope as separate integrals, because their formulas are different. This is like measuring the area of the tent by measuring the left triangle and right triangle separately and adding them.

A continuous random variable X has PDF:

Find: (a) mean, (b) variance, (c) standard deviation, (d) , (e) .

This is a triangular distribution on with mode at . The PDF rises linearly from 0 to 1, then falls linearly from 1 back to 0. The total area is , confirming it is a valid PDF. The mean of any symmetric triangular distribution on is , which we will verify by integration.

6.9.2 Finding the Mean

Since is defined differently on and , split the integral:

First integral (: ):

Second integral (: ):

Total:

So .

Sense-check: The triangular PDF is symmetric around x = 1, so the mean is 1 — matches geometric intuition.

Q: Why does the first integral use limits 0 to 1 inclusive when the first condition says "between 0 and 1" but doesn't include 1?

A: In integration, endpoints do not matter — integration is about the area under a curve. The value at a single point does not affect the integral. Using or gives the same result. We use the closed interval for convenience. In probability, for any continuous rv, so including or excluding the endpoint changes nothing.

6.9.3 Finding

First integral:

Second integral:

Total:

6.9.4 Finding Variance

Standard deviation: .

Sense-check: The distribution spans [0, 2] with most mass near the center. A standard deviation of about 0.41 means typical deviations from the mean (1) are about 0.4 units — consistent with most probability being within [0.6, 1.4].

Q: In the mean calculation, how does become in the first part?

A: In the interval , . So . It is multiplication, not division. We are replacing with its value for that interval. This is the same idea as in the discrete case: multiply the value (x) by its probability weight (), then sum (integrate).

6.9.5 Finding

The interval lies entirely within , so throughout:

Sense-check: The interval width is 0.6, the average height of over [0.2, 0.8] is about 0.5, so area — matches.

6.9.6 Finding

The interval straddles both pieces of the function. Split at :

First part ():

Second part ():

Total: .

Sense-check: The interval [0.6, 1.2] is centered at 0.9 and spans 0.6 units — roughly symmetric around the mean of 1. Half the probability (0.50) in a 0.6-wide band around the mode is reasonable for this triangular shape.

Q: For evaluating the definite integral, should we put two values for the limits?

A: Yes. For , compute the antiderivative , then do . This means substituting the upper limit first, then subtracting the value at the lower limit. Always write .

Pitfalls (Piecewise PDFs).

1. Forgetting to split at the breakpoint. If your interval crosses a breakpoint (like x = 1 here), you MUST split the integral. Integrating from 0.6 to 1.2 directly would be WRONG because is not for .

2. Using the wrong piece. At x = 0.6, because . At x = 1.2, because . Always check which piece applies at each point in your interval.

3. Endpoint confusion. for any continuous rv, so equals . The inequality type (< vs ) does not matter for continuous variables.

Recap. For piecewise PDFs: (1) identify the breakpoints, (2) split every integral at each breakpoint, (3) use the correct formula for each piece, (4) add the results. The triangular distribution is a classic exam problem because it tests splitting, polynomial integration, and the full mean-variance workflow. Next: moving from one variable to two — joint probability distributions.

Real-World & Domain Connection. Triangular distributions are used in project management (PERT analysis) to model task completion times when you know the minimum, most likely, and maximum estimates. They also appear in risk analysis when you have limited data — the triangular shape is the simplest non-uniform distribution that captures "most likely near the center." Many engineering tolerances follow triangular or trapezoidal distributions.


6.10 Joint Probability Distributions

6.10.1 Motivation — Why Two Variables?

Hook. You survey 1,000 people and record two things about each: their education level and their age group. Does education relate to age? To answer, you cannot look at education alone or age alone — you need a joint distribution that tells you how often each (education, age) combination occurs.

Intuition + Analogy. Think of a spreadsheet where each row is a person and two columns are "Education" and "Age." A joint probability table is like a pivot table: it counts how many people fall into each (Education, Age) cell, then divides by the total. Each cell is — the probability that BOTH X equals x AND Y equals y simultaneously. The comma means "and" (intersection). This is the foundation of all multivariate statistics — from correlation analysis to machine learning classifiers.

So far, we have worked with a single random variable X. But many real-world situations involve two (or more) variables simultaneously.

Recall the three-coin toss: X = number of heads. But what if we also want to track Y = number of tails? In a 3-coin toss, X and Y are related (X + Y = 3). We need a representation that captures both together.

The expression — read as "P of X comma Y" — gives the probability that X takes a specific value AND Y takes a specific value simultaneously. The comma means "and" (intersection).

6.10.2 Terminology

- Discrete case: or is called the joint probability mass function (joint PMF).

- Continuous case: is called the joint probability density function (joint PDF).

Formal definition (from T2 Ch05). For discrete rvs X and Y, the joint PMF is . For continuous rvs, the joint PDF satisfies and . The probability that falls in a region A is .

The same validation conditions apply:

1. (or )

2. (or )

6.10.3 Worked Example — Education and Age

Consider a joint probability distribution of two random variables:

- X = education level (0 = none, 1 = primary, 2 = secondary, 3 = college)

- Y = age group (30, 45, 70)

Given the joint probability table (values are probabilities):

X \ Y 30 45 70
0 (none) 0.02 0.02 0.04
1 (primary) 0.05 0.08 0.06
2 (secondary) 0.11 0.19 0.04
3 (college) 0.07 0.14 0.18

Interpretation: Each cell is . For example:

- — probability that a person is a college graduate AND age 30.

- — probability of no education AND age 45.

Validation: All values are in . The total sum of all 12 cells = . This is a valid joint probability distribution.

Reading the table — key observations:

- The most likely combination: — secondary education, age 45.

- The least likely: — no education in younger age groups.

- Older age group (70): higher probability of college education (0.18) compared to younger (0.07 for age 30) — possibly reflecting changing education patterns over generations.

Scope / Assumption. In ISM, we handle joint distributions where BOTH variables are discrete or BOTH are continuous. Mixed-type joint distributions (one discrete, one continuous) exist — for example, modeling rainfall amount (continuous) by season (discrete) — but are beyond the scope of this course. Also, the joint distribution captures ALL information about the relationship between X and Y; nothing is lost.

Visual Intuition. The joint table is a grid (matrix). Rows are X values, columns are Y values. Each cell is a probability. Darker cells mean higher probability. If you sum each row, you get the marginal distribution of X. If you sum each column, you get the marginal distribution of Y. The total of all cells is always 1.

Pitfalls.

1. Misreading the comma. means "X AND Y" — both happening together. It is NOT unless X and Y are independent.

2. Forgetting the double sum. To validate a joint distribution, sum over ALL cells: . Summing only rows or only columns gives marginal totals, not the grand total.

3. Confusing joint with conditional. means "probability of college AND age 30." would mean "probability of college GIVEN age 30" — a different number (0.07/0.25 = 0.28).

Q: In a joint distribution, can one variable be discrete and the other continuous?

A: Yes, such situations exist in practice — for example, temperature (continuous) and winning a match (discrete: yes/no). However, handling mixed-type distributions is beyond the scope of this course. In ISM, we deal with both variables being discrete or both being continuous.

Q: Does joint probability work for both mutually exclusive and independent events?

A: Yes. Independence and mutual exclusivity are special cases that can be derived from the joint distribution. The joint distribution itself is the general representation. If X and Y are independent, for all x, y — you can verify this from the joint table by comparing each cell to the product of its marginals.

Recap. Joint distributions capture the relationship between two random variables simultaneously. Each cell is — the probability of BOTH occurring. The sum over all cells is 1. From the joint table, we can answer any question about X and Y together. Next: how to extract the distribution of a single variable from the joint table — marginal distributions.

Real-World & Domain Connection. Joint distributions are the backbone of:

- Epidemiology: Joint distribution of exposure (smoking: yes/no) and disease (cancer: yes/no) — used to compute relative risk.

- Marketing: Joint distribution of customer age and product category purchased — used for targeted advertising.

- Machine Learning: The joint distribution of features X and labels Y is what classifiers try to model. Naive Bayes assumes a specific factorized form of the joint; neural networks learn complex joint representations.


6.11 Marginal Probability Distributions

6.11.1 Definition — Marginal of X

Hook. You have the joint table for education and age. Now your boss asks: "What is the overall distribution of education levels, ignoring age?" You do not need a new survey — you can extract it from the joint table by simply summing across rows. This extracted distribution is the marginal distribution.

Intuition + Analogy. Think of the joint table as a spreadsheet. The marginal distribution of X is the "row totals" column you would see on the right edge. The marginal distribution of Y is the "column totals" row at the bottom. They are called "marginal" precisely because they sit in the margins of the table — just like subtotals in an accounting ledger. If you erase the inner cells and keep only the margins, you lose all information about how X and Y relate — but you still know the individual distributions.

From the joint distribution, we can recover the distribution of X alone by summing over all values of Y:

This is called the marginal probability distribution of X.

Formal definition (from T2 Ch05). For discrete rvs X and Y with joint PMF , the marginal PMF of X is . For continuous rvs, the marginal PDF of X is . The operation is "integrate out" (or "sum out") the variable you are NOT interested in. The result is a valid univariate distribution — it sums (or integrates) to 1.

Computation for the education-age example:

Sum each row:

X P(X) — Marginal
0 (none)
1 (primary)
2 (secondary)
3 (college)

Check: . ✓

Interpretation of the marginal of X: If we ignore age entirely, 8% of the population has no education, 19% has primary, 34% has secondary, and 39% has college education. This is the overall education distribution — you would get the same numbers if you surveyed education without asking about age.

6.11.1 Definition — Marginal of X

Similarly, we can recover the distribution of Y alone by summing over all values of X:

Y P(Y) — Marginal
30
45
70

Check: . ✓

Interpretation: 25% of the surveyed population is age 30, 43% is age 45, and 32% is age 70. The age-45 group is the largest. Note that these are population proportions, not necessarily reflecting real-world age distributions — they come from whatever sampling was used.

6.11.3 Why "Marginal"?

The term "marginal" comes from the fact that these totals are written in the margins of the joint table. They are derived from the joint distribution — not independently constructed. A standalone distribution of X would just be called "the distribution of X." But when extracted from a joint table, it is the "marginal distribution of X."

Q: Both marginals sum to 1. Shouldn't they be called "total" instead of "marginal"?

A: The total is indeed 1. But the name "marginal" refers to how they are obtained — from the margins of a joint table. If you erased the joint table and showed only the row sums, you would have a standalone distribution of X — but you would not know it came from a joint distribution. The term "marginal" preserves that provenance and reminds you that this distribution was derived, not measured directly.

6.11.4 Marginal for Continuous Variables

For continuous variables, the marginal density functions are obtained by integration instead of summation:

The idea is the same: keep one variable constant and integrate (or sum) over all values of the other. This is called "integrating out" the unwanted variable.

Comparison — Discrete vs. Continuous Marginals:

Discrete Continuous
Marginal of X Sum over all y: Integrate over all y:
Marginal of Y Sum over all x: Integrate over all x:
Domain x values only real line
Validates to 1? Yes, if joint is valid Yes, if joint is valid

6.11.5 Student Questions

Q: What is the probability of a 30-year-old college graduate?

A: From the joint table: . This is a joint probability, not a marginal. If you wanted the probability of being a college graduate given age 30, that would be conditional: .

Q: Do conditional probability tables look the same as joint probability tables?

A: They may look similar in structure, but they represent different things. A joint table gives — the probability of X AND Y together. A conditional table gives — the probability of X GIVEN that Y has occurred. In a conditional table, each row (or column) sums to 1, not the entire table. For example, if you condition on Y = 30, the row X=0..3 would be: 0.02/0.25 = 0.08, 0.05/0.25 = 0.20, 0.11/0.25 = 0.44, 0.07/0.25 = 0.28 — these sum to 1. This will be covered in the next session.

Pitfalls.

1. Confusing joint and marginal. "Probability of a college graduate" is (marginal). "Probability of a college graduate AND age 30" is (joint). The marginal is always larger than or equal to any single joint cell — because it sums over all Y.

2. Summing the wrong direction. Marginal of X = sum over Y (row totals). Marginal of Y = sum over X (column totals). Mixing these up swaps the results.

3. Thinking marginals capture the relationship. The marginals of X and Y alone tell you nothing about how X and Y are related. Two completely different joint distributions can have the same marginals. The relationship lives in the inner cells.

Recap. Marginal distributions extract the behavior of a single variable from a joint table by summing (or integrating) over the other variable. They sit in the "margins" of the table. Marginal distributions alone cannot tell you whether variables are related — that requires the full joint table or conditional probabilities. Next: exam guidance and quiz details.

Real-World & Domain Connection. Marginal distributions are used routinely in data analysis: "What is the overall distribution of income?" (marginal of income, summing over age/region/education) or "What percentage of customers are in each age bracket?" (marginal of age). In Bayesian statistics, the marginal likelihood (integrating out parameters) is used for model comparison. In machine learning, marginal distributions of features are used for exploratory data analysis — histograms of individual variables are estimates of their marginal densities.


6.12 Exam Guidance and Quiz Information

6.12.1 Quiz Details

Exam note: The quiz covers content up to discrete random variables (sections 6.1–6.6). Continuous distributions, joint distributions, and marginal distributions are NOT on this quiz but will appear on later assessments.

- The quiz starts soon (from the next day of this session).

- Syllabus includes content up to discrete random variables.

- Format: MCQs (objective type).

- Duration: approximately 45 minutes.

- Content: mix of numerical problems and theoretical/conceptual questions.

- The quiz is enabled on the platform at the scheduled time.

6.12.2 Study Recommendations

- Focus on the slides — go through the slides thoroughly. Do not stretch yourself by trying to read entire textbook chapters. The slides are your primary resource for what will be tested.

- The syllabus is announced via email and on the platform — check both.

- Practice the worked examples from the sessions. The problems in the quiz will closely resemble the examples worked in class (validation conditions, finding K, computing expectation and variance, building CDFs).

Exam note: The professor explicitly said "focus on slides, not textbooks." The worked examples in this lecture — the coin-toss validation, the health-status distribution, the K-finding problem, and the discrete variance table — are the highest-yield practice problems.

6.12.3 Assignment Guidelines

- Assignments must be handwritten, scanned, and uploaded in PDF format.

- Write your name, BITS ID, and section on the top of every page.

- Save the file with your BITS ID.

- If you received an email with a specific section number, submit to that section. The section is also mentioned on the assignment PDF itself.

Common assignment mistakes to avoid:

- Missing name/BITS ID on any page (pages without identification may not be counted)

- Uploading in a format other than PDF (only PDF is accepted)

- Submitting to the wrong section

- Illegible handwriting — if the evaluator cannot read it, they cannot grade it


Exam Guidance Summary

This table consolidates all exam-relevant logistics and topic priorities mentioned throughout the lecture.

Item Detail
Quiz format MCQs, objective type
Quiz duration ~45 minutes
Quiz syllabus Up to discrete random variables (sections 6.1–6.6)
Content type Mix of numerical and theoretical
Primary study resource Lecture slides (not textbook chapters)
Assignment format Handwritten, scanned PDF
Assignment identification Name, BITS ID, section on every page
Key topics for assessment Discrete vs. continuous, validation conditions, expectation, variance, cumulative distributions, joint and marginal distributions

Exam note — Topic priority by frequency in this lecture:

1. Variance computation (2 full worked examples + computational form derivation) — highest weight

2. Expectation / Mean (definition + properties + fair-game example)

3. Validation conditions (two conditions + 4 worked examples)

4. Finding K from total probability (Section 6.6 — classic exam problem template)

5. Cumulative distribution (definition + CGPA analogy + CDF table)

6. Joint and marginal distributions (education-age example — likely on later assessments)


Key Industry Applications and Real-World Connections

- Gambling and fair games: Expectation is used to determine whether a game is fair (expected gain = 0), favorable (expected gain > 0), or unfavorable (expected gain < 0). Insurance companies and casinos rely on expectation calculations. Every casino game — roulette, blackjack, slot machines — is designed so that . The house edge is literally a negative expectation for the player. Insurance companies do the reverse: they set premiums so that , ensuring long-term profitability while still providing value to policyholders.

- Education and demographics: Joint probability distributions model relationships between categorical variables like education level and age group. These are foundational for survey analysis and demographic studies. Government census bureaus and organizations like the UN use joint distributions to track how education, income, health, and age co-vary across populations — informing policy decisions on education funding, healthcare allocation, and pension planning.

- Quality control: The validation conditions for probability distributions (values in , sum to 1) are used to verify that data-driven probability models are mathematically sound. In manufacturing, statistical process control (SPC) uses probability distributions to set tolerance limits — if the probability of a defect exceeds a threshold, the production line is stopped. Every Six Sigma project begins by verifying that the data follows an assumed distribution.

- CGPA systems: Cumulative distributions mirror how academic CGPA aggregates performance across semesters — a real-world analogy for understanding cumulative probability. This same cumulative logic applies to financial compound interest (cumulative returns), epidemiological cumulative incidence rates, and engineering reliability (cumulative failure probability over time).

- Integration in continuous probability: The transition from summation to integration is the mathematical bridge that enables modeling of continuous phenomena — temperature, time, measurements — in statistics and machine learning. Every weather forecast, stock price model, and medical dose-response curve ultimately relies on continuous probability densities and their integrals. Machine learning loss functions (cross-entropy, MSE) are defined as expectations — integrals over the data distribution — and are approximated by sums (the training set).

- Exponential distribution applications: Reliability engineering (time-to-failure of components), queuing theory (customer inter-arrival times at banks, call centers, network routers), and survival analysis (time until an event in medical studies) all use the exponential distribution. The memoryless property — — makes it uniquely suitable for modeling systems where "used is as good as new."

- Triangular distribution applications: Project management (PERT/CPM analysis) uses triangular distributions to model task durations when only three estimates are available: optimistic, most likely, and pessimistic. Risk analysts use triangular distributions as a simple alternative to the beta distribution when data is scarce.


ISM Lecture 6 notes · Random Variables — Discrete and Continuous Distributions, Expectation, Variance, Joint and Marginal Distributions

Introduction to Statistical Methods· postgraduate· 2026-07-01

Sections Breakdown

16.1 Review of Random Variables — Discrete and Continuous

Definition of random variables, discrete vs. continuous classification, symbol registry

26.2 Validating a Probability Distribution

Two validation conditions with four worked examples (coin toss, health status, constant probability, function form)

36.3 Mathematical Expectation — The Mean of a Random Variable

Definition of expectation, connection to school statistics, fair game example, properties

46.4 Variance of a Random Variable

Definition, computational form, worked example with mean and variance, derivation

56.5 Cumulative Probability Distribution

CDF definition, CGPA analogy, properties and pitfalls

66.6 Worked Example — Finding K, Mean, and Variance

Complete problem template solving for K, probabilities, CDF, expectation, and variance

76.7 Transition to Continuous Random Variables

From summation to integration, discrete vs. continuous comparison table, integration basics

86.8 Worked Example — Continuous Distribution (Exponential-Type)

Exponential distribution with rate lambda = 2, computing interval and tail probabilities

96.9 Worked Example — Piecewise Continuous Distribution

Triangular distribution, splitting integrals at breakpoints, mean, variance, probabilities

106.10 Joint Probability Distributions

Motivation, terminology, worked education-age joint probability table

116.11 Marginal Probability Distributions

Marginal of X and Y from joint table, why marginal, continuous case

126.12 Exam Guidance and Quiz Information

Quiz details, study recommendations, assignment guidelines

13Exam Guidance Summary

Consolidated exam logistics and topic priority table

14Key Industry Applications and Real-World Connections

Applications in gambling, demographics, quality control, and more

Postgraduate students in Introduction to Statistical Methods

Exam Revision Notes

Below is the distilled, exam-ready core of this lecture. Every entry is built from the full textbook notes above. Use this section for rapid review — but if something doesn't make sense, go back to the full explanation in the main content.

Discrete vs. Continuous Random Variables

Must-know: A random variable maps experimental outcomes to numbers. Discrete variables take countable values (e.g., 0, 1, 2, ...); continuous variables take any value in an interval. Always check the values of X, not the function name P(X) vs f(x).

⚠️ Top pitfall: Judging discrete vs. continuous by the function name. P(x) can appear for discrete; f(x) can appear for both. Only the domain of X tells you.

Self-check: Is the number of heads in 10 coin flips discrete or continuous?

Connects to: ['Probability distributions', 'Expectation and variance']

Validating a Probability Distribution

Must-know: Two conditions: (1) every probability in [0, 1], (2) total probability sums to 1. Both are necessary and sufficient.

⚠️ Top pitfall: Stopping after checking only one condition — both range and sum/integral must be verified.

Self-check: If P(X) = [0.5, 0.5, -0.1, 0.1], is this a valid distribution?

Connects to: ['Probability axioms', 'Joint distributions']

Mathematical Expectation (Mean)

Must-know: Expectation is the probability-weighted average: E(X) = ∑ x · P(X=x). It is a linear operator: E[aX + b] = aE(X) + b.

⚠️ Top pitfall: Confusing E(X) with a probability. E(X) can be any real number, not bounded to [0, 1]. Also, E(X) need not be a possible value of X (e.g., 3.5 for a fair die).

Self-check: For a fair die, E(X) = 3.5. Does this mean you expect to roll 3.5?

Connects to: ['Variance', 'Law of large numbers', 'Fair games']

Variance and Standard Deviation

Must-know: Variance measures spread around the mean. Computational form: Var(X) = E[X²] − μ². Standard deviation σ = √Var(X) restores original units.

⚠️ Top pitfall: The most common exam mistake: computing E[X²] and stopping. Var(X) = E[X²] − μ². You MUST subtract μ².

Self-check: If E(X) = 2 and E[X²] = 5, what is Var(X)?

Connects to: ['Expectation', 'Standard deviation', 'Risk measurement']

Cumulative Distribution Function (CDF)

Must-know: The CDF F(x) = P(X ≤ x) is a running total of probability. It starts at 0, ends at 1, and never decreases.

⚠️ Top pitfall: Confusing F(x) with P(X=x). F(3) is the sum of probabilities up to X=3. To get P(X=3), use F(3) − F(2).

Self-check: If F(2) = 0.6 and F(3) = 0.9, what is P(X = 3)?

Connects to: ['Percentiles', 'Quantile function', 'Probability distributions']

Finding K in a Probability Distribution

Must-know: When probabilities are multiples of an unknown K, use ∑P = 1 to solve for K. Then compute mean, variance, and CDF.

⚠️ Top pitfall: Forgetting to verify range condition after finding K. Always check that every P(X) with the solved K falls in [0, 1].

Self-check: If P(X) = [K, 2K, 3K, 2K, K], what is K?

Connects to: ['Validation conditions', 'Expectation', 'Variance', 'CDF']

Transition from Discrete to Continuous

Must-know: Var(X) = E[X²] − μ² is the SAME for discrete and continuous. Only the computation changes: sums become integrals.

⚠️ Top pitfall: Thinking continuous probability is fundamentally different. The logic (weighted average, variance as spread) is identical.

Self-check: What changes when moving from discrete to continuous probability?

Connects to: ['Integration', 'Exponential distribution', 'Normal distribution']

Joint and Marginal Distributions

Must-know: Joint distribution P(X, Y) captures two variables. Marginal sums over the other variable: P(X) = ∑ₗ P(X, Y).

⚠️ Top pitfall: Confusing joint P(X, Y) with conditional P(X | Y). Joint = X AND Y; conditional = X GIVEN Y. Marginals alone do NOT capture relationships.

Self-check: From a joint table, how do you find P(X = 3)?

Connects to: ['Conditional probability', 'Independence', 'Covariance']

Was this lecture useful?

Loading comments…
🤖

BitsNotes AI Assistant

Subject Notes Assistant

Configure AI Chat

Choose how to access the chatbot
Have your own API key?

Switch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.

🔑 Enter API key above to fetch live models from provider, or enter model name manually.
OpenAI-Compatible API Support

Choose any provider preset (Gemini, DeepSeek, Kimi, GLM, MiniMax, Qwen, OpenAI, Groq, Ollama, etc.) or enter a custom endpoint URL.

Security & Privacy First

Your API key is sent directly from your browser to your specified provider. BitsNotes servers never store or see your key.