Difference between revisions of "User:Saul/probability"

From Organic Design wiki
m (Notations)
(Conditional Probability)
 
(One intermediate revision by the same user not shown)
Line 13: Line 13:
 
'''&sup;''' - Superset of.<br>
 
'''&sup;''' - Superset of.<br>
 
'''&supe;''' - Is not a superset of.<br>
 
'''&supe;''' - Is not a superset of.<br>
'''&#8473;(A)''' - Probability of '''A'''.<br>
+
'''&#8473;(A)''' - A ''set'' function of set '''A''' - Probability of '''A'''.<br>
 
'''A<sup>c</sup>''' - A compliment - The event '''A''' does not occur.<br>
 
'''A<sup>c</sup>''' - A compliment - The event '''A''' does not occur.<br>
 
'''&omega;&isin;A''' - The outcome '''&omega;''' is in the event '''A'''<br>
 
'''&omega;&isin;A''' - The outcome '''&omega;''' is in the event '''A'''<br>
Line 33: Line 33:
 
''Finite additivity.''<br>
 
''Finite additivity.''<br>
 
'''&#8473;(A<sup>c</sup>) = 1 - &#8473;(A)''' ''Since'' '''A &cup; A<sup>c</sup> = &Omega;'''<br>
 
'''&#8473;(A<sup>c</sup>) = 1 - &#8473;(A)''' ''Since'' '''A &cup; A<sup>c</sup> = &Omega;'''<br>
''If'' '''A&sube;B''' ''Then'' '''&#8473;(A) &le; &#8473;(B)''' ''Since'' '''A&cup;(A<sup>c</sup>&cap;B) = B'''<br>
+
''If'' '''A &sube; B''' ''Then'' '''&#8473;(A) &le; &#8473;(B)''' ''Since'' '''A&cup;(A<sup>c</sup> &cap; B) = B'''<br>
 
'''&#8473;(A) &le; 1''' ''Since'' '''A &sube; &Omega;'''<br>
 
'''&#8473;(A) &le; 1''' ''Since'' '''A &sube; &Omega;'''<br>
'''&#8473;(A&cup;B) = &#8473;(A) + &#8473;(B) - &#8473;(A&cap;B)'''<br>
+
'''&#8473;(A &cup; B) = &#8473;(A) + &#8473;(B) - &#8473;(A &cap; B)'''<br>
 +
 
 +
== Conditional Probability ==
 +
'''&#8473;(A | H)''' - Given '''H'' occurs what is the probability of '''A''.<br>
 +
'''&#8473;(A | H) = &#8473;(A &cap; H) / &#8473;(H)'''
 +
: ''If'' '''&#8473;(H) &gt; 0'''<br>
 +
<br>
 +
For example:<br>
 +
Two dice are rolled the outcomes being '''i''' and '''j'''.<br>
 +
''let:''
 +
: '''A = {(i, j) : |i - j| &le; 1}
 +
:: ''Note '''{}''' is the set, '''(i, j)''' is all the possible outcomes and the "''':'''" means the set of those outcomes that satisfy the following condition.''
 +
''and:''
 +
: '''H = {(i, j) : i + j = 7}'''
 +
<br>
 +
We could start by listing all the possible outcomes that are in set '''H'':<br>
 +
{| class="wikitable"
 +
|-
 +
! '''i''' !! '''j'''
 +
|-
 +
| 1 || 6
 +
|-
 +
| 2 || 5
 +
|-
 +
| 3 || 4
 +
|-
 +
| 4 || 3
 +
|-
 +
| 5 || 2
 +
|-
 +
| 6 || 1
 +
|}
 +
And all the outcomes in set '''A'''<br>
 +
{| class="wikitable"
 +
|-
 +
! '''i''' !! '''j'''
 +
|-
 +
| 1 || 1
 +
|-
 +
| 1 || 2
 +
|-
 +
| 2 || 1
 +
|-
 +
| 2 || 2
 +
|-
 +
| 2 || 3
 +
|-
 +
| 3 || 2
 +
|-
 +
| 3 || 3
 +
|-
 +
| 3 || 4
 +
|-
 +
| 4 || 3
 +
|-
 +
| 4 || 4
 +
|-
 +
| 4 || 5
 +
|-
 +
| 5 || 4
 +
|-
 +
| 5 || 5
 +
|-
 +
| 5 || 6
 +
|-
 +
| 6 || 5
 +
|-
 +
| 6 || 6
 +
|}
 +
