Basic Stat Chapter 4 Probability & Probability Distribution
Basic Stat Chapter 4 Probability & Probability Distribution
2
1.1. Deterministic and non-deterministic
models
• Models are integral parts of both social and natural
sciences. In both cases we construct or fit models to
represent the interrelationship between two or more
variables.
• Particularly, in the fields like Statistics and
Economics models are fitted for the sake of
forecasting.
• It is possible to classify models in to different
groups based on varied attributes or criteria.
• Based on the type of experiment for which we fit the
model, we classify model as Deterministic and
Nondeterministic models.
Experiment
• Experiment is any activity (process or action) that
we intended to do under certain condition to obtain a
well defined results, usually called the outcome of
an experiment.
• The possible results of an experiment may be one or
more. Based on the number of possible results, we
may classify an experiment as Deterministic and
Non-deterministic experiment.
• Steps involved in an Experiment:
– Input Equipments, material, input data etc.
– Action to be performed
– Output list of all results of the experiment
Deterministic Experiments
• A precisely deterministic input yields a precisely
deterministic output. This is an experiment for which the
outcomes can be predicted in advance and is known prior
to its conduct.
• For this type of experiment we have only one possible
result (certain and unique).
• The result of an experiment is assumed to be dependent on
the condition under which an experiment is performed.
• A mathematical form of equations to be defined on this
experiment is called a deterministic model.
• Ex: Distance covered by a car traveling at a constant
speed; An experiment conducted to verify the Newton
Laws of Motion: F = ma; an experiment conducted to
determine the economic law of demand: Qt =a+bPt where
Q is a quantity demand, P is the price and t is a time; etc…
Non-deterministic Experiments
• Even exact knowledge of input and action does not allow exact
prediction of outcome.
• This is an experiment for which the outcome of a given trial
cannot be predicted in advance prior to its conduct.
• We also call this experiment as unpredictable or probabilistic or
stochastic or random experiment.
• Usually the result of this experiment is subjected to chance and
is possibly more than one.
• Ex:
– Tossing a coin;
– Throwing a dice;
– Life of an electric bulb;
– Number of road accidents in a day at Addis Ababa;
– Queue size at a railway reservation counter; etc.
• In probability theory we are mainly concerned with the random
experiments.
Non-deterministic Experiments cont’
• In this experiment, whatever the condition under which an
experiment is performed, one cannot tell with certainty
which outcome occurs at any particular execution of an
experiment though it is possible to list those outcomes.
• This types of experiments are characterized by the
following three properties:
I. The experiment is repeatable under identical conditions.
II. The outcome in any particular trial is variable, i.e., it
depends on some chance or random mechanism.
III. If the experiment is repeated a large number of times,
then some regularity becomes apparent in the outcomes
obtained. This regularity enables us to set some
mathematical form of equations called non-
deterministic model.
• Outcome: is the result of a single trial of a random experiment.
• Complement of an Event
– the complement of an event A means non-occurrence of A and contains
those points of the sample space which don’t belong to A.
• Example: Toss a fair die, let A be observing an odd number, then
A={1, 3, 5}
AC ={2, 4, 6}
9
• Elementary Event: an event having only a single element or
sample point.
10
1.2. Review of set theory
• Set: A set is a well-defined collection or list of objects.
• An object that belongs to a particular set is called an element.
• Sets are usually denoted by capital letters (A, B, C etc). On the other
hand, elements of sets are usually denoted by small letters (a, b, c etc).
Two sets are equal if they have exactly the same elements in them
A set that contains no elements is called a null set or an empty set
If every element in Set A is also in Set B, then Set A is a subset of Set B
• Examples: The set of students in a class; the set of even numbers; the
set of possible outcomes of an experiment; etc.
• Note: If X belongs to set A we write X ∈ A, and if X does not belong to
set A we write X ∉ A
Review of set theory
12
Review of set theory
Set operations
Complement: For any set A, the complement of A denoted by A/, or Ac or
Ā is given by:
{X ∈ U/ X∉A}
Note: U′= φ ; φ′= U ; ( A′)′= A
A∪B ={ X: X ∈ A ∨ X∈ B}
13
Review of set theory
Set operations
Intersection: For any two sets A and B the intersection of A and B is
defined to be the set of all elements that occur in both set A and also set B.
Symbolically, we write
A ∩ B = { x U | x A and x B }
A∪ B = B∪ A, and
A∩ B = B ∩A
II.Associative law
A∪ (B ∪ C) = (A ∪ B) ∪ C, and
A ∩ (B ∩ C) = (A ∩ B) ∩ C
III.Distributive law
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C),
A ∩ (B ∪ C) = (A ∩B) ∪ (A ∩ C),
15
Review of set theory
• A ∩ B = B - (Ac ∩ B) or
• A ∩ B = A - (A ∩ Bc)
16
Combination of events
17
Exercise 1: A person is selected at random from a population
of a given town
d) Male who is either under 30 or speaks foreign language but not both.
18
Solution 1
a) A male under 30 years who does not speak foreign
language.
(A ∩ B) ∩ C′
b) A female who is either under 30 or speaks foreign
language.
A′ ∩ (B ∪ C)
c) A person who is either under 30 or female but not both.
(B ∪ A′) ∩ (B ∩ A)′
d) Male who is either under 30 or speaks foreign language but
not both.
A ∩ [(B ∪ C) ∩ (B ∩ C) ′]
19
Counting Techniques
20
1. Addition Principle (Rule)
• If a task can be accomplished by "k distinct" procedures
where the ith procedures has “ni” alternatives , then the
total number of ways of accomplishing the task is:
23
Example 1: In how many ways can the letters A,B and C be arranged
taken two at a time.
Example 2: a) In how many ways can 3 students be arranged in
rows of 3 chairs?
b) In how many ways can a student arrange his/her 4 different
books on a shelf?
Example 3: If 2 different mathematics books, 3 different statistics
books and 2 different Chemistry books are to be arranged in a shelf,
then how many different arrangements are possible if:
a) The books in each particular subject must "stand all together".
b) Only the Mathematics books must stand all together.
c) There is no restriction.
Example 4: How many different permutations of n objects can be
made from the letters in the word MISSISSIPPI.
24
Combination Rule
–Combination is a selection of n distinct objects without regard to
order.
–It is used when the order of arrangement is not important, as in the
selection process.
–The number of combinations of r objects selected from n objects is
denoted by
25
Example 1: Given the letters A,B,C & D. List the number of
permutations & combinations for selecting two letters.
29
3. Axiomatic Approach
– Let E be a random experiment and S be a sample space associated
with E. With each event A a real number called the probability of A
(P(A)) satisfies the following properties called axioms of
probability or postulates of probability
1) P(A)≥0
2) P(S)=1
– P(Ac)=1- P(A)
– P(Ø) =0
– P(AnBc) = P(A)-P(AnB)
3) If A and B are mutually exclusive events, then
P(AUB) = P(A) + P(B)
– If If A1, A2, A3 ... is a finite or infinite sequence of mutually
exclusive events of S, then
P(A1 u A2 u A3 u ...) = P( A1) + P( A2) + P( A3) + ...= P( Ai )
30
Approaches to Measuring Probability
Derived Probabilities
P(φ)=0 for any sample space S
P(A′)=1-P(A)
For any two events say, A and B, the probability that exactly one of the
events A or B occurs but not both is :
31
Example: Sixty percent of the families in a certain community own
their own car, thirty percent own their own home, and twenty percent
own both their own car and their own home. If a family is randomly
chosen,
a) what is the probability that this family do not have a car?
b) what is the probability that this family owns a car or a house?
c) what is the probability that this family owns a car or a house
but not both?
Solution: Let A represents that the family owns a car and B
represents that the family owns a house. P(A)=0.6, P(B)=0.3, and
P(A n B)=0.2.
a) P(Ac)=0.4
b) P(AUB) =0.7
c) P((AnBc)U(AcnB))=0.5
32
Subjective Approach
– Subjective probability is a prediction that is based on an
individual's personal judgment, not on mathematical calculations.
– Subjective probabilities, like the name suggests, are probabilities
that come from an individual's personal judgment of an event
happening.
– Subjective probability differ from person to person, and because
they are subjective, they can be based on a person's beliefs or
other factors.
– Used when no historical data.
33
Conditional probability and Independence
– Conditional probability provides us with a way to reason about the
outcome of an experiment, based on partial information.
– If the occurrence of one event has an effect on the occurrence of
the other event then the two events are conditional or dependant
events.
– The conditional probability of an event is a probability obtained
with the additional information that some other event has already
occurred.
– The conditional probability of an event A given that B has already
occurred, denoted P(A|B) is
P A B
P( A | B) , if P(B) 0
P B
– Remark:
P ( Ac | B ) 1 P A | B
34
Conditional probability …
Definition
The probability that B occurs given that A occurs is called the conditional
probability of B given A and is written
P( B | A)
The conditional probability of B given A is the probability that an event, B,
will occur given that another event, A, has occurred
P A B
P( B | A) , if P(A) 0
P A
Example: A fair coin is tossed two times. What is the probability that the
second coin is a head if you know that at least one head appears.
Conditional
outcome, new
sample space
(reduced)
Example: A family has two children. What is the conditional
probability that both are boys given that at least one of them is a boy?
Assume that the sample space S is given by S = {(b, b), (b, g), (g, b),
(g, g)}, and all outcomes are equally likely. (b, g) means, for
instance, that the older child is a boy and the younger child is a girl.
Solution :
• Let A be both are boys and
• B be at least one of them is a boy
P A B
1
4 1
P( A | B)
P B 3 3
4
Exercise: Let A and B are two events such that P(A Ս B) = 3/4,
P(A Ո B) = 1/4 and P(A′) = 2/3, then find P(A′/B)? Ans = 5/8.
36
The addition Rules for Probability
1. If two events A and B are mutually exclusive, then the
probability that A or B will occur is
Example: Toss a fair a coin and die together, what is the probability
of getting head on the coin if the die shows an even number.
Exercise: A box contains four black and six white balls. What is the
probability of getting two black balls in drawing one after the other
under the following conditions?
a) The first ball drawn is not replaced?
b) The first ball drawn is replaced?
40
Independent events
Example: A box contains four black and six white balls. Two balls are drawn
one after the other. What is the probability that the second ball drawn is black
under the following conditions?
a) The first ball drawn is not replaced.
5
9
6
10
4
9
4
10
6
9
3
9
The second ball drawn is black with probability 4 10
b) The first ball drawn is replaced.
41
Bayes' Theorem and The Total Probability Theorem
• The law of total probability: Suppose 𝐵1 , 𝐵2 , … , 𝐵𝑚 are
disjoint events such that 𝐵1 ∪ 𝐵2 ∪ … ∪ 𝐵𝑚 = 𝑆. The probability
of an arbitrary event A can be expressed as:
𝑃(𝐴) = 𝑃 𝐵1 𝑥 𝑃 𝐴/𝐵1 + 𝑃 𝐵2 𝑥 𝑃 𝐴/𝐵2 + ⋯ + 𝑃 𝐵𝑚 𝑥 𝑃 𝐴/𝐵𝑚 .
Bayes' Rule
Suppose the events 𝐵1 , 𝐵2 , … , 𝐵𝑚 are disjoint and 𝐵1 ∪ 𝐵2 ∪ … ∪ 𝐵𝑚 = 𝑆.
The conditional probability of Bi given an arbitrary event A, can be
expressed as:
𝑃 𝐵𝑖 ∩ 𝐴 𝑃 𝐵𝑖 𝑥 𝑃 𝐴/𝐵𝑖
𝑃 𝐵𝑖 /𝐴 = =
𝑃𝐴 𝑃 𝐵1 𝑥 𝑃 𝐴/𝐵1 + 𝑃 𝐵2 𝑥 𝑃 𝐴/𝐵2 + ⋯ + 𝑃 𝐵𝑚 𝑥 𝑃 𝐴/𝐵𝑚
Example 1: Box 1 contains 2 red balls and one blue ball. Box 2
contains 3 blue balls and one red ball. A coin is tossed. If it falls
heads up, Box 1 is selected and a ball is drawn. If it falls tails up, Box
2 is selected and a ball is drawn. Then find the probability of
selecting a red ball.
Example 2: A shipment of two boxes, each containing 6 telephones,
is received by a store. Box1 contains one defective phone and box 2
contains 2 defective phones. After the boxes are unpacked, a phone is
selected and found to be defective. Then find the probability that it
came from box 2
Random variable
• A random variable is a variable that has a single numerical
value, determined by chance, for each outcome of the
experiment or
• a numerical valued function defined on sample space, usually
denoted by capital letters.
• Example: If X is a random variable, then it is a function from
the elements of the sample space to the set of real numbers. i.e
• X is a function X: S R
• A random variable takes a possible outcome and assigns a
number to it.
• Example: Flip a coin twice, let X be the number of heads in
two tosses
• X={0, 1, 2}
44
• A random variable is discrete if it takes on a countable number of
values (i.e. there are gaps between values).
• Example
– the number of jobs submitted to a printer,
– the number of errors in a program,
– the number of failed components of a computer
• A random variable is continuous if there are an infinite number of
values the random variable can take, and they are densely packed
together (i.e. there are no gaps between values).
• Example
– thickness of an item
– time required to complete a task
– temperature of a solution
– height, in meters
• A probability distribution is a description of the chance a random
variable has of taking on particular values. It is often displayed in
a graph, table, or formula.
45
Probability Distribution
X 0 1 2
P(X=x) 1/4 2/4 1/4
46
Discrete Random Variable
• If the random variable X can assume only a
particular finite or countably infinite set of
values, it is said to be a discrete random variable.
• For example, if you throw a die, the outcome X is
a random variable, which can assume only the
values 1, 2, 3, 4, 5 and 6.
Example: Consider an experiment of "flipping a
fair coin 3 times". List the elements of the sample
space that are assumed to be equally likely (as this
is what is meant by a fair or balanced coin) and the
corresponding values x of the r-v X, the number of
heads observed.
Discrete probability distribution
• A probability distribution describes the possible values and their
probability of occurring.
• Discrete probability distribution is called probability mass
function (pmf), p(.) and need to satisfy following conditions.
for all x where X is a discrete r.v.
Mean
Definition: The (mean) expected value of a random variable X
denoted by E(X) or μ is given by
i) E ( X ) xPX ( x) if X is discrete r.v.
xf X ( x)dx if X is continuous r.v.
Variance
Definition: The variance of a random variable X denoted V(X) or σ2
is defined as V(X)=E[(X- μ)2] = E(X2) – μ2.
•if X is discrete, V ( X ) [ x 2 PX ( x)] 2
•if X is continuous, V ( X ) [ x 2 f X ( x)dx] 2
53
Example: Calculate the mean and variance of the random variable
X=number of heads of tossing a coin twice
1 1 1
E ( X ) xPX ( x) 0 1 2 1
4 2 4
1 2 1 2 1
E ( X ) x PX ( x) 0 1 2 1.5
2 2 2
4 2 4
V ( X ) E ( X 2 ) 2 1.5 12 0.5
Example: The diameter of an electric cable, say X, is assumed to be
a continuous r.v with pdf:
n x
P X x p 1 p , x 0,1, 2,, n.
n x
x
– Let p be probability of success and q=1-p be probability of
failure
• The mean and variance are
• E(X)=np
• Var(X)=np(1-p) 56
Example 6.3: A fair coin is flipped 4 times. Let X be the number of
heads appearing out of the four trials. Calculate the following
probabilities:
i. 2 heads will appear (Ans= 0.375)
ii. No head will appear (Ans= 0.0625)
iii. At least two heads will appear (Ans= 0.6875)
iv. Less than two heads will appear (Ans= 0.3125)
v. At most heads 2 will appear (Ans= 0.6875)
Exercise: An investigator notices that children develop chronic
bronchitis in the first year of life in 3 of 20 households in which both
parents have chronic bronchitis, as compared with the national
incidence of chronic bronchitis, which is 5% in the first year of life.
How likely are infants in at least 3 of 20 households to develop
chronic bronchitis if the probability of developing disease in any one
household is 0.05? (Ans= 0.0754) 57
Poisson Distribution
• A random variable X is said to have a Poisson distribution if its
probability distribution is given by:
e x
P X x , x 0,1, 2,
x!
• The Poisson distribution depends only on the average number of
occurrences per unit time of space.
• Note that poisson distributions is used to model situations where the
random variable X is the number of occurrences of a particular event
over a given period of time (or space).
• Together with this , the following conditions must also be fulfilled:
– events are independent of each other,
– events occur singly, and
– events occur at a constant rate (in other words for a given time interval the
mean number of occurrences is proportional to the length of the interval).
• The Poisson distribution is used as a distribution of rare events, such as
Number of misprints, Natural disasters like earth quake, Accidents.
• Mean and variance: E(X)=λ, variance(X)= λ
58
Example: Suppose the number of admissions to the emergency room at a
small hospital follows a Poisson distribution, but the incidence rate changes
on different days of the week. On a weekday there are on average two
admissions per day, while on weekend day there is on average one
admission per day.
A. What is the probability of three admissions on Wednesday?
(Ans: 0.1805)
B. What is the probability of at least one admission on Saturday?
(Ans:0.3679)
C. What is the expected number of admissions on a weekday?
(Ans:2)
Example: Suppose that the number of typographical errors on a single page
of this lecture note has a Poisson distribution with parameter λ = 1. if we
randomly select a page in this lecture note, calculate the probability that
A. No error will occur. (Ans:0.367879)
B. Exactly three errors will occur. (Ans:0.061313)
C. Less than 2 errors will occur. (Ans:0.73576)
D. There is at least one error. (Ans:0.632121)
59
Uniform distribution
• We want to define a random variable X that is “equally likely”
to take on any value in some finite interval (a,b).
• Formally this is non sensical since the probability of a
continuous random variable assuming a particular value is
always 0.
• A better way of formalizing our intuition is that the probability
of X falling in a subinterval of (a , b) should depend only on
the length of the subinterval, not on its location within (a , b).
• The random variable X that satisfies this condition is the
uniform random variable. We write X~ uniform (a, b). It has
the probability density function
• E(X)=(a+b)/2 ,
Example 2. The random number generator in Excel is set to
produce numbers at random from 4 to 20 using a uniform
distribution. Let the random variable U denote the value of a
uniform random number.
a. What is the probability of getting a value less than 8?
(Ans= 0.25)
b. Calcúlate P(U > 6 AND U < 14) (Ans=0.5)
c. Calcúlate P(U > 15 OR U < 8)? (Ans=0.5625)
Normal Probability Distribution
• A random variable X is said to have a normal distribution if its
probability density function is given by
1 x
2
f x
1 2
e where x (-∞,∞ ), μ (-∞,∞ ) and σ (0,∞ ).
2
– It is bell shaped and is symmetrical about its mean and it is
mesokurtic.
– It is asymptotic to the axis, i.e., it extends indefinitely in either
direction from the mean.
– It is a continuous distribution.
– It is a family of curves, i.e., every unique pair of mean and
standard deviation defines a different normal distribution.
– Total area under the curve sums to 1, i.e., the area of the
distribution on each side of the mean is 0.5
– It is unimodal, i.e., values mound up only in the center of the
curve.
62
• Since a normal distribution is a continuous probability
distribution, the probability that X lies between a and b is the area
bounded under the curve, from left to right by the vertical lines x =
a and x = b and below by the horizontal axis.
63
• Note: To facilitate the use of normal distribution, the following
distribution known as the standard normal distribution was derived
by using the transformation
1
z2
f z
1 2
e
2
• Properties of the Standard Normal Distribution:
– Same as a normal distribution, but also...
• Mean is zero
• Variance is one
• Standard Deviation is one
• Areas under the standard normal distribution curve have been
tabulated in various ways.
• The most common tables give areas bounded between Z=0 and a
positive value of Z.
64
• In addition to the standard normal table, the properties of normal
distribution and the following theorem are useful to make
probability calculations very easy for any normal distribution.
Theorem : Standardization of a normal random variable. If X has a
normal distribution with mean, μ and standard deviation ,σ , then
i. X will have a standard normal distribution.
Z
ii. a X b
P ( a X b) P ( )
a b
P( Z )
• Example (read from table); determine the following probabilities
pa x b p a
x
b
p a
z b
for population
pa x b p a s x x x
s bs x p a s x z b s x for sample
Example: Consider the distribution of serum cholesterol levels for all
20 to 74 year old males has a mean of 210 mg /100 ml, and the
standard deviation of 20 mg/100 ml. If an individual is selected from
the population randomly, what is the probability that
A. serum cholesterol level is between 200 and 240?
(Ans:0.6247)
67
Exercises
1. Glaucoma is an eye disease that is manifested by high
intraocular pressure (IOP). The distribution of IOP in the
general population is approximately normal with mean = 16
mm Hg and standard deviation = 3 mm Hg. If the normal range
for IOP is considered to be between 12 and 20 mm HG, then
what percentage of the general population would fall within
this range?
2. Assume that the test scores for a large class are normally
distributed with a mean of 74 and a standard deviation of 10.
A. Suppose that you receive a score of 88. What percent of the
class received scores higher than yours?
B. Suppose that the teacher wants to limit the number of A
grades in the class to no more than 20%. What would be the
lowest score for an A?
68
69
Exponential Probability Distribution
• Used to model the length of time between two occurrences of an
event (the time between arrivals)
– Examples:
70
Exponential Probability Distribution
• The exponential random variable T (t>0) has a probability density
function
λ t
f(t) λ e for t 0
• Where
– e = 2.71828
71
Exponential Probability Distribution
• Defined by a single parameter, its mean (lambda)
λt
F(t) 1 e
where
72
Exponential Probability Distribution
• Example: Customers arrive at the service counter at the rate of 15
per hour. What is the probability that the arrival time between
consecutive customers is less than three minutes?
• Solution:
The mean number of arrivals per hour is 15, so = 15
Three minutes is .05 hours
P(arrival time < .05) = 1 – e- X = 1 – e-(15)(.05) = 0.5276
So there is a 52.76% probability that the arrival time between
successive customers is less than three minutes
73