0% found this document useful (0 votes)
12 views55 pages

MATHF113Lec 5

The document discusses the application of Bayes' theorem to calculate the probabilities of using different analytical plans in a manufacturing context based on defect rates. It also defines the concepts of independence and mutual independence of events in probability theory, providing mathematical propositions and examples. Additionally, it introduces random variables, their types, and probability distributions, emphasizing the characteristics of discrete random variables.

Uploaded by

f20240419
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views55 pages

MATHF113Lec 5

The document discusses the application of Bayes' theorem to calculate the probabilities of using different analytical plans in a manufacturing context based on defect rates. It also defines the concepts of independence and mutual independence of events in probability theory, providing mathematical propositions and examples. Additionally, it introduces random variables, their types, and probability distributions, emphasizing the characteristics of discrete random variables.

Uploaded by

f20240419
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

MATH F113: Probability & Statistics

Second Semester 2023-2024

Anirudh Singh Rana


Associate Professor
Department of Mathematics
BITS Pilani
Jan 16, 2025
Question
A manufacturing firm employs three analytical plans for the
design and development of a particular product. For cost
reasons, all three are used at varying times. In fact, plans 1,
2 and 3 are used for 30%, 20% and 50% of the products,
respectively. Let Pj denote the event that plan j is used and
D denote the event that the product is defective. Suppose

P(D|P1 ) = 0.01, P(D|P2 ) = 0.03, P(D|P3 ) = 0.02.

Compute P(P1 |D), P(P2 |D), P(P3 |D).

Probability & Statistics Anirudh Singh Rana 1


We have
P(P1 ) = 0.3, P(P2 ) = 0.2, P(P3 ) = 0.5.
Using Bayes’ theorem,
P(P1 )P(D|P1 )
P(P1 |D) =
P(P1 )P(D|P1 ) + P(P2 )P(D|P2 ) + P(P3 )P(D|P3 )
(0.3 × 0.01)
= = 0.158.
(0.3 × 0.01) + (0.2 × 0.03) + (0.5 × 0.02)
Similarly, (show)
P(P2 |D) = 0.316, P(P3 |D) = 0.526.
If a random product was observed and found to be defective,
the plan most likely used was plan 3 since the conditional
probability of a defect given plan 3 is the largest of the three.
Probability & Statistics Anirudh Singh Rana 2
§2.5: Independence

Probability & Statistics Anirudh Singh Rana 2


Objectives

1. Define the concept of independence of events


2. Apply this concept and prior results to calculate
probabilities

Probability & Statistics Anirudh Singh Rana 3


Definition
Two events A and B are said to be independent if

P(A|B) = P(A)

and, are said to be dependent otherwise.

Probability & Statistics Anirudh Singh Rana 4


Definition
Two events A and B are said to be independent if

P(A|B) = P(A)

and, are said to be dependent otherwise.

Note. Since
P(A ∩ B) P(A|B)P(B)
P(B|A) = = ,
P(A) P(A)

we get that P(A|B) = P(A) if and only if P(B|A) = P(B).

Probability & Statistics Anirudh Singh Rana 4


Definition
Two events A and B are said to be independent if

P(A|B) = P(A)

and, are said to be dependent otherwise.

Note. Since
P(A ∩ B) P(A|B)P(B)
P(B|A) = = ,
P(A) P(A)

we get that P(A|B) = P(A) if and only if P(B|A) = P(B).


What if P(A) = 0 or P(B) = 0?

Probability & Statistics Anirudh Singh Rana 4


Proposition
Two events A and B are independent if and only if

P(A ∩ B) = P(A)P(B).

Probability & Statistics Anirudh Singh Rana 5


Proposition
Two events A and B are independent if and only if

P(A ∩ B) = P(A)P(B).

• This allows us to extend the definition of independence


when P(A) = 0 or P(B) = 0.

Probability & Statistics Anirudh Singh Rana 5


Proposition
Two events A and B are independent if and only if

P(A ∩ B) = P(A)P(B).

• This allows us to extend the definition of independence


when P(A) = 0 or P(B) = 0.
• If two events with positive probabilities are mutually
exclusive, they cannot be independent.

Probability & Statistics Anirudh Singh Rana 5


Proposition
Two events A and B are independent if and only if

P(A ∩ B) = P(A)P(B).

• This allows us to extend the definition of independence


when P(A) = 0 or P(B) = 0.
• If two events with positive probabilities are mutually
exclusive, they cannot be independent.

Probability & Statistics Anirudh Singh Rana 5


• Suppose A, B are independent. Since

A = (A ∩ B) ∪ (A ∩ B ′ )

