Docsity

Slides for Discrete Random Variables | STA 6166, Study notes of Data Analysis & Statistical Methods

Partial preview of the text

Download Slides for Discrete Random Variables | STA 6166 and more Study notes Data Analysis & Statistical Methods in PDF only on Docsity!

Chapter

Di

t^

R

d

V

i bl

Di

screte

R

andom

V

ariables

Types

of

Random

Variables

-^

A

random

variable

is

a

variable

that

assumes

numerical

values

associated

with

the

random

outcome

of

an

experiment,

where

one

(and

only

one)

numerical

value

is

assigned

to

each

sample

point.

-^

A

discrete random

variable

can

assume

a

countable

number

of

values.

-^

A

continuous random

variable

can

assume

any

value

along a given interval of a number linealong

a

given

interval

of

a

number

line

Probability

Distributions

for

Discrete

Random VariablesRandom

Variables

-^

The

probability

distribution

of

a discrete

random

variable

is

a

graph

,^

table

or

f

ormula

that

specifies

the

probability

associated

with

each

possible

outcome

the

random variable can assumerandom

variable

can

assume

p(x)

for

all

values

of

x

p(x)

p(x)

Notation:

Random

variable:

X

Values

X

can

take

on:

x

x

x

k

Probabilities:

P

(X = x ) =

p

P

(X = x ) =

p

Probabilities:

P

