Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to...

14
Introduction to Random Variables Introduction to Random Variables 1 Definition of random variable 2 Discrete and continuous random variable P b bilit f ti Probability function Distribution function Density function 3 Characteristic measures of a random variable Mean, variance Other measures Estadística, Profesora: María Durbán 1 4 Transformation of random variables 1 Definition of random variable 1 Definition of random variable Sometimes, it is not enough to describe all possible results of an experiment: Toss a coin 3 times: {(HHH), (HHT), …} Throw a dice twice: {(1 1) (1 2) (1 3) } Throw a dice twice: {(1,1), (1,2), (1,3), …} Some tine it is useful to associate a number to each result of an experiment Define a variable We dont know the result of the experiment before we carry it out We don t know the result of the experiment before we carry it out We don’t know the value of the variable before the experiment Estadística, Profesora: María Durbán 2 1 Definition of random variable 1 Definition of random variable Sometimes, it is not enough to describe all possible results of an experiment: Toss a coin 3 times: {(HHH), (HHT), …} Throw a dice twice: {(1 1) (1 2) (1 3) } X = Number of head on the first toss X[(HHH)]=1, X[(THT)]=0, … Throw a dice twice: {(1,1), (1,2), (1,3), …} Y = Sum of points Y[(1,1)]=2, Y[(1,2)]=3, … No conocemos el valor que va a tomar la variable antes del experimento Estadística, Profesora: María Durbán 3 1 Definition of random variable 1 Definition of random variable A random variable is a function which associates a real number to each element of the sample space R d V i bl t di it ll tt ll Random V ariables are represented in capital letters, generally the last letters of the alphabet: X,Y, Z, etc. The values taken by the variable are represented by small letters, x=1 is a possible value of X y=3.2 is a possible value of Y z=-7.3 is a possible value of Z Estadística, Profesora: María Durbán 4 z 7.3 is a possible value of Z

Transcript of Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to...

Page 1: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

Introduction to Random VariablesIntroduction to Random Variables

1 Definition of random variable1 Definition of random variable

2 Discrete and continuous random variable

P b bilit f tiProbability function Distribution functionDensity function

3 Characteristic measures of a random variable

Mean, varianceOther measures

Estadística, Profesora: María Durbán1

4 Transformation of random variables

1 Definition of random variable1 Definition of random variable

Sometimes, it is not enough to describe all possible results of an experiment:p

Toss a coin 3 times: {(HHH), (HHT), …}Throw a dice twice: {(1 1) (1 2) (1 3) }Throw a dice twice: {(1,1), (1,2), (1,3), …}

Some tine it is useful to associate a number to each result of an experiment

Define a variable

We don’t know the result of the experiment before we carry it outWe don t know the result of the experiment before we carry it out We don’t know the value of the variable before the experiment

Estadística, Profesora: María Durbán2

1 Definition of random variable1 Definition of random variable

Sometimes, it is not enough to describe all possible results of an experiment:p

Toss a coin 3 times: {(HHH), (HHT), …}Throw a dice twice: {(1 1) (1 2) (1 3) }

A veces es útil asociar un número a cada resultado del experimento.X = Number of head on the first toss X[(HHH)]=1, X[(THT)]=0, …

Throw a dice twice: {(1,1), (1,2), (1,3), …}

No conocemos el resultado del experimento antes de realizarlo

No conocemos el valor que va a tomar la variable antes del experimento

Y = Sum of points Y[(1,1)]=2, Y[(1,2)]=3, …

No conocemos el valor que va a tomar la variable antes del experimento

Estadística, Profesora: María Durbán3

1 Definition of random variable1 Definition of random variable

A random variable is a function which associates a real number to each element of the sample space

R d V i bl t d i it l l tt llRandom Variables are represented in capital letters, generallythe last letters of the alphabet: X,Y, Z, etc.

The values taken by the variable are represented by small letters,

x=1 is a possible value of X y=3.2 is a possible value of Yz=-7.3 is a possible value of Z

Estadística, Profesora: María Durbán4

z 7.3 is a possible value of Z

Page 2: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

1 Definition of random variable1 Definition of random variable

