Anda di halaman 1dari 38

2.

1 Discrete Random Variables


2.2 Continuous Random Variables
2.3 The Expectation of a Random Variable
2.4 The Variance of a Random Variable
2.5 Jointly Distributed Random Variables
2.6 Combinations and Functions of Random Variables


2.1 Discrete Random Variable
2.1.1 Definition of a Random Variable (1/2)
Random variable
A numerical value to each outcome of a particular
experiment
S
0 2 1 3 -1 -2 -3
R
2.1.1 Definition of a Random Variable (2/2)
Example 1 : Machine Breakdowns
Sample space :
Each of these failures may be associated with a repair cost
State space :
Cost is a random variable : 50, 200, and 350


{ , , } S electrical mechanical misuse =
{50, 200, 350}
2.1.2 Probability Mass Function (1/2)
Probability Mass Function (p.m.f.)
A set of probability value assigned to each of the values
taken by the discrete random variable
and
Probability :

i
p
i
x
0 1
i
p s s
1
i
i
p =

( )
i i
P X x p = =
2.1.2 Probability Mass Function (1/2)
Example 1 : Machine Breakdowns
P (cost=50)=0.3, P (cost=200)=0.2,
P (cost=350)=0.5
0.3 + 0.2 + 0.5 =1
50 200 350
0.3 0.2 0.5
i
x
i
p
( ) f x
0.5
0.3
50 200 350
Cost($)
0.2
2.1.3 Cumulative Distribution Function (1/2)
Cumulative Distribution Function
Function :
Abbreviation : c.d.f



( ) ( ) F x P X x = s
:
( ) ( )
y y x
F x P X y
s
= =

( ) F x
1.0
0.5
0.3
50 200 350 0
($cost) x
2.1.3 Cumulative Distribution Function (2/2)
Example 1 : Machine Breakdowns

50 ( ) (cost ) 0
50 200 ( ) (cost ) 0.3
200 350 ( ) (cost ) 0.3 0.2 0.5
350 ( ) (cost ) 0.3 0.2 0.5 1.0
x F x P x
x F x P x
x F x P x
x F x P x
< < = s =
s < = s =
s < = s = + =
s < = s = + + =
2.2 Continuous Random Variables
2.2.1 Example of Continuous Random Variables (1/1)
Example 14 : Metal Cylinder Production
Suppose that the random variable is the diameter of a
randomly chosen cylinder manufactured by the company.
Since this random variable can take any value between
49.5 and 50.5, it is a continuous random variable.
X
2.2.2 Probability Density Function (1/4)
Probability Density Function (p.d.f.)
Probabilistic properties of a continuous random variable
( ) 0 f x >
( ) 1
statespace
f x dx =
}
2.2.2 Probability Density Function (2/4)
Example 14
Suppose that the diameter of a metal cylinder has a p.d.f
2
( ) 1.5 6( 50.2) for 49.5 50.5
( ) 0, elsewhere
f x x x
f x
= s s
=
( ) f x
x
49.5 50.5
2.2.2 Probability Density Function (3/4)
This is a valid p.d.f.

50.5
2 3 50.5
49.5
49.5
3
3
(1.5 6( 50.0) ) [1.5 2( 50.0) ]
[1.5 50.5 2(50.5 50.0) ]
[1.5 49.5 2(49.5 50.0) ]
75.5 74.5 1.0
x dx x x =
=

= =
}
2.2.2 Probability Density Function (4/4)
The probability that a metal cylinder has a diameter between
49.8 and 50.1 mm can be calculated to be

50.1
2 3 50.1
49.8
49.8
3
3
(1.5 6( 50.0) ) [1.5 2( 50.0) ]
[1.5 50.1 2(50.1 50.0) ]
[1.5 49.8 2(49.8 50.0) ]
75.148 74.716 0.432
x dx x x =
=

= =
}
( ) f x
x
49.5 50.5 49.8 50.1
2.2.3 Cumulative Distribution Function (1/3)
Cumulative Distribution Function

( ) ( ) ( )
( )
( )
x
F x P X x f y dy
dF x
f x
dx