(X

x

p

1

P

(X

x

)k

p

k

Example

1

Two

marbles

are

drawn

at

random

and

without

replacement

from

a

box

containing

bl

bl

d

d

bl

bl

ue

marbles

and

red

marbles.

S: { (B1 B2) (B1 R1) (B1 R2) (B1 R3) (B2 R1)

Lets define the random variable X as: S:

B
,^ B
)^
(B
,^ R
)^
(B
,^ R
)^
(B
,^ R
)^
(B
,^ R
(B2,
R2)
(B2,
R3)
(R1,
R2)
(R1,
R3)
(R2,
R3)}

Lets

define

the

random

variable

X

as:

X:

number

of

red

marbles

drawn.

x^

p(x)

0

1

x

x

x

X p^

2

Expected

Values

of

Discrete

Random

V

i bl

V

ariables

-^

The

mean

,^

or

expected

value

, of

a discrete

random

variable

is:

E x

xp x

-^

The

variance

of

a discrete

random

variable

x

is

2

2

2

[(

) ]

(^

)^

E

x

x^

p x

-^

The

standard

deviation

of

a

discrete

random

variable

x

is

2

2

2

[(

) ]

(^

)^

E

-^

Short

‐cut

2

2

2

[(

) ]

(^

)^

E

x

x^

p x

σ

μ

μ

2

2

2

μ

σ

x

p

x

Example

1

x^

p(x)

0

x X p^

2

⎜ ⎝^
⎜ ⎝^

x

x

p^

E x

xp x

μ =

∑

= 0×0.10 + 1×0.60 + 2×0.30 = 1.

2

2

2

[(

) ]

(^

)^

E

x^

x^

p x

∑ = (0 – 1.2)

2 ×0.10 + (1 – 1.2)

2 ×0.60 + (2 – 1.2)

2 ×0.

= 0.144 + 0.024 + 0.192 = 0.

= σ

√0.360 = 0.

Rules

for

Means

-^

Linear

transformation of

a

random

variable:

W= a

bX

(where

a

and

b

are

constants)

(^
E
( W) = E

( a+bX

μ

a+bX

= a + bμ

X

-^

Sums of

random

variables:

W = X + Y

(where

X

and

Y

are

random

variables)

E
( W) = E
( X+Y

μ

X+Y

= μ

X^

+ μ

Y

-^

Linear functions

of random variables:

-^

Linear

functions

of

random

variables:

W = a

X 1

a n

X

n^

(where

E
( X

)=i

μ

)i

E
( W
E

( a

X

a^

X

a

μ

a^

μ

E
( W
E

( a

X 1

a n

X

) =n

a

μ 1

a n

μ n

Variance

of

a

Random

Variable

b

b

b

b

bX

a

V

W

V

X

bX a

2 2

2 2

2

2 2

2

σ

σ

Y

X

ab

b

a

bY

aX

V

W

V

Y X

Y

X

bY aX

and

between

n

correlatio

the

is

where

(^

2 2 2 2 2 ρ

σ

ρσ

σ

σ

σ

Special

Cases:

-^

X

and

Y

are independent:

ρ

= 0, last term drops out

p^

ρ^

p

•^

a = b =

ρ

V
( X + Y

σ

(^2) X

σ

(^2) Y

•^

a = 1, b = -

ρ

V
( X - Y
)^

σ

(^2) X

σ

(^2) Y

,^

,^ ρ

(^
)^

X^

Y

-^ a = b =

ρ

V
( X + Y

σ

(^2) X

σ

(^2) Y

ρ

σ

X^

σ Y

•^

a^

b = -

ρ

V
( X - Y
)^

σ

(^2) X

σ

(^2) Y

ρ

σ

X^ σ Y

a^

b

ρ

V
( X
Y
)^

σ X^

σ Y

ρ^

σ X^ σ Y

Binomial

Distribution

l^

d

bl

-^

Notation:

X

Bin

( n,p

x

n

-^

A

Binomial

Random

Variable

n

identical

trials.

Trials are independent

Flip

a

coin

3

times

A head on flip doesn’t

Trials

are

independent

Two

outcomes:

S

uccess

or

F

ailure.

X

:^

number

o

f^

S uccesses

in

n

t

rials.

A^

head

on

flip

doesn t

affect

other

flips

Heads

/ Tails

u

be o

S uccesses

t a s

P(

S )

p

P(

F )

q

p

P(S)

=

.5;

P(F)

=

1

‐.

=

.

Binomial

Distribution

Toss

a

coin

times

and

record

the

number

of

heads.

X:

number

of

heads

X^

Events

Probability

Combined

0

TTTT

(^4) q

(^4) q

HTTT

pq

3

1

THTT

pq

3

4pq

3

1

THTT

pq

4pq

TTHT

pq

3

TTTH

pq

3

HHTT

(^2) p

(^2) q

HTHT

(^2) p

(^2) q

HTHT

(^2) p

(^2) q

2

HTTH

(^2) p

(^2) q

6p

2 q

2

THHT

(^2) p

(^2) q

THTH

(^2) p

(^2) q

TTHH

2

2

TTHH

(^2) p

(^2) q

THHH

(^3) p q

3

HTHH

(^3) p q^

4p

3 q

HHTH

(^3) p q

HHHT

(^3) p q

4

HHHH

(^4) p

(^4) p

Binomial

Distribution

Toss

a

coin

times

and

record

the

number

of

heads.

X:

number

of

heads

X^

Events

Probability

Combined

0

TTTT

(^4) q

(^4) q

HTTT

pq

3

1

THTT

pq

3

4pq

3

(^

x n x^ q p n

x P

−

X

Bin

1

THTT

pq

4pq

TTHT

pq

3

TTTH

pq

3

HHTT

(^2) p

(^2) q

HTHT

(^2) p

(^2) q

4

x

x

x P

q p x

x P

−

HTHT

(^2) p

(^2) q

2

HTTH

(^2) p

(^2) q

6p

2 q

2

THHT

(^2) p

(^2) q

THTH

(^2) p

(^2) q

TTHH

2

2

(^

x

x^

TTHH

(^2) p

(^2) q

THHH

(^3) p q

3

HTHH

(^3) p q^

4p

3 q

HHTH

(^3) p q^

2

2

2

2

P P

HHHT

(^3) p q

4

HHHH

(^4) p

(^4) p

P

Binomial

Distribution

Toss

a

coin

times

and

record

the

number

of

heads.

X:

number

of

heads

X^

Events

Probability

Combined

0

TTTT

(^4) q

(^4) q

HTTT

pq

3

1

THTT

pq

3

4pq

3

X

Bin

×

np

μ

1

THTT

pq

4pq

TTHT

pq

3

TTTH

pq

3

HHTT

(^2) p

(^2) q

HTHT

(^2) p

(^2) q

p

μ^ σ

×

×

2 2

npq

HTHT

(^2) p

(^2) q

2

HTTH

(^2) p

(^2) q

6p

2 q

2

THHT

(^2) p

(^2) q

THTH

(^2) p

(^2) q

TTHH

2

2

σ

σ

2

TTHH

(^2) p

(^2) q

THHH

(^3) p q

3

HTHH

(^3) p q^

4p

3 q

HHTH

(^3) p q

HHHT

(^3) p q

4

HHHH

(^4) p

(^4) p

http://www.jcu.edu/math/isep/Quincunx/Quincunx.html

Example

a)

Define

the

random

variable

x.

x: number of trees infectedx:

number of trees infected

b)

If a

buyer

purchases

trees,

what

is

the

distribution

of

x?

X ~ Bin

(

,^ 0.3)

c)

Calculate μ and

σ

×

×

×

npq

np

c)

Calculate

μ

and

σ

×

×

npq

Example

d)

What

is

the

probability

that

trees

will

be

infected?

8

2

)^

Wh t i

th

b bilit

th t

t l

t 1

t^

f th

10 t

i^

i f

t d?

(^

8

2

×
×
×
⎞⎟×⎟ ⎠
X
P

e)

What

is

th

e^

probability

th

at

at

least

out

of

th

e^

t rees

is

infected?

P
( X
P
( X
P
( X
P
( X
(^
P
( X
P
( X