ExamplesExamples

Number of defective units in a random sample of 5 units

Number of faults per cm2 of materialNumber of faults per cm2 of material

Lifetime of a lamp

Resistance to compression of concrete

Estadística, Profesora: María Durbán5

1 Definition of random variable

si

1 Definition of random variable

E X(si) = b; si ∈ Esk

RX

X(sk) = a

a b

• The space RX is the set of ALL possible values of X(s).

• Each possible event of E has an associated value in R• Each possible event of E has an associated value in RX

• We can consider Rx as another random space

Estadística, Profesora: María Durbán6

1 Definition of random variable

si

1 Definition of random variable

E X(si) = b; si ∈ Esk

RX

X(sk) = a

a b

Th l t i E h b bilit di t ib ti thi di t ib ti i lThe elements in E have a probability distribution, this distribution is alsoassociated to the values of the variable X. That is, all r.v. preserve the probability structure of the random experiment that generates it:

Pr( ) Pr( : ( ) )X x s E X s x= = ∈ =

Estadística, Profesora: María Durbán7

Introduction to Random VariablesIntroduction to Random Variables

1 Definition of random variable

2 Discrete and continuos random variables

P b bilit f ti

2 Discrete and continuous random variable

Probability function Distribution functionDensity function

3 Characteristic measures of a random variable

Mean, varianceOther measures

Estadística, Profesora: María Durbán8

4 Transformation of random variables

Page 3: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

2 Discrete and continuous random variables2 Discrete and continuous random variables

The rank of a random variable is the set of possible values taken by the variable.

Depending on the rank, the variables can be classified as:

Discrete: Those that take a finite or infinite (numerable) number of values

Continuous: Those whose rank is an interval of real numbers

Discrete: Those that take a finite or infinite (numerable) number of values

Continuous: Those whose rank is an interval of real numbersContinuous: Those whose rank is an interval of real numbersContinuous: Those whose rank is an interval of real numbers

Estadística, Profesora: María Durbán9

2 Discrete and continuous random variables

Examples of discrete random variablesExamples of discrete random variables

2 Discrete and continuous random variables

Examples of discrete random variables

Number of faults on a glass surface

Examples of discrete random variables

Number of faults on a glass surface

Proportion of default parts in a sample of 1000

N b f bit t itt d d i d tl

Proportion of default parts in a sample of 1000

N b f bit t itt d d i d tlGenerally count

Number of bits transmitted and received correctly

Examples of continuous random variables

Number of bits transmitted and received correctly

Examples of continuous random variables

the number of times that somethinghappens

Electric currentElectric current

Longitude

Temperature

Longitude

Temperature

Generally measure a magnitude

Estadística, Profesora: María Durbán10

Temperature

Weight

Temperature

Weight

2 Discrete random variables2 Discrete random variables

The values taken by a random variable change from one experimentThe values taken by a random variable change from one experiment to another, since the results of the experiment are different

A r.v. is defined by y

The values that it takes.Th b bilit f t ki h lThe probability of taking each value.

Thi i f ti th t i di t th b bilit f hThis is a function that indicates the probability of each possible value

( ) ( )i ip x P X x= =

Estadística, Profesora: María Durbán11

( ) ( )i ip

2 Discrete random variables2 Discrete random variables

The properties of the probability function come from the axioms of

probability:

p(x ) 0 ( ) 1ip x≤ ≤

1. 0≤P(A) ≤1 2. P(E)=1 3. P(AUB)=P(A)+P(B) si A∩B=Ø

p(xi)

{ } { }1

( ) 1n

ii

p x

a b c A a X b B b X c=

=

< < → = ≤ ≤ = < ≤

∑{ } { }

Pr( ) Pr( ) Pr( )a b c A a X b B b X c

a X c a X b b X c< < → = ≤ ≤ = < ≤

≤ ≤ = ≤ ≤ + < ≤

x

x1 x 2 x3 x4 x5 x6 xn

Estadística, Profesora: María Durbán12

Page 4: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

2 Discrete random variables

Experiment: Toss 2 coins

2 Discrete random variables

