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

BA1001 Week 10 Random Variables

This document is a handout for a Business Statistics course covering random variables, their definitions, and properties. It includes a schedule of topics, examples of random variables, cumulative distribution functions, and probability mass functions. The document also discusses discrete and continuous random variables, along with their respective probability density functions.

Uploaded by

Sameera Gamage
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 views33 pages

BA1001 Week 10 Random Variables

This document is a handout for a Business Statistics course covering random variables, their definitions, and properties. It includes a schedule of topics, examples of random variables, cumulative distribution functions, and probability mass functions. The document also discusses discrete and continuous random variables, along with their respective probability density functions.

Uploaded by

Sameera Gamage
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

MASTER OF BUSINESS ANALYTICS

BA 1001: Business Statistics

Handout No 10- Random Variables

Dr. Rushan Abeygunawardana


rab_abey@[Link]

UNIVERSITY OF COLOMBO SCHOOL OF COMPUTING


Schedule of Work

Week Topic
Week 01  Introduction to Business Statistics
Week 02  Gathering data: Sampling Techniques
Week 03  Gathering data: Data Collection Methods
Week 04  Visualizing of data: Graphical Representation of Data
Week 05  Visualizing of data: Graphical Representation of Data using software
Week 06  Describing data: Numerical Representation of Data
Week 07  Describing data: Numerical Representation of Data using software
Week 08  Measures of uncertainty: Measuring uncertainty using probability
Week 09  Measures of uncertainty: Making decisions with uncertainty
Week 10 Random Variables
Week 11 Probability Distributions: Discrete probability distributions
Week 12 Probability Distributions: Continuous Probability Distributions
Week 13 Prediction and optimization: Linear Programming techniques
Week 14 Prediction and optimization: Linear Programming techniques
Week 15 Prediction and optimization: Linear Programming techniques

2
Random Variables

• The main purpose of using a random variable is to define certain probability


functions that make both convenient and easy to compute the probabilities of
various events.
• Random Variable
A random variable is a single-valued real function that assigns a real number to
each observation on sample space.
• Capital letters, (X, Y, Z, …) are used to represent the random variables.
• Sample space S is the domain of the random variable.
• Collection of all numbers is the range of the random variable.
• Two or more sample points might give the same values of X,
• Different values cannot be assigned to the same sample point.

3
Rushan A B Abeygunawardana
Examples

Question 01 (Categorial Variable) Question 02 (Numerical Varable)


Suppose an experiment of tossing a coin A coin is tossing three times. Then the S
once. Then we may be interested with consists of eight equally likely outcomes.
the outcome of a trial. The random Let we are interested with the number of
variable X can be defined as, “Head” in 3 trials. The random variable X
For “Head” ➔ X = 1 and is the number of heads obtained. Find
For “Tail” ➔X=0 (a) P(X=2) (b) P(X<2)
We could define another random variable Answer
Y as S={(HHH), (HHT), (HTH),…, (TTH), (TTT)}
For “Head” ➔ Y = 0 and (a) Let A be the event defined by X=2.
For “Tail” ➔Y=1 Then A  S and A={HHT, HTH, THH}
Therefore P(A) = P(X=2) = 3/8
(b) Let B be the event defined by X<2.
Then BS & B={HTT,THT,TTH,TTT}
Rushan A B Abeygunawardana Therefore P(B) = P(X<2) = 4/8 4
Cumulative Distribution Function

• The Cumulative Distribution Function (cdf) [or distribution function] of a random


variable X is the function denoted total (accumulated) probability of X up to and
including a certain value of 𝑥. It is denoted by 𝐹𝑋 (𝑥) or simply 𝐹(𝑥), which is
defined as,
𝐹𝑋 𝑥 = 𝑃 𝑋 ≤ 𝑥 𝑓𝑜𝑟 − ∞ < 𝑥 < ∞

• Information about a random experiment described by the random variable X can


be determined by the behavior of 𝐹𝑋 𝑥

• Properties of cdf

• 0 ≤ 𝐹𝑋 (𝑥) ≤ 1

