A Random Variable is a real-valued function defined on the sample space of a random experiment. In simple words, it assigns a numerical value to each outcome of an experiment.
Example: If two coins are tossed, the sample space is
S={HH,HT,TH,TT}
If we define X as the number of heads, then
X(HH)=2,X(HT)=1,X(TH)=1,X(TT)=0
Thus, X is a random variable taking values
0,1,2
Types of Random Variables:
Discrete Random Variable: Takes only a finite or countably infinite number of values.
Continuous Random Variable: Takes any value in an interval.
At this level, the main focus is on discrete random variables.
Probability Distribution of a Random Variable
The list of all possible values of a discrete random variable together with their corresponding probabilities is called its probability distribution.
If a discrete random variable X takes values
x1,x2,…,xn
with probabilities
p1,p2,…,pn
then the following conditions must hold:
pi≥0for all i
i=1∑npi=1
Probability Mass Function (PMF): For a discrete random variable, the function
P(X=x)
is called its probability mass function.
Mean (Mathematical Expectation)
The Mean or Expected Value of a random variable X, denoted by E(X) or μ, is the probability-weighted average of all possible values of X.
It is given by
E(X)=μ=i=1∑nxipi
It represents the long-run average value of the random variable.
Variance and Standard Deviation
The Variance measures the spread of the random variable around its mean.
It is given by
Var(X)=σ2=E(X2)−[E(X)]2
where
E(X2)=∑xi2pi
The Standard Deviation is the positive square root of the variance:
σ=Var(X)
Standard deviation is always non-negative and has the same units as the random variable.
Example 1: Probability Distribution of Heads
Two coins are tossed simultaneously. Find the probability distribution of the number of heads.
Solution:
Let X denote the number of heads.
The sample space is
S={HH,HT,TH,TT}
So the possible values of X are
0,1,2
From a lot of 10 items containing 3 defectives, a sample of 2 items is drawn at random without replacement. Find the probability distribution of the number of defective items.
Solution:
Let X be the number of defective items in the sample of 2.
Then possible values are
X=0,1,2
Total number of ways of choosing 2 items from 10 is
(210)=45
For X=0:
Both selected items are non-defective.
There are 7 non-defective items, so
P(X=0)=(210)(27)=4521=157
For X=1:
Choose 1 defective from 3 and 1 non-defective from 7:
P(X=1)=(210)(13)(17)=453⋅7=4521=157
For X=2:
Choose 2 defectives from 3:
P(X=2)=(210)(23)=453=151
Thus the distribution is:
X
0
1
2
P(X)
157
157
151
Check:
157+157+151=1
Answer:P(X=0)=157,P(X=1)=157,P(X=2)=151
Example 6: Expected Gain in a Game
A player tosses two coins. He wins Rs 5 if 2 heads appear, Rs 2 if 1 head appears and Rs 1 if no head appears. Find his expected gain.
Solution:
Let X denote the gain of the player.
Then
X=5 if 2 heads appearX=2 if 1 head appearsX=1 if no head appears
From the distribution of heads in two tosses,
P(2 heads)=41,P(1 head)=21,P(0 heads)=41