0% found this document useful (0 votes)
20 views29 pages

Random Variables

The document provides a comprehensive overview of random variables, including their definitions, types (discrete and continuous), and methods for displaying their probability distributions. It covers key concepts such as expectation, variance, and various statistical parameters like mode and geometric mean. Additionally, it includes exercises and quizzes to reinforce understanding of the material.

Uploaded by

Niyonshuti Yves
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)
20 views29 pages

Random Variables

The document provides a comprehensive overview of random variables, including their definitions, types (discrete and continuous), and methods for displaying their probability distributions. It covers key concepts such as expectation, variance, and various statistical parameters like mode and geometric mean. Additionally, it includes exercises and quizzes to reinforce understanding of the material.

Uploaded by

Niyonshuti Yves
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
You are on page 1/ 29

RANDOM VARIABLES

RANDOM VARIABLES 1 / 29
CONTENTS:
1 Introduction
2 Random variables
3 Probability distribution of a random variable
4 Expectation and variance of random variables
5 Redefining some other statistical parameters

RANDOM VARIABLES 2 / 29
INTRODUCTION

The assignment of a numerical value to each outcome of an experiment


for formulating a probability model constitutes a random variable. To
understand the assignment of probabilities in a model, we need a efficient
and readable way of displaying them.

For small number of simple events, a use of pie chats is appropriate. The
most widely used method is the histogram or bar chart which plots the
probability of each event as the height of the corresponding bar.
Probabilities over the given sample space may also be displayed by the
cumulative distribution, which adds up probabilities in order, then
represent the process by a graph. By a limiting process, two functions are
defined: the probability density function (pdf) and the cumulative
distribution function (cdf). This part discusses random variables
through different properties and uses them for redefining the common
statistical parameters.

RANDOM VARIABLES 3 / 29
RANDOM VARIABLES

Definition
A random variable is a function from the sample space to some subset of
the real numbers. When the number of values of the function is countable,
it is called discrete random variable. When the number of values of the
function is uncountable, it is called a continuous random variable.

Random variables are denoted by capital letters such as X , Y , S. Random


variables are displayed like probabilities, histograms and cumulative
distributions are used to represent discrete random variables while pdf’s
and cdf’s are used to represent continuous random variables.
Examples

RANDOM VARIABLES 4 / 29
1 Rolling a symmetric die, we define a random variable X that takes the
values X = 1, 2, 3, 4, 5, 6, each with probability 16 as summarized the
following table.
X 1 2 3 4 5 6
P(X=x) 16 16 16 16 16 16
2 Computer chips often contain surface imperfections. For a certain
type of computer chip, 9% contain no imperfections, 22% contain 1
imperfection, 26% contain 2 imperfections, 20% contain 3
imperfections, 12% contain 4 imperfections, and the remaining 11%
contain 5 imperfections. Let Y represent the number of imperfections
in a randomly chosen chip.
(1) What are the possible values for Y ?
Solution
The possible values for Y are the integers 0, 1, 2, 3, 4, and 5.
(2) Is Y discrete or continuous?
Solution
The random variable Y is discrete, because it takes on only integer
values.

RANDOM VARIABLES 5 / 29
(3) Find P(Y = y ) for each possible value y .
Solution
Y 0 1 2 3 4 5
P(Y = y ) 0.09 0.22 0.26 0.20 0.12 0.11

RANDOM VARIABLES 6 / 29
PROBABILITY DISTRIBUTION OF A RANDOM VARIABLE

The probability distribution specifies a probability on the range of a


random variable and this allows probability displays.
1 The probability mass function (pmf), p(x) which characterizes a
discrete random variable X is given by

p(x) = P(X = x);

and X X
p(x) = P(X = x) = 1; p(x) ≥ 0 ∀x.
x x

2 The probability density function (pdf), f (x), which characterizes a


continuous random variable X is a smooth function on the range of X
that satisfies the following two conditions:
(1) f (x) ≥ 0
Z ∞
(2) f (x)dx = 1.
−∞

RANDOM VARIABLES 7 / 29
For any element a of the range of X ;

P(a) = 0.

For any elements a and b of the range of X ; a < b,


