Download Random Variables

Document related concepts
no text concepts found
Transcript
Random Variable
Random Variables
Jiřı́ Neubauer
Department of Econometrics FVL UO Brno
office 69a, tel. 973 442029
email:[email protected]
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
Many random experiments have numerical outcomes.
Definition
A random variable is a real-valued function X (ω) defined on the sample
space Ω.
The set of possible values of the random variable X is called the range of
X.
M = {x; X (ω) = x}.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
We denote random variables by capital letters X , Y , . . . (eventually
X1 , X2 , . . . ) and their particular values by small letters x, y , . . . .
Using random variables we can describe random events, for example
X = x, X ≤ x, x1 < X < x2 etc.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
We denote random variables by capital letters X , Y , . . . (eventually
X1 , X2 , . . . ) and their particular values by small letters x, y , . . . .
Using random variables we can describe random events, for example
X = x, X ≤ x, x1 < X < x2 etc.
Examples of random variables:
the number of dots when a die is rolled, the range is M = {1, 2, . . . 6}
the number of rolls of a die until the first 6 appears, the range is
M = {1, 2, }˙
the lifetime of the lightbulb, the range is M = {x; x ≥ 0},
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
According to the range M we separate random variables to
discrete . . . M is finite or countable,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
According to the range M we separate random variables to
discrete . . . M is finite or countable,
continuous . . . M is a closed or open interval.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
Examples of discrete random variables:
the number of cars sold at a dealership during a given month,
M = {0, 1, 2, . . . }
the number of houses in a certain block, M = {1, 2, . . . }
the number of fish caught on a fishing trip, M = {0, 1, 2, . . . }
the number of heads obtained in three tosses of a coin,
M = {0, 1, 2, 3}
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
Examples of discrete random variables:
the number of cars sold at a dealership during a given month,
M = {0, 1, 2, . . . }
the number of houses in a certain block, M = {1, 2, . . . }
the number of fish caught on a fishing trip, M = {0, 1, 2, . . . }
the number of heads obtained in three tosses of a coin,
M = {0, 1, 2, 3}
Examples of continuous random variables:
the height of a person, M = (0, ∞)
the time taken to complete an examination, M = (0, ∞)
the amount of milk in a bottle, M = (0, ∞)
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
For the description of random variables we will use some functions:
a cumulative distribution function F (x),
a probability function p(x) – only for discrete random variables,
a probability density function f (x) – only for continuous random
variables.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
For the description of random variables we will use some functions:
a cumulative distribution function F (x),
a probability function p(x) – only for discrete random variables,
a probability density function f (x) – only for continuous random
variables.
and some measures:
measures of location,
measures of dispersion,
measures of concentration.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Cumulative Distribution Function
Definition
Let X be any random variable. The cumulative distribution function
F (x) of the random variable X is defined as
F (x) = P(X ≤ x),
Jiřı́ Neubauer
x ∈ R.
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Cumulative Distribution Function
We mention some important properties of F (x):
for every real x: 0 ≤ F (x) ≤ 1,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Cumulative Distribution Function
We mention some important properties of F (x):
for every real x: 0 ≤ F (x) ≤ 1,
F (x) is a non-decreasing, right-continuous function,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Cumulative Distribution Function
We mention some important properties of F (x):
for every real x: 0 ≤ F (x) ≤ 1,
F (x) is a non-decreasing, right-continuous function,
it has limits
lim F (x) = 0, lim F (x) = 1,
x→−∞
x→∞
if range of X is M = {x; x ∈ (a, bi} then F (a) = 0 a F (b) = 1,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Cumulative Distribution Function
We mention some important properties of F (x):
for every real x: 0 ≤ F (x) ≤ 1,
F (x) is a non-decreasing, right-continuous function,
it has limits
lim F (x) = 0, lim F (x) = 1,
x→−∞
x→∞
if range of X is M = {x; x ∈ (a, bi} then F (a) = 0 a F (b) = 1,
for every real numbers x1 and x2 : P(x1 < X ≤ x2 ) = F (x2 ) − F (x1 ).
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Discrete Random Variable
For a discrete random variable X , we are interested in computing
probabilities of the type P(X = xk ) for various values xk in range of X .
Definition
Let X be a discrete random variable with range {x1 , x2 , . . . } (finite or
countably infinite). The function
p(x) = P(X = x)
is called the probability function of X .
Note: probability function = probability mass function
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Discrete Random Variable
We mention some important properties of p(x)
for every real number x, 0 ≤ p(x) ≤ 1,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Discrete Random Variable
We mention some important properties of p(x)
for every real number x, 0 ≤ p(x) ≤ 1,
X
p(x) = 1
x∈M
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Discrete Random Variable
We mention some important properties of p(x)
for every real number x, 0 ≤ p(x) ≤ 1,
X
p(x) = 1
x∈M
for every two real numbers xk and xl (xk ≤ xl ):
P(xk ≤ X ≤ xl ) =
xl
X
p(xi ).
xi =xk
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Probability Function
The probability function p(x) can be described by
the table,
X
p(x)
x1
p(x1 )
x2
p(x2 )
Jiřı́ Neubauer
...
...
xi
p(xi )
Random Variables
...
...
P
1
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Probability Function
the graph [x, p(x)],
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Probability Function
the formula, for example
π(1 − π)x
p(x) =
0
x = 0, 1, 2, . . . ,
otherwise,
where π is a given probability.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The shooter has 3 bullets and shoots at the target until the first hit or
until the last bullet. The probability that the shooter hits the target after
one shot is 0.6. The random variable X is the number of the fired
bullets. Find the probability and the cumulative distribution function of
the given random variable. What is the probability that the number of
the fired bullets will not be larger then 2?
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Random variable X is discrete with the range M = {1, 2, 3}. The
probability function is:
p(1) = P(X = 1) = 0.6,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Random variable X is discrete with the range M = {1, 2, 3}. The
probability function is:
p(1) = P(X = 1) = 0.6,
p(2) = P(X = 2) = 0.4 · 0.6 = 0.24,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Random variable X is discrete with the range M = {1, 2, 3}. The
probability function is:
p(1) = P(X = 1) = 0.6,
p(2) = P(X = 2) = 0.4 · 0.6 = 0.24,
p(3) = P(X = 3) = 0.4 · 0.4 · 0.6 + 0.4 · 0.4 · 0.4 = 0.4 · 0.4 = 0.16.
Jiřı́ Neubauer
Random Variables
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
Example
All results are summarized in the table
x
p(x)
1
0.6
2
0.24
3
0.16
P
1
The probability function can be described by the formula

 0.6 · 0.4x−1 x = 1, 2,
0.42
x = 3,
p(x) =

0
otherwise.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
We can calculate some values of the cumulative distribution function
F (x):
F (0) = P(X ≤ 0) = 0,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
We can calculate some values of the cumulative distribution function
F (x):
F (0) = P(X ≤ 0) = 0,
F (1) = P(X ≤ 1) = p(1) = 0.6,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
We can calculate some values of the cumulative distribution function
F (x):
F (0) = P(X ≤ 0) = 0,
F (1) = P(X ≤ 1) = p(1) = 0.6,
F (1.5) = P(X ≤ 1.5) = P(X ≤ 1) = p(1) = 0.6,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
We can calculate some values of the cumulative distribution function
F (x):
F (0) = P(X ≤ 0) = 0,
F (1) = P(X ≤ 1) = p(1) = 0.6,
F (1.5) = P(X ≤ 1.5) = P(X ≤ 1) = p(1) = 0.6,
F (2) = P(X ≤ 2) = p(1) + p(2) = 0.84,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
We can calculate some values of the cumulative distribution function
F (x):
F (0) = P(X ≤ 0) = 0,
F (1) = P(X ≤ 1) = p(1) = 0.6,
F (1.5) = P(X ≤ 1.5) = P(X ≤ 1) = p(1) = 0.6,
F (2) = P(X ≤ 2) = p(1) + p(2) = 0.84,
F (3) = P(X ≤ 3) = p(1) + p(2) + p(3) = 1,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
We can calculate some values of the cumulative distribution function
F (x):
F (0) = P(X ≤ 0) = 0,
F (1) = P(X ≤ 1) = p(1) = 0.6,
F (1.5) = P(X ≤ 1.5) = P(X ≤ 1) = p(1) = 0.6,
F (2) = P(X ≤ 2) = p(1) + p(2) = 0.84,
F (3) = P(X ≤ 3) = p(1) + p(2) + p(3) = 1,
F (4) = P(X ≤ 4) = p(1) + p(2) + p(3) = 1.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
We can write




0
0.6
F (x) =
 0.84


1
Jiřı́ Neubauer
x < 1,
1 ≤ x < 2,
2 ≤ x < 3,
x ≥ 3.
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Figure: The probability and the cumulative distribution function
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
What is the probability that the number of the fired bullets will not be
larger then 2?
P(X ≤ 2) = P(X = 1) + P(X = 2) = p(1) + p(2) = F (2) =
= 0.6 + 0.24 = 0.84.
Jiřı́ Neubauer
Random Variables
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
Probability Density Function
If the cumulative distribution function is a continuous function, then X is
said to be a continuous random variable.
Definition
The probability density function of the random variable X is
a non-negative function f (x) such that
Zx
f (t)dt, x ∈ R.
F (x) =
−∞
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Probability Density Function
Some properties of f (x):
R∞
R
f (x)dx = f (x)dx = 1,
−∞
M
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Probability Density Function
Some properties of f (x):
R∞
R
f (x)dx = f (x)dx = 1,
−∞
f (x) =
M
dF (x)
dx
= F 0 (x), where the derivative exists,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Probability Density Function
Some properties of f (x):
R∞
R
f (x)dx = f (x)dx = 1,
−∞
f (x) =
M
dF (x)
dx
= F 0 (x), where the derivative exists,
P(x1 ≤ X ≤ x2 ) = P(x1 < X < x2 ) = P(x1 < X ≤ x2 ) =
Rx2
=P(x1 ≤ X < x2 ) = F (x2 ) − F (x1 ) = f (x)dx
x1
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Probability Density Function
Some properties of f (x):
R∞
R
f (x)dx = f (x)dx = 1,
−∞
f (x) =
M
dF (x)
dx
= F 0 (x), where the derivative exists,
P(x1 ≤ X ≤ x2 ) = P(x1 < X < x2 ) = P(x1 < X ≤ x2 ) =
Rx2
=P(x1 ≤ X < x2 ) = F (x2 ) − F (x1 ) = f (x)dx
x1
If X is a continuous random variable, then P(X = x) = 0.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Probability Density Function
The function f (x) we can describe by a formula or a graph, for example
1 x−2
− 5
pro x > 2,
5e
f (x) =
0
pro x ≤ 2.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The random variable X has the probability density function
2
cx (1 − x) 0 < x < 1,
f (x) =
0
otherwise.
Determine a constant c in order that f (x) is a probability density
function. Find a distribution function of the random variable X .
Calculate the probability P(0.2 < X < 0.8).
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The probability density function has to fulfil
Z
f (x)dx = 1.
M
R1
0
h 3
R1
cx 2 (1 − x)dx = c (x 2 − x 3 )dx = c x3 −
0
c
= c 13 − 14 = 12
= 1,
we get c = 12.
Jiřı́ Neubauer
Random Variables
x4
4
i1
0
=
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The distribution function can be calculated by the definition of
the probability density function. We can write for 0 < x < 1
h 3
Rx
12t 2 (1 − t)dt = 12 (t 2 − t 3 )dt = 12 t3 −
0 h
0
i
3
4
= 12 x3 − x4 = 4x 3 − 3x 4 .
F (x) =
Rx
F (x) =


0
x 3 (4 − 3x)

1
Jiřı́ Neubauer
x ≤ 0,
0 < x < 1,
otherwise.
Random Variables
t4
4
ix
0
=
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Figure: The probability density function and the cumulative distribution
function
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Using the probability density function we can calculate
Z0.8
0.8
P(0.2 < X < 0.8) = 12x 2 (1 − x)dx = 4x 3 − 3x 4 0.2 = 0.792.
0.2
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Using the probability density function we can calculate
Z0.8
0.8
P(0.2 < X < 0.8) = 12x 2 (1 − x)dx = 4x 3 − 3x 4 0.2 = 0.792.
0.2
If the distribution function is known, we can do simpler calculation
P(0.2 < X < 0.8) = F (0.8) − F (0.2) =
= 0.83 (4 − 3 · 0.8) − 0.23 (4 − 3 · 0.2) = 0.792.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
A random variable X is described by the cumulative distribution function
0
x ≤ 0,
F (x) =
1 − e −x x > 0.
Find a probability density function.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Using mentioned formula
f (x) =
and the fact that
d
dx (1
dF (x)
dx
− e −x ) = e −x we get
0
x ≤ 0,
f (x) =
e −x x > 0.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Measures of Location
The cumulative distribution function (the probability function or the
probability density function) gives us the complete information about the
random variable. Sometimes is useful to know some simpler and
concentrated formulation of this information such as measures of
location, dispersion and concentration.
The best known measures of location are a mean (an expected value),
quantiles (a median, an upper and a lower quartile, . . . ) and a mode.
Jiřı́ Neubauer
Random Variables
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
Expected Value
Definition
The mean (expected value) E (X ) of the random variable X
(sometimes denoted as µ) is the value that is expected to occur per
repetition, if an experiment is repeated a large number of times. For the
discrete random variable is defined as
X
xi p(xi ),
E (X ) =
M
for the continuous random variable as
Z
E (X ) = xf (x)dx
M
if the given sequence or integral absolutely converges.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Expected Value
We mention some properties of the mean:
the mean of the constant c is equal to this constant
E (c) = c,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Expected Value
We mention some properties of the mean:
the mean of the constant c is equal to this constant
E (c) = c,
the mean of the product of the constant c and the random variable
X is equal to the product of the given constant c and the mean of X
E (cX ) = cE (X ),
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Expected Value
the mean of the sum of random variables X1 , X2 , . . . , Xn is equal to
the sum of the mean of the given random variables,
E (X1 + X2 + · · · + Xn ) = E (X1 ) + E (X2 ) + · · · + E (Xn ),
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Expected Value
the mean of the sum of random variables X1 , X2 , . . . , Xn is equal to
the sum of the mean of the given random variables,
E (X1 + X2 + · · · + Xn ) = E (X1 ) + E (X2 ) + · · · + E (Xn ),
if X1 , X2 , . . . , Xn are independent, then the mean of their product is
equal to the product of their means
E (X1 X2 . . . Xn ) = E (X1 )E (X2 ) . . . E (Xn ).
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variables and Independency
The random variables X1 , X2 , . . . , Xn are independent if and only if for
any numbers x1 , x2 , . . . , xn ∈ R is
P(X1 ≤ x1 , X2 ≤ x2 , . . . , Xn ≤ xn ) =
= P(X1 ≤ x1 ) · P(X2 ≤ x2 ) · · · P(Xn ≤ xn ).
Let us have the random vector X = (X1 , X2 , . . . , Xn ), whose components
X1 , X2 , . . . , Xn are the random variables.
F (x) = F (x1 , x2 , . . . , xn ) = P(X1 ≤ x1 , X2 ≤ x2 , . . . , Xn ≤ xn ) is the
cumulative distribution function of the vector X and
F (x1 ), F (x2 ), . . . , F (xn ) are the cumulative distribution functions of the
random variables X1 , X2 , . . . , Xn . The random variables X1 , X2 , . . . , Xn
are independent if and only if
F (x1 , x2 , . . . , xn ) = F (x1 ) · F (x2 ) · · · F (xn ).
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variables and Independency
If X is the random vector whose components are the discrete random
variables, the function
p(x) = p(x1 , x2 , . . . , xn ) = P(X1 = x1 , X2 = x2 , . . . , Xn = xn ) is the
probability function of the vector X, p(x1 ), p(x2 ), . . . , p(xn ) are the
probability functions of X1 , X2 , . . . , Xn , then:
X1 , X2 , . . . , Xn are independent if and only if
p(x1 , x2 , . . . , xn ) = p(x1 ) · p(x2 ) · · · p(xn ).
If X is the random vector whose components are the continuous random
variables, the function f (x) = f (x1 , x2 , . . . , xn ) is the probability density
function of the vector X, f (x1 ), f (x2 ), . . . , f (xn ) are the probability
density functions of X1 , X2 , . . . , Xn , then: X1 , X2 , . . . , Xn are independent
if and only if
f (x1 , x2 , . . . , xn ) = f (x1 ) · f (x2 ) · · · f (xn ).
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Quantile
Definition
100P% quantile xP of the random variable with the increasing
cumulative distribution function is such value of the random variable that
P(X ≤ xP ) = F (xP ) = P,
Jiřı́ Neubauer
0 < P < 1.
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Quantile
The quantile x0.50 we call median Me(X ), it fulfils
P(X ≤ Me(X )) = P(X ≥ Me(X )) = 0.50. The quantile x0.25 is called
the lower quartile, the quantile x0.75 is called the upper quartile. The
selected quantiles of some important distributions are tabulated.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Mode
Definition
The mode Mo(X ) is the value of the random variable with the highest
probability (for the discrete random variable), or the value, where the
function f (x) has the maximum (for the continuous random variable ).
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Find the mean (the expected value) and the mode of the random variable
defined as the number of fired bullets (see the example before). The
probability function is

 0.6 · 0.4x−1 x = 1, 2,
0.42
x = 3,
p(x) =

0
otherwise.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The mean (the expected value) we get using the formula from the
definition of E (X )
E (x) =
3
X
xi p(xi ) = 1 · 0.6 · 0.40 + 2 · 0.6 · 0.41 + 3 · 0.42 = 1.56.
i=1
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The mean (the expected value) we get using the formula from the
definition of E (X )
E (x) =
3
X
xi p(xi ) = 1 · 0.6 · 0.40 + 2 · 0.6 · 0.41 + 3 · 0.42 = 1.56.
i=1
The mode is the value of the given random variable with the highest
probability which is Mo(X ) = 1, because p(1) = 0.6.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The random variable X is described by the probability density function
12x 2 (1 − x) 0 < x < 1,
f (x) =
0
otherwise.
Find the mean (the expected value) and the mode.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
We calculate the mean using the definition formula
Z1
E (X ) =
Z1
xf (x)dx =
0
x · 12x 2 (1 − x) = 12
0
Jiřı́ Neubauer
Random Variables
x4
x5
−
4
5
1
=
0
3
= 0.6.
5
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
We calculate the mean using the definition formula
Z1
E (X ) =
Z1
xf (x)dx =
0
x · 12x 2 (1 − x) = 12
0
x4
x5
−
4
5
1
=
0
3
= 0.6.
5
The mode is the maximum of the probability density function. We have
to find
maximum
of f (x) on the interval 0 < x < 1,
the
d
2
12x
(1
−
x)
=
12(2x
− 3x 2 ) = 0, x(2 − 3x) = 0, we get x = 0 or
dx
x = 2/3. The maximum of f (x) is in x = 2/3 ⇒ Mo(X ) = 2/3.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Find the median,the upper and the lower quartile of the random variable
X with the distribution function
1 − x13 x > 1,
F (x) =
0
x ≤ 1.
Jiřı́ Neubauer
Random Variables
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
Example
The quantile is defined by the formula F (xP ) = P.
1−
1
= P,
xP3
xP = √
3
Jiřı́ Neubauer
1
.
1−P
Random Variables
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
Example
The quantile is defined by the formula F (xP ) = P.
1−
1
= P,
xP3
xP = √
3
median
x0.50 =
lower quartile x0.25 =
upper quartile x0.75 =
1
√
3
1−0.50
1
√
3
1−0.25
1
√
3
1−0.75
1
.
1−P
= 1.260,
= 1.101,
= 1.587.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Measures of Dispersion
The elementary and widely-used measures of dispersion are the variance
and the standard deviation.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Variance
Definition
The variance D(X ) of the random variable X (sometimes denoted as
σ 2 ) is defined by the formula
D(X ) = E [X − E (X )]2 .
The variance of the discrete random variable is given by
X
D(X ) =
[xi − E (X )]2 p(xi ),
M
the variance of the continuous random variable is
Z
D(X ) = [x − E (X )]2 f (x)dx.
M
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Variance
Some properties of the variance:
D(k) = 0, where k is a constant,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Variance
Some properties of the variance:
D(k) = 0, where k is a constant,
D(kX ) = k 2 D(X ),
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Variance
Some properties of the variance:
D(k) = 0, where k is a constant,
D(kX ) = k 2 D(X ),
D(X + Y ) = D(X ) + D(Y ), if X and Y are independent,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Variance
Some properties of the variance:
D(k) = 0, where k is a constant,
D(kX ) = k 2 D(X ),
D(X + Y ) = D(X ) + D(Y ), if X and Y are independent,
D(X ) ≥ 0 for every random variable,
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Variance
D(X ) = E (X 2 ) − E (X )2 ,
D(X ) = E [X − E (X )]2 = E [X 2 − 2XE (X ) + E (X )2 ] =
= E (X 2 ) − E [2XE (X )] + E [E (X )2 ] =
= E (X 2 ) − 2E (X )E (X ) + E (X )2 = E (X 2 ) − E (X )2
For the discrete random variable
X
xi2 p(xi ) − E (X )2 ,
D(X ) =
M
for the continuous random variable
Z
D(X ) = x 2 f (x)dx − E (X )2 .
M
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Standard Deviation
Definition
The standard deviation σ(X ) of the random variable X is defined as the
square root of the variance
p
σ(X ) = D(X ).
The standard deviation has the same unit as the random variable X .
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Figure: Relation between the mean and the standard deviation
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Find the variance and the standard deviation of the random variable
defined as the number of fired bullets (see the example before).
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The mean is E (X ) = 1.56 (see the previous example). For the purpose of
calculation of the variance we use the formula
D(X ) = E (X 2 ) − E (X )2
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The mean is E (X ) = 1.56 (see the previous example). For the purpose of
calculation of the variance we use the formula
D(X ) = E (X 2 ) − E (X )2
E (X 2 ) =
X
M
xi2 p(xi ) =
3
X
xi2 p(xi ) = 12 · 0.6 + 22 · 0.24 + 32 · 0.16 = 3,
i=1
then
D(X ) = 3 − 1.562 = 0.566.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The mean is E (X ) = 1.56 (see the previous example). For the purpose of
calculation of the variance we use the formula
D(X ) = E (X 2 ) − E (X )2
E (X 2 ) =
X
M
xi2 p(xi ) =
3
X
xi2 p(xi ) = 12 · 0.6 + 22 · 0.24 + 32 · 0.16 = 3,
i=1
then
D(X ) = 3 − 1.562 = 0.566.
The standard deviation is the square root of the variance
p
σ(X ) = D(X ) = 0.753.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Find the variance and the standard deviation of the random variable X
with the probability density function
12x 2 (1 − x) 0 < x < 1,
f (x) =
0
otherwise.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The mean is E (X ) = 3/5 (see the previous example).
D(X ) = E (X 2 ) − E (X )2
E (X 2 ) =
R
x 2 f (x)dx =
M
=
R1
0
2
5
x 2 · 12x 2 (1 − x)dx = 12
= 0.4,
Jiřı́ Neubauer
Random Variables
h
x5
5
−
x6
6
i1
0
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The mean is E (X ) = 3/5 (see the previous example).
D(X ) = E (X 2 ) − E (X )2
E (X 2 ) =
R
x 2 f (x)dx =
M
=
R1
x 2 · 12x 2 (1 − x)dx = 12
0
2
5
= 0.4,
2
2
3
1
D(X ) = −
=
= 0.04.
5
5
25
The standard deviation is
σ(X ) =
p
1
D(X ) = = 0.2.
5
Jiřı́ Neubauer
Random Variables
h
x5
5
−
x6
6
i1
0
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Measures of Concentration
We will focus on the measures describing the shape of random variables
distribution (skewness and kurtosis). These measures are defined by
moments.
Jiřı́ Neubauer
Random Variables
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
Measures of Concentration
Definition
The r th moment µ0r of the random variable X is defined by the formula
µ0r (X ) = E (X r )
for r = 1, 2, . . . .
The r th moment of the discrete random variable is given by
X
xir p(xi ),
µ0r (X ) =
M
r th moment of the continuous random variable is
Z
µ0r (X ) = x r f (x)dx.
M
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Measures of Concentration
Definition
The r th central moment µr of the random variable X is defined by the
formula
µr (X ) = E [X − E (X )]r for r = 2, 3, . . . .
The r th central moment of the discrete random variable is given by
X
µr (X ) =
[xi − E (X )]r p(xi ),
M
the r th central moment of the continuous random variable is
Z
µr (X ) = [x − E (X )]r f (x)dx.
M
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Skewness
Definition
The skewness α3 (X ) is defined by the formula
α3 (X ) =
Jiřı́ Neubauer
µ3 (X )
.
σ(X )3
Random Variables
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Random Variable
Skewness
Definition
The skewness α3 (X ) is defined by the formula
α3 (X ) =
µ3 (X )
.
σ(X )3
According to the values of the skewness we can tell whether distribution
is symmetric or asymmetric.
α3 = 0, distribution is symmetric,
α3 < 0, distribution is skewed to the right,
α3 > 0, distribution is skewed to the left.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Skewness
Figure: The skewness
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Kurtosis
Definition
The kurtosis α4 (X ) is defined by the formula
α4 (X ) =
Jiřı́ Neubauer
µ4 (X )
− 3.
σ(X )4
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Kurtosis
Definition
The kurtosis α4 (X ) is defined by the formula
α4 (X ) =
µ4 (X )
− 3.
σ(X )4
Kurtosis is a measure of how outlier-prone a distribution is. The kurtosis
of the normal distribution is 0. Distributions that are more outlier-prone
than the normal distribution have kurtosis greater than 0; distributions
that are less outlier-prone have kurtosis less than 0.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Kurtosis
Figure: The kurtosis
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Calculate the skewness and the kurtosis of the random variable defined as
the number of fired bullets (see the previous examples).
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
First of all we have to calculate 3rd and 4th central moment. The mean
of the given random variable is E (X ) = 1.56, the standard deviation is
σ(X ) = 0.753.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
First of all we have to calculate 3rd and 4th central moment. The mean
of the given random variable is E (X ) = 1.56, the standard deviation is
σ(X ) = 0.753.
µ3 =
3
P
[xi − E (X )]3 p(xi ) = (1 − 1.56)3 · 0.6+
i=1
+(2 − 1.56)3 · 0.24 + (3 − 1.56)3 · 0.16 = 0.393
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
First of all we have to calculate 3rd and 4th central moment. The mean
of the given random variable is E (X ) = 1.56, the standard deviation is
σ(X ) = 0.753.
µ3 =
3
P
[xi − E (X )]3 p(xi ) = (1 − 1.56)3 · 0.6+
i=1
+(2 − 1.56)3 · 0.24 + (3 − 1.56)3 · 0.16 = 0.393
µ4 =
3
P
[xi − E (X )]4 p(xi ) = (1 − 1.56)4 · 0.6+
i=1
+(2 − 1.56)4 · 0.24 + (3 − 1.56)4 · 0.16 = 0.756
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The skewness is equal to
α3 =
µ3
= 0.922,
σ3
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The skewness is equal to
α3 =
the kurtosis is
α4 =
µ3
= 0.922,
σ3
µ4
− 3 = −0.644.
σ4
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
Calculate the skewness and the kurtosis of the random X with the
probability density function
12x 2 (1 − x) 0 < x < 1,
f (x) =
0
otherwise.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The mean of the given random variable is E (X ) = 3/5. the standard
deviation is 1/5.
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The mean of the given random variable is E (X ) = 3/5. the standard
deviation is 1/5. First of all we calculate 3rd and 4th central moment.
Z1
µ3 =
[x − 0.6]3 12x 2 (1 − x)dx = · · · = −
0
Jiřı́ Neubauer
Random Variables
2
= −0.00229,
875
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The mean of the given random variable is E (X ) = 3/5. the standard
deviation is 1/5. First of all we calculate 3rd and 4th central moment.
Z1
µ3 =
[x − 0.6]3 12x 2 (1 − x)dx = · · · = −
2
= −0.00229,
875
0
Z1
µ4 =
[x − 0.6]4 12x 2 (1 − x)dx = · · · =
0
Jiřı́ Neubauer
Random Variables
33
= 0.00377.
8750
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The skewness is equal to
α3 =
µ3
2
= − = −0.286,
σ3
7
Jiřı́ Neubauer
Random Variables
Random Variable
Discrete Random Variable
Continuous Random Variable
Measures of Location
Measures of Dispersion
Measures of Concentration
Example
The skewness is equal to
α3 =
the kurtosis is
α4 =
µ3
2
= − = −0.286,
σ3
7
µ4
9
−3=−
= −0.643.
4
σ
14
Jiřı́ Neubauer
Random Variables
Related documents