• 𝐹𝑋 𝑥1 ≤ 𝐹𝑋 𝑥2 𝑖𝑓𝑥1 < 𝑥2
5
Rushan A B Abeygunawardana
Examples

Question
• Consider the random variable X defined on Question 02. Find and sketch the
cumulative distribution function of X.
Answer
• The following table and graph give F(x)=P(Xx) for x=-1, 0, 1, 2, 3, 4
X P(X=x) F(x)
-1 0 0
0 1/8 1/8
1 3/8 4/8
2 3/8 7/8
3 1/8 1
4 0 1

• F(x) has jumps at x= 0, 1, 2, 3 and that at each jump the upper value is the value for
F(x).
6
Rushan A B Abeygunawardana
Determination of Probabilities from the cdf

• From the definition of the cumulative distribution function we can compute other
probabilities such as,

• 𝑃(𝑎 < 𝑋 ≤ 𝑏) = 𝐹𝑋 (𝑏) − 𝐹𝑋 (𝑎)

• 𝑃(𝑋 > 𝑎) = 1 − 𝐹𝑋 (𝑎)

7
Rushan A B Abeygunawardana
Examples

Question
• Find the cdf for the r.v. X is given below “X: score on an unbiased die”
X 1 2 3 4 5 6
P(X=x) 1/6 1/6 1/6 1/6 1/6 1/6
P(Xx) 1/6 2/6 3/6 4/6 5/6 1
Question
• The pmf of the r.v X is shown in the table. Find the cdf of X.
X 0 1 2 3 4 5 6
P(X=x) 0.03 0.04 0.06 0.12 0.4 0.15 0.2
P(Xx) 0.03 0.07 0.13 0.25 0.65 0.8 1

8
Rushan A B Abeygunawardana
Discrete Random Variables

• X is a discrete random variable only if its range contains a finite or countable


infinite number of points

• Let X be a discrete random variable with cdf FX(x)

• FX(x) changes values only in jumps and is constant between jumps

