Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

CHAPTER 2: RANDOM VARIABLES

• Random Variables

• Discrete Random Variables


• Continuous Random Variables
• Mathematical Expectation of Random Variables
Random Variables
• A random variable is a numerical variable whose measured value
can change from one replicate of the experiment to another.
• Random variables are denoted as X, Y, R, …
Random Variables
Discrete Random Variables
• A list of all possible values of all the discrete random variable X,
together with their associated probabilities – probability
distribution.

• Example: Toss a die


Discrete Random Variables
Sum of probabilities
Consider the discrete random variable X with the following probability distribution

The sum of all the probabilities is 1.


Discrete Random Variables
Example 1: Ali is playing a game with a biased five-sided spinner
marked with the number 1, 2, 3, 4 and 5. The probability distribution
of X is shown in the table.
Exercises
1. Construct a probability distribution for tossing three coins.
Find P (X ≥ 2).

2. The discrete random variable Y has the following probability


distribution.

i. Find the value of a.


ii. Find P(Y > 18).
Discrete Random Variables
Probability Function
• Sometimes the probability distribution of X can be defined in terms
of x by a probability function.

• Every probability function must display the two basic properties of probability.
These two properties are:

Property 1 : the probability assigned to each value of the random variable must
be between zero and one. 0  P (X)  1

Property 2 : the sum of the probabilities assigned to all the values of the random
variable must equal one. σ P(X) =1
Discrete Random Variables
Probability Mass Function

Cumulative Distribution Function


Determining of Prob. Function

For example: Is for x = 1, 2, 3, or 4 a probability function?


Determining of Prob. Function
Example 3: A discrete random variable has probability mass function

f(x) =

i. Write out the probability distribution table for X.


ii. Find value a.
iii. Find P(X ≥ 3).

Example 4: The discrete random variable X has probability mass function.

f(x) =

Find the value of the constant k.


Exercises

1.

2. The discrete random variable X can take the values 0, 1, 2, 3


and 4 only and P(X = x) = k (𝑥 2 − 2).
i. Find the value of k.
ii. Find P(1 < X < 4)

3. The number of heads obtained when two unbiased coins are tossed
is denoted by Z.
i. Construct a probability distribution table for Z.
ii. Find P(Z = 2).
Continuous Random Variables
Probability Density Function

The probability distribution or simply distribution of a random


variable X is a description of the set of the probabilities associated
with the possible values for X.
Continuous Random Variables

Probability Density Function

Figure: Probability determined from the area under f(x).


Continuous Random Variables

Probability Density Function


Continuous Random Variables
Example 5:
The probability density function of a certain continuous random variable X is:

𝑥2
−1<𝑥 <2
𝑓 𝑥 =൞ 3
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

i. Show that

ii. Find P(0 < X ≤ 1)


Continuous Random Variables
Example 6:
The probability density function of a certain continuous random variable X is:

1
(4 − 2𝑥 ) 0≤𝑥≤2
𝑓 𝑥 =൞ 4

0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Find
i. P(X > 1)
ii. P(0.5 < X ≤ 1)
iii. P(X < 1)
Exercises
1. The continuous random variable X has probability density function given
by the following, where k is a constant

𝑘(𝑥 2 + 1) 1≤𝑥≤4
𝑓 𝑥 =ቐ
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
i. Find the value of k.
ii. Calculate P(X = 3).
ii. Calculate P(2 < X ≤ 3).

2. The probability density function of a certain continuous random variable X is:


1
𝑥, 0≤𝑥≤3
6
𝑓 𝑥 =
1
2 − 𝑥, 3≤𝑥≤4
2
Calculate P(2 ≤ X ≤ 4).
Exercises
3. Let the continuous random variable X denote the distance in micrometers
from the start of a track on a magnetic disk until the first flaw. Historical data
show that the distribution of X can be modelled by a pdf
1
𝑓 𝑥 = 𝑒 −𝑥/2000 , 𝑥 ≥ 0.
2000

i. What proportion of disks is the distance to the first flaw greater than
1000 micrometers?
ii. What proportion of parts is between 1000 and 2000 micrometers?
Mathematical Expectation Random Variables
Mathematical Expectation Random Variables
When it exists, the mathematical expectation E satisfies the
following properties:

E(c) = c
E(cX) = cE(X)
E(c + X) = c + E(X)
E(X + Y) = E(X) + E(Y)
Example 7
Let X have the p.m.f

Find
i. E(X)
ii. E(𝑋 2 )
iii. 𝐸 𝑋 5−𝑋
iv. Var 𝐸
Example 8
The probability distribution of the discrete random variable X is shown below.

Find
i. E(X)
ii. Var (X)
iii. σ
Exercises
1. The discrete random variable X has the following probability distribution.

Given that E(X) = 4, find a and b.

2. The discrete random variable R has the following probability distribution.

Find the value of a, E(R) and Var(X).

3. The discrete random variable X has the following probability distribution.

i. Find the value of k.


ii. Find the value of n.
iii. Find Var(X).
Exercises
4. The discrete random variable X has probability distribution given by the
byfollowing, where k is a constant

i. Show that k = 20/33.


ii. Find the probability that X is greater than or equal to 4.
iii. Find E(X).
iv. Find Var (X).
Mean and Variance of Continuous Random Variables
Example 9
Suppose we have a continuous random variable X with probability density
function distribution given by

𝑥2
0<𝑥<3
𝑓 𝑥 =൞ 9
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Calculate E(X) and Var(X).


Example 10

The probability density function of a certain continuous random variable X is:

1
𝑥, 0≤𝑥≤3
6
𝑓 𝑥 =
1
2 − 𝑥, 3≤𝑥≤4
2

Calculate E(X) and Var(X).

You might also like