Random Variable — Definition (Introduced in the Probability Chapter)
On this page· 13 sections
Source & scope. Class 12 Mathematics, Chapter 13 Probability, the closing Remark right after the Bayes'-theorem worked examples (immediately before Exercise 13.3). Builds on: the general theory of sample spaces and events covered throughout this chapter. This is the final new idea introduced in the...
Source & scope. Class 12 Mathematics, Chapter 13 Probability, the closing Remark right after the Bayes'-theorem worked examples (immediately before Exercise 13.3). Builds on: the general theory of sample spaces and events covered throughout this chapter. This is the final new idea introduced in the chapter.
A random variable is a real-valued function whose domain is the sample space of a random experiment. It assigns a single number to every possible outcome of an experiment, letting outcomes be analysed and compared numerically rather than only as abstract set elements.
At a glance
- Definition: a random variable is a real-valued function whose domain is a random experiment's sample space.
- NCERT's example: toss a coin twice, S = {HH, HT, TH, TT}; let X = "number of heads," giving X(HH)=2, X(HT)=1, X(TH)=1, X(TT)=0.
- MORE THAN ONE random variable can be defined on the SAME sample space — e.g. Y = "number of heads minus number of tails" on the same S, giving Y(HH)=2, Y(HT)=0, Y(TH)=0, Y(TT)=−2.
- Important scope note: in THIS particular NCERT 2026-27 edition, the chapter introduces only this bare definition — it does NOT go on to cover the probability distribution, mean, or variance of a random variable within Chapter 13.
- The random variable concept is the natural numerical complement to everything else in the chapter (events, conditional probability, [[[Bayes' theorem](/study-materials/math12-ch13-bayes-theorem)](/study-materials/math12-ch13-bayes-theorem-truthfulness-problems)](/study-materials/math12-ch13-bayes-theorem-defective-items-machines)), bridging toward the deeper study of probability distributions typically covered elsewhere.
Learning objectives
- State the definition of a random variable precisely.
- Construct a random variable as a function from a given sample space.
- Recognise that multiple distinct random variables can be defined on one sample space.
Prerequisite knowledge
The reader should already know what a sample space is and be comfortable listing the outcomes of a simple compound experiment like tossing a coin twice.
Core explanation
The definition. NCERT states, as a closing remark to this chapter: a random variable is a real valued function whose domain is the sample space of a random experiment. In other words, a random variable X assigns to EVERY outcome ω of the sample space S a single real number X(ω) — it is simply a rule (a function) for turning each qualitative outcome into a quantitative value.
Illustrating with a concrete example. Consider the experiment of tossing a coin two times in succession. The sample space is:
Let X denote "the number of heads obtained." Then X is a random variable, and for each outcome, its value is:
Notice that X takes the value 1 for TWO different outcomes (HT and TH) — this is perfectly normal; a random variable need not be one-to-one, it simply needs to assign SOME real number to every outcome.
More than one random variable can exist on the same sample space. NCERT emphasises that several DIFFERENT random variables can be defined using the SAME underlying sample space. For example, let Y denote "the number of heads minus the number of tails" for each outcome of the SAME sample space S above. Then:
So X and Y are two genuinely different random variables, both defined on the identical sample space S = {HH, HT, TH, TT} — they simply apply different "rules" to the same four outcomes.
Key terms
- Random variable — a real-valued function whose domain is the sample space of a random experiment; typically denoted by a capital letter such as X or Y.
- Domain of a random variable — the sample space S itself; every outcome of S must be assigned some real number.
- X(ω) — the specific real number that the random variable X assigns to the outcome ω.
- Multiple random variables on one sample space — different functions (like X and Y above) can both be defined using the same underlying set of outcomes.
Diagram / figure guidance
Draw the sample space S = {HH, HT, TH, TT} as four labelled dots on the left. Draw a vertical number line on the right. Draw arrows from each dot to its corresponding value on the number line for X: HH→2, HT→1, TH→1, TT→0 (note two arrows converge on the same value, 1). As a second, overlaid diagram (or a second number line), draw the arrows for Y: HH→2, HT→0, TH→0, TT→−2, so the reader can visually compare how X and Y assign different numbers to the same four outcomes.
Worked example
A coin is tossed three times. Let Z denote the number of heads obtained. List the sample space and find Z(ω) for every outcome ω.
The sample space for three coin tosses is:
S = {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}, containing 8 outcomes.
Applying Z = "number of heads" to every outcome:
So Z takes the values 3, 2, 2, 2, 1, 1, 1, 0 across the 8 outcomes — confirming Z is indeed a real-valued function on S, with the value 3 occurring once, the value 2 occurring three times, the value 1 occurring three times, and the value 0 occurring once. (Note: this worked example only illustrates the DEFINITION of a random variable, i.e. constructing the function and listing its values — this chapter, in this edition, does not proceed to assign or discuss PROBABILITIES to these values, which would be the next natural step covered under the topic of a "probability distribution" elsewhere.)
Common misconceptions
- "A random variable is random — it doesn't have a definite value." A random variable IS a well-defined function; for each SPECIFIC outcome ω, X(ω) is a perfectly definite, fixed real number. The "randomness" refers to the fact that WHICH outcome ω actually occurs is uncertain, not that the function X itself is vague or undefined.
- "A random variable must take a different value for every outcome." False — as shown, X(HT) = X(TH) = 1; a random variable can (and very often does) assign the same value to multiple different outcomes.
- "Only ONE random variable can meaningfully be defined on a given sample space." Incorrect — NCERT's own example shows two distinct random variables, X and Y, both defined validly on the identical sample space S = {HH, HT, TH, TT}.
- "This chapter covers the probability distribution, mean, and variance of a random variable." Not in this particular NCERT 2026-27 edition of Chapter 13 — the chapter, as confirmed by its own table of contents, ends with this bare definition (sections 13.1 through 13.5 only); probability distributions, expectation, and variance of a random variable are not part of this chapter's content here and should not be assumed or fabricated.
Exam application (JEE)
Within this chapter's actual scope, JEE would test only the bare mechanics of the definition: given a sample space and a stated rule (such as "number of heads," "sum of two dice," "larger of the two numbers rolled"), construct the function's values across the sample space correctly. Students should be aware that broader JEE syllabi elsewhere (and other textbook treatments) extend this into probability distributions, expectation (mean), and variance of a random variable — important and heavily tested topics in their own right — but that extended material is NOT part of what this specific NCERT chapter provides, so any such content must be sourced and verified separately rather than assumed to follow from this chapter alone.
Frequently asked questions
- What is a random variable? A real-valued function whose domain is the sample space of a random experiment — it assigns a single real number to every outcome.
- Can a random variable assign the same value to two different outcomes? Yes — for example, X(HT) = X(TH) = 1 when X is "number of heads" on two coin tosses; a random variable is not required to be one-to-one.
- Can more than one random variable be defined on the same sample space? Yes — NCERT's own example defines both X ("number of heads") and Y ("heads minus tails") on the identical sample space {HH, HT, TH, TT}.
- Does this NCERT chapter cover the probability distribution of a random variable? No — in this particular 2026-27 edition, Chapter 13 "Probability" ends with just the bare definition of a random variable (confirmed via the book's own table of contents, which lists only sections 13.1 through 13.5); probability distributions, mean, and variance are not included in this chapter's content.
- Why is a random variable useful? It converts qualitative outcomes of an experiment into numerical values, making outcomes comparable, summable, and ultimately usable for further analysis such as computing averages or spreads (though that further analysis is outside this particular chapter's scope).
Practice questions (original practice questions)
- A die is thrown once, S = {1,2,3,4,5,6}. Let W = "the square of the number shown." Then W(4) equals:
- (a) 4
- (b) 16
- (c) 2
- (d) 8
- Answer: (b) — W(4) = 4² = 16, applying the stated rule directly.
- Two dice are thrown. Let T = "the sum of the two numbers shown." The value of T for the outcome (3,5) is:
- (a) 15
- (b) 8
- (c) 2
- (d) 3
- Answer: (b) — T(3,5) = 3+5 = 8.
- For X = "number of heads" on two coin tosses (S = {HH,HT,TH,TT}), how many outcomes satisfy X(ω) = 1?
- (a) 0
- (b) 1
- (c) 2
- (d) 4
- Answer: (c) — HT and TH both give X=1.
- Which statement about random variables is TRUE?
- (a) A random variable must be one-to-one
- (b) A random variable is a function on the sample space
- (c) Only one random variable can exist per sample space
- (d) A random variable always takes only positive values
- Answer: (b) — This is the core definition; the others are all false in general.
- For Y = "number of heads minus number of tails" on two coin tosses, Y(TT) equals:
- (a) 0
- (b) 2
- (c) −2
- (d) 1
- Answer: (c) — TT has 0 heads and 2 tails, so Y(TT) = 0 − 2 = −2.
Quick revision
- A random variable is a real-valued function whose domain is the sample space of a random experiment.
- NCERT's example: X = "number of heads" on two coin tosses, giving X(HH)=2, X(HT)=1, X(TH)=1, X(TT)=0.
- Multiple random variables (e.g. X and Y) can be defined on the SAME sample space.
- A random variable need not be one-to-one — the same value can arise from different outcomes.
- This NCERT edition's Chapter 13 covers ONLY this bare definition — probability distribution, mean, and variance of a random variable are not included here.
Related articles
- Builds on: the general theory of sample spaces introduced throughout this chapter.
- See also: Bayes' Theorem — Statement, Proof and Formula (the preceding topic in the chapter).
- Builds on (Class 11): Random Experiment and Sample Space (Chapter 14, Class 11 Mathematics).
- Related topics: Addition Rule for Conditional Probability — P((A∪B)|F) = P(A|F) + P(B|F) − P((A∩B)|F), Bayes' Theorem and the Medical Test False-Positive Problem (HIV Test Example), Bayes' Theorem — Defective Items from Multiple Machines (Manufacturing Problem), Bayes' Theorem — Probability That a Witness Is Telling the Truth, Bayes' Theorem — The Three Boxes of Gold and Silver Coins Problem, Complement Rule for Conditional Probability — P(E′|F) = 1 − P(E|F)