Experiment: Toss 2 coins. X=Number of tails.

HH TH TT

E

HH THHT TT

Pr

RX

X

0 1 2

Estadística, Profesora: María Durbán13

2 Discrete random variables

Experiment: Toss 2 coins

2 Discrete random variables

Experiment: Toss 2 coins. X=Number of tails.

X P(X=x)H H ( )

0 1/4TH1 1/2

2 1/4T H 2 1/4 T

T T

H

Estadística, Profesora: María Durbán14

T T

2 Discrete random variables

Experiment: Toss 2 coins

2 Discrete random variables

Experiment: Toss 2 coins. X=Number of tails.

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

0 1/4

1 1/2

2 1/42 1/4

x=0 x=1 x=2 X

Estadística, Profesora: María Durbán15

x 0 x 1 x 2 X

2 Discrete random variables2 Discrete random variables

Sometimes we might be interested on the probability that a variable takes a value less or equal to a quantity

0 0( ) ( )F x P X x= ≤0 0

1 2 n

( ) ( )( ) 0 ( ) 1

if X takes values x x : ( ) ( ) ( )

F Fx

F x P X x p x

−∞ = +∞ =≤ ≤ ≤

≤K

1 1 1

2 2 1 2

( ) ( ) ( )( ) ( ) ( ) ( )

F x P X x p xF x P X x p x p x

= ≤ == ≤ = +

M

Estadística, Profesora: María Durbán16

1( ) ( ) ( ) 1n

n n iiF x P X x p x

== ≤ = =∑

Page 5: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

2 Discrete random variables

Experiment: Toss 2 coins

2 Discrete random variables

Experiment: Toss 2 coins. X=Number of tails.

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

0 1/4

1 1/2

2 1/42 1/4

x=0 x=1 x=2 X

Estadística, Profesora: María Durbán17

x 0 x 1 x 2 X

2 Discrete random variables

Experiment: Toss 2 coins

2 Discrete random variables

Experiment: Toss 2 coins. X=Number of tails.

X F(x)F(x) ( )

0 1/4 0 75

1

1 3/4

2 10 25

0.5

0.75

2 1

x=0 x=1 x=2 X

0.25

Estadística, Profesora: María Durbán18

x 0 x 1 x 2 X

2 Continuous random variables2 Continuous random variables

When a random variable is continuous it doesn’t make sense to sum:When a random variable is continuous, it doesn t make sense to sum:

( ) 1ip x∞

=∑1i=∑

Since the set of values taken by the variable is not numerable

We can generalize →∑ ∫

We introduce a new concept instead of the probability function of discrete random variablesdiscrete random variables

Estadística, Profesora: María Durbán19

2 Continuous random variables2 Continuous random variables

Density function describes the probability distribution of a continuousrandom variable. It is a function that satisfies:

( ) 0f x ≥( ) 0

( ) 1

f x

f x dx+∞

=∫ ( ) 1

( ) ( )b

f x dx

P a X b f x dx

−∞

≤ ≤ =

∫∫( ) ( )

aP a X b f x dx≤ ≤ = ∫

Estadística, Profesora: María Durbán20

Page 6: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

2 Continuous random variables2 Continuous random variables

Density function describes the probability distribution of a continuousrandom variable. It is a function that satisfies:

( ) 0f x ≥( ) 0

( ) 1

f x

f x dx+∞

=∫ ( ) 1

( ) ( )b

f x dx

P a X b f x dx

−∞

≤ ≤ =

∫∫ a b( ) ( )

aP a X b f x dx≤ ≤ = ∫

Area below the curve

Estadística, Profesora: María Durbán21

2 Continuous random variables2 Continuous random variables

( ) ( ) 0a

aP X a f x dx= = =∫

( ) ( )( )

P a X b P a X bP X b

≤ ≤ = < ≤≤ ( )

( )P a X bP a X b

= ≤ <= < < a

Estadística, Profesora: María Durbán22

2 Continuous random variables2 Continuous random variables

0.5

The density function d ’t h t b

30.

4doesn’t have to be symmetric, or be define for all values ( | )Xf x β

