Student Project for MA375: Mysteries of Probability
Probability is ordinarily used to describe an attitude of mind towards some proposition of whose truth we are not certain. The proposition of interest is usually of the form "Will a specific event occur?" The attitude of mind is of the form "How certain are we that the event will occur?" The certainty we adopt can be described in terms of a numerical measure and this number, between 0 and 1, we call probability. The higher the probability of an event, the more certain we are that the event will occur. Thus, probability in an applied sense is a measure of the confidence a person has that a (random) event will occur.
Discrete Probability
Discrete probability restricts one to experiments that have finitely many, equally likely, outcomes. There are several terms one must familiarize themselves with before talking about discrete probability, which are listed below:
- Experiment- A procedure that yields one of a given set of possible outcomes
- Sample Space- The set of possible outcomes
- Event-A subset of the sample space
- The complementary event of E- (E)- if E is an event in the sample space S is the subtraction of E from S: E = S-E
- Union of two events A and B (A u B)- The union of two events A and B is the set of outcomes that belong to A or B or both.
- Intersection of two events A and B (A n B)-The intersection of two events A and B is the set of outcomes that belong to both A and B.
Now that there is an understanding of some fundamental definitions, the definition of Probability now can be defined:
The probability of E (if E is an event and S is a finite nonempty sample space of equally likely outcomes), p(E), is equal to |E| / |S|
p(E) = |E| / |S| Eq. 1
Example 1:
Question:
A bucket has 4 blue balls and 6 red balls. What is the probability that a ball chosen at random from the bucket will be blue?
Solution:
There are 10 possibile outcomes (4 blue + 6 red), which is the sample space. 4 of these outcomes will result in a blue ball (event); so the probability of choosing a blue ball, using Equation 1, is 4/10
- The probability of the complementary event (E) is given by the following equaiton:
p(E) = 1-P(E) Eq. 2
Example 2:
Question:
A sequence of 9 bits is randomly generated. What is the probability that at least one of these bits is a 1?
Solution:
E is the event that at least one of the 9 bits is 1. The sample space, S, is the set of all bit strings length 9.
Using Eq. 2: p(E) = 1 - p(E) = 1 - ( |E| / |S| ) = 1 - (1 / 2^9) = 1 - (1 / 512) = 511/512
- The probability of A union B is given by the below formula:
p(A u B)= p(A)+p(B)-P(A n B) Eq. 3
Example 3:
Question:
What is the probabilit that a positive integer selected at random from the set of positive integers is divisible by either 2 or 5?
Solution:
E1 is the event that the integer selected at random is divisible by 2 and E2 is the event that an integer selected at random is divisible by 5.
E1 u E2 is the event that the number is divisible by either 2 or 5.
E1 n E2 is the event that it is divisible by both 2 and 5, which is the same as saying the number is divisible by 10.
because |E1| = 50 and |E2| = 20 and |E1 n E2| = 10, using Equation 3:
p(E1 u E2) = p(E1) + p(E2) - p(E1 n E2)
p(E1 u E2) = 50/100 + 20/100 - 10/100
p(Eq u E2) = 3/5
Probability Theory
In this section, every outcome might not have the same probability, so assigning probabilities might be necessary. One example of all outcomes not having identical probabilities is in the example of a loaded dice (One number on the die has a larger probability than others).
Assigning Probabilities
If S is the sample space of an experiment wih a finite number of outcomes, then p(s) is assigned to each outcome s.
2 conditions must be met when assigning probabilities:
- 0<p(s)<1 for each s that exists in S
- the sum of all probabilities of s that exist in S must equal 1
Example 4:
Question:
a. What are the probabilities that should be assigned to the outcomes of H (heads) and T (tails) if a fair coin is flipped?
b. What are the probabilities that should be assigned to the outcomes of H (heads) and T (tails) if the coin is biased so tails comes up twice as many times as heads?
Solution:
a. for a fair coin the probability that heads comes up is equal to the probability that heads will come up when a fair coin is flipped. This means that the probabilities are equally likely, so p(H) = p(T) = 1/2.
b. For the biased coin, p(T) = 2p(H).
From the second condition for assigning probabilities, p(H) + p(T) =1
p(H) + 2p(H) = 1
3p(H) = 1
p(H) = 1/3, and p(T) = 2/3
- Uniform Distribution- Assigns the probability 1/n to each element of S, if S is a set with n elements
- The probability of an event (A)- The sum of the probability of all the outcomes of A
Probabilities of Complements and Unions of Events
Conditional Probability of A and B p(A | B)- the probability of the union of A and B divided by the probability of B
p(A | B) = p( A u B) / p(B) Eq. 4
Example 5:
Question:
A bit string length 4 is randomly generated so each of the 16 bit strings length 4 are equally likely of occuring. What is the probability that the bit string will contain at least two consecutive 0's, given the first bit is a 0?
Solution:
If A is the event that a bit string length four has 2 consecutive 0's, and B is the event that the first number in the bit string starts with a 0. The probability that a bit string contains two consecutive 0's and the bit begins with a 0 is given by Eq. 4:
p(A | B) = p( A u B)/ p(B)
(A u B)= 5, {0000, 0001, 0010, 0011, 0100}
p(A u B) is 5/16 using Eq. 1
B = The number of bit strings length 4 that begin with 0 = 8
p(B) = 8/16 = 1/2
Using Eq. 4: p(A | B) = (5/16) / (1/2) = 5/8
Independent- Events A and B are independent if and only if the probability of the union of A and B is equal to the probability of A multiplied by the probability of B.
p(A n B)= p(A)p(B) Eq. 5
Example 6:
Question:
Assume each of the four ways a family can have two children is equally likely. Are the events that a family with two children will have 2 boys (A), and the event that a family with two children will have at least one boy (B) independent?
Solution:
A = {BB}
From Equation 1, p(A) = 1/4
B = {GB, BG, BB}
From Equation 1, p(B) = 3/4
(A n B) = {BB}
From Equation 1, p(A n B) = 1/4
p(A)*p(B) = 1/4 * 3/4 = 3/16
Due to the fact that p(A n B) does not equal p(A)p(B), Eq. 5 is false. Therefore A and B are not independent.
Bernoullu Trials
Bernoulli Trial- Each performance of an experiment where there are only 2 possibilities (usually called a success of failure).
The probability of exactly k successes in n independent Bernoulli Trials- C(n,k)pk qn-k , where the probability of success=p and probability of failure= q =1-p
Example 7:
Question:
Assume the probability of generating a 0 bit is 0.9, the probability of generating a 1 bit is 0.1, and the bits are generated independently. What is the probability that exactly 7 0 bits are generated when 10 bits are generated?
Solution
Using C(n,k)pk qn-k as mentioned above, where n=10, k= 7, p=0.9, and q=0.1
= C(10,7) * (0.9)7 * (0.1)3
The probability that exactly seven 0 bits are generated when 10 bits are generated = 0.057396