Random Variables and Distributions
Random Variables and Distributions
Random Variables and Distributions
Random Variables and Distributions
Random Variables and Distributions
Random Variables and Distributions
2. 2.1 Random Variables
General definition
A variable whose value is unknown or with a variable value by chance, it is not
fixed to a specific value.
2
Statistical definition
A random variable X is a function that associates each element in the sample
space with a real number (i.e., X : S R.)
3. Example
A balanced coin is tossed three times, then the sample space consists of eight
possible outcomes. Let X the random variable for the number of heads observed.
3
Sample space ( 2^3) = {HHH,HHT,HTH,HTT,THT,THH,TTH,TTT}
Let X = {0,1,2,3}
X=0 ~ {TTT}
X=1 ~ {HTT , THT , TTH}
X=2 ~ {HHT , HTH , THH}
X=3 ~ {HHH}
4. 2.2 Distributions of Random Variables
4
If X is a random variable, then the distribution of X is the collection of probabilities
P(X ∈ B) for all subsets B of the real numbers.
P(X=0) = ⅛ P(X=1) = ⅜ P(X=2) = ⅜ P(X=3) = ⅛
Sample point (outcomes) Assigned Numerical Value (x) P( X=x )
TTT 0 1/8
THT , TTH , TTH 1 3/8
HHT , HTH , THH 2 3/8
HHH 3 1/8
5. Types of Random Variables
5
A random variable X is called a discrete random variable if its set of possible
values is countable .
A random variable X is called a continuous random variable if it can take values
on a continuous scale or range.
Discrete x = 5
Continuous 1<=x<5
7. Example
7
Experiment: tossing a non-balance coin 2 times independently.
Sample space: S={HH, HT, TH, TT}
Suppose: P(H)=1/2 P(T) P(H)=1/3 P(T)=⅔
Let X= number of heads
8. 8
The possible values of X with their probabilities a
The function f(x)=P(X=x) is called the probability function (probability distribution)
of the discrete random variable X.
8
10. 2.4 Continuous distribution
10
For any continuous random variable, X, there exists a nonnegative function f(x), called
the probability density function (p.d.f) .
12. Problem
12
Suppose that the error in the reaction temperature, in C, for a controlled laboratory experiment is a
continuous random variable X having the following probability density function:
𝇇
14. The cumulative distribution function (CDF), F(x), of a discrete random variable X
with the probability function f(x) is given by:
2.5 Cumulative distribution function
(CDF)
14
15. Find the CDF of the random variable X with the probability function:
Example
15
X 0 1 2
F(x) 10/28 15/28 3/28
19. The cumulative distribution function (CDF), F(x), of a continuous random
variable X with probability density function f(x) is given by:
2.5 Cumulative distribution function
(CDF)
19
20. Problem
20
Suppose that the error in the reaction temperature, in C, for a controlled laboratory experiment is a
continuous random variable X having the following probability density function:
𝇇
1.Find the CDF
2.Using the CDF, find P(0<X<=1).