P(a ≤ X ≤ b) = P(a ≤ X < b) = P(a < X ≤ b)
Z b
= P(a < X < b) = f (x)dx.
a
Z b
P(X ≤ b) = P(X < b) = f (x)dx.
−∞
Z ∞
P(X ≥ a) = P(X > a) = f (x)dx.
a

RANDOM VARIABLES 8 / 29
Definition
The cumulative distribution function (cdf) of a random variable X is
the function F(x) defined by

F (x) = P(X ≤ x)

1 If X is a discrete random variable with a pmf p(x), then


X
F (x) = P(X ≤ x) = p(t)
t≤x

2 If X is a continuous random variable with a pdf f (x), then


Z x
F (x) = P(X ≤ x) = f (t)dt
−∞
and Z ∞
P(X ≥ x) = f (t)dt = 1 − F (x).
x

RANDOM VARIABLES 9 / 29
In class-1-

1 Assume that N is a number of cars in a parking at 18:00. Consider


the following distribution of N.
N 0 1 2 3 4 5
P(N = n) 0.3 0.1 0.2 0.2 0.1 0.1
(1) Write down the range of N.
(2) Find P(N < 4)
(3) Find P(N > 4)
(4) Find P(N ≤ 2)
(5) Plot the cdf, F (n), of N.
2 A random variable X has a pdf f (x) = 1; 0 ≤ x < 1.
(1) Check whether f (x) is a pdf.
(2) Find:
(a) P(0.2 ≤ X ≤ 0.44).
(b) P(X < 0.4)

RANDOM VARIABLES 10 / 29
3 The exact pdf for the waiting time of a client at a bank (in minutes)
is f (t) = 0.1e −0.1t .
(1) Check whether f (t) is a pdf.
(2) Find the probability that:
(a) A client may wait between 0 and 10 min.
(b) A client may wait between 5 and 15 min.
(c) A client may wait less than 10 min.
(3) Use a cdf for computing the probability that a client may wait between
5 and 15 min.
4 Consider a random variable X for which the pdf is f (x) = 2 − 2x,
0 ≤ x < 1.
(1) Check whether f (x) is a pdf.
(2) Find the cdf of X .
(3) Calculate P(0.3 ≤ X ≤ 0.6).

RANDOM VARIABLES 11 / 29
EXPECTATION AND VARIANCE OF RANDOM VARIABLES

Discrete random variables


Let x1 , x2 , . . . , xn denote the n possible values of a discrete random
variable X . Suppose that X = xi with probability pi , i ∈ [1, n].
1 The expectation or mean of X has an idea of the average of X . It is

denoted by E (X ) and defined by


n
X
E (X ) = xi pi .
i=1

2 The variance of X is denoted by Var (X ) and defined by


h i
Var (X ) = E (X − E (X ))2
n
X
= [xi − E (X )]2 pi .
i=1

RANDOM VARIABLES 12 / 29
Continuous random variables
Let X be a continuous random variable with pdf f (x).
1 The expectation or mean of X , E (X ) is defined by

Z ∞
E (X ) = xf (x)dx
−∞

2 The variance of X is defined by


h i
Var (X ) = E (X − E (X ))2
Z ∞
= [x − E (X )]2 f (x)dx
−∞

RANDOM VARIABLES 13 / 29
Main properties of Expectation and Variance
1 Theorem: Let X be a random variable. If a and b are the elements
of the range of X , then:
(i) E (aX ) = aE (X )
(ii) E (aX + b) = aE (X ) + b
(iii) Var(aX ) = a2 Var(X )
(iv) Var(aX + b) = a2 Var(Xh) i
2 The formula Var(X ) = E (X − E (X ))2 is equivalent to the formula
Var(X ) = E X 2 − [E (X )]2

3 The other 2 statistics of a random variable X directly calculated from
the variance and the expectation are the standard deviation, δ(X ) and
the coefficient
p of variation, CV (X ):
δ(X ) = Var(X )
δ(X )
CV (X ) = .
E (X )

RANDOM VARIABLES 14 / 29
In class-2-
1 Prove 1(i); 1(ii), 1(iii) and 1(iv) for both discrete and continuous
random variables.
2 Show that
h i
E (X − E (X ))2 = E X 2 − [E (X )]2 (Page) 111


