


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 1
Example I: A die is biased so that the number 3 appears twice as often as each other number.
What are the probabilities of all possible outcomes?
Solution: There are 6 possible outcomes s 1 , $, s 6.
p(s 1 ) = p(s 2 ) = p(s 4 ) = p(s 5 ) = p(s 6 )
p(s 3 ) = 2p(s 1 )
Since the probabilities must add up to 1, we have:
5p(s 1 ) + 2p(s 1 ) = 1
7p(s 1 ) = 1
p(s 1 ) = p(s 2 ) = p(s 4 ) = p(s 5 ) = p(s 6 ) = 1/7, p(s 3 ) = 2/ March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 2
Example II: For the biased die from Example I, what is the probability that an odd number appears when we roll the die?
Solution: Eodd = {s 1 , s 3 , s 5 }
Remember the formula p(E) = ∑s∈E p(s).
p(Eodd) = ∑s∈Eodd p(s) = p(s 1 ) + p(s 3 ) + p(s 5 ) p(Eodd) = 1/7 + 2/7 + 1/7 = 4/7 = 57.14%
March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 3
If we toss a coin three times, what is the probability that an odd number of tails appears (event E) , if the first toss is a tail (event F)?
If the first toss is a tail, the possible sequences are TTT, TTH, THT, and THH.
In two out of these four cases, there is an odd number of tails.
Therefore, the probability of E, under the condition that F occurs, is 0.5.
We call this conditional probability.
March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 4
If we want to compute the conditional probability of E given F, we use F as the sample space. For any outcome of E to occur under the condition that F also occurs, this outcome must also be in E ∩ F.
Definition: Let E and F be events with p(F) > 0. The conditional probability of E given F, denoted by p(E | F), is defined as
p(E | F) = p(E ∩ F)/p(F)
March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 5
Example: What is the probability of a random bit string of length four to contain at least two consecutive 0s, given that its first bit is a 0?
Solution:
E: “bit string contains at least two consecutive 0s” F: “first bit of the string is a 0”
We know the formula p(E | F) = p(E ∩ F)/p(F).
E ∩ F = {0000, 0001, 0010, 0011, 0100} p(E ∩ F) = 5/ p(F) = 8/16 = 1/
p(E | F) = (5/16)/(1/2) = 10/16 = 5/8 = 0. March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 6
Let us return to the example of tossing a coin three times. Does the probability of event E (odd number of tails) depend on the occurrence of event F (first toss is a tail)? In other words, is it the case that p(E | F) ≠ p(E)?
We actually find that p(E | F) = 0.5 and p(E) = 0.5, so we say that E and F are independent events.
March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 7
Because we have p(E | F) = p(E ∩ F)/p(F), p(E | F) = p(E) if and only if p(E ∩ F) = p(E)p(F).
Definition: The events E and F are said to be independent if and only if p(E ∩ F) = p(E)p(F).
Obviously, this definition is symmetrical for E and F. If we have p(E ∩ F) = p(E)p(F), then it is also true that p(F | E) = p(F).
March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 8
Example: Suppose E is the event of rolling an even number with an unbiased die. F is the event that the resulting number is divisible by three. Are events E and F independent?
Solution: p(E) = 1/2, p(F) = 1/3.
|E ∩ F|= 1 (only 6 is divisible by both 2 and 3) p(E ∩ F) = 1/ p(E ∩ F) = p(E)p(F)
Conclusion: E and F are independent.
March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 9
Suppose an experiment with two possible outcomes , such as tossing a coin.
Each performance of such an experiment is called a Bernoulli trial.
We will call the two possible outcomes a success or a failure , respectively.
If p is the probability of a success and q is the probability of a failure, it is obvious that p + q = 1.
March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 10
Often we are interested in the probability of exactly k successes when an experiment consists of n independent Bernoulli trials.
Example: A coin is biased so that the probability of head is 2/3. What is the probability of exactly four heads to come up when the coin is tossed seven times?
March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 11
Solution:
There are 2^7 = 128 possible outcomes.
The number of possibilities for four heads among the seven trials is C(7, 4).
The seven trials are independent, so the probability of each of these outcomes is (2/3)^4 (1/3)^3.
Consequently, the probability of exactly four heads to appear is
C(7, 4)(2/3)^4 (1/3)^3 = 560/2187 = 25.61%
March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 12
Illustration: Let us denote a success by ‘S’ and a failure by ‘F’. As before, we have a probability of success p and probability of failure q = 1 – p. What is the probability of two successes in five independent Bernoulli trials? Let us look at a possible sequence: SSFFF What is the probability that we will generate exactly this sequence?
March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 19
No, we cannot, since it is possible that some outcomes are more likely than others.
For example, assume the possible outcomes of an experiment are 1 and 2 with probabilities of 0.1 and 0.9, respectively.
Is the average value 1.5?
No, since 2 is much more likely to occur than 1, the average must be larger than 1.5.
March 14, 2013 Applied Discrete Mathematics Week 7: Probability Theory 20
Instead, we have to calculate the weighted sum of all possible outcomes, that is, each value of the random variable has to be multiplied with its probability before being added to the sum.
In our example, the average value is given by 0.1⋅1 + 0.9⋅2 = 0.1 + 1.8 = 1.9.
Definition: The expected value (or expectation) of the random variable X(s) on the sample space S is equal to:
E(X) = ∑s∈Sp(s)X(s).