Chapter 5 Introduction To Probabiity
Chapter 5 Introduction To Probabiity
1
Objectives
At end of this session students are able to:
• Understand the concepts and characteristics of probabilities and probability
distributions
• Understand the different events
• Compute probabilities of events
• Differentiate the difference between marginal, conditional and joint probabilities
of events.
• Differentiate b/n permutation and combination
• Understand the rules of probability
Introduction
People use the term probability many times each day. For example, physician says that
a patient has a 50-50 chance of surviving a certain operation..
• The theory of probability provides the foundation for statistical inference. It helps
us to deal with uncertainty.
Definition:
In general, probability is the chance of an outcome of an experiment. It is the measure
of how likely an outcome is to occur
If an event can occur in N mutually exclusive and equally likely ways, and if m of
these possess a trait, E, the probability of the occurrence of E is read as: P(E) = m/N
Review of set theory
ü Intersection (And)
– a set containing all elements in both A and B
ü Union (Or)
– a set containing all elements in A or B or both
üMutually exclusive or disjoint sets
–sets having no elements in common, having no intersection, whose
intersection is empty set
Sets: A Intersecting with B
S
A
B
Sets: A Union B
S
A
B
Mutually Exclusive or Disjoint Sets have nothing in common
B
A
Definition
v Experiment : Any process of observation or measurement or any process which
generates well defined outcome.
It consists of a number of trials under the same condition.
event E is given by
Number of outcomes in event
P (E)=
Total number of outcomes in sample space
Example:
Blood
Males Females Total
Group
O 20 20 40
A 17 18 35
B 8 7 15
AB 5 5 10
Total 50 50 100
Problem 2
• an outbreak of food poisoning occurs in a group of students who
attended a party
1. Multiplication rule
2. Additive rule
3. Bayes Rule
1) Independence and multiplication rule: suppose events A
and B are independent
P(A and B) = P(A) P(B)
P(B/A)=p(B)
Example
The joint probability of being male and having blood type O
v To know that two events are independent compute the marginal and
conditional probabilities of one of them if they are equal the two
events are independent. If not equal the two events are dependent:
P(O) = 40/100 = 0.40
P(O\M) =20/50 = 0.40
• Then the two events are independent
P(O∩M) = P(O)XP(M) = (40/100)X(50/100)
Rules of probability
Multiplication rule: - in a sequence of n events in which the first event has k
possibilities… the nth event has kn possibilities, then the total possibilities of the
sequence will be k1.k2….kn.
Dependence and the modified multiplication rule -P(A and B) = P(A) P(B\A)
P(A) P(B)
P(A ∩ B)
Example: A fair die is thrown twice. Calculate the probability that the sum of
spots on the face of the die that turn up is divisible by 2 or 3.
Solution:
• S={(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),
(3,1), (3,2), (3,3),(3,4),(3,5),(3,6),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(5,1), (5,2),
(5,3),(5,4), (5,5),(5,6),(6,1),(6,2),(6,3),(6,4),(6,5),(6,6)}
Solution
• This sample space has 6*6 =36 elements let E1 be the event that the sum of
the spots on the die is divisible by 2 and E2 be the event that the sum of the
spots on the die is divisible by three, then
• P (E1 or E2) = P (E1 U E2)
= P (E1) +P (E2) – P (E1 ∩ E2)
= 18/36 + 12/36 -6/36
= 24/36 = 2/3
Fundamental of Counting Principle
Example: You are required to read 5 books from a list of 8. In how many different
ways can you do so if the order doesn’t matter?
Application of Counting Principles
• Example:
In a state lottery, you must correctly select 6 numbers (in any order) out of 44 to win
the grand prize.
a.) How many ways can 6 numbers be chosen from the 44 numbers?
b.) If you purchase one lottery ticket, what is the probability of winning the top prize?
44!
a) 44C6= = 7,059,052 combinations
6!38!
1
p(win)= = 0.00000014
7059052
Exercises
5
5
Objectives
5
6
Probability distributions
• If we measure a random variable many times, we can build up a
was possible to take more and more measurements under the same
random variable.
57
Usage of Probability Distribution
• Distribution (discrete/continuous) function is widely used in simulatio n studies
• A simulation study uses a computer to simulate a real phenomenon or process as
closely as possible.
• The use of simulation studies can often eliminate the need of costly experiments and is
also often used to study problems where actual experimentation is impossible.
• Examples 4.4:
1) A study involving testing the effectiveness of a new drug, the number of cured patients
among all the patients who uses such a drug approximately follows a binomial
distribution.
2) Operation of ticketing system in a busy public establishment (e.g., airport), the arrival of
passengers can be simulated using Poisson distribution.
Families of probability Distributions
1) Families of Discrete Probability 2) Families Continuous Distributions
Distributions o Continuous uniform probability
o Discrete uniform probability distribution
distribution
o Normal distribution
o Geometric distribution
o Standard normal distribution
o Binomial probability distribution
o Chi-squared distribution
o Poisson probability distribution
o Gamma distribution
o Multinomial distribution
o Exponential distribution
o Hyper-geometric distribution
o Lognormal distribution
o Weibull distribution
59
Families of discrete prob. Distr…
approximately)satisfied.
60
Random Variables
A random variable x represents a numerical value associated with
each outcome of a probability distribution.
A random variable is discrete if it has a finite or countable number
of possible outcomes that can be listed.
0 2 4 6 8 10
x
0 2 4 6 8 10
Discrete Probability Distributions
A discrete probability distribution lists each possible value the
random variable can assume, together with its probability. A
probability distribution must satisfy the following conditions.
In Symbols
In Words
63
Discrete example:
roll of a die
p(x)
1/6
x
1 2 3 4 5 6
P (x) 1
all x
64
Probability mass
function (PMF)
x p(x)
1 p(x=1)=1/6
2 p(x=2)=1/6
3 p(x=3)=1/6
4 p(x=4)=1/6
5 p(x=5)=1/6
6 p(x=6)=1/6
1.0 65
Cumulative Distribution
Function (CDF)
1.0 P(x)
5/6
2/3
1/2
1/3
1/6
1 2 3 4 5 6 x
66
Cumulative distribution
function
x P(x≤A)
1 P(x≤1)=1/6
2 P(x≤2)=2/6
3 P(x≤3)=3/6
4 P(x≤4)=4/6
5 P(x≤5)=5/6
6 P(x≤6)=6/6
67
Examples
1. What‟s the probability that you roll a 3 or less?
P(x≤3)=1/2
68
Practice Problem
Which of the following are probability functions?
69
Answer
(a)
a. f(x)=.25 for x=9,10,11,12
12 .25
1.0 70
Answer
(b)
b. f(x)= (3-x)/2 for x=1,2,3,4
x f(x)
Though this sums to 1,
1 (3-1)/2=1.0 you can‟t have a
negative probability;
2 (3-2)/2=.5 therefore, it‟s not a
probability function.
3 (3-3)/2=0
4 (3-4)/2=-.5
71
Answer
(c)
c. f(x)= (x2+x+1)/25 for x=0,1,2,3
x f(x)
0 1/25
1 3/25 Doesn‟t sum to 1. Thus,
it‟s not a probability
2 7/25
function.
3 13/25
24/25 72
Practice Problem:
• The number of ships to arrive at a harbor on any given day is a random
variable represented by x. The probability distribution for x is:
x 10 11 12 13 14
P(x) .4 .2 .2 .1 .1
73
Practice Problem:
You are lecturing to a group of 1000 students. You ask them to each randomly pick an
integer between 1 and 10. Assuming, their picks are truly random:
• What’s your best guess for how many students picked
the number 9?
Since p(x=9) = 1/10, we’d expect about 1/10th of the 1000 students to pick 9. 100
students.
• What percentage of the students would you expect picked a number less than or
equal to 6?
Since p(x≤ 6) = 1/10 + 1/10 + 1/10 + 1/10 + 1/10
+ 1/10 = 0.6= 60%
74
Constructing a Discrete Probability Distribution
Guidelines
Let x be a discrete random variable with possible outcomes x1, x2,
… , xn.
1. Make a frequency distribution for the possible
outcomes.
2. Find the sum of the frequencies.
3. Find the probability of each possible outcome by
dividing its frequency by the sum of the frequencies.
4. Check that each probability is between 0 and 1 and
that the sum is 1.
Constructing a Discrete Probability Distribution
Example: The spinner below is divided into two sections. The
probability of landing on the 1 is 0.25. The probability of landing on
the 2 is 0.75. Let x be the number the spinner lands on. Construct a
probability distribution for the random variable x.
1 x P (x)
1 0.25 Each probability is
2
2 0.75 between 0 and 1.
Constructing a Discrete Probability Distribution
Example: The spinner below is spun two times. The probability of
landing on the 1 is 0.25. The probability of landing on the 2 is 0.75.
Let x be the sum of the two spins. Construct a probability distribution
for the random variable x.
“or”
P (sum of 3) = 0.75 0.25 = 0.1875
Sum of
P (x)
spins, x Spin a 2 on the first“and”
Spin a 1 on the second
spin.
2 0.0625 spin.
3 0.375
4 0.1875 + 0.1875
Constructing a Discrete Probability Distribution
Example continued:
1
P (sum of 4) = 0.75 0.75 = 0.5625
Spin a 2 on the first“and” Spin a 2 on the second
2
spin. spin.
Sum of
P (x) Each probability is between 0 and 1, and
spins, x
2 0.0625 the sum of the probabilities is 1.
3 0.375
4 0.5625
Graphing a Discrete Probability Distribution
Example:
Graph the following probability distribution using a histogram.
Sum of P(x)
Sum of Two Spins
P (x)
spins, x 0.6
2 0.0625 0.5
3 0.375
0.4
4 0.5625
Probability
0.3
0.2
0.1
0 x
2 3 4
Sum
Mean
The mean of a discrete random variable is given by
μ = ΣxP(x).
Each value of x is multiplied by its corresponding probability and the
products are added.
Example: Find the mean of the probability distribution for the sum
of the two spins.
x P (x) xP (x)
2 0.0625 2(0.0625) = 0.125 μ = ΣxP(x) = 3.5
ΣP(x)(x – 2)2
x P (x) x– μ (x – μ)2 P ( x )(x – μ ) 2
0.376
2 0.0625 –1.5 2.25 0.141
3 0.375 –0.5 0.25 0.094
The variance for the
4 0.5625 0.5 0.25 0.141 two spins is
approximately 0.376
82
Standard Deviation
The standard deviation of a discrete random variable is
given by
σ= σ 2.
Example: Find the standard deviation of the probability distribution
for the sum of the two spins. The variance is 0.376.
σ σ2
x P (x) x– μ (x – μ) 2 P ( x )(x – μ)2
0.376 0.613
2 0.0625 –1.5 2.25 0.141
Most of the sums
3 0.375 –0.5 0.25 0.094
differ from the
4 0.5625 0.5 0.25 0.141 mean by no more
than 0.6 points. 83
Expected Value
The expected value of a discrete random variable is equal to the
mean of the random variable.
Expected Value = E(x) = μ = ΣxP(x).
Example: At a raffle, 500 tickets are sold for $1 each for two prizes
of $100 and $50. What is the expected value of your gain?
• You roll a die 10 times and note the number the die lands on.
q = 1 – p = 0.50
n=3
x=1 89
Binomial Probability Distribution
Example: A hospital involves 100 patients admitted in Medical ward, 50 in
Medical ward A and 50 in Medical ward B. Three patients are selected, with
replacement. Find the probability that you select exactly one patient from
Medical ward B.
x P (x)
0 0.125 The binomial
1 0.375 probability formula is
2 0.375 used to find each
probability.
3 0.125
90
Graphing Binomial Probabilities
Example: The following probability distribution represents the
probability of selecting 0, 1, 2, or 3 patients admitted to medical
ward B when 3 patients are already selected. Graph the
distribution using a histogram.
P (x)
Selecting patients admitted to Medical ward B
0.5
x P (x) 0.4
Probability
0 0.125 0.3
1 0.375 0.2
2 0.375 0.1
3 0.125 0 x
0 1 2 3
Number of patients admitted to Medical ward B
91
Mean, Variance and Standard Deviation
Mean: μ np
Variance: σ 2 npq
Standard deviation: σ npq
Example: One out of 5 students at a local college say that they skip
breakfast in the morning. Find the mean, variance and standard
deviation if 10 students are randomly selected.
n 10 μ np σ 2 npq σ npq
p 1 0.2 10(0.2) (10)(0.2)(0.8) 1.6
5
q 0.8 2 1.6 1.3
92
Binomial Distribution
Example 4.7: Verify with real-life experiment
Suppose, 10 pairs of random numbers are generated by a computer (Monte-Carlo
method)
15 38 68 39 49 54 19 79 38 14
41
Poisson Distributions
• Poisson distributions are often used to describe the number of
occurrences of a „rare‟ event. For example
and � 2 = �1 ∑��=1(��−�)2
97
Descriptive measures
1. Binomial distribution
The binomial probability distribution is characterized with � (the
probability of success) and � (is the number of trials). Then
� = �. �
� 2 = �� 1 − �
� = �2
2. Poisson Distribution
The Poisson distribution is characterized with �� where
� = �ℎ� ���� �� �������� and � = ���� ��������.
� = ��
� 2 = �t
98
Exercise
s
1. Suppose it is known that in a certain population 10 percent of the population is
color blind. If a random sample of 25 people is drawn from this population, find
the probability that
11/15/2019 101
Objective
At the end this session, students will able to:
11/15/2019
10
2
Continuous probability distribution
11/15/2019
10
4
Continuous
case
The probability function that accompanies a
continuous random variable is a continuous
mathematical function that integrates to 1.
11/15/2019
10
6
Continuous case: probability density function
(pdf)
p(x)=e-x
11/15/2019
10
7
For example, the probability of x falling within 1 to 2:
p(x)=e-x
x
1 2
2
2
P(1 x 2) e x e x e 2 e 1 .135 .368 .23
1
1
11/15/2019
10
8
Cumulative distribution function
As in the discrete case, we can specify the “cumulative
distribution function” (CDF):
The CDF here is P(x≤A)
A
A
ex ex
0
eA e0 eA 11eA
0
11/15/2019
10
9
Exampl
e
p(x)
2 x
P ( x 2) 1 - e 2 1 - . 1 3 5 . 8 6 5
11/15/2019
11
0
Example 2: Uniform distribution
The uniform distribution: all values are equally likely
The uniform distribution:
f(x)= 1 , for 1 x 0 p(x)
1 x
1 x 0
1 0 1
11/15/2019 0
11
1
Example: Uniform distribution
p(x)
¼ ½ x
1
P(½ x ¼ )= ¼
11/15/2019
11
2
Practice
Problem
Suppose that survival drops off rapidly in the year following
diagnosis of a certain type of advanced cancer. Suppose that the
length of survival (or time-to-death) is a random variable that
approximately follows an exponential distribution with parameter 2
(makes it a steeper drop off):
[note: 2e 2x e 2x
0
0 1 1]
0
1 (1 e2(1) ) .135
11/15/2019
11
4
Continuous Probability
Distributions
• When the random variable of interest can take any value in an
interval, it is called continuous random variable.
– Every continuous random variable has an infinite,
uncountable number of possible values (i.e., any value in an
interval)
• The depth or density of the probability, which varies with x, may
be described by a mathematical formula f (x ), called the
probability distribution or probability density function for the
random variable x.
11/15/2019
11
5
Properties of Probability Density
Function
The function �(�) is a probability density function for the continuous random
variable �, defined over the set of real numbers �, if
1. � � ≥ 0, for all � ∈ �
�
2. ∫− � � �� =
1 �
�
3. � � ≤ � ≤ � = ∫� �(�) ��
f(x)
�
4. � = ∫− ��(�) ��
�
2 � 2� a b
5. � =∫ �−� � ��
−�
X=x
11/15/2019
11
6
Continuous Uniform Distribution
• One of the simplest continuous distribution in all of statistics is the continuous uniform
distribution.
The density function of the continuous uniform random variable � on the interval
, �, �- is:
1
�≤�≤�
� �: �, � = { � − �
0 ��ℎ������
11/15/2019
11
7
Continuous Uniform Distribution
f(x)
c
A B
X=x
Note:
−∞ 1
a) ∫∞ � � �� = �−� × (� − �) = 1
�−�
b) �(� < � < �)= �−� where both � and � are in the interval (A,B)
c) � = �+�
2
(�−�) 2
d) � 2 =
12
11/15/2019
11
8
Normal Distribution
• The most often used continuous probability distribution is the
normal distribution; it is also known as Gaussian distribution.
• Its graph called the normal curve is the bell-shaped curve.
• Such a curve approximately describes many phenomenon occur
in nature, industry and research.
– Physical measurement in areas such as meteorological
experiments, rainfall studies and measurement of
manufacturing parts are often more than adequately
explained with normal distribution.
• A continuous random variable X having the bell-shaped
distribution is called a normal random variable.
11/15/2019
11
9
Normal Distribution
The mathematical equation for the probability distribution of the
normal variable depends upon the two parameters � and �, its
mean and standard deviation.
f(x)
�
�
x
11/15/2019
where � = 3.14159 … and � = 2.71828 … . ., the Naperian constant
12
0
Normal Distribution
σ1 = σ2
σ1
σ2
µ1 = µ2
µ1 µ2 Normal curves with µ 1 = µ 2 and σ 1 < σ 2
σ1
σ2
µ1 µ2
11/15/2019 21
Normal curves with µ 1 <µ 2 and σ 1 <σ 2
Properties of Normal
o Distribution
The curve is symmetric about a vertical axis through the mean �.
o The random variable � can take any value from −∞ �� ∞.
o The most frequently used descriptive parameter s define the curve itself.
o The mode, which is the point on the horizontal axis where the curve is a
maximum occurs at � = �.
o The total area under the curve and above the horizontal axis is equal to 1.
2 1
∞ 1 ∞ − 2 (� −
∫−∞ � � �� = ∫−∞ � � 2�
)
�� = 1
� 2�
∞ 1 ∞ 1 2
– � =∫ �. � � �� = ∫ �. � −2�2 (�−�) ��
−∞ � 2� −∞
2 1 ∞ 2 − 1 , (�−�) / 2 -
– � = � 2� ∫−∞(� − �) . � 2 � ��
1 � 2 − 1 2 (�−�) 2
– � �1 < � < �2 = � 2� ∫�1 � 2� ��
denotes the probability of x in the interval (�1, �2 ).
� x1 x2
11/15/2019 122
Standard Normal Distribution
• The normal distribution has computational complexity to calculate
� �1 < � < �2 for any two (�1, �2) and given � and �
• To avoid this difficulty, the concept of �-transformation is
followed.
� = �−� [Z-transformation]
�
= �(�: 0, �)
11/15/2019 123
Standard Normal Distribution
The Standard Normal Distribution is a normal
probability distribution that has a mean of 0 and
a standard deviation of 1.
• m = 0, s = 1
• In this way the formula giving the heights of the normal
curve is simplified greatly.
11/15/2019 124
Standard Normal Distribution
0.09
0.4
0.08
σ σ=1
0.07
0.3
0.06
0.05
0.2
0.04
0.03
0.02 0.1
0.01
0.00 0.0
-5 0 5 10 15 20 25 -3 -2 -1 0 1 2 3
x=µ µ=0
f(x: µ, σ) f(z: 0, 1)
11/15/2019 125
Standard Normal
Probabilities
• Note: The table only gives the areas under the curve to
the right between 0 and z. To find other intervals
requires some tricks.
11/15/2019 128
Table
5.1
11/15/2019 129
Find probability z is between -1.33 and
+1.33.
11/15/2019 130
Want probability z is between -1.33 and +1.33.
Solution: Locate 1.33 in the row labeled 1.3 and the column labeled
.03. By symmetry, P (-1.333<Z<1.33) = 2(0.4082) = .8164
11/15/2019 131
Find probability z exceeds 1.96 in absolute
value.
11/15/2019 132
Areas under the standard normal curve for z exceeding 1.96
in absolute value
11/15/2019 133
Normal Approximation to the binomial distribution
• Suppose a binomial distribution has parameters n and p. If n i s
moderately large and p is either near 0 or near 1, then the binomial
distribution will be very positively or negatively skewed, respectively.
11/15/2019 135
Normal Approximation…
11/15/2019 136
Normal Approximation…
11/15/2019 137
Normal Approximation…
11/15/2019 138
Normal Approximation to Poisson Distribution
11/15/2019 139
Normal Approximation to Poisson Distribution
11/15/2019 140
Normal Approximation to Poisson Distribution
11/15/2019 141
Exercises
11/15/2019 142
References
1) Fundamentals of Biostatistics, 7th edition.
2) Probability and Statistics for Enginneers and
Scientists (8th Ed.) by Ronald E. Walpole,
Sharon L. Myers, Keying Ye (Pearson), 2013.
11/15/2019 143
u!!
yo
ank
T h