Beruflich Dokumente
Kultur Dokumente
DISTRIBUTIONS
Definition
RANDOM EXPERIMENT (E):
a phenomenon whose outcome cannot be predicted with
certainty.
SAMPLE SPACE of E ( ) :
the set of all possible outcomes (Ê) of the random experiment.
Definition
A RANDOM VARIABLE (r.v.) X is said to be
DISCRETE if it has (at most) a countable number of possible values.
CONTINUOUS if it can take any real value in a (set of) possibly
infinite interval(s).
Example (Example)
E: flip a coin until you observe HEAD (H) for the first time
= {H, TH, TTH, TTTH, . . .}
r.v.: X = # of TAILs before the first HEAD
realizations of X: 0,1,2,3,. . . . more specifically
Definition
The probability distribution of a discrete random variable X is described by
its probability (mass) function (pmf), p(x ), defined as
1
When dealing with two or more r.v.’s at the same time, it might be useful to include
a subscript referring to the specific random variable: e.g. pX (x ) and pY (x ) because
P(X = 2) = pX (2) is different from P(Y = 2) = pY (2).
RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS
September 27, 2018 6 / 49
The cumulative distribution function
Specifically
0.2
0.1
0.0
0 5 10 15
x (#trials)
0.08
0.06
0 2 4 6 8 10 12 14
0.4
0.2
0.0
0 2 4 6 8 10
the VARIANCE:
Var [X ] = ‡ 2 = E [(X ≠ µ)2 ] = E [X 2 ] ≠ E [X ]2
ÿ ÿ
= (x ≠ µ)2 · p(x ) = x 2 · p(x ) ≠ µ2
x x
Example
Assume that X has a discrete uniform distribution on {1, 2, . . . , n}, then
n n
ÿ 1 1ÿ 1 n(n + 1) n+1
E [X ] = x· = x= =
x =1
n n x =1 n 2 2
Result
If X ≥ Binomial(n, p), then
Expectation (Mean):
µ = E [X ] = np
Variance:
‡ 2 = Var [X ] = np(1 ≠ p)
Cumulative distribution function:
x
ÿ
FX (x ) = P(X Æ x ) = pX (u)
u=0
x
ÿ
= pX (0) + pX (1) + . . . + pX (x ) = P(X = u)
u=0
p(x)
0 2 4 6 8 0 2 4 6 8
x x
p(x)
0 2 4 6 8 0 2 4 6 8
x x
0.25
0.20
0.20
0.15
0.15
p(x)
p(x)
0.10
0.10
0.05
0.05
0.00
0.00
0 5 10 15 20 0 5 10 15 20
x x
0.25
0.20
0.20
0.15
0.15
p(x)
p(x)
0.10
0.10
0.05
0.05
0.00
0.00
0 5 10 15 20 0 5 10 15 20
x x
0.15
0.10
0.10
p(x)
p(x)
0.05
0.05
0.00
0.00
0 10 20 30 40 50 60 0 10 20 30 40 50 60
x x
0.15
0.10
0.10
p(x)
p(x)
0.05
0.05
0.00
0.00
0 10 20 30 40 50 60 0 10 20 30 40 50 60
x x
E [X ] = p Var [X ] = p(1 ≠ p)
such that
p = probability of success
Assume that
1 we repeat n times the aforementioned trial
2 p is constant across repetitions
3 trials are indipendent from one another
then the r.v. X = #of successes out of n trials has a Binomial(n, p)
distribution.
Example
Assume that we run n = 3 Bernoulli trials with p œ (0, 1).
Example
E: randomly select a client (Ê) who has just used the front-desk
service in a bank branch
= {Ê1 , Ê2 , Ê3 , Ê4 , . . .}
(the population of all clients who have used the front-desk service in the period of
interest, for example, in the last year)
r.v.: X = waiting time of a client in the queue (minutes)
realizations of X: (0, +Œ)
X (Mr.Smith) = 15.5
0.10
0.05
0.00
0 5 10 15 20
the VARIANCE:
Var [X ] = ‡ 2 = E [(X ≠ µ)2 ] = E [X 2 ] ≠ E [X ]2
⁄ +Œ ⁄ +Œ
2
= (x ≠ µ) f (x )dx = x 2 f (x )dx ≠ µ2
≠Œ ≠Œ
1 1 2
f (x ) = Ô e ≠ 2‡2 (x ≠µ) for ≠ Œ < x < +Œ
2fi‡ 2
Result
Mean:
E [X ] = µ
Variancea :
V [X ] = ‡ 2
Symmetric (µ is also the median)
Bell-shaped (µ is also the mode)
Light tails (as compared to other distributions to be seen later):
large deviations from µ rarely occur.
a
This might seem a trivial remark, but it is stating that the parameters of a
normal distribution directly represent the values of two crucial summary
measures of the distribution.
0.08
0.06
0.04
0.02
0.00
−20 −10 0 10 20
0.4
0.2
0.0
−5 0 5
x -1 0 1
y = x2 1 0 1
pX (x ) 1/5 2/5 2/5
y 0 1
pY (y ) 2/5 3/5
More formally, Y can take on only the values 0 and 1, with probabilities
I
pY (0) = P(Y = 0) = P(X 2 = 0) = P(X = 0) = pX (0) = 2/5
pY (1) = P(Y = 1) = P(X 2 = 1) = pX (≠1) + pX (1) = 3/5
RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS
September 27, 2018 33 / 49
Mean and variance of a function of a r.v.
The main characteristics of Y can be obtained using its distribution,
according to the definitions, or sometimes directly and more simply
through the distribution of X .
Example (continued)
We might compute the summary measures using pY (y ):
1
ÿ 2 3 3
E [Y ] = y · pY (y ) = 0 · +1· =
y =0
5 5 5
1 3 42
ÿ
2 3 2 3 9 6
Var [Y ] = y · pY (y ) ≠ = 02 · + 12 · ≠ =
y =0
5 5 5 25 25
Example (continued)
1 3 42
ÿ 3
Var [Y ] = x 4 · pX (x ) ≠
x =≠1
5
1 2 2 9 6
= (≠1)4 · + 04 · + 14 · ≠ =
5 5 5 25 25
Y = g(X ) = a + b · X
E [Z ] = 0 Var [Z ] = 1
indeed
5 6
X ≠µ 1 1
E [Z ] = E = E [X ≠ µ] = {E [X ] ≠ µ} = 0
‡ ‡ ‡
1
Var [Z ] = Var [a + b · X ] = b 2 · Var [X ] = · ‡2 = 1
‡2
Thus standardizing a r.v. always leads to a new r.v. with zero mean
and unit variance.
RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS
September 27, 2018 39 / 49
Relevant transformations of a normally distributed r.v.
Normally distributed r.v.’s and linear transformations react nicely:
Y =a+b·X
then Y ≥ N (a + bµ, b 2 ‡ 2 ).
Remark:
The crucial part of the previous theorem is that the distribution of the
new r.v. Y is still normal.2
X ≠µ
Z=
‡
then Z ≥ N (0, 1), i.e. a standard normal distribution.
Remark:
The previous result states that any Normally distributed r.v. can be
turned into a r.v. with standard normal distribution.
4
FZ is frequently denoted by .
RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS
September 27, 2018 42 / 49
Computation of normal probabilities
Example
Assume that X ≥ N (3.6, 2.25) thus µ = 3.6, ‡ 2 = 2.25 and ‡ = 1.5:
3 4
X ≠ 3.6 4.6 ≠ 3.6
P(X Æ 4.6) = P Æ = P(Z Æ 0.67) = FZ (0.67)
1.5 1.5
= 0.7486
The statistical table of the standard normal distribution (or the use of R)
provides the final value.
3 4
X ≠ 3.6 2.1 ≠ 3.6
P(X Æ 2.1) = P Æ = P(Z Æ ≠1) = P(Z > 1)
1.5 1.5
= 1 ≠ P(Z Æ 1) = 1 ≠ FZ (1) = 1 ≠ 0.8413 = 0.1577
Note that the value -1 is not shown on the table: the symmetry of the
distribution allows us to express the required probability in terms only of a
positive value (3rd equality).
RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS
September 27, 2018 43 / 49
Computation of normal probabilities
Example (continued)
3 4
1.8 ≠ 3.6 X ≠µ 4 ≠ 3.6
P(1.8 < X Æ 4) = P < Æ
1.5 ‡ 1.5
= P (≠1.2 < Z Æ 0.27)
= FZ (0.27) ≠ FZ (≠1.2)
= 0.6064 ≠ 0.1151 = 0.4913
Empirical Rule
then C n D
ÿ n
ÿ n
ÿ
E [Y ] = E ai Xi = ai E [Xi ] = ai µi
i=1 i=1 i=1
C n D n
ÿ ÿ ÿ
Var [Y ] = Var ai Xi = ai2 Var [Xi ] + 2 ai aj Cov (Xi , Xj )
i=1 i=1 i<j
Xi ≥ N (µi , ‡i2 )
qn
then Y = i=1 ai Xi is normally distributed, that is
A B
ÿ ÿ
Y ≥N ai µi , ai2 ‡i2
i i
a1 = a2 , . . . , = an = 1
n
ÿ
Y = Xi ≥ N (nµ, n‡ 2 )
i=1
a1 = a2 , . . . , = an = 1/n
n
ÿ 1
Y = Xi ≥ N (µ, ‡ 2 /n)
i=1
n