Professional Documents
Culture Documents
Probability
Probability
Mat 211
Dr. Firoz
7-8: Probability and Statistics
Chapter 7 Probability
Definition: Probability is a real valued set function P that assigns to each event A in the
sample space S a number P(A), called the probability of A, such that the following
properties hold:
a) 1 P( A) 0
b) P(S ) 1
c) P(S ) P( A) P( A ) P( A) 1 P( A ) , where A is the complement of A.
d) For events A,and B we have P( A B) P( A) P( B) P( A B)
e) If A and B are mutually exclusive (means A B , P( A B) P( ) 0 , then
P( A B) P( A) P(B)
f) For three events A, B, and C verify that
P( A B C) P( A) P(B) P(C) P( A B) P(B C) P(C A) P( A B C)
Example 1. Roll a die once. The total outcomes are namely 1, 2, 3, 4, 5, and 6. The
sample space is the set S {1, 2, 3, 4, 5, 6} . The event E rolling a 3 is the singleton set
1
E {3} . Now the probability of the event E for rolling a 3 is p( E ) p(rolling a 3) ,
6
because there are 6 total outcomes and 1 desired outcome.
Example 2. Roll a die once. Write the sample space. Find the following probabilities:
a) P( E ) P(rolling a 3 or a 5)
b) P( E ) P(rolling a 3 or more)
c) P( E ) P(rolling a number greater than 10)
d) P( E) P(rolling an even number)
e) o(E) = odds for the event that the roll is a 3 or a 5
Answer: a) 1/3 b) 2/3 c) 0 d) ½ e) 2 : 4
Example 3. Roll a die twice. Write the sample space. Find the following probabilities:
a) P( E ) P(rolling a sum 3 or a sum 5)
b) P ( E ) P (rolling a sum 3 or more)
c) P ( E ) P (rolling a sum greater than 10)
d) P ( E ) P (rolling a sum greater than 12)
The sample space of the event of rolling a die twice:
2
11 12 13 14 15 16
21 22 23 24 25 26
31 32 33 34 35 36
41 42 43 44 45 46
51 52 53 54 55 56
61 62 63 64 65 66
Example 4. Roll a die twice. Write the sample space. Find the following probabilities:
a) P( E) P(all two rolls are either a 1 or a 3)
b) P( E) P(all two rolls are not 2)
c) P( E) P(all two rolls are above 3)
d) P( E) P(all are a 1 or all are a 5)
The sample space of the event of rolling a die twice:
11 12 13 14 15 16
21 22 23 24 25 26
31 32 33 34 35 36
41 42 43 44 45 46
51 52 53 54 55 56
61 62 63 64 65 66
Answer: a) Look at the sample space, we have all three rolls either a 1 or a 3 are 11, 13,
31, and 33. Thus P( E) P(all two rolls are either a 1 or a 3) = 4/36.
We could find this probability using independent event and multiplication principle as
the probability of getting first outcome either 1 or 3 is 2/6, then the probability of getting
second outcome either 1 or 3 is again 2/6. By multiplication principle the probability of
getting all two outcomes either a 1 or a 3 is 2 / 6 2 / 6 4 / 36
b) P( E) P(all two rolls are not 2) = 25/36, you may verify looking at the sample space,
that we have 12, 21, 22, 23, 24, 25, 26, 32, 42, 52, 62 with outcome 2’s. There are 25
outcomes with no 2’s.
Using independent event and multiplication principle we have
P( E) P(all two rolls are not 2) = 5 / 6 5 / 6 25 / 36
Example 5. Roll a die three times. How many outcomes do we have in the sample space?
Find the following probabilities:
a) P ( E ) P (all three rolls are either a 1 or a 3)
b) P ( E ) P (all three rolls are not 2)
c) P( E ) P(all three rolls are above 3)
d) P( E) P(all are a 1 or all are a 5)
Example 6. Roll a die five times. How many outcomes do we have in the sample space.
Find the following probabilities:
a) P ( E ) P (all five rolls are either a 1 or a 3)
b) P ( E ) P (all five rolls are not 2)
c) P( E ) P(all five rolls are above 3)
d) P( E) P(all are a 1 or all are a 5)
Answer: a) 2 5 / 6 5 b) 55 / 65 c) 35 / 65 d) 2 / 65
Methods of Enumeration
1. A true/false test contains 10 questions. In how many ways can a student answer
the questions? If a student makes random guesses, what is the probability that the
student will make exactly 5 questions correct? Answer:
10
2 1024, c(10,5) /1024 0.2461 .
2. How many three letter words (without meaning) are possible when repetition of
letters is not allowed? What is the probability that those words will not start with
a vowel? Answer: P(26,3), 0.8077
3. How many three letter words (without meaning) are possible when repetition of
letters is allowed? What is the probability that those words will not start with a
vowel? Answer: 263 , 0.8077
5. A company has 9 women and 8 men. What is the probability that a 7 person
committee will have 4 men and 3 women? Answer: 0.3023
6. If the letters in the word POKER are rearranged, what is the probability that the
word will begin with a K and ends with an O? Answer: 0.05
4
Independent Probabilities:
Example 1. A card is chosen at random from a deck of 52 cards. It is then replaced, the
deck reshuffled and a second card is chosen. What is the probability of getting a jack and
an eight?
Solution. The event is independent. The probability of drawing first card a jack is 4/52
and second card an eight is 4/52. Also drawing a first card an eight is 4/52 and second
card a jack is 4/52. The probability of drawing a jack and an eight is
4 / 52 4 / 52 4 / 52 4 / 52 2 / 169
Exercise: A card is chosen at random from a deck of 52 cards. It is then replaced, the
deck reshuffled and a second card is chosen.
a) What is the probability of getting a jack and then an eight? Ans: 1/169
b) What is the probability of getting a diamond and then a heart? Ans: 1/16
Example 2. A family has two children. Using b to stand for boy and g for girl in ordered
pairs, give each of the following.
a) the sample space b) the event E that the family has exactly one daughter.
c) the event F the family has at least one daughter
d) the event G that the family has two daughters
e) p(E) f) p(F) g) p(G)
Example 3. A group of three people is selected at random. 1)What is the probability that
all three people have different birthdays. 2) What is the probability that at least two of
them have the same birthday?
Suppose we label the events in the following manner: W is the event that a response is
from a woman, M is the event that a response is from a man, Y is the event that a
response is yes, and N is the event that a response is no, then the event that a woman
responded yes would be written as Y | W and p(Y | W) = 256/320 = 0.8.
Use the given table to answer following questions.
Independent Events
Independent Events: Two events A and B are called independent if and only if
P( A B) P( A) P( B) , otherwise A and B are dependent.
Example 1. In two tosses of a single fair coin show that the events “A head on the first
toss” and “A head on the second toss” are independent.
Solution: The sample space S S {HH , HT , TH , TT } , the event with a head on the first
toss A {HH , HT } and an event with a head on the second toss B {HH , TH }.
Now show that P( A B) P( A) P( B) .
6
Bayes’ Formula: Let A, B, C are mutually exclusive events whose union is the sample
space S. Let E be the arbitrary event in S such that P(E) 0 , then
P( A E ) P( B E ) P(C E )
P( A | E ) , P( B | E ) , P(C | E )
P( E ) P( E ) P( E )
where P( A E) P( E | A) P( A) and so on.
0.05 D
A
0.95 D’
0.35
0.03 D
Start 0.25 B
0.97 D’
0.40
0.07 D
C
0.93 D’
We now answer all questions from the tree diagram.
P( A D) 0.35(0.05) 1
a) P ( A | D)
P ( D) 0.35(0.05) 0.25(0.03) 0.40(0.07) 3
P ( B D) 0.25(0.03)
You now try to find b) P( B | D) ?
P( D) 0.35(0.05) 0.25(0.03) 0.40(0.07)
P(C D) 0.40(0.07)
c) P(C | D) ?
P ( D) 0.35(0.05) 0.25(0.03) 0.40(0.07)
1. The Belgian 20-frank coin (B20), the Italian 500-lire coin (I500), and the Hong
Kong 5-dollar (HK5) are approximately the same size. Coin purse one (C1)
contains six of each of these coins. Coin purse two (C2) contains nine B20s, six
I500s, and three HK5s. A fair four-sided die is rolled. If the outcome is {1}, a
coin is selected randomly from C1. If the outcomes belong to {2, 3, 4}, a coin is
selected randomly from C2. Find
a) P(I 500) , the probability of selecting an Italian coin
b) P(C1 | I 500) , the conditional probability that the coin selected from C1,
given that it was an Italian coin.
Solution: We have P(C1) 1/ 4 and P(C 2) 3 / 4 . We know that (you may draw a
tree diagram) P(C1 | I 500) 6 / 18 1/ 3 , P(C1 | B20) 6 / 18 1/ 3 and
P(C1 | HK 5) 6 / 18 1/ 3 , and you can find for C2 in the same way.
a)
P(I 500) P(I 500 | C1)P(C1) P(I 500 | C2)P(C2) 1/ 3 *1/ 4 1/ 3 * 3 / 4 4 / 12 1/ 3
2. The Belgian 20-frank coin (B20), the Italian 500-lire coin (I500), and the Hong
Kong 5-dollar (HK5) are approximately the same size. Coin purse one (C1)
contains six of each of these coins. Coin purse two (C2) contains nine B20s, six
I500s, and three HK5s. A fair four-sided die is rolled. If the outcome is {1}, a
coin is selected randomly from C1. If the outcomes belong to {2, 3, 4}, a coin is
selected randomly from C2. Find
4. An absence minded nurse is to give Mr. Brown a pill each day. The probability
that the nurse forgets to administer the pill is 2/3. If he receives the pill, the
probability that Mr. Brown will die is 1/3. If he does not get the pill, the
probability that he will die is ¾. Mr. Brown died. What is the probability that the
nurse forgot to give Mr. Brown the pill? (Answer: 9/11)
Solution hints: A = the nurse forgets to give pill, B = do not forget, E = Mr.
Brown dies. Now P(A) = 2/3, P(E|A) = 1/3, P(E) = P(A)P(E|A)+P(B)P(E|B), find
P(A|E).
8
6. A box of candy hearts contains 52 hearts of which 19 are white, 10 are tan, 7 are
pink, 3 are purple, 5 are yellow, 2 are orange, and 7 are green. If you select 9
pieces candy randomly from the box, without replacement, give the probability
that a) three of the hearts are white b) Three are white, two are tan, one is pink,
one is yellow, and two are green. [a) 29.17% b) 0.87%]
7. Suppose that P(A) = 0.7 and P(B) = 0.5 and P[ ( A B) ] = 0.1. Find a) p( A B)
b) p( A | B) c) p( B | A)
If a random variable is discrete, then the set of all values that it can assume with non-zero
probability is finite or countably infinite, because the sum of uncountably many positive
real numbers (which is the least upper bound of the set of all finite partial sums) always
diverges to infinity.
Given a random experiment with an outcome space S, a function X that assigns to each
element s in S one and only one real number X(s) = x is called a random variable, like a
9
1. f ( x) 0, x S;
2. f ( x) 1;
x S
3. P( X A) f ( x), A S
x A
Example 1. Suppose that X has a discrete uniform distribution on S {1, 2,3, 4,5,6} and
1
its pmf is f ( x) , x 1, 2,3, 4,5,6 .
6
1
As a general case we may write pmf as f ( x) , x 1, 2,3, 4,, m
m
Example 2. Roll a 4 –sided die twice and let X equal the larger of the two outcomes if
they are different and common value if they are the same. The outcome space for this
experiment is S0 {(d1 , d 2 ); d1 1, 2,3, 4; d 2 1, 2,3, 4} , where we assume that each of
1
these 16 points has probability . Then
16
1 3 5
P( X 1) P[(1,1)] , P( X 2) P[{(1, 2),(2, 2),(2,1)] , P( X 3)] and
16 16 16
7
P( X 4) . Looking at the pattern one can easily find the pmf
16
2x 1
f ( x) , x 1, 2,3, 4
16
Exercise
x
1. Let the pmf of X be defined by f ( x) ,x 2,3, 4 , a) draw a bar graph and a
9
b) probability histogram
2. For each of the following, determine the constant c, so that f ( x) satisfies the
conditions of being a pmf for a random variable X,
x
a) f ( x) , x 1, 2,3, 4
c
b) f ( x) cx, x 1, 2,3, 410
x
1
c) f ( x) c , x 1, 2,3, 4
4
d) f ( x) c(1 x) 2 , x 0,1, 2,3
x
e) f ( x) , x 1, 2,3, 4,, n
c
10
Mathematical expectation
In probability theory and statistics, the expected value (or expectation value, or
mathematical expectation, or mean, or first moment) of a random variable is the
integral of the random variable with respect to its probability measure. For discrete
random variables this is equivalent to the probability-weighted sum of the possible
values.
The term "expected value" can be misleading. It must not be confused with the "most
probable value." The expected value is in general not a typical value that the random
variable can take on. It is often helpful to interpret the expected value of a random
variable as the long-run average value of the variable over many independent repetitions
of an experiment.
Solution: For the environment the expected value is E( x) 15(.39) 30(1 .39) 12.45
On the other hand for jobs the expected value is E( x) 25(.39) 10(1 .39) 3.65 . So
the preference will go for a) Environment (because of higher expected value).
Exercise
Example 2. In the instant lottery with 20% winning tickets, if X is equal to the number of
winning tickets among n = 8 that are purchased, the probability of purchasing at best 6
winning tickets is
8 8
P( X 6) 1 f (7) f (8) 1 (0.20)7 (1 0.2)1 (0.2)8 0.99991552
7 8
One may use calculator as follows (TI)
2nd DISTR A (binomcdf) (8, 0.20, 6) will display 0.99991552
12
Example 3. In the instant lottery with 20% winning tickets, if X is equal to the number of
winning tickets among n = 8 that are purchased. Find the probability of purchasing at
least 6 winning tickets.
Hint. Find P( X 6) P( X 6) P( X 7) P( X 8) or
P( X 6) 1 P( X 5) 1 binomcdf (8,.2,5)
Example 4. A quiz consists of 24 multiple choice questions. Each question has 5 possible
answers, only one of which is correct. If you answer the questions completely based on
guessing, what is the probability that
4
Solution: The probability that you will answer one question wrong is 0.8 .
5
a) The probability of answering exactly 4 wrong is a binomial probability of
24
B(24, 0.8, 4), which is P( X 4) B(24, 0.8, 4) (0.8) 4 (0.2) 20 4.56 10 11
,
4
which is almost zero.
If you use TI calculator use binompdf (24, 0.8, 4). Check your calculator using the
following code:
b) The probability that you will answer exactly 4 correct is B(24, 0.2, 4) = 0.196
c) At least 20 correct P( X 20)
= 20 correct + 21 correct + 22 correct + 23 correct + 24 correct = 4.79 10 11 .
12
d) At most three wrong: P( X 3) binomcdf (24, 0.8,3) 2.25 10
e) At most three correct: P( X 3) binomcdf (24,0.2,3) 0.264
5
Solution: P( X 9) 1 binomcdf (10, 0.25,8) 2.95639 10
Example 8. A student claims that he has extrasensory perception (ESP). A coin is flipped
25 times, and a student is asked to predict the outcome in advance. He gets 20 out of 25
correct. What was the probability that he would have done at least this well if he had no
EPS?
Exercise 1. Toss a fair coin 12 times. How many possible outcomes do you have? What
is the probability of getting a) exactly 7 heads, b) at least 7 heads, c) at most 7 heads?
Exercise 2. A student claims that he has extrasensory perception (ESP). A coin is flipped
30 times, and a student is asked to predict the outcome in advance. He gets 25 out of 30
correct. What was the probability that he would have done at least this well if he had no
EPS?
Exercise 3. A quiz consists of 20 multiple choice questions, each with 5 possible choices.
For someone who makes random guesses for all of the questions, find the probability of
passing if the minimum passing grade is 80%.
Example 4. A computer manufacturer tests a random sample of 30 computers. The
7
probability that a computer is defective is 7 %. What is the probability that:
8
a) Exactly 7 computers are defective?
b) At least two computers are defective?
c) At most two computers are defective?
Exercise 5. In the instant lottery with 10% winning tickets, if X is equal to the number of
winning tickets among 20 tickets that are purchased, find the probability of purchasing
a) at best 7 winning tickets,
b) at least 7 winning tickets,
c) no more than 6 winning tickets,
d) no less than 6 winning tickets
Exercise 6. The rates of on-time flights for commercial jets are continuously tracked by
the U.S Department of transportation. Recently, Southwest Air had the best rate with
80% of its flights arriving on time. A test is conducted by randomly selected 16
Southwest flights and observing whether they arrive on time. Find
a) the probability that exactly 4 flights arrive on time
b) The probability that at least 4 flights arrive on time
c) At best 4 flights arrive on time
14
mx
e
Example 2. Show that f ( x) , 0 x is a probability density function.
m
x/m
e
Solution (Hint): Show that f ( x) 0 and dx 1
0
m
Example 3. Let Y be a continuous random variable with pdf g ( y) 2 y, 0 y 1 and the
distribution function is defined by
0 y 0
y
G( y) 2t dt y2 0 y 1
0
1 1 y
1
2
Find mean E (Y ) yg ( y )dy (check the integral) and
0
3
1
2 2 2 1
Variance Var (Y ) E (Y ) y 2 g ( y )dy 2
(check the integral). Find
0
18
also the standard deviation .
0 1 2
F(1) = 1/2 and F(2) = 1. We also notice that distribution function is zero, i.e., F (0) 0
when x < 0.
The distribution function over the interval 0 x 1 is
x2
F ( x) (1 x 1)dx (1 (1 x) dx x dx c, c 0,as F (0) 0
2
The distribution function over the interval 1 x 2 is
x2 1
F ( x) (1 x 1)dx (1 x 1) dx (2 x)dx 2x c, c 1, as F (1)
2 2
The distribution function over the interval 2 x is
F ( x) f ( x) dx 0 dx c 1, as F (2) 1
0 x 0
2
x
, 0 x 1
F ( x) 2
x2
2x 1, 1 x 2
2
1 x 2
You can calculate mean, standard deviation and variance. Look at example 3.
Exercise:
1. For each of the following functions, i) find the constant c so that f (x) is a pdf of
the random variable X, ii) find the distribution function F(x) P( X x) and iii)
sketch f (x) and F(x), iv) find also , 2 , .
x3
a) f ( x) ,0 x c
4
3x 2
b) f ( x) , c x c
16
c) f ( x) 4 x c , 0 x 1
d) f ( x) c x , 0 x 4
2. Sketch the graph of the following pdf f (x), then find and sketch the probability
distribution function F(x) on the real line. Review example 4.
3x 2 1
a) f ( x) , 1 x 1 b) f ( x) , 1 x 1
2 2
1 x, 1 x 0
c) f ( x)
1 x, 0 x 1
2
A normal distribution of a random variable X with mean and variance is a statistic
distribution with probability density function (pdf)
(1)
17
on the domain . While statisticians and mathematicians uniformly use the term
"normal distribution" for this distribution, physicists sometimes call it a Gaussian
distribution and, because of its curved flaring shape, social scientists refer to it as the
"bell curve."
Example 1. Find the mean and standard deviation of the normal distribution whose pdf is
1 ( x 7)2
given as f ( x) exp
128 128
Solution: Compare with the standard formula of pdf for the normal distribution and find
that 8, 7.
Example 2. Write the pdf of a normal distribution with mean 3 and variance 16.
Example 3. Find the area under the normal curve with mean zero and standard deviation
one for the standard variate z 1.24 .
0 1.24
Using calculator: P( z 1.24) 0.8925 89.25%
19
Example 4. Find the area under the normal curve with mean zero and standard deviation
one for the standard variate z 1.24 .
0 1.24
Using calculator: P( z 1.24) 0.1075 10.75%
The calculator code: 2nd DISTR 2 normalcdf ( 1.24, 5) =0.1074875
Example 5. Find the area under the normal curve with mean zero and standard deviation
one for 0.12 z 1.24 .
-0.12 0 1.24
Using calculator: P( 0.12 z 1.24) 0.4402707 44.03%
The calculator code:
Example 6. Suppose x is a normally distributed random variable with mean 10.2 and
standard deviation 1.5. Find each of the following probabilities.
a) P(6.1 x 13.3) .
b) P(9.4 x 13)
c) P(15.5 x 13.1)
d) P( x 11.6)
e) P( x 14.4)
Draw normal curve and show the region bounded by the normal curve and the x values.
20
11.6 10.2
b) P( x 11.6) normalcdf ,5 17.53%
1.5
Try for e).
6.1 10.2 13.3
Exercise Set
1. The physical fitness of an athlete is often measured by how much oxygen the
athlete takes in (which is recorded in millimeters per kilogram, ml/kg). The
maximum oxygen uptake for elite athletes has been found to be 80 with a standard
deviation 9.2. Assume that distribution is approximately normal.
a) What is the probability that an elite athlete has a maximum oxygen uptake of
at least 75 ml/kg? Answer: 70.66%
b) What is the probability that an elite athlete has a maximum oxygen uptake of
65 ml/kg or lower? Answer: 5.15%
c) Consider someone with a maximum oxygen uptake of 26 ml/kg. Is it likely
that this person is an elite athlete? Answer: No
2. The combined score of SAT – 1 test are normally distributed with mean of 998
and a standard deviation of 202. If a college includes a minimum score of 800
among its requirements, what percentage of students do not satisfy that
requirement? Answer: 16.35%
3. IQ score are normally distributed with mean of 100 and a standard deviation 15.
Mensa is an international society that has one – and only one qualification for
membership, a score in the top 2 on an IQ test.
4. Using diaries for many weeks, a study on the lifestyle of visually impaired
students was conducted. The students kept track of many lifestyle variables
including how many hours of sleep obtained on a typical day. Researchers found
that visually impaired students averaged 9.6 hours of sleep, with a standard
deviation of 2.56 hours. Assume that the number of hours of sleep for these
visually impaired students is normally distributed.
a) What is the probability that a visually impaired student gets less than 6.1
hours of sleep? Answer: 8.58%
b) What is the probability that a visually impaired student gets between 6.3 and
10.35 hours of sleep? Answer: 51.65%
21
c) Forty percent of students get less than how many hours of sleep on a typical
day? Answer: 8.95 hours
5. Healthy people have body temperatures that are normally distributed with a mean
of 98.20 degree Fahrenheit and a standard deviation of 0.62 degree Fahrenheit.
a) If a healthy person is randomly selected, what is the probability that he or she
has a body temperature above 98.9 degree Fahrenheit? Answer: 12.94%
b) A hospital wants to select a minimum temperature for requiring further
medical tests. What should that temperature be, if we want only 1% of healthy
people to exceed it? Answer: hint: (x-98.2)/.62 = invnorm(0.99), 99.64
Measures of Dispersion: