31
1 Independent Events

Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

1

Independent Events

Page 2: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

2

Two definitions of independence

• Def.1 – Two events, A and B are said to be

independent if

• Def. 2– Two events, A and B are said to be

independent if

• Note that they are algebraically equivalent

( ) ( ) ( )P =P PA B A B∩

( ) ( )P / PA B A=

)()()(

)()(

)/(BP

BPAPBP

BAPBAP =

∩=

Page 3: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

3

Intuitive meaning of independence

•– Knowledge of B is irrelevant to A

• P(Thunder/lightning) ≠P(Thunder)• P(Face coin1/Face coin2)= P(Face coin1)

– Sample space of A does not change if B has happened.• For instance a sample space generated by the

cartesian product of two sets.

( ) ( )P / PA B A=

mnm

m

n

BABABABA

BBB

AAA

LL

L

L

,,,

,,

,,

12111

21

212

211

=ΩΩ×Ω=Ω

=Ω=Ω

Page 4: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

4

Intuitive meaning of independence• Sample space of A does not change if B has

happened.– Sample space generated by the cartesian product of two

sets. ( ) ( )P / PA B A=

nBA

mB

nmBA

nA

BA

BABA

BABA

B

BB

A

AA

mn

m

mn

1)/p(

1)p(

1)p(

1)p(

11

1

11

1

12

1

21

11

2

1

2

1

2121

=

=

=

=

×

Ω×Ω=ΩΩΩ

M

M

MM

( ) ( ) ( )P =P PA B A B∩

Page 5: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

5

Explaination of dependent events by means of the sample space

• Sample space of A does change if B has happened. Eliminate possibilities

1)/p(

1)p(

11

)p(

1)p(

11

1

11

1

12

1

21

11

2

1

2

1

21

−=

=

−=

=

×

ΩΩΩ

nmm

BA

mB

nmBA

nA

BA

BABA

BABA

B

BB

A

AA

mn

m

mn

New

M

M

MM

( ) ( )P / PA B A=

( ) ( ) ( )P =P PA B A B∩

Page 6: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

6

Explaination of dependent events by means of the sample space

• Sample space of A does change if B has happened. – Eliminated possibilities– Preferencial Attatchment

1)/p(

1)p(

11

)p(

1)p(

11

1

11

1

12

1

21

11

2

1

2

1

21

−=

=

−=

=

×

ΩΩΩ

nmm

BA

mB

nmBA

nA

BA

BABA

BABA

B

BB

A

AA

mn

m

mn

New

M

M

MM

( ) ( )P / PA B A=

( ) ( ) ( )P =P PA B A B∩

Model 1 of the problemA1=Rain,A2=Sun shineB1=ThunderModel 2 of the problemA1=Rain,A2=Sun shineB1=Dressed with a rain coat

Page 7: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

7

Intuitive meaning of independence• Another case: Proportion of the sample space of

A does not change if B has happened• Note: the condition is algebraic, not physical

31

52

125

31

21

)(

)/()()/()()(

)()(

52

)/(

)()(

31

)/(

12/5)(

2/1)(

1122

2

22

1

11

2

1

=+=

+=

∩==

∩==

==

SlwP

SSlwPSPSSlwPSPSlwP

SPSSlwP

SSlwP

SPSSlwP

SSlwP

SP

SP

Fst

Slw Fst

Fst

Slw Slw Slw

Fst

)()/( 1 SlwPSSlwP =

Page 8: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

8

Independence by inclusion

• Preposition– If it rains, I’ll bring the umbrella

• Sets– A=It rains, B=Bring umbrella

• Probabilities– P(B/A)=P(B)– P(B/Not A)=

OperationsImplication Inclusion Condition→ →

Propositions Relations between objects Numbers→ →∅

A

BB A⊂

Page 9: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

9

( )

( )

( )

( )

( ) ( )

P 1

P

P

Area P / =

P / P

Total Area

Yellow AreaA

Total AreaBlue Area

BTotal Area

Green Yellow AreaA BBlue Area Total Area

A B A

Ω = =

=

=

=

=

Intuitive meaning of independence• Proportion of the sample space of A

does not change if B has happened• Note: the condition is algebraic, not physical

Page 10: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

10

Application to Scale Free objects• Application to fractal images and objects.

– Sierpinski triangle

( )

( )

( )

( )

( ) ( )

P 1

P

P

Area P / =

P / P

Total Area

Yellow AreaA

Total AreaBlue Area

BTotal Area

Green YellowAreaA B

Blue Area Total Area

A B A

Ω = =

=

=

=

=

http://en.wikipedia.org/wiki/Sierpinski_triangle

Page 11: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

11

Application to Scale Free objects• Application to fractal images and objects.

( )

( )

( )

( )

( ) ( )

P 1

P

P

Area P / =

P / P

Total Area

YellowAreaA

Total AreaBlue Area

BTotal Area

Green YellowAreaA B

Blue Area Total Area

A B A

Ω = =

=

=

=

=

http://en.wikipedia.org/wiki/Fractals

Page 12: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

12

Application to Scale Free objects• Application to internet traffic.

( ) ( )( ) ( )

0

1

2

3

% change in the traffic

time scale: month

time scale: day

time scale: hour

time scale: seconds

i,j

P P /

P / P /

i

j i

A q

B

B

B

B

A A B

A B A B

=

=

=

=

=

=

=http://classes.yale.edu/fractals/Panorama/ManuFractals/Internet/Internet4.html

Page 13: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

13

Application to Scale Free objects• Flips of coins. 10.000 vs. 1.000.000

)/p()p( experiment theof ScaleB

winningisplayer one Time ofFraction coin a of flips 1.000.000in results possible all ofset

coin a of flips 10.000in results possible all ofset

2

1

BAA

A

===

Page 14: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

14

Application to Scale Free objects

• One way of creating Scale free objects, is by means of an exponencial grow

Page 15: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

15

Application to Scale Free objects

Taken from:

The architecture of complexity: From the topology of the www to thecell's genetic network

Albert-László Barabási

P(k) ~ k-γ

mnm

m

n

BABABABA

BBB

AAA

LL

L

L

,,,

,,

,,

12111

21

212

211

=ΩΩ×Ω=Ω

mnm

m

n

BABABABA

BBB

AAA

LL

L

L

,,,

,,

,,

12111

21

212

211

=ΩΩ×Ω=Ω

Prefencial connexions (road to the nearest neighbour) vs. indifferent conexions (can fly anywhere)

Page 16: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

16

Similarities between natural graphs

• Semantic map vs. Physical connections in internet

http://rdfweb.org/2002/02/foafpath/The architecture of complexity: From the topology of the www to thecell's genetic network

Albert-László Barabási

Page 17: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

17

Examples of Scale Free in biology

Broccoli Eucalyptus Tree

Page 18: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

18

Relation between independenceand disjoint condition

• Independence does not imply disjointness– Condition of indepence– Condition of disjointness

• In probabilities means:

• What does mean?( ) ( ) ( )P =P P 0A B A B∩ =

0=∩ BA

)()()( BPAPBAP =∩

)()()()( BAPBPAPBAP ∩−+=∪

)()()( BPAPBAP +=∪

Page 19: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

19

Relation between independence and disjoint condition

• What does mean?

( ) ( ) ( ) ( )P A B P A P B P A B∪ = + − ∩

A B A B

Counted twice

( ) ( ) ( )P =P P 0A B A B∩ =

nBA

mB

nmBA

nA

BA

BABA

BABA

B

B

B

A

A

A

mn

m

mn

1)/p(

1)p(

1)p(

1)p(

11

1

11

1

12

1

21

11

2

1

2

1

2121

=

=

=

=

×

Ω×Ω=ΩΩΩ

M

M

MM

Model 1 of the problemA1=Rain,A2=Sun shineB1=Thunder

Model 2 of the problemA1=Rain,A2=Sun shineB1=Dressed with a rain coat

Eliminated possibilitiesPreferencial Attatchment

Page 20: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

20

Probability of the intersection of a set of independent events.

• Probability of the union of independent events

• Formally the union of all the elements, consists on the event: – E=Simultaneously of the elements of the set

appear

• Note:

,, 21 nAAA L=Ω

∏=

=∩∩∩n

iin APAAAP

121 )()( L

Propositions Relations between objects Numbers→ →

Page 21: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

21

When intersection of sets corresonds to multiplication of probabilities?

1

2 8 4

13 18 9

k m n

o

o o oo o o

o o o

UniverseΩ = Event

1

0

, , ,

, , ,

, , ( (./.))

Logic OR AND NOT IMPLICATION

Sets UNION INTERSECTION COMPLEMENT INCLUSION

Sets SUM MULTIPLICATION CONDITIONING p

=

=

=

Propositions Relations between objects Numbers→ →

∏=

=∩∩∩n

iin APAAAP

121 )()( L

Page 22: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

22

Probability of getting at least one event of a set of independent events • Probability of the union of independent

events• Formally the union of all the elements,

consists on the event: – E=At least one of the elements of the set

appear– E=Not a single element of the set appears

• Which is equivalent to

,, 21 nAAA L=Ω

EE −Ω=

Page 23: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

23

Probability of getting at least one event of a set of independent events • Probability of the union of independent

events

( )

( )

( ) ( ) ( )

( ) ( )

1

1

1

1 1

1

E=

E= -

E= - -

P =P - - 1 P -

P =1 1-P

n

ii

n

ii

n

ii

n n

i ii i

n

ii

A

A

A

E A A

E A

=

=

=

= =

=

∩ Ω

Ω ∩ Ω

Ω ∩ Ω = − ∩ Ω =

− Π

,, 21 nAAA L=Ω

E=At least one of the elements of the set appear.

E=Not a single element of the set appears

Page 24: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

24

Example 1

• A web page has two kind links. A,B• M different users select randomly and

independently of each other one of the links.

• What is the probability that at a link of kind A is visited least once?

– For instance: Web based bookshop that also has CD, DVD, second hand books.

Page 25: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

25

Example 1

• A web page has two kind links. A,B• Sample space of the links

• Possible choises of the M users

,,,,

212

211

m

n

BBBAAA

LL

=Ω=Ω

mnmBP

mnnAP

+=

+=

)(

)(

M

jijiji MMBORABORABORA

2 2 2 2 choices ofNumber

),,(choices of Possible2211

=××=

=

L

L

Page 26: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

26

Example 1

• Probability of a given selection:

• What is the probability that at a link of kind A is visited least once?

mnmBP

mnn

AP

+=

+=

)(

)(

LML

jijii mnm

mnn

BANDABANDAANDAPLML

+

+=

−)(

121L

M

mnm

AllPP

+−=−= 1)B (1)Aan least At (

Page 27: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

27

Example 1• What is the probability that at a link of kind

A is visited least once?

mnm

BP

mnn

AP

+=

+=

)(

)(

M

mnm

AllPP

+−=−= 1)B (1)Aan least At (

0,9533446

0,922245

0,87044

0,7843

0,642

0,4P(B)=0,41

0,6P(A)=m=2 n=3M

m=2 n=3

00,20,40,60,8

11,2

1 2 3 4 5 6

M

Pro

b. a

t le

ast

on

e o

f K

ind

A

0,8384944210

0,80619339

0,767431968

0,720918357

0,665102026

0,598122435

0,517746914

0,42129633

0,305555562

0,2P(B)=0,166666671

0,8P(A)=m=10 n=3M

0

0,2

0,4

0,6

0,8

1

1 2 3 4 5 6 7 8 9 1 11

M

Page 28: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

28

Example 2

• Another way of deriving the formula:

• Throw a coin N times, what is the probability that heads occur on at least one trial?

M

mnm

AllPP

+−=−= 1)B (1)Aan least At (

MM

M qq

qppqpqpqpHeadsP −=

−−

=+++= − 11

1) trialonein least at ( 132 L

How?

Page 29: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

29

Example 2

• Throw a coin N times, what is the probability that heads occur on at least one trial?

( ) ( )

( )

MM

M

M

iiM

iii

i

i

qq

qppqpqpqpHeadsP

AAAAPHeadsP

pqPpqAP

TailsiA

FirstA

−=−

−=+++=

=∪∪=

=+=

∪−=

=

=

−−

11

1) trialonein least at (

) trialonein least at (

)else anythingthen ()(

else anythingthen Head aby followed 1

inumber trialin the occurs Head

132

121

11

L

L

?

Page 30: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

30

Example 2

• P(then anything else)?

qqqpqqqpqqqpqpppqpppqpppP +++++++=)else anythingthen (3 of Case

( ) 322332233

33

23

13

03

331 babbaababbaaba

+

+

+

=+++=+

baaabaaab ,,

( ) 1=+ nqp

Page 31: Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf · Probability of getting at least one event of a set of independent events • Probability

31

Example 2

• Applications of the formula:

• Carl Sagan an the probability of inteligent life in our galaxy

• Saddam’s ‘Plebicito’ with a 99.9% of approval

• Other ‘plebicito’s’ and elections

M

mnm

AllPP

+−=−= 1)B (1)Aan least At (