CH04 - Probability - Random 2
CH04 - Probability - Random 2
CHAPTER 4
(Part 1)
Overview of Probability
1
Probability
(Recall from subject SCSI1013 – Discrete Maths: Chapter 3 (Part 4 – probability theory)
Rolling a die
Tossing a coin Select cards from deck
2
Chance Experiments
Suppose:
• two six-sided die is rolled and they both land on
sixes.
• a coin is flipped and it lands on heads.
These would be examples of chance experiments.
S = {1, 2, 3, 4, 5, 6}
This would be an example of a sample space (S).
E = {2, 4, 6}
What would the event be that is the die NOT landing on an even
number?
EC = {1, 3, 5}
The sum of the
probabilities of
complementary
events equals ONE.
8
Example - Union
Suppose a six-sided die is rolled. The event that the die would land
on an even number would be
E = {2, 4, 6}
The event that the die would land on a prime number would be
P = {2, 3, 5}
What would be the event E or P happening?
E or P = {2, 3, 4, 5, 6}
9
Example - Intersection
Suppose a six-sided die is rolled. The event that the die
would land on an even number would be
E = {2, 4, 6}
The event that the die would land on a prime number
would be
P = {2, 3, 5}
4 3
2
1
6 5
Why is the number 1
outside the circles?
11
Approach to Probability
When the outcomes in a sample space are equally
likely, the probability of an event E, denoted by P(E), is
the ratio of the number of outcomes favorable to E to
the total number of outcomes in the sample space.
12
Probability - Rules
• Fundamental Properties of Probability
13
Property 3: Addition
If two events E and F are disjoint,
P(E or F) = P(E) + P(F)
Property 4: Complement
For any event E, P(E) + P(not E) = 1
14
Exercise #1
The student council for a school of science and math has one representative
from each of the five academic departments: biology (B), chemistry (C),
mathematics (M), physics (P), and statistics (S). Two of these students are to be
randomly selected for inclusion on a university-wide student committee (by
placing five slips of paper in a bowl, mixing and drawing out two of them).
15
Exercise #2
A large department store offers online ordering. When a purchase is made online, the
customer can select one of four different delivery options: expedited overnight delivery,
expedited second-business-day delivery, standard delivery, or delivery to the nearest
store for customer pick-up. Consider the chance experiment that consists of observing
the selected delivery option for a randomly selected online purchase.
a)What are the events that make-up the sample space for this experiment?
b)Suppose that the probability of an overnight delivery selection is 0.1, the probability of
a second-day delivery selection is 0.3, and the probability of a standard-delivery
selection is 0.4. Find the following probabilities:
i) The probability that a randomly selected online purchase selects delivery to
the nearest store for customer pick-up.
ii) The probability that the customer selects a form of expedited delivery.
iii) The probability that either standard delivery or delivery to the nearest store is
selected.
17
CHAPTER 4
(Part 2)
19
Random Variables
• A numerical variable whose value depends on the
outcome of a chance experiment.
• It associates a numerical value with each outcome of
a chance experiment.
• Two types of random variables:
1) Discrete
2) Continuous
20
Discrete Random Variables
• Discrete – its set of possible values is a collection of
isolated points along a number line.
This is typically a
“count” of something
This is typically a
“measure” of something
21
Example
Suppose that a counsellor plans to select a random sample of 50 seniors at
a large high school and to ask each student in the sample whether he or
she plans to attend college after graduation. The process of sampling is a
chance experiment. The sample space for this experiment consists of all
different possible random samples of size 50 that might result (there is a very
large number of these) and for simple random sampling, each of these
outcomes is equally likely.
22
Example
A point is randomly selected on the surface of a lake
that has a maximum depth of 100 feet. Let y be the
depth of the lake at the random chosen point.
23
Example
Consider an experiment in which the type of book, print (P) and
digital (D), chosen by each of three successive customers making a
purchase from on an online bookstore is recorded. Define a
random variable x by
26
It give the possibility associated with each possible x
value.
Each probability is the long-run relative frequency of
occurrence of the corresponding x value when the
chance experiment is performed a very large number
of times.
Common way to display a probability distribution for
discrete random variable: table, histogram, formula.
27
Example
In a Wolf City, regulations prohibit no more than five
dogs or cats per household.
Let, x = the number of dogs and cats in a randomly
selected household in Wolf City.
Then, the Department of Animal Control has collected
data over the course of several years.
They want to estimate the long-run probabilities for the
values of x.
28
• The results as follows:
x 0 1 2 3 4 5
p(x) 0.26 0.31 0.21 0.13 0.06 0.03
Probability
Number of Pets
29
Properties of Discrete Probability
Distributions
2)
30
Example
Refer to previous example (Dogs and Cats) .
x 0 1 2 3 4 5
p(x) 0.26 0.31 0.21 0.13 0.06 0.03
32
x 0 1 2 3 4 5
p(x) 0.26 0.31 0.21 0.13 0.06 0.03
33
34
Definition:
Continuous Variables Probability Distribution
Continuous Random Variable
• A continuous random variables is a random variable
where the data can take infinitely many values.
• A continuous random variable “x” takes all values in
a given interval of numbers.
35
Definition :
Probability Distribution for Continuous
Random Variable
36
Continuous Variables Probability Distribution
Density curve
Density function
Probability
37
Properties of Continuous probability
distributions
38
Example
Suppose x is a continuous random variable defined as the amount of
time (in minutes) taken by a clerk to process a certain type of
application form. Suppose x has a probability distribution with density
function:
.5 4 x 6
f (x )
0 otherwise
The following is the graph of f(x), the density curve:
0.5
Density
4 5 6
Time (in minutes)
39
Example (cont.)
What is the probability that it takes more than 5.5 minutes
to process the application form?
0.5
Density
4 5 6
Time (in minutes)
40
Other Density Curves
Some density curves resemble the one below.
Integral calculus is used to find the area under
the these curves.
We will use tables (with the values already
calculated).
41
The probability that a continuous random variable x
lies between a lower limit a and an upper limit b is
p(a < x < b) = (cumulative area to the left of b) –
(cumulative area to the left of a)
42
• Other continuous
distribution
43
CHAPTER 4
(Part 3)
44
Special Distributions
Discrete Distribution:
• Binomial
• Negative Binomial
• Geometric
Continuous Distribution:
• Normal
45
46
Binomial Distribution
47
Binomial Distribution (cont’d)
Properties of a Bernoulli process:
48
Binomial Distribution (cont’d)
The number X of success in n Bernoulli trials is called a binomial
random variable.
The probability distribution of this discrete random variable is
called the binomial distribution.
Formula:
A Bernoulli trial can result in a success with probability p and a
failure with probability q = 1-p. Then the probability distribution of
the binomial random variable X, the number of successes in n
independent trials, is
𝑛
𝑏 𝑥; 𝑛, 𝑝 = 𝑝 𝑞 , 𝑥 = 0, 1, 2, … , 𝑛
𝑥
The mean and variance of the binomial distribution:
𝜇 = 𝑛𝑝 ; 𝜎 = 𝑛𝑝𝑞
49
Example
Solution:
Assuming that the tests are independent and p = ¾ for
each of the 4 tests, we obtain
3 4 3 1 27
𝑏 2; 4, 4 = =
2 4 4 128
50
Example
A coin is tossed four times. Find the mean and variance
of the number of heads that will be obtained? Given the
distribution as follows.
No of head, x 0 1 2 3 4
Probability 1/16 4/16 6/16 4/16 1/16
Solution:
1 1
𝑛 = 4, 𝑝 = ; 𝑞 =
2 2
.: 𝜇 = 4 = 2;
.: 𝜎 = 4 =1
51
Negative Binomial Distribution
𝑥−1
𝑏∗ 𝑥; 𝑘, 𝑝 = 𝑝 𝑞 , 𝑥 = 𝑘, 𝑘 + 1, 𝑘 + 2, … .
𝑘−1
52
Example
A scientist inoculates mice, one at a time, with a diseases germ
until he finds 2 that have contracted the diseases. If the probability
of contracting the diseases is 1/6, what is the probability that 8
mice are required?
Solution:
8−1
𝑏 ∗ 8; 2,0.1667 = (0.1667) (1 − 0.1667) = 0.0651
2−1
53
Geometric Distribution
Example:
Malik throws a dice until he gets a ‘4’.
What is the probability of him getting the first ‘4’ in the
6th throw? How to calculate the probability?
54
Geometric Distribution (cont’d)
𝑔 𝑥; 𝑝 = (1 − 𝑝) 𝑝; 𝑥 = 1, 2, 3, … .
55
Geometric Distribution (cont’d)
56
Example
A product produced by a machine has a 3% defective
rate. What is the probability that the first defective
occurs in the fifth(5th) item inspected?
Solution:
57
Exercise#1
It is claimed that 15% of the ducks in a particular region have patent
schistosome infection. Suppose that seven ducks are selected at
random. Let x equals the number of ducks that are infected.
58
Exercise #2
In an NBA (National Basketball Association) championship series, the team that
wins four games out of seven is the winner. Suppose that teams A and B face
each other in the championship games and that team A has probability 0.55 of
winning a game over team B.
a) What is the probability that team A will win the series in 6 games?
b) What is the probability that team A will win the series?
c) If teams A and B were facing each other in a regional playoff series, which
is decided by winning three out of five games, what is the probability that
team A would win the series?
61
Exercise #3
63
65
Continous Distribution
66
A
Do these two normal curves have the same mean? YES
Which normal curve has a standard deviation of 3? B
Which normal curve has a standard deviation of 1? A
67
Effect of Varying
Parameters ( & )
f(X)
B
A C
68
Notation
x is N(μ,σ)
The random variable x has a normal distribution
(N) with mean, μ and standard deviation, σ.
Example:
x is N(40,1)
x is N(10,5)
x is N(50,3)
69
Probability Density Function
70
Normal Curve
72
Normal Distribution Probability
Probability is
area under
curve! c
d
P(c x d ) f ( x) dx ?
f(x)
x
c d
73
Infinite Number of Distribution Tables
f(X)
X
That’s an infinite number!
74
Standardize the Normal Distribution
Normal
Distribution
X
One table!
75
Example #1
What is the probability of p(X=6.2), given that the mean is 5 and std.
deviation is 10?.
Normal Distribution
= 10
= 5 6.2 X
76
Example #1 -Solution
= 10 =1
= 5 6.2 X = 0 .12 Z
Note: Shaded area exaggerated.
77
Step 2: Refer to standard Normal Dist. Table to locate the Z value.
= 0 .12 Z
P(Z=0.12) = 0.54776 - 0.5 = 0.04776
78
Example #2: Find P(3.8 X 5)
Normal Distribution
= 10
…………….
3.8 = 5 X
Standardize Normal Distribution
=1
0.04776
Normal Distribution
= 10
2.9 5 7.1 X
80
=1 0.08317+0.08317
=0.16634
0.08317 0.08317
-.21 0 .21 Z
81
Example #4: Find P(X 8)
X 85
Z .30
10
= 10 =1
0.3821
.11791
0.03471
.08317
= 0 .31
? Z
Note:
If Z less than mean, than Z
value has negative sign.
84
Normal Distribution Standardize Normal Distribution
= 10 =1
.1217 .1217
= 5 ? X = 0 .31 Z
X Z 5 .3110 8.1
85
Exercise #4
A lecturer commutes daily from his suburban home to his midtown university.
The average time for a one-way trip is 24 minutes, with a standard deviation
of 3.8 minutes. Assume that the distribution of trip times to be normally
distributed.
86