We can then find all the outcomes in '''A &cap; H''' (We could have just applied set '''H''''s condition straight to '''A'''):
 +
{| class="wikitable"
 +
|-
 +
! '''i''' !! '''j'''
 +
|-
 +
| 3 || 4
 +
|-
 +
| 4 || 3
 +
|}
 +
We can say there are '''6 * 6 = 36''' total possible outcomes ('''&Omega;''').<br>
 +
: Set '''H''' has '''6 / 36''' of these outcomes.
 +
: Set '''A''' has '''16 / 36''' of these outcomes.
 +
: Set '''A &cap; H''' has '''2 / 36''' of these outcomes.
 +
We can now calculate the probability of '''A''' happening ''given'' '''H''' has happened.
 +
: '''&#8473;(A | H) = &#8473;(2/36) / &#8473;(6/36) = 1 / 3'''
 +
And the probability of '''H''' happening ''given'' '''A''' has happened.
 +
: '''&#8473;(H | A) = &#8473;(2/36) / &#8473;(16/36) = 1 / 8'''
 +
 
 +
=== Positive/Negative Relationships ===
 +
A '''positive''' relationship means that given '''H''' has happened the chance of '''A'' has '''increased'''.<br>
 +
If this is true it also means the reverse is true: ''given'' '''A''', '''H''' has an '''increased''' chance of happening.
 +
: '''&#8473;(A | H) &gt; &#8473;(A)'''
 +
Which also means:
 +
: '''&#8473;(H | A) &gt; &#8473;(H)'''
 +
<br>
 +
The same goes for '''negative''' relationships, however it is flipped: ''given'' '''H''', '''A''' has an '''decreased''' chance of happening.
 +
: '''&#8473;(A | H) &lt; &#8473;(A)'''
 +
Which also means:
 +
: '''&#8473;(H | A) &lt; &#8473;(H)'''
 +
 
 +
=== Independent Events ===
 +
If event '''H''' happening does not effect the chance of '''A''' then  the two sets are said to be independent.<br>
 +
''If:''
 +
: '''&#8473;(A | H) = &#8473;(A)'''
 +
''And/Or:''
 +
: '''&#8473;(A &cap; H) = &#8473;(A) * &#8473;(H) '''
 +
Then the two events('''A''' and '''H''') are independent.

Latest revision as of 00:28, 7 March 2020

Notations

Ω - The outcome space.
ω - An outcome.
- A non event.
- Union.
- Intersection.
- Is in.
- Is not in.
- Subset of.
- Subset or equal to.

Note: there is a small difference between & but sometimes they get used interchangeably.

- Is not a subset of.
- Superset of.
- Is not a superset of.
ℙ(A) - A set function of set A - Probability of A.
Ac - A compliment - The event A does not occur.
ω∈A - The outcome ω is in the event A
A∪B - The union of A and B - The set containing all the elements from A and B without duplicates.
A∩B - The intersection of A and B - The set containing all the common elements from A and B.
A∩B = ∅ - The sets A and B are disjoint.
ℙ(A∪B) = ℙ(A) + ℙ(B) - The sets A and B are disjoint.
#A - The number of elements A contains if A is finite.
ℙ(S) = 1 - The set S is a exhaustive set as it contains all the outcomes.
Possible outcome - may have a probability of 0.

Axioms

ℙ(A) ≥ 0 for all events A.
ℙ(Ω) = 1
(Countable additivity) For an infinite sequence of mutually exclusive events{A1,A2,A3,...}

Deducible Properties

ℙ(∅) = 0 Since Ω ∪ ∅ ∪ ∅ ∪ ... = Ω
Finite additivity.
ℙ(Ac) = 1 - ℙ(A) Since A ∪ Ac = Ω
If A ⊆ B Then ℙ(A) ≤ ℙ(B) Since A∪(Ac ∩ B) = B
ℙ(A) ≤ 1 Since A ⊆ Ω
ℙ(A ∪ B) = ℙ(A) + ℙ(B) - ℙ(A ∩ B)

Conditional Probability

ℙ(A | H) - Given H occurs what is the probability of A.
ℙ(A | H) = ℙ(A ∩ H) / ℙ(H)

If ℙ(H) > 0


For example:
Two dice are rolled the outcomes being i and j.
let:

A = {(i, j) : |i - j| ≤ 1}
Note {} is the set, (i, j) is all the possible outcomes and the ":" means the set of those outcomes that satisfy the following condition.

and:

H = {(i, j) : i + j = 7}


We could start by listing all the possible outcomes that are in set 'H:

i j
1 6
2 5
3 4
4 3
5 2
6 1

And all the outcomes in set A

i j
1 1
1 2
2 1
2 2
2 3
3 2
3 3
3 4
4 3
4 4
4 5
5 4
5 5
5 6
6 5
6 6

We can then find all the outcomes in A ∩ H (We could have just applied set H's condition straight to A):

i j
3 4
4 3

We can say there are 6 * 6 = 36 total possible outcomes (Ω).

Set H has 6 / 36 of these outcomes.
Set A has 16 / 36 of these outcomes.
Set A ∩ H has 2 / 36 of these outcomes.

We can now calculate the probability of A happening given H has happened.

ℙ(A | H) = ℙ(2/36) / ℙ(6/36) = 1 / 3

And the probability of H happening given A has happened.

ℙ(H | A) = ℙ(2/36) / ℙ(16/36) = 1 / 8

Positive/Negative Relationships

A positive' relationship means that given H has happened the chance of A has increased.
If this is true it also means the reverse is true: given A, H has an increased chance of happening.

ℙ(A | H) > ℙ(A)

Which also means:

ℙ(H | A) > ℙ(H)


The same goes for negative relationships, however it is flipped: given H, A has an decreased chance of happening.

ℙ(A | H) < ℙ(A)

Which also means:

ℙ(H | A) < ℙ(H)

Independent Events

If event H happening does not effect the chance of A then the two sets are said to be independent.
If:

ℙ(A | H) = ℙ(A)

And/Or:

ℙ(A ∩ H) = ℙ(A) * ℙ(H)

Then the two events(A and H) are independent.