Chapter 8 Discrete variables
PDF
Pdf > probability density function > f
f(x)= P(X=x)
f(x) is het probability that the realisation of X will be x
X=number of heads
P(X=0)=P(TT)=1/4
P(X=1)=P(HT) +P(TH)= ½
P(X=2)= P(HH)=1/4
x 0 1 2
f(x) 0.25 0.50 0.25
CDF
cdf> cumulative distribution function > F
F(a)=P(X≤a)
x 0 1 2
f(x) 0.25 0.50 0.25
F(x) 0.25 0.75 1
Example: F(1.4) = P(X 1.4) = P(X 1) = 0.75
For discrete RV: graph is a step function
Expectation
> expectation > lange termijn gemiddelde > verwachte waarde van de uitkomst
x 1 2 3 4 5 6
f(x) 1/12 1/6 1/6 1/6 1/6 3/12
E(X)= 1 x (1/12) + 2 x (1/6) + 3 x (1/6) + 4 x (1/6) + 5 x (1/6) + 6 x (3/12) = 47/12
= 47/12
Expectation of a function of X
V=h(X)
h(x) is de nieuwe x keer de bestaande f(x). Iedere x de h uitrekenen en die keer f(x) en daarvan de
som
x 1 2 3 4 5 6
f(x) 1/12 1/6 1/6 1/6 1/6 3/12
h(x) 2 4 6 8 10 12
h(x)= x * 2
E(V) = 2 x (1/12) + 4 x (1/6) + 6 x (1/6) + 8 x (1/6) + 10 x (1/6) + 12 x (3/12) = …
Throwing a fair die two times ; X= total number of eyes.
E(X1) = E(X2) = 1 x (1/6) + … 6 x (1/6) = 3.5
E(X) = E(X1) + E(X2) = 7
Throwing 12 times with a fair die: 12 x 3.5 = 42. Able to calculate E(x) van een hoog aantal worpen
, Variance and Standard deviation
2 > variance > spreading van x > hoever valt x van zijn gemiddelde
> standard deviation SD(X)
x 1 2 3 4 5 6
(x-)2 8.5069 3.6733 0.8403 0.0069 1.1736 4.3403
f(x) 1/12 1/6 1/6 1/6 1/6 3/12
1 1 1
σ 2 =8 . 5069× +3 . 6736× +⋯+4 .3403× =2 . 7431
12 6 4
σ =√ 2. 7431=1 .6562
Short-cut formula for variance
2 = x2 * f(x) + x2 * f(x) …… - ()2
x 1 2 3 4 5 6
f(x) 1/12 1/6 1/6 1/6 1/6 3/12
( )
2
1 1 1 47
σ =1 × +22 × +⋯+6 2× −
2 2
12 6 4 12
¿ 18 .0833−15 .3403=2. 7431
Chapter 9
Bernoulli experiment
X Bern(p) > X has the Bernoulli distribution with parameter p > random experiment with only 2
outcomes S (success) and F (failure)
P(S) = propability of success
1 if the outcome is a success
0 if the outcome is a failure
¿
X =¿ { ¿ ¿ ¿
¿
x 0 1
f(x) 1-p p
E(X)= p
V(X)= p(1-p)
Pdf > probability density function > f
f(x)= P(X=x)
f(x) is het probability that the realisation of X will be x
X=number of heads
P(X=0)=P(TT)=1/4
P(X=1)=P(HT) +P(TH)= ½
P(X=2)= P(HH)=1/4
x 0 1 2
f(x) 0.25 0.50 0.25
CDF
cdf> cumulative distribution function > F
F(a)=P(X≤a)
x 0 1 2
f(x) 0.25 0.50 0.25
F(x) 0.25 0.75 1
Example: F(1.4) = P(X 1.4) = P(X 1) = 0.75
For discrete RV: graph is a step function
Expectation
> expectation > lange termijn gemiddelde > verwachte waarde van de uitkomst
x 1 2 3 4 5 6
f(x) 1/12 1/6 1/6 1/6 1/6 3/12
E(X)= 1 x (1/12) + 2 x (1/6) + 3 x (1/6) + 4 x (1/6) + 5 x (1/6) + 6 x (3/12) = 47/12
= 47/12
Expectation of a function of X
V=h(X)
h(x) is de nieuwe x keer de bestaande f(x). Iedere x de h uitrekenen en die keer f(x) en daarvan de
som
x 1 2 3 4 5 6
f(x) 1/12 1/6 1/6 1/6 1/6 3/12
h(x) 2 4 6 8 10 12
h(x)= x * 2
E(V) = 2 x (1/12) + 4 x (1/6) + 6 x (1/6) + 8 x (1/6) + 10 x (1/6) + 12 x (3/12) = …
Throwing a fair die two times ; X= total number of eyes.
E(X1) = E(X2) = 1 x (1/6) + … 6 x (1/6) = 3.5
E(X) = E(X1) + E(X2) = 7
Throwing 12 times with a fair die: 12 x 3.5 = 42. Able to calculate E(x) van een hoog aantal worpen
, Variance and Standard deviation
2 > variance > spreading van x > hoever valt x van zijn gemiddelde
> standard deviation SD(X)
x 1 2 3 4 5 6
(x-)2 8.5069 3.6733 0.8403 0.0069 1.1736 4.3403
f(x) 1/12 1/6 1/6 1/6 1/6 3/12
1 1 1
σ 2 =8 . 5069× +3 . 6736× +⋯+4 .3403× =2 . 7431
12 6 4
σ =√ 2. 7431=1 .6562
Short-cut formula for variance
2 = x2 * f(x) + x2 * f(x) …… - ()2
x 1 2 3 4 5 6
f(x) 1/12 1/6 1/6 1/6 1/6 3/12
( )
2
1 1 1 47
σ =1 × +22 × +⋯+6 2× −
2 2
12 6 4 12
¿ 18 .0833−15 .3403=2. 7431
Chapter 9
Bernoulli experiment
X Bern(p) > X has the Bernoulli distribution with parameter p > random experiment with only 2
outcomes S (success) and F (failure)
P(S) = propability of success
1 if the outcome is a success
0 if the outcome is a failure
¿
X =¿ { ¿ ¿ ¿
¿
x 0 1
f(x) 1-p p
E(X)= p
V(X)= p(1-p)