is the union of mutually exclusive events, by Axiom 3, we


get
P(A) = P(A ∩ B) + P(A ∩ B ′ ).
Hence, using independence of A, B, we get

P(A∩B ′ ) = P(A)−P(A∩B) = P(A)−P(A)P(B) = P(A)P(B ′ ).

Hence A, B ′ are independent.

Probability & Statistics Anirudh Singh Rana 6


• Suppose A, B are independent. Since

A = (A ∩ B) ∪ (A ∩ B ′ )

is the union of mutually exclusive events, by Axiom 3, we


get
P(A) = P(A ∩ B) + P(A ∩ B ′ ).
Hence, using independence of A, B, we get

P(A∩B ′ ) = P(A)−P(A∩B) = P(A)−P(A)P(B) = P(A)P(B ′ ).

Hence A, B ′ are independent.


Exercise. Prove that if A, B are independent, then so are
A′ , B and A′ , B ′ .

Probability & Statistics Anirudh Singh Rana 6


Independence of more than 2 events

Definition
Events A1 , . . . , An are said to be mutually independent if for
every k = 2, . . . , n and every subset of indices i1 , . . . , ik , we
have

P(Ai1 ∩ Ai2 ∩ . . . ∩ Aik ) = P(Ai1 )P(Ai2 ) · · · P(Aik ).

Probability & Statistics Anirudh Singh Rana 7


Independence of more than 2 events

Definition
Events A1 , . . . , An are said to be mutually independent if for
every k = 2, . . . , n and every subset of indices i1 , . . . , ik , we
have

P(Ai1 ∩ Ai2 ∩ . . . ∩ Aik ) = P(Ai1 )P(Ai2 ) · · · P(Aik ).

The events A1 , . . . , An are called pairwise independent if for


any i ̸= j,
P(Ai ∩ Aj ) = P(Ai )P(Aj ).

Probability & Statistics Anirudh Singh Rana 7


Pairwise independence does not imply mutual in-
dependence

Mutual independence implies pairwise independence but not


conversely.
Question
Two fair coins are tossed independently. Let A denote the
event that the first toss lands in Heads, B denote the event
that the second toss lands in Heads and C denote the event
that the two tosses give the same result. Prove that A, B, C
are pairwise independent but no mutually independent.

Probability & Statistics Anirudh Singh Rana 8


Sampling with replacement

From a population of size N, n objects are chosen randomly


with replacement. Then no choice has any effect on another.
So they can be treated as independent. The probability that
chosen sample is (x1 , . . . , xn ), xi are all specific from
n
population, is N1 .

Probability & Statistics Anirudh Singh Rana 9


§2.5, Q77

Probability & Statistics Anirudh Singh Rana 10


§2.5, Q77

Probability & Statistics Anirudh Singh Rana 11


Ch 3: Discrete Random Variables &
Probability Distributions

Probability & Statistics Anirudh Singh Rana 11


Definition
For a given sample space S of some experiment, a random
variable is any rule that associates a number with each
outcome in S. Mathematically, a random variable is a
function whose domain is the sample space and whose
codomain is the set of real numbers.

Probability & Statistics Anirudh Singh Rana 12


Definition
For a given sample space S of some experiment, a random
variable is any rule that associates a number with each
outcome in S. Mathematically, a random variable is a
function whose domain is the sample space and whose
codomain is the set of real numbers.

Random variables are customarily denoted by uppercase


letters, such as X and the corresponding lowercase letters, x in
this case, denotes one of its values.

Probability & Statistics Anirudh Singh Rana 12


Example 1. A coin is tossed twice. The sample space is
S = {HH, HT , TH, TT }.
Assume all the outcomes are equally likely. Define a random
variable X by
X = the number of heads in the two tosses.
Then
X (HH) = 2,
X (HT ) = 1,
X (TH) = 1,
X (TT ) = 0.
Probability & Statistics Anirudh Singh Rana 13
Definition
Any random variable with only two possible values 0 and 1 is
called a Bernoulli random variable.

Probability & Statistics Anirudh Singh Rana 14


Definition
Any random variable with only two possible values 0 and 1 is
called a Bernoulli random variable.

Example 2. A university student calls the help desk for


technical support. Either the student is able to speak to
someone immediately (S) or, they are placed on hold (F). We
have
S = {S, F }.
The random variable X defined by

X (S) = 1, X (F ) = 0,

is a Bernoulli random variable.

Probability & Statistics Anirudh Singh Rana 14


Example 3

A fair coin is tossed again and again till head appears. The
sample space is

Probability & Statistics Anirudh Singh Rana 15