= s =
=
}

( ) ( ) ( )
( ) ( )
( ) ( )
P a X b P X b P X a
F b F a
P a X b P a X b
< s = s s
=
s s = < s



2.2.2 Probability Density Function (2/3)
Example 14

2
49.5
3
49.5
3 3
3
( ) ( ) (1.5 6( 50.0) )
[1.5 2( 50.0) ]
[1.5 2( 50.0) ] [1.5 49.5 2(49.5 50.0) ]
1.5 2( 50.0) 74.5
x
x
F x P X x y dy
y y
x x
x x
= s =
=
=
=
}
3
3
(49.7 50.0) (50.0) (49.7)
(1.5 50.0 2(50.0 50.0) 74.5)
(1.5 49.7 2(49.7 50.0) 74.5)
0.5 0.104 0.396
P X F F s s =
=

= =
2.2.2 Probability Density Function (3/3)
( ) F x
( 49.7) 0.104 P X s =
x 49.5
50.5 49.7 50.0
1
( 50.0) 0.5 P X s =
(49.7 50.0) 0.396 P X s s =
2.3 The Expectation of a Random Variable
2.3.1 Expectations of Discrete Random Variables (1/2)
Expectation of a discrete random variable with p.m.f





Expectation of a continuous random variable with p.d.f f(x)



The expected value of a random variable is also called the
mean of the random variable

( )
i i
P X x p = =
( )
i i
i
E X p x =

state space
( ) ( ) E X xf x dx =
}
2.3.1 Expectations of Discrete Random Variables (2/2)
Example 1 (discrete random variable)
The expected repair cost is



(cost) ($50 0.3) ($200 0.2) ($350 0.5) $230 E = + + =
2.3.2 Expectations of Continuous Random Variables (1/2)
Example 14 (continuous random variable)
The expected diameter of a metal cylinder is


Change of variable: y=x-50



50.5
2
49.5
( ) (1.5 6( 50.0) ) E X x x dx =
}
0.5
2
0.5
0.5
3 2
0.5
4 3 2 0.5
0.5
( ) ( 50)(1.5 6 )
( 6 300 1.5 75)
[ 3 / 2 100 0.75 75 ]
[25.09375] [ 24.90625] 50.0
E x y y dy
y y y dy
y y y y

= +
= + +
= + +
= =
}
}
2.3.2 Expectations of Continuous Random Variables (2/2)
Symmetric Random Variables
If has a p.d.f that is
symmetric about a point
so that


Then, (why?)

So that the expectation of
the random variable is equal
to the point of symmetry
( ) f x
( ) ( ) f x f x + =
x
( ) E X =

( ) E X =
( ) f x
x

2.3.3 Medians of Random Variables


Median
Information about the middle value of the random variable


Symmetric Random Variable
If a continuous random variable is symmetric about a point ,
then both the median and the expectation of the random
variable are equal to



( ) 0.5 F x =

2.4 The variance of a Random Variable


2.4.1 Definition and Interpretation of Variance (1/2)
Variance( )
A positive quantity that measures the spread of the
distribution of the random variable about its mean value
Larger values of the variance indicate that the distribution is
more spread out

Definition:


Standard Deviation
The positive square root of the variance
Denoted by

2
2 2
Var( ) (( ( )) )
( ) ( ( ))
X E X E X
E X E X
=
=
2
o
o
2.4.1 Definition and Interpretation of Variance (2/2)
2
2 2
2 2
2 2
Var( ) (( ( )) )
( 2 ( ) ( ( )) )
( ) 2 ( ) ( ) ( ( ))
( ) ( ( ))
X E X E X
E X XE X E X
E X E X E X E X
E X E X
=
= +
= +
=
Two distribution with
identical mean values but
different variances
( ) f x
x
2.4.2 Examples of Variance Calculations (1/1)
Example 1


2 2
2 2 2
2
Var( ) (( ( )) ) ( ( ))
0.3(50 230) 0.2(200 230) 0.5(350 230)
17,100
i i
i
X E X E X p x E X
o
= =
= + +
= =