• FX(x is a staircase or step function

• Random variable X defined in Question 2 is an example for discrete random


variable

9
Rushan A B Abeygunawardana
Probability Mass Function (pmf)

• List of possible values with the corresponding probabilities is called pmf of a discrete
random variable X.
• Suppose that X is a discrete random variable occur at the points x1, x2, x3,… where the
sequence be either finite or countable infinite, and we assume xi <xj if i<j, then
• 𝑃(𝑥) = 𝑃(𝑋 = 𝑥𝑖 )
• 𝑃(𝑋 = 𝑥𝑖 ) = 𝐹𝑋 (𝑥𝑖 ) − 𝐹𝑋 (𝑥𝑖−1 ) = 𝑃(𝑋 ≤ 𝑥𝑖 ) − 𝑃(𝑋 ≤ 𝑥𝑖−1 )

• Properties of pmf
• 0≤𝑃 𝑥 ≤1 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑣𝑎𝑙𝑢𝑒𝑠 𝑜𝑓 𝑥

• 𝑃 𝑥 =0 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖𝑚𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑣𝑎𝑙𝑢𝑒𝑠 𝑜𝑓 𝑥

• σ𝑎𝑙𝑙 𝑥 𝑃(𝑥) = 1

• 𝐹𝑋 (𝑥) = 𝑃(𝑋 ≤ 𝑥) = σ𝑥𝑘 ≤𝑥 𝑃𝑋 (𝑥𝑘 )

10
Rushan A B Abeygunawardana
Examples

Question
• Let “X: number of fours obtained when two dice are thrown”.
• Obtain the valid probability mass function of X
• Illustrate the probability mass function on a diagram
Answer
When 2 dice are thrown, the number of fours obtained is 0, 1, or 2.
5 5 25
Then, 𝑃(𝑋 = 0) = 𝑃(4ሜ 4)
ሜ = 𝑃(4)𝑃(
ሜ ሜ =
4) =
6 6 36
Similarly we can get P(X=1)=10/36, P(X=2)=1/36
x 0 1 2
P(X=x) 25/36 10/36 1/36
Since P(X=0)>0, P(X=1)>0, P(X=2)>0 and
 P(X=x)=1 this is a valid probability distribution function

11
Rushan A B Abeygunawardana
Examples

Question Answer
• The discrete random variable W has 1. 0.1 + 0.25 + 0.3 + 0.15 + 𝑑 = 1 ⇒ 𝑑 = 0.2
pmf as shown
2. 𝑃(−3 ≤ 𝑊 < 0) = 𝑃(𝑊 = −3) + 𝑃(𝑊 =
W -3 -2 -1 0 1 − 2) + 𝑃(𝑊 = −1)
= 0.1 + 0.25 + 0.3 = 0.65
P(W=w) 0.1 0.25 0.3 0.15 d
Find 3.𝑃(𝑊 > −1) = 𝑃(𝑊 = 0) + 𝑃(𝑊 = 1)
1. The value of d = 0.15 + 0.2 = 0.35
2. P(-3W<0)
4. 𝑃(−1 ≤ 𝑊 < 1) = 𝑃(𝑊 = 0) = 0.15
3. P(W>-1)
4. P(-1<W<1) 5. The mode is the value with the highest
5. The mode probability. Here it is with w=-1.
➔ mode =-1

12
Rushan A B Abeygunawardana
Examples

Question Answer
• The pmf of a random Since Y is a r.v.  P(Y=y)=1
variable Y is given by
P(Y=y)=cy2,for y=0,1,2,3, c+4c+9c+16c=1 => c = 1/30
and 4. Find the value of
the constant c.

Question Answer
• The pmf of the discrete rv
is given by P(X=x)= a(3/4)x
for x=0,1,2, 3,… 10, find
the value of the constant
a.

13
Rushan A B Abeygunawardana
Continuous Random Variables

• The random variable X is continuous random variable if its range contains an


interval (infinite) of real numbers.

• Let X be a random variable with cumulative distribution function FX(x). Then FX(x) is
continuous and the derivative dFX(x)/dx exists everywhere except at possibly a
finite number of points.

• If X is a continuous random variable then P(X = x) = 0

• This is an example of an event with probability zero, that is not necessarily the
impossible events.

14
Rushan A B Abeygunawardana
Probability Density Function (pdf)

• Let X be a continues rv with pdf 𝑓𝑋 𝑋 = 𝑥


• The function fX(x) is can be treated as a probability density function (pdf) of the
continuous random variable X, if it is a positive function that defined over the range
of possible values.
• pdf can be used to determine the probability over a range as the area under the
curve of 𝑓𝑋 𝑋 = 𝑥
• Properties of fX(x) Note:
• 𝑓𝑋 (𝑥) ≥ 0
+∞
𝑃𝑋 (𝑎 < 𝑋 < 𝑏) = 𝑃𝑋 (𝑎 < 𝑋 ≤ 𝑏)
• ‫׬‬−∞ 𝑓𝑋 (𝑥) =1
= 𝑃𝑋 (𝑎 ≤ 𝑋 < 𝑏)
𝑑𝐹𝑋 (𝑥) = 𝑃𝑋 (𝑎 ≤ 𝑋 ≤ 𝑏)
• 𝑓𝑋 (𝑥) =
𝑑𝑥
𝑥 𝑏
• 𝐹𝑋 (𝑥) = 𝑃𝑋 (𝑋 ≤ 𝑥) = ‫׬‬−∞ 𝑓𝑋 (𝑥)𝑑𝑥
𝑏 = න 𝑓𝑋 (𝑥)𝑑𝑥 = 𝐹𝑋 (𝑏) − 𝐹𝑋 (𝑎)
• 𝑃(𝑎 < 𝑋 ≤ 𝑏) = ‫𝑥𝑑)𝑥( 𝑋𝑓 𝑎׬‬ 𝑎


15
Rushan A B Abeygunawardana
Examples

Question Answer
Let X be a rv ‘the delay, in 10
1. 𝑃(0 ≤ 𝑥 ≤ 10) = ‫׬‬0 (0.2 − 0.02𝑥)𝑑𝑥 = ሾ0.2𝑥 −
hours, of a flight from airport
A’, where f(x)=0.2 – 0.02x, for 0.01𝑥 2 ሿ10
0 =2−1=1
0  x  10. 10
Since ‫׬‬0 𝑓(𝑥) = 1 and it is a positive function this is a
1. Check whether this is a valid probability function
valid probability
2. 𝑃 𝑋 < 4 = 𝑃 0 ≤ 𝑋 < 4
distribution function. 4
2. Find the probability that = න(0.2 − 0.02𝑥)𝑑𝑥 = 0.2𝑥 − 0.01𝑥 2 4
0
the delay will be less than 4 0
hours = 0.8 − 0.16 = 0.64
3. Find the probability that 6
3. 𝑃ሾ2 ≤ 𝑋 < 6ሿ = ‫׬‬2 (0.2 − 0.02𝑥)𝑑𝑥 = 0.2𝑥 − 0.01𝑥 2 6
2
the delay will be between 2
= 1.2 − 0.36 − 0.4 − 0.04 = 0.64
and 6 hours

16
Rushan A B Abeygunawardana
Examples

Question Answer 1
• The continuous r.v. X has pdf f(x)  0
1
3
1.
 f ( x)dx = 1 =  k (x + 2 ) dx +  4kdx
2
where;
− −2 0

k ( x + 2 )
2
−2  x  0 1

 
0 1
 1 =
k
(x + 2)3 + 4k x 
3

 1
f ( x ) = 4 k 0  x 1 3 −2 0

 3
0 otherwise
1 =
k
8 + 4k  4 
 3 3
1. Find the value of the constant k 1
k =
2. Sketch y=f(x) 8
3. Find P(-1X 1)
4. Find P(X>1)

17
Rushan A B Abeygunawardana
Examples…

Answer…
1
 8 (x + 2) −2  x  0
2
2.

 1 1
f ( x ) = 4 0  x 1
 8 3
0 otherwise

 
0 0

3. P(−1  X  0) =  (x + 2) dx =
1 2 1
(x + 2)3 =
1
8 − 1 = 7
−1
8 24 −1 24 24
1
P(0  X  1) = area of rec tan gle =
2
7 1 19
 P(−1  X  1) = P(−1  X  0) + P(0  X  1) = + =
24 2 24
1 1 1
4. 𝑃 𝑋 > 1 = 𝑎𝑟𝑒𝑎 𝑜𝑓 𝑟𝑒𝑐𝑡𝑎𝑛𝑔𝑙𝑒 = × =
3 2 6

18
Rushan A B Abeygunawardana
Obtaining the pdf from the cdf

Example
Find a probability density function for the r.v. whose distribution function is given
by 0 for x  0

F ( x) =  x for 0  x  1
1 for x  1

and plot its graph.
Example
For a discrete r.v. X the cumulative distribution function F(x) is as shown.
x 1 2 3 4 5
F(x) 0.2 0.32 0.67 0.9 1

Find (a). P(X=3) (b). P(X>2)

19
Rushan A B Abeygunawardana
Mathematical Expectation and Variance of a
Random Variable
• The mathematical expectation (mean or expected value) of a random variable X
denoted by X or E(X) is defined as
෍ 𝑥𝑃 𝑥 𝑖𝑓 𝑋 𝑖𝑠 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒
𝑎𝑙𝑙 𝑥
𝜇𝑋 = 𝐸(𝑋) = +∞

න 𝑥𝑓𝑋 𝑥 𝑑𝑥 𝑖𝑓 𝑋 𝑖𝑠 𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠
−∞
• The variance of a random variable X denoted by 2 or Var(X) is defined as
෍ 𝑥 − 𝜇𝑋 2 𝑃 𝑥 𝑖𝑓 𝑋 𝑖𝑠 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒
𝑎𝑙𝑙 𝑥
𝜎𝑋2 = 𝑉𝑎𝑟(𝑋) = +∞

න 𝑥 − 𝜇𝑋 2 𝑓𝑋 𝑥 𝑑𝑥𝑖𝑓 𝑋 𝑖𝑠 𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠
−∞

• Thus 𝜎𝑋2 = 𝑉𝑎𝑟(𝑋) = 𝐸 𝑋 − 𝐸 𝑋 2 = 𝐸 𝑋 2 − 𝐸 𝑋 2 = 𝐸 𝑋 2 − 𝜇2


• Var(X)  0
• Standard deviation is the positive value of the square root of Var(X)
20
Rushan A B Abeygunawardana
Examples

Question
• A r.v. X has pmf as
X -2 -1 0 1 2
Find the E(X).
P(X=x) 0.3 0.1 0.15 0.4 0.05
Answer

𝐸 𝑋 = ෍ 𝑥𝑃ሾ𝑋 = 𝑥ሿ = −2 0.3 + −1 0.1 + 0 0.15 + 1 0.4 + 2 0.05 = −0.2


𝑎𝑙𝑙𝑥

21
Rushan A B Abeygunawardana
Examples

Question
A bag contains 3 red balls and 1 blue ball. A second bag contains 1 red ball and 1 blue
ball. A ball is picked out of each bag and is then placed in the other bag. What is the
expected number of red balls in the first bag?
Answer
Assume that the balls are taken from each bag simultaneously.
Let X = the final number of red balls in the first bag. Then X=2, 3, 4.
If a red ball is picked from each bag and places in the other then the number of red
balls in the first bag is now 3, etc
P[X=2]=P(R from 1st bag and B from 2nd bag) = P(R1B2) = (3/4)(1/2) =3/8
P[X=3]=P(R1R2)+P(B1B2)=(3/4)(1/2)+(1/4)(1/2)=1/2 and P[X=4]=P(B1R2) =1/8
3 4 1 22
∴ 𝐸 𝑋 = ෍ 𝑥𝑃(𝑋 = 𝑥) = 2 +3 +4 =
8 8 8 8
𝑎𝑙𝑙𝑥

22
Rushan A B Abeygunawardana
Examples

Question Answer
• The r.v. X has pdf P[X=x] for 1. 𝐸(3) = σ 3𝑃(𝑋 = 𝑥) = 3(0.1) + 3(0.6) + 3(0.3) = 3
x=1,2,3 2. 𝐸(𝑋) = σ 𝑥𝑃(𝑋 = 𝑥) = 1(0.1) + 2(0.6) + 3(0.3) = 2.2

x 1 2 3 3. 𝐸(5𝑋) = σ 5𝑥𝑃(𝑋 = 𝑥) = 5 1 (0.1) + 5 2 (0.6) +


5 3 (0.3) = 11
P[X=x] 0.1 0.6 0.3
4. 𝐸(5𝑋 + 3) = σ 5𝑥 + 3 𝑃(𝑋 = 𝑥)
• Calculate = 8 (0.1) + 13 (0.6) + 18 (0.3) = 14
1. E(3) 2. E(X) 5. 5𝐸(𝑋) + 3 = 5(2.2) + 3 = 14
3. E(5X) 4. E(5X+3) 6. 𝐸(𝑋 2 ) = σ 𝑥 2 𝑃(𝑋 = 𝑥) = 1(0.1) + 4(0.6) + 9(0.3) = 5.2
5. 5E(X)+3 6. E(X2) 7. 𝐸(4𝑋 2 − 3) = σ 4𝑥 2 − 3 𝑃(𝑋 = 𝑥) = 1(0.1) + 13(0.6) +
7. E(4X2-3) 8. 4E(X2-3) 33(0.3) = 17.8
8. 4𝐸(𝑋 2 − 3) = 4𝐸 𝑋 2 − 3 = 4(5.2) − 3 = 17.8

23
Rushan A B Abeygunawardana
Results of E(X) and V(X)

Expected Value Variance


• E(a) = a V(a) = 0
• E(aX) = aE(X) V(aX) = a2V(X)
• E(aX+b) = aE(X)+b V(aX+b) = a2V(X)
Here a and b are constants Here a and b are constants
• E(aX+bY) = aE(X)+bE(Y) If X and Y are independent r.v
• E[f1(x)+f2(x)]=E[f1(x)]+E[f2(x)] V[X+Y]=V[X]+V[Y]
Here f1 and f2 are function of X V[X-Y]=V[X]+V[Y]
• If X and Y are independent r.v
V(aX + bY) = a2V(X) + b2V(Y)
E[X + Y] = E[X] + E[Y]
E[X - Y] = E[X] - E[Y] V(aX - bY) = a2V(X) + b2V(Y)
E[aX - bY] = aE[X] - bE[Y]
24
Rushan A B Abeygunawardana
Examples

Question
• The discrete r.v. X has pmf as shown in the table.

x 10 20 30
P(X=x) 0.1 0.6 0.3
Find V(2X+3)
Answer
𝑉(2𝑋 + 3) = 4𝑉 𝑋
𝑉(𝑋) = 𝐸(𝑋 2 ) − 𝐸 𝑋 2

𝐸 𝑋 = ෍ 𝑥𝑃(𝑋 = 𝑥) = 10(0.1) + 20(0.6) + 30(0.3) = 22


𝑎𝑙𝑙𝑥

𝐸 𝑋 2 = ෍ 𝑥 2 𝑃(𝑋 = 𝑥) = 100(0.1) + 400(0.6) + 900(0.3) = 520


𝑎𝑙𝑙𝑥
𝑉(𝑋) = 𝐸(𝑋 2 ) − 𝐸 𝑋 2 = 520 − 222
= 36
∴ 𝑉(2𝑋 + 3) = 4𝑉(𝑋) = 4(36) = 144

25
Rushan A B Abeygunawardana
Examples

Question Answer
Let X and Y are independent 1. E(5 X + 4Y ) = 5E( X ) + 4E (Y ) = 5(10) + 4(8) = 82
discrete r.v’s, such that E(X)=10,
V(X)=2, E(Y)=8, V(Y)=3. Find; 2. V (5 X + 4Y ) = 25V ( X ) + 16V (Y ) = 25(2) + 16(3) = 98
1. E(5X+4Y) 2. V(5X+4Y) 3. V  1 X + Y  = 1 V ( X ) + V (Y ) = 1 (2) + (3) = 3.5
3. V(1/2X+Y) 2  4 4

Question Answer
The r.v’s X and Y are 1. E(4 X − 3Y ) = 4E( X ) − 3E (Y ) = 4(2) − 3(5) = −7
independent and E(X)=2, 2. V (4 X − 3Y ) = 16V ( X ) + 9V (Y ) = 16(0.5) + 9(2) = 26
V(X)=0.5, E(Y)=5, V(Y)=2. Find;
1. E(4X-3Y) 2. V(4X-3Y)

26
Rushan A B Abeygunawardana
Examples

Question Answer
• The table gives the joint 1. Consider the r.v. X. Then;
probability mass function
of two random variables X x 0 1
and Y. P[X=x] 0.5 0.5
x=0 x=1 By symmetry E(X)=0.5
y=1 0.2 0.4 2. Consider the r.v. X. Then;
y=2 0.3 0.1 y 1 2
• Calculate P[Y=y] 0.6 0.4
1. E(X)
2. E(Y) EY  =  yP(Y = y) = 1(0.5) + 2(0.4) = 1.4
3. E(X+Y) all y

3. EX + Y  = E( X ) + E(Y ) = 0.5 + 1.4 = 1.9


27
Rushan A B Abeygunawardana
Examples

Question Question
• Let X is a continuous r.v. Let X is a continuous r.v. with pdf
with pdf 2
f ( x) = (3 − x )( x − 5)
3
f ( x) =
3x
0 x4 3 x 5
64 4
Find E(X) Find E(X)
Answer Answer
E(X ) =  x f ( x)dx
5
E(X ) = (3 − x )(x − 5)dx
3
all x  x f ( x)dx =  x
all x 3
4
4
3x 2
=x
( )
dx 3
5

0
64 =  8 x 2 − 15x − x 3 dx
4 43
3
= 
3
x dx 5
64 0 3  8 x 15x x 
3 2 4
=  − − 
3  x4 
4
4 3 2 4 3
=   =3
64  4  0 =4
28
Rushan A B Abeygunawardana
Examples

Question Answer
The continuous r.v. X has pdf f(x) where 1
4
1
1. E ( X ) =  x ( x + 3) dx =  x ( x + 3) dx
1 20 20
f ( x) = ( x + 3) 0 x4 all x 0

20 4
1  x3 
4

=
1
 (
x 2
+ 3 x)dx = 
20  3
+ 3 x  = 2.266
Find 20 0 0

1. E(X) 2. E (2 X + 5) = E (2 X ) + 5 = 2E ( X ) + 5
2. E(2X+5) = 2(2.266) + 5 = 9.533
3. E(X2) 4
3. E ( X ) =  x 1 ( x + 3) dx =  x 2 1 ( x + 3) dx
2 2

4. E(X2+2X-3) all x
20 0
20
4
1  x 4 3x3 
4
=
1
20 0
( 3 2
)
x + 3 x dx =  +
20  4
 = 6.4
3 0
4. E ( X 2 + 2 X − 3) = E ( X 2 ) + 2 E ( X ) − 3
= 6.4 + 2(2.266) − 3
Rushan A B Abeygunawardana = 7.933 29
Examples

Question Question
The continuous r.v. X has pdf f(x) where The continuous r.v. X has pdf
6
7 x 0  x 1 1
 f ( x) = x 0 x4
6 8
f ( x) =  x ( 2 − x ) 1 x  2
7 Find E(X), E(X2), V(X), standard deviation
0 otherwise

2
Find E(X ) 
of X, V(3X+2)
Answer
2 2 6
1
6
E ( X ) =  x f ( x)dx =  x xdx +  x 2 x(2 − x)dx
2
2
Answer
4
1  x3 
4
7 7 1
all x 0 1
1. E ( X ) =  x xdx =   = 2.66
6
1
6
2 8 8  3 0
=  x3dx +  (2 x 3 − x 4 )dx
0
4
70 71 4
1  x4 
2 1
2. E ( X ) =  x 8 xdx = 8  4  = 8
2
1 2
6  x 4  6  2 x 4 x5  2  0
=   +  −  0
V ( X ) = E ( X ) − ( E ( X ) ) = 8 − ( 2.66 ) = 0.88
2 2
7  4 0 7  4 5 1
= 1.328
3. SD( X ) = V ( X ) = 0.888 = 0.9428
4. V (3 X + 2) = 9V ( X ) = 9(0.888) = 8
Rushan A B Abeygunawardana
30
Two Independent Random variables

• If X and Y are any two random variables, then


E(X+Y) = E(X) + E(Y)
Var(X+Y) = Var(X) + Var (Y) +2Cov(X, Y)
• If X and Y are two independent random variables, then
E(X+Y) = E(X) + E(Y)
Var(X+Y) = Var(X) + Var (Y)
Results
• For r.v’s X and Y and constant a and b,
E(aX+bY) = aE(X) + bE(Y)
• If X and Y are two independent random variables, then
Var(aX+bY) = a2Var(X) + b2Var (Y)
• If X and Y are independent;
E(X – Y) = E(X) - E(Y) and Var(X – Y) = Var(X) + Var (Y)
• And also E(aX – bY) = aE(X) - bE(Y) and Var(aX – bY) = a2Var(X) + b2Var (Y)
31
Rushan A B Abeygunawardana
Two Independent Random Variables…

Example 1
X is the r.v. “the score on a tetrahedral die”, Y is the r.v. “the number of heads obtained
when two coins are tossed”.
a) Obtain the probability distributions of X and of Y.
b) Find E(X) and E(Y)
c) Find V(X) and V(Y)
d) Obtain the probability distribution for the r.v. X+Y
e) Find E(X+Y) and V(X+Y) using the probability distribution for X+Y.
Comment on your results.
Example 2
The random variables X and Y are independent and E(X) = 2, V(X) = 0.5, E(Y) = 5, V(Y) =
2. Find,
a) E(4X – 3Y)
b) V(4X – 3Y)

32
Rushan A B Abeygunawardana
NEXT ?
…Probability Distributions…

Rushan A B Abeygunawardana 10/16/2020 33

You might also like