Example 3

A fair coin is tossed again and again till head appears. The
sample space is
S = {H, TH, TTH, TTTH, . . .}.
Define a random variable X by
X = the number of tosses in this experiment.
Then
X (H) = 1, X (TH) = 2,
X (TTH) = 3, X (TTTH) = 4,
.. ..
.=.
So any positive integer is a possible value of X .
Probability & Statistics Anirudh Singh Rana 15
Example 4

Let X be the random variable defined by the waiting time, in


hours, between successive speeders spotted by a radar unit.
The random variable X takes on all values x for which x ≥ 0.

Probability & Statistics Anirudh Singh Rana 16


Two Types of Random Variables

Definition
A random variable is said to be discrete if its possible values
either constitute a finite set or a countably infinite set.

Probability & Statistics Anirudh Singh Rana 17


Two Types of Random Variables

Definition
A random variable is said to be discrete if its possible values
either constitute a finite set or a countably infinite set.
A random variable X is said to be continuous if both of the
following hold.

1. The set of possible values of X is either an interval or a


disjoint union of intervals.
2. P(X = c) = 0 for any possible value of c (i.e., no
possible value of X has a positive probability.)

Probability & Statistics Anirudh Singh Rana 17


Two Types of Random Variables

Definition
A random variable is said to be discrete if its possible values
either constitute a finite set or a countably infinite set.
A random variable X is said to be continuous if both of the
following hold.

1. The set of possible values of X is either an interval or a


disjoint union of intervals.
2. P(X = c) = 0 for any possible value of c (i.e., no
possible value of X has a positive probability.)

All the random variables in Examples 1–3 are discrete.

Probability & Statistics Anirudh Singh Rana 17


Probability Distributions for Discrete RVs

Definition
The probability distribution or probability mass function
(pmf) of a discrete rv is the function p (or, pX ) defined by

p(x) = P(X = x) = P(s ∈ S : X (s) = x).

Probability & Statistics Anirudh Singh Rana 18


Probability Distributions for Discrete RVs

Definition
The probability distribution or probability mass function
(pmf) of a discrete rv is the function p (or, pX ) defined by

p(x) = P(X = x) = P(s ∈ S : X (s) = x).

The necessary and sufficient condition for a function f to be a


pmf of a discrete rv are (i) f (x) ≥ 0 for all x, (ii)
all x f (x) = 1.
P

Probability & Statistics Anirudh Singh Rana 18


• In Example 1, the pmf p is given by
x 0 1 2
p(x) = P(X = x) 1/4 1/2 1/4

Probability & Statistics Anirudh Singh Rana 19


• In Example 1, the pmf p is given by
x 0 1 2
p(x) = P(X = x) 1/4 1/2 1/4

• In Example 3, the pmf p of X is given by

Probability & Statistics Anirudh Singh Rana 19


• In Example 1, the pmf p is given by
x 0 1 2
p(x) = P(X = x) 1/4 1/2 1/4

• In Example 3, the pmf p of X is given by


x 1 2 3 ...
p(x) = P(X = x) 1/2 (1/2)2 (1/2)3 ...

Probability & Statistics Anirudh Singh Rana 19


Line Graph & Probability Histogram

Probability & Statistics Anirudh Singh Rana 20


Probability & Statistics Anirudh Singh Rana 21
Another useful pictorial representation of a pmf, called a
probability histogram. Above each y with p(y ) > 0, construct
a rectangle centered at y . The height of each rectangle is
proportional to p(y ), and the base is the same for all
rectangles. When possible values are equally spaced, the base
is frequently chosen as the distance between successive y
values (though it could be smaller).

Probability & Statistics Anirudh Singh Rana 22


A Parameter of a Probability Distribution

Definition
Suppose p(x) depends on a quantity which can be assigned
any one of a number of possible values, with each different
value determining a different probability distribution. Such a
quantity is called a parameter of the distribution. The
collection of all probability distributions for different values of
the parameter is called a family of probability distributions.

Probability & Statistics Anirudh Singh Rana 23


A Parameter of a Probability Distribution
(contd.)

Example. The pmf of any Bernoulli random variable can be


written as 
α

 if x = 1,
p(x; α) = 1 − α if x = 0,

0 otherwise,

where 0 < α < 1. The quantity α is a parameter and each


different value of α between 0 and 1 determines a different
member of the Bernoulli family of distributions.

Probability & Statistics Anirudh Singh Rana 24


§3.2, Q14

Probability & Statistics Anirudh Singh Rana 25


Probability & Statistics Anirudh Singh Rana 26
The Cumulative Distribution Function

