PT1,2,3 - Random Variables, Distribution Functions, Mathematical Expectation - CG-1-39
PT1,2,3 - Random Variables, Distribution Functions, Mathematical Expectation - CG-1-39
PT1,2,3 - Random Variables, Distribution Functions, Mathematical Expectation - CG-1-39
X = No. of tails 0 1 2
Outcome of 1 2 3 4 5 6
die roll
Probability 1/6 1/6 1/6 1/6 1/6 1/6
1. Probability Distribution
• Probability distribution of a random variable is a list of all the possible values of
a random variable along with their corresponding probabilities.
• Let P(X = xi) = pi denotes the probability that the discrete r.v. X takes all the
value x1, x2, …, xk corresponding to the various outcomes of a random
experiment. The collection of pairs (xi , pi), i = 1, 2, …, k is called the probability
distribution of X or the discrete probability distribution.
X x1 x2 … xk
P(X = xi) = pi p1 p2 … pk
Probability Mass Function of a random variable
• The function P(X) is called the probability function of the discrete r.v. X
if
1. 0 ≤ pi ≤ 1 for all i = 1, 2, …, k
2. p1 + p2+ … + pk = 1
2. Probability distribution of rolling a fair 6-sided die, where the random variable
X is the outcome of the rolled die:
Outcome of 1 2 3 4 5 6
die roll
Probability 1/6 1/6 1/6 1/6 1/6 1/6
Examples of Probability Distribution
3. A coin is tossed 3 times and the random variable X is number of tails tossed.
q What are the possible outcomes, values of X, and probabilities?
Examples of Probability Distribution
3. A coin is tossed 3 times and the random variable X is number of tails tossed.
q What are the possible outcomes, values of X, and probabilities?
Examples of Probability Distribution
3. A coin is tossed 3 times and the random variable X is number of tails tossed.
q What are the possible outcomes, values of X, and probabilities?
q Probability distribution?
Examples of Probability Distribution
3. A coin is tossed 3 times and the random variable X is number of tails tossed.
q What are the possible outcomes, values of X, and probabilities?
SOLUTION: The lot contains of 9 non-defective items. Since X denotes the number of defective items, x can
take the values 0, 1, 2, 3.
Examples of Probability Distribution
4. QUESTION: From a lot of 12 items containing 3 defective items, a sample of 4 items are drawn at random
without replacement. Let a random variable X denote the number of defective items in the sample. Find the
probability distribution of X.
SOLUTION: The lot contains of 9 non-defective items. Since X denotes the number of defective items, x can
take the values 0, 1, 2, 3. Four items drawn without replacement.
q For x = 0, p(x) = 9C4/12C4 = 14/55
q For x = 1, p(x) = 9C3 3C1 /12C4 = 28/55
q For x = 2, p(x) = 9C2 3C2 /12C4 = 12/55
q For x = 3, p(x) = 9C1 3C3 /12C4 = 1/55
Examples of Probability Distribution
4. QUESTION: From a lot of 12 items containing 3 defective items, a sample of 4 items are drawn at random
without replacement. Let a random variable X denote the number of defective items in the sample. Find the
probability distribution of X.
SOLUTION: The lot contains of 9 non-defective items. Since X denotes the number of defective items, x can
take the values 0, 1, 2, 3. Four items drawn without replacement.
q For x = 0, p(x) = 9C4/12C4 = 14/55
q For x = 1, p(x) = 9C3 3C1 /12C4 = 28/55
q For x = 2, p(x) = 9C2 3C2 /12C4 = 12/55
q For x = 3, p(x) = 9C1 3C3 /12C4 = 1/55
Standard deviation =
• Mean is weighted average of values, where each value is weighted with its
probability.
• Standard deviation is “typical” distance of values from mean.
• Square of Standard Deviation is the Variance.
Mean and Variance of a Random variable
• Mean and Variance are also called the expected values, denoted by E[g(x)], where g(x)
is a random variable.
X = no. rolled 1 2 3 4 5 6
P(X=x) 1/6 1/6 1/6 1/6 1/6 1/6
X = no. rolled 1 2 3 4 5 6
P(X=x) 1/6 1/6 1/6 1/6 1/6 1/6
X = no. rolled 1 2 3 4 5 6
P(X=x) 1/6 1/6 1/6 1/6 1/6 1/6
Variance = (σx)2 = ∫6 𝑥 − µx 2 𝑓 𝑥 𝑑𝑥
7
= ∫; 𝑥2 𝑓 𝑥 𝑑𝑥 − 2µx(∫; 𝑥𝑓 𝑥 𝑑𝑥) − (µx ) 2( ∫; 𝑓 𝑥 𝑑𝑥)
< < <
= ∫6 𝑥2 𝑓 𝑥 𝑑𝑥 - (µx)2 [using ∫6 𝑓 𝑥 𝑑𝑥 = 1]
7 7
<
(ii) The cdf is F(x) = P (-∞ < x ≤ x) = ∫BC 𝑓 𝑥 𝑑𝑥
We have
x<0: F(x) = 0
< <
0 ≤ x ≤ 2: F(x) = ∫> 𝑑𝑥 = 𝑥2/8
=
@ <F
2 ≤ x ≤ 4: F(x) = ∫> (𝑥/4)𝑑𝑥 + ∫@ 4 − 𝑥 𝑑𝑥 = (8𝑥 − 𝑥2 − 8)/8
=
> @ = <
x > 4: F(x) = ∫BC 𝑓 𝑥 𝑑𝑥 + ∫> 𝑓 𝑥 𝑑𝑥 + ∫@ 𝑓 𝑥 𝑑𝑥 + ∫= 𝑓 𝑥 𝑑𝑥 = 1
= F
(iii) P(X> 2.5) = ∫@.K 4 − 𝑥 𝑑𝑥 = 9/32
=
Example 2
• QUESTION: The distribution function of a random variable is given by
1 − 1 + 𝑥 𝑒 B< , 𝑥 ≥ 0
F(x) = L
0, 𝑥 < 0
Find the corresponding density function of random variable X. Also find the mean and variance.
Q Q
• SOLUTION: We have f x = ( 𝐹 𝑥 = (1 − 1 + 𝑥 𝑒 B< )
Q< Q<
Q
= (1 − 𝑒 B< − 𝑥𝑒 B< ) = 0 − (−𝑒 B< ) − (𝑥 −𝑒 B< + 𝑒 B< ) = 𝑥𝑒 B<
Q<
𝑥𝑒 B< , 𝑥 ≥ 0
Hence, f(x) = L is the required density function.
0 , otherwise
C C
Mean = µx = ∫BC 𝑥𝑓 𝑥 𝑑𝑥 = ∫> 𝑥2𝑒 B< 𝑑𝑥 = … = 2
C C
Variance = ∫BC 𝑥2𝑓 𝑥 𝑑𝑥 − (µx)2 = ∫> 𝑥3𝑒 B< 𝑑𝑥 − (µx)2 = … = 6 – 22 = 2
EXPECTED VALUES OF CONTINUOUS RVS
C
• Expected Value: µx = E(X) = Mean = ∫BC 𝑥𝑓 𝑥 𝑑𝑥
C
• E[g(X)] = ∫BC 𝑔 𝑥 𝑓 𝑥 𝑑𝑥
• Variance: (σx)2 = Var(X)= E[(x - µx)2]
C
= ∫BC 𝑥 − µx 2 𝑓 𝑥 𝑑𝑥 = E(X2) – (µx)2 = E(X2) – [E(X)]2
For real numbers a,b:
C
• E[aX+b] = ∫BC 𝑎𝑥 + 𝑏 𝑓 𝑥 𝑑𝑥 = aE(X) + b = aµx + b