Probability Theory - Michael Johnson's Homepage | All

Download Report

Transcript Probability Theory - Michael Johnson's Homepage | All

Probability Theory
Validity
A bar is obeying the law when it has the following property:
If any of the patrons are below the age of 18, then that person is not
drinking alcohol.
Legal or Illegal?
Patron
Alice
Bill
Cecil
Doug
Age
Over 18
Over 18
Under 18
Under 18
Drink
Beer
Soda
Beer
Soda
Ignore People over 18
Patron
Alice
Bill
Cecil
Doug
Age
Over 18
Over 18
Under 18
Under 18
Drink
Beer
Soda
Beer
Soda
Make Sure No One Else Has Alcohol
Patron
Alice
Bill
Cecil
Doug
Age
Over 18
Over 18
Under 18
Under 18
Drink
Beer
Soda
Beer
Soda
Illegal!
Patron
Alice
Bill
Cecil
Doug
Age
Over 18
Over 18
Under 18
Under 18
Drink
Beer
Soda
Beer
Soda
Legal or Illegal?
Patron
Evan
Fred
Gale
Harriet
Age
Over 18
Over 18
Under 18
Under 18
Drink
Beer
Soda
Soda
Soda
Ignore People over 18
Patron
Evan
Fred
Gale
Harriet
Age
Over 18
Over 18
Under 18
Under 18
Drink
Beer
Soda
Soda
Soda
Make Sure No One Else Has Alcohol
Patron
Evan
Fred
Gale
Harriet
Age
Over 18
Over 18
Under 18
Under 18
Drink
Beer
Soda
Soda
Soda
Legal or Illegal?
Patron
Ivan
Janet
Kerry
Lenny
Age
Over 18
Over 18
Over 18
Over 18
Drink
Beer
Soda
Soda
Soda
Ignore Everyone
Patron
Ivan
Janet
Kerry
Lenny
Age
Over 18
Over 18
Over 18
Over 18
Drink
Beer
Soda
Soda
Soda
Legal! No One Underage Has Alcohol
Patron
Ivan
Janet
Kerry
Lenny
Age
Over 18
Over 18
Over 18
Over 18
Drink
Beer
Soda
Soda
Soda
A bar is obeying the law when it has the following property:
If any of the patrons are below the age of 18, then that person is not
drinking alcohol.
An argument is valid when it has the following property:
If any possibility (evaluation) makes the premises true, then the
conclusion is not false.
Valid or Fails the Test?
Possibility
Possibility 1
Possibility 2
Possibility 3
Possibility 4
Premise
True
True
False
False
Conclusion
True
False
True
False
Ignore the Possibilities Where Premise Is Not
True
Possibility
Possibility 1
Possibility 2
Possibility 3
Possibility 4
Premise
True
True
False
False
Conclusion
True
False
True
False
Make Sure No Remaining Possibilities Make
the Conclusion False
Possibility
Possibility 1
Possibility 2
Possibility 3
Possibility 4
Premise
True
True
False
False
Conclusion
True
False
True
False
Make Sure No Remaining Possibilities Make
the Conclusion False
Possibility
Possibility 1
Possibility 2
Possibility 3
Possibility 4
Premise
True
True
False
False
Conclusion
True
False
True
False
Example
P
T
T
F
F
Q
T
F
T
F
~~P
T
T
F
F
((Q → P) → Q)
T
F
T
F
Example
P
T
T
F
F
Q
T
F
T
F
~~P
T
T
F
F
((Q → P) → Q)
T
F
T
F
Example
P
T
T
F
F
Q
T
F
T
F
~~P
T
T
F
F
((Q → P) → Q)
T
F
T
F
Recap
Inductive Arguments
An inductive argument tries to show that its conclusion is supported by
its premises.
In other words, it tries to show that the truth of its premises makes it
more likely that its conclusion will be true.
Inductive Strength
The quality of an inductive argument is measured by its strength – the
degree to which its premises raise the probability of its conclusion.
If they don’t raise the probability very much, the argument is not very
strong. If they do, the argument is strong.
Additional Evidence
Even strong inductive arguments with true premises can be shown to
be bad arguments with the addition of more evidence.
Inductive Syllogism
In standard form:
1) Most bankers are rich.
2) Bill is a banker.
3) Bill is rich.
The general form of the argument I just gave is:
1) Most X’s are Y.
2) A is an X.
C) A is Y.
This type of argument is called an inductive syllogism.
Evaluating Inductive Syllogisms
The strength of an inductive syllogism depends primarily on the
strength of the generalization.
But our assessment of the argument also has to do with the amount of
available evidence that has been taken into account.
Inductive Generalization
The argument form of an inductive generalization is:
1) Most of the observed sample of X’s are Y.
C) Most X’s are Y.
Samples
Ideally, when we are trying to find out whether a large percentage of a
group has a certain property, we would check every member of the
group.
But for a lot of groups, that’s just not possible – there are too many to
check. Instead, we look at a sample, or a subset of the group.
Representative Samples
The success of an inductive generalization depends on how good the
match is between the sample and the entire group.
If our sample of bankers is 90% rich, but bankers on a whole are only
30% rich, our argument will not be a good one.
The Elements of Sentential Logic
Sentential Logic: Vocabulary
Sentence letters: A, B, C,…
Logical connectives: ~, &, v, →, ↔
Punctuation: ), (
Sentential Logic: Grammar
i. All sentence letters are WFFs.
ii. If φ is a WFF, then ~φ is a WFF.
iii. If φ and ψ are WFFs, then (φ & ψ), (φ v ψ), (φ → ψ), (φ ↔ ψ) are
also WFFs.
iv. Nothing else is a WFF.
Sentential Logic: Examples
• (Q & R)
• ((Q & R) v P)
• ~((Q & ~R) v P)
• (S → ~((Q & ~R) v P))
• ~((~P ↔ S) → ~((Q & ~R) v P))
Sentential Logic: Outside Parentheses
• (Q & R)
• ((Q & R) v P)
• ~((Q & ~R) v P)
• (S → ~((Q & ~R) v P))
• ~((~P ↔ S) → ~((Q & ~R) v P))
Convention: Omit Outside Parentheses
• Q&R
• (Q & R) v P
• ~((Q & ~R) v P)
• S → ~((Q & ~R) v P)
• ~((~P ↔ S) → ~((Q & ~R) v P))
Note on Negation
Can’t omit parentheses when negation is main connective. Example:
1. ~((Q & ~R) v P)
(1) Is false whenever P is true. But (2) is true whenever P is true:
2. ~(Q & ~R) v P
Probability Theory
Probability Theory: Vocabulary
Sentence letters: A, B, C,…
Logical connectives: ~, &, v
Punctuation: ), (
Real numbers between 0 and 1: 0.5, 0.362, π/4…
Probability function symbol: Pr
Equality sign: =
Domain
Range
Functions
A function is a relation between the members of two sets X and Y,
called its domain and its range.
The function takes each member of its domain and relates it to exactly
one member of its range.
Numerical Functions
Most functions that you’ve learned about are numerical functions:
their domains are numbers or pairs of numbers, and their range is also
numbers. Addition:
+: 2,2
4
+: 16,9
25
+: 9,16
25
+: 0.5,0.25
0.75
+: 7,-18
-11
Truth-Functions
But we also learned about truth-functions in class too.
~:T
F
~:F
T
&:T,T
&:T,F
&:F,T
&:F,F
T
F
F
F
Pr
“Pr” is the symbol for a probability function. It’s a function from SL
formulas to real numbers in [0, 1]. There are lots of probability
functions, but they all follow these rules:
Rule 1: 0 ≤ Pr(φ) ≤ 1
Rule 2: If φ is a tautology, then Pr(φ) = 1
Rule 3: If φ and ψ are mutually exclusive, then Pr(φ v ψ) = Pr(φ) + Pr(ψ)
Probabilities of Complex Sentences
Just as in Sentential Logic, where you can calculate the truth-values of
complex sentences if you know the truth-values of their parts, we can
calculate the probabilities of complex sentences from the probabilities
of their parts.
Probability of Negation
If you know the Pr(φ), you can calculate Pr(~φ):
Pr(~φ) = 1 – Pr(φ)
If the probability that it will rain tomorrow is 20%, then the probability
that it will not rain is 1 – 20% = 80%.
If the probability that the die will land 4 is 1/6, then the probability that
it will not land 4 is 1 – 1/6 = 5/6.
Probability of Disjunction
There are two ways we need to use to calculate the probability of a
disjunction (φ v ψ).
The first way we use if φ and ψ are mutually exclusive: they can’t both
be true together. Then the rule is:
Pr(φ v ψ) = Pr(φ) + Pr(ψ)
Examples of Mutually Exclusive Possibilities
When you roll a fair 6-sided die,
the probability it will land on any
one side is 1/6.
It cannot land on two sides at the
same time.
Examples of Mutually Exclusive Possibilities
Landing 4 on one roll and landing
6 on the same roll are mutually
exclusive possibilities.
So the probability that on one roll
it will land 4 or it will land 6 is 1/6
+ 1/6 or 2/6.
Inclusive “Or”
In logic, we use inclusive “or.”
(φ v ψ) can be true when both φ and ψ are true. Thus we must be able
to calculate the probabilities disjunctions of events that are not
mutually exclusive.
Why doesn’t our old rule work?
Coin Flips
Suppose I flip a coin twice.
The probability that it will land
heads on the first flip is 50%.
The probability that it will land
heads on the second flip is 50%.
What’s the probability it will land
heads on the first flip or the
second flip?
Coin Flips
Not this:
Pr(F v S) = Pr(F) + Pr(S)
= 50% + 50%
= 100%
Coin Flips
First
Heads
Heads
Tails
Tails
Second
Heads
Tails
Heads
Tails
Heads on the First Flip: Two Possibilities
First
Heads
Heads
Tails
Tails
Second
Heads
Tails
Heads
Tails
Heads on the Second Flip: Two Possibilities
First
Heads
Heads
Tails
Tails
Second
Heads
Tails
Heads
Tails
Heads on First Or Second: Not 2 + 2
First
Heads
Heads
Tails
Tails
Second
Heads
Tails
Heads
Tails
Rule for Events that Aren’t Mutually Exclusive
In adding the probabilities of the first and second flips, we double
counted the possibility that the coin lands heads in the first flip and
lands heads in the second flip.
Rule: Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)
Rule for Events that Aren’t Mutually Exclusive
But how do we calculate this part?
Rule: Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)
Dependence and Independence
Two events A and B are independent if A happening does not increase
the probability that B will happen.
(This is equal to the claim that B happening does not increase the
probability that A will happen.)
A and B are independent:
• Pr(A) = Pr(A/ B)
• Pr(B) = Pr(B/ A)
Conjunctions: First Rule
If A and B are independent, then Pr(φ & ψ) = Pr(φ) x Pr(ψ)
Coin Flips
Suppose I flip a coin twice.
The probability that it will land
heads on the first flip is 50%.
The probability that it will land
heads on the second flip is 50%.
What’s the probability it will land
heads on the first flip and the
second flip?
Probability of Independent Events
Coin flips are independent. What
happens on one flip does not
affect what happens on a different
flip.
Thus: Pr(F & S) = Pr(F) x Pr(S)
= 50% x 50%
= 25%
First and Second: 1 out of 4 (25%)
First
Heads
Heads
Tails
Tails
Second
Heads
Tails
Heads
Tails
Back to “Or”
Now, returning to our earlier question: What’s the probability the coin
will land heads on the first flip or the second flip?
Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)
= Pr(F) + Pr(S) – Pr(F & S)
= Pr(F) + Pr(S) – Pr(F) x Pr(S)
= 50% + 50% – 25%
= 75%
Heads on First Or Second: 3 out of 4 (75%)
First
Heads
Heads
Tails
Tails
Second
Heads
Tails
Heads
Tails
Non-Independent Events
We can’t always multiply the probabilities of the conjuncts to get the
probability of a conjunction.
For example, the probability of a coin landing heads is 50%: Pr(H) =
50%. What’s the probability that it lands heads and lands heads on the
same flip? Why, 50% of course. But
Pr(H & H) = 50% x 50% = 25%... Wrong!
Non-Independent Events
In general, if A happening raises or lowers the probability that B will
happen, then we can’t use the standard multiplication rule.
Even Numbers
The even numbers are the
numbers: 2, 4, 6, 8, 10, 12…
On a 6-sided die there are only
three even numbers: 2, 4, 6.
Prime Numbers
The prime numbers are the
numbers that are only divisible by
themselves and one: 2, 3, 5, 7, 11,
13, 17…
On a 6 sided die, there are four
prime numbers: 1, 2, 3, 5
Rolling Even
The probability of rolling an even
number is:
Pr((R2 v R4) v R6)
= Pr(R2 v R4) + Pr(R6)
= Pr(R2) + Pr(R4) + Pr(R6)
= 1/6 + 1/6 + 1/6
= 1/2
Rolling Prime
The probability of rolling a prime
number is:
Pr((R1 v R2) v (R3 v R5))
= Pr(R1 v R2) + Pr(R3 v R5)
= Pr(R1 v R2) + Pr(R3) + Pr(R5)
= Pr(R1) + Pr(R2) + Pr(R3) + Pr(R5)
= 1/6 + 1/6 + 1/6 + 1/6
= 2/3
Rolling Prime and Even
We can’t just multiply these
probabilities together to get the
right result.
Pr(P & E) = Pr(P) x Pr(E)
= 2/3 x 1/2
= 2/6
= 1/3… Wrong!!!
Rolling Prime and Even
Why? Because there is only one
even prime number and there is a
1/6 chance you roll it.
Pr(Prime/ Odd) = 100%
If you roll an odd number this
raises the probability that you
rolled a prime number.
Since every odd number on the
die is prime: Pr(P/ O) = 1
O=T
R1
R2
R3
R4
R5
R6
P
R1
R2
R3
R4
R5
R6
Pr(Prime/ Even) = 1/3 < Pr(Prime) = 2/3
If you roll an even number this
lowers the probability that you
rolled a prime number.
There’s a 2/3 unconditional
probability that you’ll roll a prime.
But if you roll an even number,
there’s only a 1/3 chance it’s
prime.
O=T
R1
R2
R3
R4
R5
R6
P
R1
R2
R3
R4
R5
R6
General Conjunction Rule
So rolling prime P and rolling even E are not independent.
The rule Pr(φ & ψ) = Pr(φ) x Pr(ψ) only works for events that are
independent.
The general rule, for any two events, is:
Pr(φ & ψ) = Pr(φ) x Pr(ψ/ φ)
Pr(Prime and Even)
Pr(E & P) = Pr(E) x Pr(P/ E)
= 1/2 x Pr(P/E)
= 1/2 x 1/3
= 1/6
Pr(P & E) = Pr(P) x Pr(E/P)
= 2/3 x Pr(E/P)
= 2/3 x 1/4
= 2/12 = 1/6
Conditional Probability
We’ll talk more about conditional probability next time.
Rules
Pr(~φ) = 1 – Pr(φ)
Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)
Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusive
Pr(φ & ψ) = Pr(φ) x Pr(ψ/ φ)
Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent
Sample Problems
Imagine you have an ordinary
deck of 52 playing cards, shuffled
and face-down.
If you select one card from the
deck, what’s the probability it will
be:
The ace of spades?
The four of clubs?
If you select one card from the
deck, what’s the probability it will
be:
The ace of spades or the queen of
diamonds?
Any ace?
Not an ace?