Definition
The cumulative distribution function (cdf) F (x) of a discrete
random variable X with pmf p(x) is defined as
X
F (x) = P(X ≤ x) = p(y ).
y : y ≤x

So F (x) is the probability that the observed value of X will be


at most x.

Probability & Statistics Anirudh Singh Rana 27


Example. A store carries flash drives with either 1 GB, 2 GB,
4 GB, 8 GB or 16 GB of memory. Define a random variable Y
by

Y = the amount of memory in a purchased drive.

The pmf of Y is given by:

y 1 2 4 8 16
p(y) 0.05 0.1 0.35 0.4 0.1

Probability & Statistics Anirudh Singh Rana 28


Example. A store carries flash drives with either 1 GB, 2 GB,
4 GB, 8 GB or 16 GB of memory. Define a random variable Y
by

Y = the amount of memory in a purchased drive.

The pmf of Y is given by:

y 1 2 4 8 16
p(y) 0.05 0.1 0.35 0.4 0.1

Probability & Statistics Anirudh Singh Rana 28


Example. A store carries flash drives with either 1 GB, 2 GB,
4 GB, 8 GB or 16 GB of memory. Define a random variable Y
by

Y = the amount of memory in a purchased drive.

The pmf of Y is given by:

y 1 2 4 8 16
p(y) 0.05 0.1 0.35 0.4 0.1

If y < 1, then F (y ) = P(Y ≤ y ) = 0,

Probability & Statistics Anirudh Singh Rana 28


Example. A store carries flash drives with either 1 GB, 2 GB,
4 GB, 8 GB or 16 GB of memory. Define a random variable Y
by

Y = the amount of memory in a purchased drive.

The pmf of Y is given by:

y 1 2 4 8 16
p(y) 0.05 0.1 0.35 0.4 0.1

If y < 1, then F (y ) = P(Y ≤ y ) = 0,


F (1) = P(Y ≤ 1) = P(Y = 1) = p(1) = 0.05;

Probability & Statistics Anirudh Singh Rana 28


Example. A store carries flash drives with either 1 GB, 2 GB,
4 GB, 8 GB or 16 GB of memory. Define a random variable Y
by

Y = the amount of memory in a purchased drive.

The pmf of Y is given by:

y 1 2 4 8 16
p(y) 0.05 0.1 0.35 0.4 0.1

If y < 1, then F (y ) = P(Y ≤ y ) = 0,


F (1) = P(Y ≤ 1) = P(Y = 1) = p(1) = 0.05;
If 1 ≤ y < 2, then
F (y ) = P(Y ≤ y ) = P(Y ≤ 1) = F (1) = 0.05,

Probability & Statistics Anirudh Singh Rana 28


Example. A store carries flash drives with either 1 GB, 2 GB,
4 GB, 8 GB or 16 GB of memory. Define a random variable Y
by

Y = the amount of memory in a purchased drive.

The pmf of Y is given by:

y 1 2 4 8 16
p(y) 0.05 0.1 0.35 0.4 0.1

If y < 1, then F (y ) = P(Y ≤ y ) = 0,


F (1) = P(Y ≤ 1) = P(Y = 1) = p(1) = 0.05;
If 1 ≤ y < 2, then
F (y ) = P(Y ≤ y ) = P(Y ≤ 1) = F (1) = 0.05,
F (2) = P(Y ≤ 2) = P(Y = 1 or 2) = p(1) + p(2) =
0.05 + 0.1 = 0.15, . . .
Probability & Statistics Anirudh Singh Rana 28
Probability & Statistics Anirudh Singh Rana 29
Probability & Statistics Anirudh Singh Rana 30
(contd.)

• Note that F (x) is non-decreasing and

lim F (x) = 0, lim F (x) = 1.


x→−∞ x→∞

• It can be shown that if F (x) is a real valued function of a


real variable, is a non-decreasing step function and

lim F (x) = 0, lim F (x) = 1,


x→−∞ x→∞

then F must be the cdf of a discrete random variable.

Probability & Statistics Anirudh Singh Rana 31


Proposition
Let a, b be real numbers with a ≤ b. Then

P(a < X ≤ b) = F (b) − F (a)


P(a ≤ X ≤ b) = F (b) − F (a−),

where a− denotes the largest possible X value strictly less


than a.

Note.

• If the only possible values of X are integers and a and b


are integers, then P(a ≤ X ≤ b) = P(X =
a or a + 1 or . . . b) = F (b) − F (a − 1).
• F (a−) = limx→a− F (x).

Probability & Statistics Anirudh Singh Rana 32

You might also like