17,100 130.77 o = =
LATIHAN YUK
Contoh
x 0 100
p(x) 1/2 1/2

E(x) = 0(1/2) + 100(1/2) = 50

y 49 51
p(y) 1/2 1/2

E(y) = 49(1/2) + 51(1/2) = 50

Contoh: model probabilitas pada sebuah perusahaan asuransi

Variance
Dinyatakan dengan


Contoh
2 2
=1
= ( ( )) ( = )
k
i i
i
x E X P X x o

Standard Deviasi
Adalah akar dari nilai deviasinya

Contoh
2
(or SD) = o o
A basketball player shoots 3 free throws. P(make) =P(mis
s)=0.5. Let X = number of free throws made.
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
2 2 2 2 2
3 3 1 1
8 8 8 8
3 3 1 1
8 8 8 8
0 1 2 3
1 3 3 1
( ) E(X)
8 8 8 8
Compute the variance:
(0 1.5) (1 1.5) (2 1.5) (3 1.5)
2.25 .25 .25 2.25
.75.
.75 .866
x
p x
o
o o
2
=1.5
= + + +
= + + +
=
= = =
o(x) =?
Probability
Great 0.20
Good 0.40
OK 0.25
Economic
Scenario
Profit
($ Millions)
5
1
-4 Lousy 0.15
10
P(X=x
4
)
X
x
1
x
2
x
3
x
4
P
P(X=x
1
)
P(X=x
2
)
P(X=x
3
)
Probability
Great 0.20
Good 0.40
OK 0.25
Economic
Scenario
Profit
($ Millions)
5+2
1+2
-4+2 Lousy 0.15
10+2
P(X=x
4
)
X+2
x
1
+
2

x
2
+2

x
3
+2

x
4
+2

P
P(X=x
1
)
P(X=x
2
)
P(X=x
3
)
E(x + a) = E(x) + a; SD(x + a)=SD(x); let a = 2
Probability
0
0.1
0.2
0.3
0.4
0.5
-4 -2 0 2 4 6 8 10 12 14
Profit =5.65
o = 4.40 Probability
0
0.1
0.2
0.3
0.4
0.5
-4 -2 0 2 4 6 8 10 12 14
Profit
=3.65
o = 4.40
Soal
A random variable X has pdf f
X
(.) where




a. Find c
b. Find P( 1/2 < X s 3/4 )
c. Calculate E(X) and var(X)
Suatu data dikirimkan melalui sebuah kanal transmisi. Di bagian
penerima, data diterima dengan kecepatan 10Mbps mempunyai
probabilitas 1/5, sedangkan data diterima dengan kecepatan 1
Mbps mempunyai probabilitas . Data dengan kecepatan 100kb
ps diterima dengan probabilitas 1/3. Sedangkan kemungkinan
13/60 data diterima dengan kecepatan 10kbps.
Hitung ekspektasi kecepatan data yang diterima.
Hitung varian yang terjadi di kasus tersebut.
NEXT TOPIC
Chebyshevs Inequality
If a random variable has a mean and a variance , then



For example, taking gives

2
o
2
1
( ) 1
for 1
P c X c
c
c
o o s s + >
>
2 c =
2
1
( 2 2 ) 1 0.75
2
P X o o s s + > =
2.4.3 Chebyshevs Inequality (1/1)
2.4.4 Quantiles of Random Variables (1/2)
Quantiles of Random variables
The th quantile of a random variable X

A probability of that the random variable takes a value
less than the th quantile
Upper quartile
The 75th percentile of the distribution
Lower quartile
The 25th percentile of the distribution
Interquartile range
The distance between the two quartiles

p
( ) F x p =
p
p
2.4.4 Quantiles of Random Variables (2/2)
Example 14

Upper quartile :

Lower quartile :

Interquartile range :
3
( ) 1.5 2( 50.0) 74.5 for 49.5 50.5 F x x x x = s s
( ) 0.75 F x = 50.17 x =
( ) 0.25 F x =
49.83 x =
50.17 49.83 0.34 =

Anda mungkin juga menyukai