You are on page 1of 7

2.

RANDOM VARIABLES
− RANDOM EXPERIMENTS
 Random experiment is any experiment that is not
possible to predict.
 Sample space, Ω, is the set of all possible results of a
random experiment.
 Event is any subset of the sample space.
Elementary event is any subset with a single
sample point.

 Examples:
 rolling a dice,
Ω = {1, 2, 3, 4, 5, 6}
 number of people who get off a bus with a capacity of N,
Ω = {0, 1, 2, ..., N}
 extract a random number from the interval (0, 1),
Ω = (0, 1) 1
2. RANDOM VARIABLES
− PROBABILITY
 Probability, P, is a function that measures the
possibility of occurrence of each event A in a
sample space Ω.

 Properties:
 0 ≤ P(A) ≤ 1
 P(Ω) = 1
 P(not A) = 1 − P(A)
 P(A or B) = P(A) + P(B) − P(A and B)
 If A and B are independent events, then
P(A and B) = P(A)· P(B)
2
2. RANDOM VARIABLES
− RANDOM VARIABLE
 Random variable, X, is a function that assigns a
real number to each elementary event in a sample
space.
 Tossing a coin: X(heads) = 1, X(tails) = 0
 Rolling a dice: X(1) = 1, X(2) = 2, X(3) = 3, ...

Discrete X Continuous X
Probability function p(x) Density function f(x)

 p(x) ≥ 0  f(x) ≥ 0
 P(X = a) = p(a)  P(a  X  b) = a f(x) dx
b


 x p(x) = 1   f(x) dx = 1 3
2. RANDOM VARIABLES
− EXAMPLE: PROBABILITY FUNCTION
 Random variable X: sum of points obtained rolling two dice
Elementary events x p(x)
(1,1) 2 1/36
(1,2),(2,1) 3 2/36
(1,3),(2,2),(3,1) 4 3/36
(1,4),(2,3),(3,2),(4,1) 5 4/36
(1,5),(2,4),(3,3),(4,2),(5,1) 6 5/36
(1,6),(2,5),(3,4),(4,3),(5,2),(6,1) 7 6/36
(2,6),(3,5),(4,4),(5,3),(6,2) 8 5/36
(3,6),(4,5),(5,4),(6,3) 9 4/36
(4,6),(5,5),(6,4) 10 3/36
(5,6),(6,5) 11 2/36 4
(6,6) 12 1/36
2. RANDOM VARIABLES
− EXAMPLE: DENSITY FUNCTION
 The density function, f(x), of a continuous random
variable X equals (x + 15) / 200 when x is between
0 and 10, and it equals 0 otherwise.
What is the probability that the random variable
X takes any value between 4 and 6?
x  15
P 4  X  6   
6 1
dx 
4 200 5

5
2. RANDOM VARIABLES
− EXPECTED VALUE
 Expected value, E(X), is the theoretical mean
value of a random variable X.
 It is related to the arithmetic mean of a series of
data.

Discrete Continuous
random variable random variable

 E(X) = x x p(x)  E(X) =  x f(x) dx
6
2. RANDOM VARIABLES
− VARIANCE AND STANDARD DEVIATION
 They measure the mean dispersion of a random
variable X with respect to its expected value E(X).
 They are related to the variance and the standard
deviation of a series of data.
 Standard deviation is the square root of
variance.

Discrete Continuous
random variable random variable

 Var(X) = x [x−E(X)]2 p(x)  Var(X) =  [x−E(X)]2 f(x)dx

= x [x2 p(x)] − [E(X)]2 =  [x2 f(x)] dx − [E(X)]2
7

You might also like