Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf ·...
Transcript of Independent Events - Docènciadocencia.ac.upc.edu › master › CMARC › IndependentEvents.pdf ·...
1
Independent Events
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 =
∩=
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
=ΩΩ×Ω=Ω
=Ω=Ω
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∩
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∩
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
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 =
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⊂
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
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
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
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
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
===
=Ω
=Ω
14
Application to Scale Free objects
• One way of creating Scale free objects, is by means of an exponencial grow
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)
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
17
Examples of Scale Free in biology
Broccoli Eucalyptus Tree
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 +=∪
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
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→ →
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
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 −Ω=
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
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.
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
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 (
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
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?
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
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
?
30
Example 2
• P(then anything else)?
qqqpqqqpqqqpqpppqpppqpppP +++++++=)else anythingthen (3 of Case
( ) 322332233
33
23
13
03
331 babbaababbaaba
+
+
+
=+++=+
baaabaaab ,,
( ) 1=+ nqp
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 (