x2

0.2

0.3

0.1

the form of the

0 5 10 15 20 25 30

0.0

the form of the curve will depend on one

Estadística, Profesora: María Durbán23

y

0 5 10 15 20 25 30or more parameters

2 Continuous random variables2 Continuous random variables

If we measure a continuous variable and represent the values in a histogram:

Estadística, Profesora: María Durbán24

If we make the intervals smaller and smaller:

Page 7: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

2 Continuous random variables2 Continuous random variables

Estadística, Profesora: María Durbán25

2 Continuous random variables2 Continuous random variables

( )f x

Estadística, Profesora: María Durbán26

2 Continuous random variables

Example

2 Continuous random variables

The density function of the use of a machine in a year (i h 100)

Example

(in hours x100):

f(x)

⎪⎪⎧ << 2.5x0x,

2 50.4

0.4

⎪⎪⎪

⎨ <≤−=

l

5x2.5x,2.50.40.8

2.5)x(f

⎪⎪⎪

⎩else0, elsewhere

Estadística, Profesora: María Durbán27

2.5 5x

2 Continuous random variables

Example

2 Continuous random variables

What is the probability that a machine randomly selected has b d l th 320 h ?

Example

been used less than 320 hours?

f(x)

0.423 ).( =<XP

524080

524052

0

23

52 ...

.

.. .

.

⎟⎠⎞

⎜⎝⎛ −+⎟

⎠⎞

⎜⎝⎛= ∫ ∫ dxxdxx

740.=

Estadística, Profesora: María Durbán28

2.5 5x

3.2

Page 8: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

2 Continuous random variables2 Continuous random variables

As in the case of discrete random variables, we can define the distribution of a continuous random variables by means of the Distribution function:

( ) ( ) ( ) x

F x P X x f u du x= ≤ = −∞ < < ∞∫( ) ( ) ( )f−∞∫

( )P X x≤

29x

2 Continuous random variables2 Continuous random variables

As in the case of discrete random variables, we can define the distribution of a continuous random variables by means of the Distribution function:

( ) ( ) ( ) x

F x P X x f u du x= ≤ = −∞ < < ∞∫( ) ( ) ( )f−∞∫

In the discrete case, the Probability function is obtained as the

( )dF

In the discrete case, the Probability function is obtained as the difference of to adjoin values of F(x). In the case of continuous variables:

( )( ) dF xf xdx

=

Estadística, Profesora: María Durbán30

2 Continuous random variables2 Continuous random variables

The Distribution function satisfies the following properties:

( ) ( )a b F a F b< ⇒ ≤ It is non-decreasing( ) ( )( ) 0 ( ) 1F F−∞ = +∞ =

gIt is right-continuous

If we define the following disjoint events:

{ } { } { } { } { }X a a X b X a a X b X b≤ < ≤ → ≤ ∪ < ≤ = ≤{ } { } { } { } { } X a a X b X a a X b X b≤ < ≤ → ≤ ∪ < ≤ = ≤

Pr( ) Pr( ) Pr( ) ( )X b X a a X b F b≤ = ≤ + < ≤ ≤

First axiom of probability

Estadística, Profesora: María Durbán31Third axiom of probability

0≥

2 Continuous random variables2 Continuous random variables

The Distribution function satisfies the following properties:

( ) ( )a b F a F b< ⇒ ≤( ) ( )( ) 0 ( ) 1F F−∞ = +∞ =

( ) Pr( ) ( ) 0F X f x dx−∞

−∞−∞ = ≤ −∞ = =∫

( ) Pr( ) ( ) 1F X f x dx+∞

−∞+∞ = ≤ +∞ = =∫

Estadística, Profesora: María Durbán32

Page 9: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

2 Continuous random variables

Example

2 Continuous random variables

The density function of the use of a machine in a year ( h 100)

Example

(en horas x100):

f(x)

⎪⎪⎧ << 2.5x0x,

2 50.4

0.4

⎪⎪⎪

⎨ <≤−=

l

5x2.5x,2.50.40.8

2.5)x(f

⎪⎪⎪

⎩else0, elsewhere

Estadística, Profesora: María Durbán33

2.5 5x

2 Continuous random variables

Example

2 Continuous random variables

0.4 x, 0 x 2.52 5

⎧ < <⎪2.50.4( ) 0.8 x, 2.5 x 52.5

f x

⎪⎪⎪= − ≤ <⎨⎪ 2.5

0, elsewhere⎪⎪⎪⎩

Pr(0 2 5)X< < Pr(2 5 )X x≤ <

0

0.4 0 x 2.52.5

xu du

⎧< <⎪

⎪∫

Pr(0 2.5)X< < Pr(2.5 )X x≤ <

2.5

0 2.5

0.4 0.4( ) 0.8 u du, 2.5 x 52.5 2.5

xF x u du

⎪⎪= + − ≤ <⎨⎪⎪

∫ ∫

Estadística, Profesora: María Durbán341 x 5

⎪⎪ ≥⎩ Pr( 5)X ≤

2 Continuous random variables

ExampleExample

2 Continuous random variables

Example

P(x<3.2)

x=3 2x=3.2

20 08 0 2 5x x⎧⎪ < <⎪

2

0.08 0 2.5( ) -1 0.8 - 0.08 2.5 5

x xF x x x x

< <⎪⎪= + ≤ <⎨⎪⎪

Estadística, Profesora: María Durbán35

1 5x⎪

≥⎪⎩

2 Continuous random variables

Example

2 Continuous random variables

Example

P(x<3.2)

Estadística, Profesora: María Durbán36

Page 10: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

Introduction to Random VariablesIntroduction to Random Variables

1 Definition of random variable

2 Discrete and continuous random variable

P b bilit f tiProbability function Distribution functionDensity function

3 Characteristic measures of a random variable3 Characteristic measures of a random variable

Mean, varianceOther measures

Estadística, Profesora: María Durbán37

4 Transformation of random variables

3 Characteristic measures of a r v3 Characteristic measures of a r.v.

Central measures

In the case of a sample of data, the sample mean allocates a weight of 1/n to each value:

1 1 1

Th E t ti f th b bilit i ht

1 21 1 1

nx x x xn n n

= + + +K

The mean or Expectation of a r.v. uses the probability as a weight:μ

[ ] ( )i iE X x p xμ = =∑ discrete r.v.[ ]

[ ]

( )

( )

i ii

x p x

E X x f x dx

μ

μ+∞

= =

discrete r.v.

continuous r.v.

Estadística, Profesora: María Durbán38

[ ] ( )fμ−∞∫

3 Characteristic measures of a r v3 Characteristic measures of a r.v.

Central measures

Intuitively: Median = value that divides the total probability in to parts

( ) 0 5P X m≤ =( ) 0.5

( ) 0.5

P X m

F m

≤ =

0.50.5

( ) 0.5F m ≥

Estadística, Profesora: María Durbán39

3 Characteristic measures of a r v

Example

3 Characteristic measures of a r.v.

What is the average time of use of the machines?

Example

0.4 x, 0 x 2.52.5

⎧ < <⎪⎪

0.4( ) 0.8 x, 2.5 x 52.5

f x⎪⎪= − ≤ <⎨⎪⎪0, elsewhere⎪⎪⎩

[ ]2.5 52 2

0 2.5

0.4 0.4( ) d 0.8 d2.5 2.5

E X xf x dx x x x x x+∞

−∞= = + −∫ ∫ ∫

Estadística, Profesora: María Durbán40

.5 .5 2.5=

Page 11: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

3 Characteristic measures of a r v

Example

3 Characteristic measures of a r.v.

If we want to know the time of use such that 50% of the machines have a use less or equal to that value

Example

have a use less or equal to that value

( ) 0.5F m =2

2

0.08 0 x 2.5( ) -1 0.8 - 0.08 2.5 x 5

xF x x x

⎧ < <⎪= + ≤ <⎨( )

1 x 5⎨⎪ ≥⎩

20 08 0 5 2 52

2

0.08 0.5 2.5-1 0.8 - 0.08 0.5 2.5

x mx x m= → =

+ = → =

Estadística, Profesora: María Durbán41

3 Characteristic measures of a r v3 Characteristic measures of a r.v.

Other measures

The percentil p of a random variable is the value xp that satisfies:

( ) y ( )( )

p p

p

p X x p p X x pF x p

< ≤ ≤ ≥

=discrete r.v.

continuous r v( )p p continuous r.v.

A special case are quartiles which divide the distribution in 4 parts

1 0.25

2 0 5 MedianQ pQ p

== =

Estadística, Profesora: María Durbán42

2 0.5

3 0.75

MedianQ pQ p=

3 Characteristic measures of a r v3 Characteristic measures of a r.v.

Measures of dispersionp

⎡ ⎤

The sample variance of a set of data is given by:

[ ] [ ]( )2Var X E X E X⎡ ⎤= −

⎣ ⎦The sample variance of a set of data is given by:

2 2 2 21 2

1 1 1( ) ( ) ( )ns x x x x x xn n n

= − + − + + −K

The Variance of a r.v. also uses the probability as a weight:

n n n

[ ] 22 ( ) ( )i ii

Var X x p xσ μ= = −∑ discrete r.v.

Estadística, Profesora: María Durbán43[ ]2 2( ) ( )

i

Var X x f x dxσ μ+∞

−∞= = −∫ continuous r.v.

3 Characteristic measures of a r v3 Characteristic measures of a r.v.

Measures of dispersion

⎡ ⎤

p

[ ] [ ]( )2Var X E X E X⎡ ⎤= −

⎣ ⎦

[ ] [ ]( )22Var X E X E X⎡ ⎤= −⎣ ⎦

[ ]( ) [ ]( ) [ ]2 22 2E X E X E X E X XE X⎡ ⎤ ⎡ ⎤− = + −⎣ ⎦ ⎣ ⎦

[ ]( ) [ ] [ ]

[ ]( )

22

22

2E X E X E X E X

E X E X

⎡ ⎤= + −⎣ ⎦

⎡ ⎤= −⎣ ⎦ It i li t

[ ] is a constant, does not depend on E X

X

Estadística, Profesora: María Durbán44

[ ]( )E X E X⎡ ⎤= ⎣ ⎦ It is a linear operator

Page 12: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

Introduction to Random VariablesIntroduction to Random Variables

1 Definition of random variable

2 Discrete and continuous random variable

P b bilit f tiProbability function Distribution functionDensity function

3 Characteristic measures of a random variable

Mean, varianceOther measures

Estadística, Profesora: María Durbán45

4 Transformation of random variables4 Transformation of random variables

4 Transformation of random variables4 Transformation of random variables

In some situations we will need to know the probability distribution of atransformation of a random variable

Examples

Change unitsUse logarithmic scale

bbaX +2Xsin X

1)(XgY = || X

X

1X

Estadística, Profesora: María Durbán46

XXe

Xlog

4 Transformation of random variables4 Transformation of random variables

L t X b If h t Y h(X) bt iLet X be a r.v. If we change to Y=h(X), we obtain a new r.v.:

( )Y h X

Distribution function

( )Y h X=

( ) Pr( ) Pr( ( ) ) Pr( )YF y Y y h X y x A= ≤ = ≤ = ∈

{ }, ( )A x h x y= ≤

Estadística, Profesora: María Durbán47

4 Transformation of random variables

Example

4 Transformation of random variables

Example

A company packs microchips in lots. It is know that the probabilitydistribution of the number of microchips per lots is given by:

x p(x) F(x)

0 03 0 03 2P ( 144)?X ≤11 0.03 0.03

12 0.03 0.06

13 0.03 0.09

2¿Pr( 144)?X ≤

{ }2 2( ) ( )

{ }, 144A x x= ≤

14 0.06 0.15

15 0.26 0.41

16 0 09 0 5

{ }( )

2 2Pr( 144) Pr( ) , 144

Pr 12 0.06

X x A A x x

X

≤ = ∈ = ≤

≤ =16 0.09 0.5

17 0.12 0.62

18 0.21 0.83

Estadística, Profesora: María Durbán48

19 0.14 0.97

20 0.03 1

Page 13: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

4 Transformation of random variables4 Transformation of random variables

( )Y h X=In general:

If is continuous and monotonic increasing :h1 1( ) Pr( ( ) ) Pr( ( )) ( ( ))Y XF y h X y X h y F h y− −= ≤ = ≤ =

If is continuous and monotonic decreasing:h1 1( ) P ( ( ) ) P ( ( )) 1 ( ( ))F h X X h F h− −≤ ≥ 1 1( ) Pr( ( ) ) Pr( ( )) 1 ( ( ))Y XF y h X y X h y F h y= ≤ = ≥ = −

Estadística, Profesora: María Durbán49

4 Transformation of random variables4 Transformation of random variables

Density function

If X is a continuous r.v. Y=h(X), where h is derivable and inyective

( ) ( )Y Xdxf y f xdy

=dy

1

( )( ( ))( )

XF x dxdx dyF h yF y −

∂⎧⎪∂∂ ⎪

increasingx

( ( ))( )( )(1 ( ))

xYY

X

dx dyF h yF yf yF x dxy ydx dy

∂∂ ⎪= = = ⎨∂ −∂ ∂ ⎪⎪⎩

decreasing

Estadística, Profesora: María Durbán50

dx dy⎪⎩g

4 Transformation of random variables4 Transformation of random variables

If X is a continuous r.v. Y=h(X), where h is derivable and inyective

( ) ( )Y Xdxf y f xdy

=dy

For discrete r.v.:

( )( ) Pr( ) Pr( )

i

Y ih x y

p y Y y X x=

= = = =∑

Estadística, Profesora: María Durbán51

( )ih x y

4 Transformation of random variables4 Transformation of random variables

ExampleExample

The velocity of a gas particle is a r.v. V with density function

2 2( / 2) 0( )

bvb v e vf v

− >=( )

0 elsewhereVf v =

The kinetic energy of the particle is What is the density function of W?

2 / 2W mV=

Estadística, Profesora: María Durbán52

Page 14: Introduction to Random Variables 1 Definition of random variable · 2009-02-10 · Introduction to Random Variables 1 Definition of random variable1 Definition of random variable

4 Transformation of random variables4 Transformation of random variables

ExampleExample

The velocity of a gas particle is a r.v. V with density function

2 2( / 2) 0( )

bvb v e vf v

− >=( )

0 elsewhereVf v =

2 / 2 2 / 2 /W mV v w m v w m= → = = −

12

dvdw mw

= ( )21 2 2 /( ( )) ( / 2) 2 / b w m

Vf h w b w m e− −=

Estadística, Profesora: María Durbán53

2dw mw ( )

4 Transformation of random variables4 Transformation of random variables

ExampleExample

The velocity of a gas particle is a r.v. V with density function

2 2( / 2) 0( )

bvb v e vf v

− >=( )

0 elsewhereVf v =

2 2 /( / 2 ) 2 / 0b w mb m w m e w− >( / 2 ) 2 / 0( ) 0 elsewhereWb m w m e wf w >

=

Estadística, Profesora: María Durbán54

4 Transformation of random variables4 Transformation of random variables

ExpectationExpectation

+

[ ]( ) ( )

( ) ( ) ( )

X

i i

h x f x dxE h X

h x p X x

+∞

−∞==

∫∑

, ( )( ) ( )

i i

i ix h x y

p=

∑( )Y h X=

increasing

[ ] ( ) ( ) ( )y XdxE y yf y dy h x f x dydy

+∞ +∞

−∞ −∞= =∫ ∫

Estadística, Profesora: María Durbán55

4 Transformation of random variables4 Transformation of random variables

ExpectationExpectation

+

[ ]( ) ( )

( ) ( ) ( )

X

i i

h x f x dxE h X

h x p X x

+∞

−∞==

∫∑

, ( )( ) ( )

i i

i ix h x y

p=

Linear TransformationsLinear Transformations

Y a bX= +

[ ] [ ]E Y a bE X= +

Estadística, Profesora: María Durbán56

[ ] [ ]2Var Y b Var X=