2.4 Exercises (From page 112): 1, 2, 3, 4, 5, 6, 7, 8, 9, 13,


15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26

QUIZ-1-

RANDOM VARIABLES 15 / 29
REDEFINING SOME OTHER STATISTICAL PARAMETERS

Central parameters

Mode
The mode is the most probable measurement of the random variable.
For a discrete random variable X ,

Mode = x such that P(X = x)

is the largest probability in the probability distribution.


For a continuous random variable X with a pdf f (x),

Mode = x such that f (x) is absolutely maximum.

RANDOM VARIABLES 16 / 29
Geometric mean
Given a random variable X , X > 0, the geometric mean (GM) of X is
given by
GM = e E (ln X ) .
If X is a discrete random variable taking on values x1 , x2 , . . . , xn , then
n
P
ln(xi )pi
GM = e i=1 .

If X is a continuous random variable taking on positive values with pdf


f (x), then R∞
GM = e 0 ln(x)f (x)dx .

Theorem: Arithmetic-Geometric inequality


Given a random variable X taking on positive values, then

GM ≤ E (X )

RANDOM VARIABLES 17 / 29
6.8 Exercises: 5, 6, 7, 8, 9, 10, 11, 12, 15

RANDOM VARIABLES 18 / 29
6.8 Exercises (continued): 15, 16, 17, 18, 19, 20

RANDOM VARIABLES 19 / 29
QUIZ-2-

Spread parameters

Range
The range gives a description of all the values that a random variable can
take, from the lowest to the highest values. Many continuous random
variables have a mathematically possible range from negative infinity to
infinity. In such a case where at least one bound of the range in not finite,
the range gives no useful information. Thinking of random variables as
functions, the range coincides with the domain of the pdf.

RANDOM VARIABLES 20 / 29
Percentiles
The p th percentile is defined as the value of the random variable that
exceeds exactly p% of the values. The important particular cases of the
percentiles are
1 The median: 50th percentile

2 The lower quartile: 25th percentile

3 The upper quartile: 75th percentile

If X is a continuous random variable with cdf F (x), the p th percentile of


X is x such that
p
F (x) = .
100

RANDOM VARIABLES 21 / 29
Mean Absolute Deviation (MAD)
The MAD is a statistic that measures the average distance from the mean.
Given a random variable X such that E (X ) = X and considering a new
random variable Y = |X − X |, then

MAD(X ) = E (Y ) = E |X − X | .

If X is a discrete random variable, taking on the values x1 , x2 , . . . , xn


with probabilities p1 , p2 , . . . , pn then
n
X
MAD(X ) = |xi − X |pi .
i=1

If X is a continuous random variable with pdf f (x), then


Z ∞
MAD(X ) = |x − X |f (x)dx.
−∞

RANDOM VARIABLES 22 / 29
In class-3-

1 Consider the following distribution of a random variable X .


x P(X=x) F(x)
0 0.050
1 0.100
2 0.050
3 0.100
4 0.200
5 0.100
6 0.200
7 0.050
8 0.100
9 0.050
10 0.000
1 Fill in the column of F (x).
2 Find the median of X .

RANDOM VARIABLES 23 / 29
2 Compare the geometric and arithmetic means of X with pdf
1
f (x) = (4 − x) 0 ≤ x ≤ 4
8
.
3 The pdf of a random variable X is given by f (x) = 1, 0 ≤ x < 1.
1 Find the median of X .
2 Find the lower quartile of X .
3 Find the upper quartile of X .
4 Find the first percentile of X .
5 Find the MAD of X
4 The waiting time of clients at a bank is random variable T with a pdf
f (t) = 0.1e −0.1t .
1 Find the mean waiting time .
2 Find the variance and the standard deviation of T .
3 Find the lower and the upper quartile of T .
4 Find the 30th percentile of T .

RANDOM VARIABLES 24 / 29
6.9 Exercises: 13

RANDOM VARIABLES 25 / 29
6.9 Exercises (continued): 14, 15, 16, 17, 18

RANDOM VARIABLES 26 / 29
QUIZ-3-

RANDOM VARIABLES 27 / 29
RANDOM VARIABLES 28 / 29
RANDOM VARIABLES 29 / 29

You might also like