math 230: probability lec # 01suraj.lums.edu.pk/.../classes/quantfin/revprobability.pdf · 2020. 3....
TRANSCRIPT
-
Dr Adnan Khan Jan 13, 2014
1
MATH 230: Probability
Lec # 01
Life is full of uncertainties
It is likely to rain in the afternoon.
Perhaps I get promotion Next year.
The word “likely”, “perhaps” and “chance” convey the idea of uncertainty.
Experiment:
An experiment is a process that generates a result. A single performance of an experiment is
called a trial. The result of an experiment is called an outcome.
Deterministic experiment Vs Probabilistic experiment:
Deterministic experiment:
An experiment whose outcomes can be predicted with certainty
A jar contains 100 White balls, one ball is selected, it cannot be Black.
You know the initial deposit and interest rate then you can determine the amount after
year
Here experiment conditions determine the outcomes i.e. you know the all the data.
Probabilistic experiment:
An experiment whose outcomes cannot be predicted with certainty
A fair coin is tossed its outcome may be Head or Tail.
You roll a dice you don’t know what will be the outcome, it may be 1, 2,3,4,5 or 6.
You roll the dice it comes up 6.
In these experiments, the element of chance is involved. These experiments are also known as
Random experiments.
Some interesting probability questions:
The Monty Hall Problem:
Suppose on a game show you are shown three doors and told that one door hides a car while
others hide goats. You pick a door, say No. 1, and the host, who knows what is behind the doors,
opens another door, say No. 3, which has a goat. He then asks you whether or not you want to
switch to No. 2. Is it beneficial for you to switch your choice?
-
Dr Adnan Khan Jan 13, 2014
2
Two Envelopes:
You have two indistinguishable envelopes that each contains money. One contains twice as
much as the other. You may pick one envelope and keep the money it contains. You pick at
random, but before you open the envelope, you are offered the chance to take the other envelope
instead. Should you switch or not?
The Birthday Problem:
How many people should be in a group before we can say with more than an even chance
(i.e., with at least 1=2 probability) that at least two people in the group share a birthday?
Anyboys:
In a family with two children, one of the children is a girl. What is the probability that the other
is a girl as well?
The Hat Problem:
Suppose 10 people take of their hats and toss them up. As they come down, each person
randomly grabs a hat. What is the probability that no person receives his or her own hat?
What if there are n people? What happens as 𝑛 → ∞ ?
Sleeping Beauty:
Sleeping Beauty volunteers to undergo the following experiment and is told all of the following
details. On Sunday she is put to sleep. A fair coin is then tossed to determine which experimental
procedure is undertaken. If the coin comes up heads, Beauty is awakened and interviewed on
Monday, and then the experiment ends. If the coin comes up tails, she is awakened and
interviewed on Monday, given an amnesia-inducing drug that makes her forget Monday, put to
sleep again, and reawakened on Tuesday. In this case, the experiment ends after she is
interviewed on Tuesday.
Any time Sleeping Beauty is woken and interviewed, she is asked, "What is your belief now for
the proposition that the coin landed heads?"
-
Dr. Adnan Khan Jan 22, 2014
1
MATH 230: Probability
Lec # 04
Axioms of Probability:
Sample Space:
The set of all possible outcomes of an experiment is known as the sample space of the
experiment and it is denoted by 𝑆. If sample space is a set of finite number of elements or
unending sequence of the natural number then it is a discrete sample space or else it is
continuous sample space. For example
If the outcome of an experiment to determination of gender of a newborn child then
sample space consist on 𝑆 = {𝑏𝑜𝑦, 𝑔𝑖𝑟𝑙}
If a fair coin is tossed then sample space will be 𝑆 = {𝐻𝑒𝑎𝑑, 𝑡𝑎𝑖𝑙}
When a fair dice is rolled, the sample space of this experiment is 𝑆 = {1,2,3,4,5,6}
If the experiment consists of flipping two fair coins then sample space becomes
𝑆 = {𝐻𝐻, 𝐻𝑇, 𝑇𝐻, 𝑇𝑇}
If the experiment is measuring the lifetime of tube lights then sample space is made of all
nonnegative real numbers (Continuous Sample Space)
𝑆 = 𝑥 𝑥 ∈ ℝ+ 𝑜𝑟 {𝑥|0 ≤ 𝑥 < ∞}
Event:
Let 𝑆 be a Sample space of an experiment. An event is any possible outcome of the experiment.
Also it is subset of the sample space. For example
If the newborn baby is a boy then event is 𝐸 = {𝑏𝑜𝑦}
If a fair coin is tossed then a head appears then event becomes 𝐸 = {𝐻𝑒𝑎𝑑}
A fair dice is rolled, 6 appears then the event is 𝐸 = 6
If the experiment consists of flipping two fair coins then and event is a Head appears on
first coin 𝐸 = {𝐻𝐻, 𝐻𝑇}
If 𝐸 = {𝑥|0 ≤ 𝑥 ≤ 5} then 𝐸 is event that tube light does not last longer than 5 years.
-
Dr. Adnan Khan Jan 22, 2014
2
Operations on Events:
Union:
Consider 𝐴 and 𝐵 be two events of an experiment. 𝐴 ∪ 𝐵 is an event that will occur if either 𝐴 or
𝐵 occurs and it consists of all outcomes that are either in 𝐴 or in 𝐵 or in both 𝐴 and 𝐵.
For example,
Let 𝐴 = 𝐻𝑇, 𝑇𝐻 and 𝐵 = {𝐻𝐻, 𝑇𝐻} then 𝐸 = 𝐴 ∪ 𝐵 = {𝐻𝐻, 𝐻𝑇, 𝑇𝐻}
Let 𝐴 = 1,2,3,4 and 𝐵 = {3,4,5, } then 𝐸 = 𝐴 ∪ 𝐵 = {1,2,3,4,5}
Let 𝐴 = 𝑥|0 ≤ 𝑥 ≤ 10 and 𝐵 = {𝑥|0 ≤ 𝑥 ≤ 25} then 𝐸 = 𝐴 ∪ 𝐵 = {𝑥|0 ≤ 𝑥 ≤ 25}
Similarly union of more than two events is defined as
If 𝐴1, 𝐴2, 𝐴3 ⋯ , 𝐴𝑛 are events of some experiment then
𝐸 = 𝐴𝑖
n
𝑖=1
= 𝐴1 ∪ 𝐴2 ∪ ⋯∪ 𝐴𝑛
is an event that consist of all outcomes that are in 𝐴𝑖 for at least value of 𝑖 = 1,2,3,4, ⋯
Intersection:
Consider 𝐴 and 𝐵 be two events of an experiment. 𝐴 ∩ 𝐵 is an event that will occur if 𝐴 and 𝐵
occurs and it consist of all outcomes that are in both 𝐴 and 𝐵.For example,
Let 𝐴 = 𝐻𝑇, 𝑇𝐻 and 𝐵 = {𝐻𝐻, 𝑇𝐻} then 𝐸 = 𝐴 ∩ 𝐵 = {𝑇𝐻}
Let 𝐴 = 1,2,3,4 and 𝐵 = {3,4,5, } then 𝐸 = 𝐴 ∩ 𝐵 = {3,4}
Let 𝐴 = 𝑥|0 ≤ 𝑥 ≤ 10 and 𝐵 = 𝑥 0 ≤ 𝑥 ≤ 25 then 𝐸 = 𝐴 ∩ 𝐵 = 𝑥 0 ≤ 𝑥 ≤ 10
Similarly intersection of more than two events is defined as
If 𝐵1, 𝐵2, 𝐵3 ⋯ , 𝐵𝑛 are events of some experiment then
𝐹 = 𝐵𝑖
𝑛
𝑖=1
= 𝐵1 ∩ 𝐵2 ∩ ⋯∩ 𝐵𝑛
is an event that consist of all outcomes that are all in the events 𝐵𝑖 , 𝑖 = 1,2,3,4, ⋯
Two events that have no outcome in common are said to be mutually exclusive or disjoint event.
E.g. Let 𝐴 = 1,2,3,4 and 𝐵 = {5,6} then 𝐸 = 𝐴 ∩ 𝐵 = { } = 𝜙
-
Dr. Adnan Khan Jan 22, 2014
3
Complement:
Let A be an event of an experiment. Complement of 𝐴, denoted by 𝐴𝑐 or 𝐴′ , is an event that
consist of set of all outcomes in sample space that are not in 𝐴. For example
If the experiment consists of flipping two fair coins then sample space becomes
𝑆 = {𝐻𝐻, 𝐻𝑇, 𝑇𝐻, 𝑇𝑇} and suppose that 𝐴 = 𝐻𝑇, 𝑇𝐻 then 𝐴𝑐 = 𝐻𝐻, 𝑇𝑇
A fair dice is rolled, 6 appears then the event is 𝐸 = 6 then 𝐸𝑐 = 1,2,3,4,5
DeMorgan’s laws:
𝐴𝑖
n
𝑖=0
𝑐
= 𝐴𝑖𝑐
𝑛
𝑖=0
(Prove it‼ )
𝐴𝑖𝑐
𝑛
𝑖=0
𝑐
= 𝐴𝑖c
n
𝑖=0
(Prove it‼ )
Identities:
Suppose that 𝐴, 𝐵 and 𝐶 are events of a random experiment then
𝐴 ∪ 𝐵 ∪ 𝐶 = 𝐴 ∪ 𝐵 ∪ 𝐶
𝐴 ∩ 𝐵 ∩ 𝐶 = 𝐴 ∩ 𝐵 ∩ 𝐶
𝑆𝑐 = 𝜙
𝜙𝑐 = 𝑆
Probability:
Let 𝑆 be the sample space of a random experiment. Let 𝐴 be an event then probability of 𝐴 is
defined as
𝑃 𝐴 = Size of 𝐴
Size of 𝑆
𝑃 𝐴 = # 𝑜𝑓 𝑠𝑢𝑐𝑐𝑒𝑠𝑠 𝑤𝑎𝑦𝑠
𝑇𝑜𝑡𝑎𝑙 # 𝑜𝑓 𝑤𝑎𝑦𝑠
Example: If an experiment consists of tossing a fair coin then what is the probability of
𝐸 = 𝐻𝑒𝑎𝑑 ?
𝑆 = 𝐻𝑒𝑎𝑑 , 𝑇𝑎𝑖𝑙
𝐸 = 𝐻𝑒𝑎𝑑
Size of 𝑆 = 2
Size of 𝐸 = 1
-
Dr. Adnan Khan Jan 22, 2014
4
𝑃 𝐸 = Size of 𝐸
Size of 𝑆 =
1
2
Relative Frequency definition of Probability:
If an experiment, with sample space 𝑆, is repeated 𝑁 times under identical conditions and an
event 𝐴 is occurred 𝑛 times then the probability of 𝐴 is given as
𝑃 𝐴 = lim𝑁→∞
𝑛
𝑁
Example: Suppose that coin toss experiment is repeated 100 times and head appears 49 times.
𝑃 𝐻𝑒𝑎𝑑 = 49
100= 0.49
Axioms of probability:
Consider an experiment with sample space 𝑆. Assume that for each event 𝐴 of the sample space
𝑃 𝐴 is given
Axiom # 1:
0 ≤ 𝑃 𝐴 ≤ 1
Axiom # 2:
𝑃 𝑆 = 1
Axiom # 3:
For any two (or more than two) mutually exclusive events 𝐴 & 𝐵
𝑃 𝐴 ∪ 𝐵 = 𝑃 𝐴 + 𝑃(𝐵)
Example: Two coin are tossed what is the probability of
𝐸 = Getting exactly one head
𝐹 = At least one head
Sol: The sample space is 𝑆 = 𝐻𝐻, 𝑇𝐻, 𝐻𝑇, 𝑇𝑇 𝑆 = 4
𝐸 = 𝐻𝑇, 𝑇𝐻 , 𝐸 = 2
𝑃 𝐸 = 𝐸
𝑆 =
2
4=
1
2
𝐹 = 𝐻𝑇, 𝑇𝐻, 𝐻𝐻 , 𝐹 = 3
𝑃 𝐹 = 𝐸
𝑆 =
3
4
-
Dr. Adnan Khan Jan 22, 2014
5
Example: A committee of 5 members is to be selected from 6 men and 9 women. Assume each
member is chosen at random what is the probability that committee consist of 3 men and 2
women?
𝑃 𝐸 = 𝐶6 3 × 𝐶
92
𝐶15 5
-
Dr. Adnan Khan Feb 3,2014
1
MATH 230: Probability
Lec # 07
Conditional Probability & Bayes’ Formula:
Suppose two dice are rolled, Sample space consists of 36 possible outcomes. Each outcome is
equally likely to occur therefore the probability is1/6 . Now what is the probability given first
die is 5? Here we know that an event is happened which leads to reduced sample space. So he
sample space consist of only possible out comes
𝑆 = 5,1 , 5,2 , 5,3 , 5,4 , 5,5 , 5,6
Hence the probability of any outcome, given first die is 5, is 1/6
Conditional Probability:
Let 𝐸 and 𝐹 be two events of sharing the same sample space 𝑆 and 𝑃(𝐹) > 0 then probability of
event 𝐸 given 𝐹 has occurred is defined as
𝑃 𝐸|𝐹 = P(E ∩ F)
P(F)
Example: A fair coin is tossed twice find the probability that second flip is 𝐸 = 𝐻𝑒𝑎𝑑 given
first flip is 𝐹 = 𝐻𝑒𝑎𝑑 ?
𝑆 = 𝐻𝐻 ,𝐻𝑇,𝑇𝐻,𝑇𝑇
𝐸 = 𝐻𝑒𝑎𝑑 , 𝐹 = 𝐻𝑒𝑎𝑑
𝑃 𝐸|𝐹 = P(E ∩ F)
P(F)
𝑃 𝐸|𝐹 = 1/4
2/4 =
1
2
Example: Two fair dice are rolled. What is the conditional probability that at least one lands on 6
given that the dice land on different numbers?
Sol: Let 𝐸 = at least one die is a six and 𝐹 = two die land on different #′s
𝑃 𝐹 = 30
36=
5
6
𝑃 𝐸 ∩ 𝐹 = 10
36=
5
18
𝑃 𝐸 𝐹 = 𝑃(𝐸 ∩ 𝐹)
𝑃(𝐹)=
5/6
5/18=
6
18=
1
3
-
Dr. Adnan Khan Feb 3,2014
2
Example: A couple has 2 children. What is the probability that both are girls if the older of the
two is a girl?
Sol: Let 𝐸 = both children are girls and 𝐹 = eldest child is a girl
𝑃 𝐹 = 1
4+
1
4=
1
2
𝑃 𝐸 ∩ 𝐹 = 1
4
𝑃 𝐸 𝐹 = 𝑃(𝐸 ∩ 𝐹)
𝑃(𝐹)=
1/4
1/2=
1
2
Example: The king comes from a family of 2 children. What is the probability that the other child
is his sister?
Sol: the two possible children have a sample space given by
𝑆 = 𝑀,𝑀 , 𝑀,𝐹 , 𝐹,𝑀 , 𝐹,𝐹
Let 𝐸 = one child is female and one child is male and 𝐹 = one child is male
𝑃 𝐹 = 1
4+
1
4+
1
4=
3
4
𝑃 𝐸 ∩ 𝐹 = 1
2
𝑃 𝐸 𝐹 = 𝑃(𝐸 ∩ 𝐹)
𝑃(𝐹)=
1/2
3/4=
2
3
Multiplicative rule:
P(E ∩ F) = 𝑃 𝐸|𝐹 × P(F)
Law of Total Probability:
Let sample space is divided into two parts 𝐴 and 𝐴𝑐 such that 𝐴 ∪ 𝐴𝑐 = 𝑆 and Let 𝐸 be an
event from the given sample space then
𝐸 = 𝐴 ∩ 𝐸 ∪ (𝐴𝑐 ∩ 𝐸)
-
Dr. Adnan Khan Feb 3,2014
3
𝑃 𝐸 = 𝑃 𝐴 ∩ 𝐸 ∪ (𝐴𝑐 ∩ 𝐸)
𝑃 𝐸 = 𝑃 𝐴 ∩ 𝐸 + 𝑃 𝐴𝑐 ∩ 𝐸 ,∵ 𝐴 ∩ 𝐴𝑐 = 𝜙
Using Conditional property expression
𝑃 𝐸 = 𝑃 𝐸 𝐴 𝑃(𝐴) + 𝑃 𝐸 𝐴𝑐 𝑃(𝐴𝑐)
Generalized Law of total probability:
If the events 𝐴1 ,𝐴2,⋯ ,𝐴𝑛 constitute a partition of sample space 𝑆 such that 𝑃 𝐴𝑖 ≠ 0 for
𝑖 = 1,2,3,⋯ ,𝑛 then for any event 𝐸
𝑃 𝐸 = 𝑃(𝐴𝑖 ∩ 𝐸)
𝑛
𝑖=1
= 𝑃 𝐴𝑖 𝑃(𝐸|𝐴𝑖)
𝑛
𝑖=1
Example: In a certain assembly plant, three machines, 𝐴1, 𝐴2 and𝐴3, make 30%, 45% and
25%, respectively, of the products. It is known from past, experience that 2%, 3% and 2% of the
products made by each machine, respectively, are defective. Now, suppose that a finished
product is randomly selected. What is the probability that if is defective?
Sol: Define the events
𝐸 = product is defective , 𝐴1 = product made by machine A1,
𝐴2 = product made by machine A2 , 𝐴3 = product made by machine A3
𝑃 𝐸 = 𝑃 𝐸 𝐴1 𝑃 𝐴1 + 𝑃 𝐸 𝐴2 𝑃 𝐴2 + 𝑃 𝐸 𝐴3 𝑃 𝐴3
𝑃 𝐸 = 0.006 + 0.0135 + 0.005 = 0.0245
𝑬
𝐸 ∩ 𝐴
𝑨𝒄
𝐸 ∩ 𝐴𝑐
𝑨
-
Dr. Adnan Khan Feb 3,2014
4
Bayes’ Formula:
Let E and F be two events of some sample space then
𝑃 𝐹|𝐸 = P(E ∩ F)
P(E)
Using conditional and Law of total probability
𝑃 𝐹|𝐸 = P E F P(F)
P E F P F + P E Fc P(Fc)
Example: When coin 𝐴 is flipped it comes up heads with probability 1
4. When coin 𝐵 is flipped it
comes up head with probability 3
4. Suppose one of the coins is randomly chosen and flipped
twice and it comes up head both the times. What is the probability that coin 𝐵 is selected?
Sol: Let E be event that two head comes up
𝑃 𝐵|𝐸 = P(B ∩ E)
P(E)
𝑃 𝐵|𝐸 = P E B P(B)
P E B P B + P E Bc P(Bc)
𝑃 𝐵|𝐸 =
916 ×
12
9
16×
12 +
116
×12
=9
10
𝑨
𝑩
𝑯
𝑻
𝑯
𝑻
𝐻𝐻 ⇒ 𝑃 𝐻𝐻 = 1/32
𝐻𝑇 ⇒ 𝑃 𝐻𝑇 = 3/32
𝑇𝐻 ⇒ 𝑃 𝐻𝑇 = 3/32
𝑇𝑇 ⇒ 𝑃 𝑇𝑇 = 9/32
𝐻𝐻 ⇒ 𝑃 𝐻𝐻 = 9/32
𝐻𝑇 ⇒ 𝑃 𝐻𝑇 = 3/32
𝑇𝐻 ⇒ 𝑃 𝑇𝐻 = 3/32
𝑇𝑇 ⇒ 𝑃 𝑇𝑇 = 1/32
1/4
3/4
3/4
1/4
1/2
1/2
-
Dr. Adnan Khan Feb 3,2014
5
𝑃 𝐵|𝐻𝐻 = P(BHH)
P BHH + P(AHH) =
932
932
+1
32
=9
10
Example: Suppose we have 3 cards identical in form except that both sides of first card are red,
both sides of the second card are colored black and one side of the third is red and the other is
black. The cards are mixed up in a hat and one card is randomly selected and put on the ground.
If the upper side of the card is colored red, what is the probability that the other side is black?
Sol: Let 𝑅 = side is RED ,𝐵 = side is BLACK
𝑃 𝑅𝐵|𝑅 = P R RB P(RB)
P R RB P RB + P R RR P RR + P R BB P(BB)
𝑃 𝑅𝐵|𝑅 =
12 ×
13
12
×13 + 1 ×
13 + 0 ×
13
=1
3
Example: On an MCQ test a student either knows the answer or guesses it. Let 𝑝 be the
probability that the student knows the answer and 1 − 𝑝 be the probability that the students
guesses it. Assume that there are 𝑚 choices. What is the probability that a student knew that
answer give that she answered correctly?
Sol: Let 𝐾 = she know the answer ,𝐶 = she answered correctly
𝑃 𝐾|𝐶 = 𝑃 𝐾 ∩ 𝐶
𝑃(𝐶)
𝑃 𝐾|𝐶 = 𝑃 𝐾 ∩ 𝐶
𝑃 𝐶 𝐾 𝑃 𝐾 + 𝑃 𝐶 𝐾𝑐 𝑃(𝐾𝑐)
𝑃 𝐾|𝐶 =
𝑝
𝑝 +1𝑚
1 − 𝑝
-
Dr. Adnan Khan Feb 10,2014
1
MATH 230: Probability
Lec # 08
Conditional Probability & Bayes’ Formula II:
Conditional Probability:
Let 𝐸 and 𝐹 be two events of sharing the same sample space 𝑆 and 𝑃(𝐹) > 0 then probability of
event 𝐸 given 𝐹 has occurred is defined as
𝑃 𝐸|𝐹 = P(E ∩ F)
P(F)
Bayes’ Formula:
Let E and F be two events of some sample space then
𝑃 𝐹|𝐸 = P(E ∩ F)
P(E)
Using conditional and Law of total probability
𝑃 𝐹|𝐸 = P E F P(F)
P E F P F + P E Fc P(Fc)
Example: When coin 𝐶1 is flipped it comes up heads with probability 1
2. When coin 𝐶_2 is flipped
it comes up head with probability 1 (i.e.) Coin 𝐶2 is Double headed coin). Suppose one of the
coins is randomly chosen and flipped twice and it comes up head both the times. What is the
probability that coin 𝐶2 is selected?
Sol: Let 𝐸 be event that two head comes up
𝑃 𝐶2|𝐸 = P(C2 ∩ E)
P(E)
𝑃 𝐶2|𝐸 = P E C2 P(C2)
P E C2 P C2 + P E C2c P(C2
c )
𝑃 𝐶2|𝐸 = P E C2 P(C2)
P E C2 P C2 + P E C1 P(C1)
𝑃 𝐶2|𝐸 =
12
× 1
12
× 1 + 12
×12
×12
=4
5
-
Dr. Adnan Khan Feb 10,2014
2
𝑃 𝐶2|𝐻𝐻 = P(C2HH)
P C2HH + P(C1HH) =
12
12
+18
=4
5
Example: A laboratory blood test is 95 percent effective in detecting a certain disease when it is,
in fact, present. However, the test also yields a “false positive” result for 1 percent of the healthy
persons tested. (That is, if a healthy person is tested, then, with probability 0.01, the test result
will imply that he or she has the disease.) If 0.5 percent of the population actually has the
disease, what is the probability that a person has the disease given that the test result is positive?
Sol: Let 𝐸 = Test is Positive ,𝐷 = Person that is tested has disease
Given 𝑃 𝐸|𝐷 = 0.95 ,𝑃 𝐸 𝐷𝑐 = 0.01 ,𝑃 𝐷 = 0.005 ,
𝑃 𝐷|𝐸 = P(E ∩ D)
P(E)
𝑃 𝐷|𝐸 = P E D P(D)
P E D P D + P E Dc P Dc
𝑃 𝐷|𝐸 = 0.95 × 0.005
0.95 × 0.005 + 0.01 × 0.995 =
95
294= 0.323
𝑨
𝑩
𝑯
𝑻
𝑯
𝑻
𝐻𝐻 ⇒ 𝑃 𝐻𝐻 = 1/8
𝐻𝑇 ⇒ 𝑃 𝐻𝑇 = 1/8
𝑇𝐻 ⇒ 𝑃 𝐻𝑇 = 1/8
𝑇𝑇 ⇒ 𝑃 𝑇𝑇 = 1/8
𝐻𝐻 ⇒ 𝑃 𝐻𝐻 = 1/2
𝐻𝑇 ⇒ 𝑃 𝐻𝑇 = 0
𝑇𝐻 ⇒ 𝑃 𝑇𝐻 = 0
𝑇𝑇 ⇒ 𝑃 𝑇𝑇 = 0
1/2
1/2
1/1
0
1/2
1/2
-
Dr. Adnan Khan Feb 10,2014
3
𝑃 𝐷|𝐸 = 0.95 × 0.005
0.95 × 0.005 + 0.01 × 0.995 =
95
294= 0.323
Example: A coin is flipped twice. What is the conditional probability that both flips are head
given
(a) The First one is a Head (b) At least one lands on a Head
Sol: Let 𝐸 = H, H ,𝐹 = H ,𝐾 = {At least one Head}
(a) 𝑃 𝐸|𝐹 = 𝑃 𝐸 ∩ 𝐹
𝑃(𝐹)
𝑃 𝐾|𝐶 = 1/4
2/4=
1
2
(b) 𝑃 𝐸|𝐾 = 𝑃 𝐸 ∩ 𝐾
𝑃(𝐾)=
1/4
3/4=
1
3
Example: Suppose an urn contains 8 red balls and 4 white balls. We draw two balls from the urn
without replacement. What is the probability that both balls are red?
Sol:
𝑃 𝑅1𝑅2 = C8 2
C12 2 =
14
33
𝑃 𝑅2|𝑅1 = P(R1 ∩ R2)
P(R1)
P(R1 ∩ R2) = 𝑃 𝑅2|𝑅1 × P(R1)
P(R1 ∩ R2) = 7
11×
8
12=
14
33
𝑫
𝑫𝒄
+𝒗𝒆
−𝒗𝒆
+𝒗𝒆
−𝒗𝒆
0.95
0.05
0.01
0.99
0.005
0.995
-
Dr. Adnan Khan Feb 10,2014
4
Exercise Questions:
Question #1: Two fair dice are rolled. What is the conditional probability that at least one lands
on 6 given that the dice land on different numbers?
Sol: 𝐸 = Die is 6 ,𝐹 = Different Numbers
𝑃 𝐸|𝐹 = P(E ∩ F)
P(F)
𝑃 𝐸|𝐹 = 10/36
30/36=
1
3
Question #5: An urn contains 6 white and 9 black balls. If 4 balls are to be randomly selected
without replacement, what is the probability that the first 2 selected are white and the last 2
black?
Sol: 𝐵 = Black balls are selected ,𝑊 = White balls are selected
𝑃 𝐵|𝑊 = P(B ∩ W)
P(W)
P(E ∩ F) = 𝑃 𝐸|𝐹 P F =36
78×
15
105=
6
91
Question #10: Three cards are randomly selected, without replacement, from an ordinary deck of
52 playing cards. Compute the conditional probability that the first card selected is a spade given
that the second and third cards are spades?
Sol: 𝐸 = First card is spades ,𝐹 = 2nd and 3rd cars are spades
𝑃 𝐸|𝐹 = P(E ∩ F)
P(F)
𝑃 𝐸|𝐹 = P F|E 𝑃(𝐸)
P F|E 𝑃 𝐸 + P F|Ec 𝑃(𝐸𝑐)=
11
50
Question #12: A recent college graduate is planning to take the first three actuarial examinations
in the coming summer. She will take the first actuarial exam in June. If she passes that exam,
then she will take the second exam in July, and if she also passes that one, then she will take the
third exam in September. If she fails an exam, then she is not allowed to take any others. The
probability that she passes the first exam is 0.9 . If she passes the first exam, then the conditional
probability that she passes the second one is 0.8, and if she passes both the first and the second
exams, then the conditional probability that she passes the third exam is 0.7. What is the
probability that she passes all three exams?
Sol: 𝐸1 = passes the 1st exam ,𝐸2 = passes the 2nd exam ,𝐸3 = passes the 3rd exam
-
Dr. Adnan Khan Feb 10,2014
5
𝑃 𝐸1 = 0.9 ,𝑃 𝐸2 𝐸1 = 0.8 ,𝑃 𝐸3 𝐸1𝐸2 = 0.7
𝑃 𝐸3|𝐸1𝐸2 = P(E1 ∩ E2 ∩ E3)
P(E1 ∩ E2) ,𝑃 𝐸2 𝐸1 =
𝑃 𝐸1 ∩ 𝐸2
𝑃 𝐸1
P(E1 ∩ E2 ∩ E3) = 𝑃 𝐸3|𝐸1𝐸2 × P E1 ∩ E2
P(E1 ∩ E2 ∩ E3) = 𝑃 𝐸3|𝐸1𝐸2 × 𝑃 𝐸2 𝐸1 × 𝑃 𝐸1 = 0.7 × 0.8 × 0.7
Question #38: Urn 𝐴 has 5 white and 7 black balls. Urn 𝐵 has 3 white and 12 black balls. We flip
a fair coin. If the outcome is heads, then a ball from urn 𝐴 is selected, whereas if the outcome is
tails, then a ball from urn 𝐵 is selected. Suppose that a white ball is selected. What is the
probability that the coin landed tails?
𝑃 𝑇|𝑊 = P(T ∩ W)
P(W)
𝑃 𝑇|𝑊 = P W T P(T)
P W T P T + P W H P(H)=
12
37
Question #42: Three cooks, 𝐴, 𝐵, and 𝐶, bake a special kind of cake, and with respective
probabilities 0.02, 0.03, and 0.05, it fails to rise. In the restaurant where they work, 𝐴 bakes 50
percent of these cakes, 𝐵 30 percent, and 𝐶 20 percent. What proportion of “failures” is caused
by 𝐴?
𝑃 𝐴|𝐹 = P(A ∩ F)
P(F)
𝑃 𝐴|𝐹 = P F A 𝑃(𝐴)
P F A 𝑃 𝐴 + P F B 𝑃 𝐵 + P F C 𝑃(𝐶)
𝑃 𝐴|𝐹 = 0.02 ×
12
0.02 ×12 + 0.03 ×
310
+ 0.05 ×15
= 0.344
-
Dr. Adnan Khan Feb 17,2014
1
MATH 230: Probability
Lec # 10
Random Variables:
Definition: A random variable is a function that associates a real number with each element of
the sample space. Let Ω be sample space then 𝑋 is defined as
𝑋: Ω → ℝ
Example: Three fair coins are tossed. Let 𝑋 be the random variable that denote the number of
heads then 𝑋 can take values 0,1,2 and 3 with given probabilities.
𝑃 𝑋 = 0 = 𝑃 𝑇,𝑇,𝑇 =1
8
𝑃 𝑋 = 1 = 𝑃 𝐻,𝑇,𝑇 , 𝑇,𝐻,𝑇 , 𝑇,𝑇𝐻 =3
8
𝑃 𝑋 = 2 = 𝑃 𝐻,𝐻,𝑇 , 𝑇,𝐻,𝐻 , 𝐻,𝑇,𝐻 =3
8
𝑃 𝑋 = 3 = 𝑃 𝐻,𝐻,𝐻 =1
8
Example: Independent trials consisting of the flipping of a coin having probability 𝑝 of coming
up heads are continually performed until either a head occurs or a total of 𝑛 flips is made.
Sol: Let 𝑌 be a random variable that counts the number of times coin is tossed then 𝑌 can take
values from 1,2,3,⋯ ,𝑛 with associated probabilities
𝑃 𝑋 = 1 = 𝑃 𝐻 = 𝑝
𝑃 𝑋 = 2 = 𝑃 𝑇,𝐻 = 𝑝 1 − 𝑝
𝑃 𝑋 = 3 = 𝑃 𝑇,𝑇,𝐻 = 𝑝 1 − 𝑝 2
⋮ ⋮
𝑃 𝑋 = 𝑘 = 𝑝 1 − 𝑝 𝑘−1
⋮ ⋮
𝑃 𝑋 = 𝑛 − 1 = 𝑝 1 − 𝑝 𝑛−2
𝑃 𝑋 = 𝑛 = 1 − 𝑝 𝑛−1
-
Dr. Adnan Khan Feb 17,2014
2
By law of probability
𝑃 𝑋 = 𝑖
𝑛
𝑖=1
= 𝑃 𝑋 = 𝑖
𝑛
𝑖=1
𝑃 𝑋 = 𝑖
𝑛
𝑖=1
= 𝑝 1 − 𝑝 𝑖−1𝑛−1
𝑖=1
+ 1 − 𝑝 𝑛−1
𝑃 𝑋 = 𝑖
𝑛
𝑖=1
= 𝑝 1 − 1 − 𝑝 𝑛−1
1 − 1 − 𝑝 + 1 − 𝑝 𝑛−1 = 1
𝑃 𝑋 = 𝑖
𝑛
𝑖=1
= 1
Discrete random Variable:
If the random variable takes the values from set of integers or on at most countable number of
possible values than it is said to be discrete random variable.
Example: Three balls are randomly chosen from an urn containing 3 white, 3 red, and 5 black
balls. Suppose that we win $1 for each white ball selected and lose $1 for each red ball selected.
Find the probabilities of total winnings.
Sol: Let 𝑋 be random variable that denotes the total winnings then 𝑋 = −3,−2,−1,0,1,2,3
𝑃 𝑋 = −3 = 𝐶3 3
𝐶11 3=
1
165 = 𝑃 𝑋 = 3
𝑃 𝑋 = −2 = 𝐶3 2 × 𝐶
51
𝐶11 3=
15
165 = 𝑃 𝑋 = 2
𝑃 𝑋 = −1 = 𝐶3 1 × 𝐶
52 + 𝐶
31 × 𝐶
32
𝐶11 3=
39
165 = 𝑃 𝑋 = 1
𝑃 𝑋 = 0 = 𝐶3 1 × 𝐶
51 × 𝐶
31 + 𝐶
53
𝐶11 3=
55
165
Discrete Probability mass/density function:
The probability function 𝑝 𝑎 = 𝑃 𝑋 = 𝑎 defined on discrete random variable 𝑎 ∈ ℤ with the
following properties
𝑝 𝑎 = 𝑃 𝑋 = 𝑎 ≥ 0
-
Dr. Adnan Khan Feb 17,2014
3
𝑝 𝑎 =
𝑎
1
The function 𝑝 𝑎 is called Probability mass/density function of discrete random variable
Example: The probability mass function in the above example can be expressed as
𝑝(𝑥) =
1
165 , 𝑥 = ±3
15
165 , 𝑥 = ±2
39
165 , 𝑥 = ±1
55
165 , 𝑥 = 0
Example: Three fair coins are tossed. Let 𝑋 be the random variable that denote the number of
heads. Find probability mass function.
Sol:
𝑥 0 1 2 3
𝑝 𝑥 1
8
3
8
3
8
1
8
Cumulative Probability distribution function:
The 𝐹 𝑥 of discrete random variable X with probability mass function 𝑝 𝑥 is given as
𝐹(𝑥) = 𝑃 𝑋 ≤ 𝑥 = 𝑝 𝑋 ≤ 𝑥
𝑥
Example: Three fair coins are tossed. Let 𝑋 be the random variable that denote the number of
heads. Find cumulative probability distribution function
𝐹(𝑥) =
0 , 𝑥 < 01
8 , 0 ≤ 𝑥 < 1
4
8 ,1 ≤ 𝑥 < 2
7
8 ,2 ≤ 𝑥 < 3
1 , 𝑥 ≥ 3
-
Dr. Adnan Khan Feb 17,2014
4
Expected value:
Let 𝑋 is discrete random variable with probability mass function 𝑝(𝑥 ). The expected value or
mean of 𝑋 is given as
𝜇 = 𝐸 𝑋 = 𝑥 𝑝(𝑥)
𝑥
Example: The probability mass function of 𝑋 is given by
𝑝(0) = 1
2= 𝑝(1)
The expected value will be
𝐸 𝑋 = 0 ×1
2+ 1 ×
1
2=
1
2
Example: Find 𝐸 𝑋 when a fair die is rolled
Sol: The probability mass function is given as
𝑝(𝑥) = 1
6 , 𝑥 = 1,2,3,4,5,6
𝐸 𝑋 = 𝑥 𝑝 𝑥
𝑥
, 𝑥 = 1,2,3,4,5,6
𝐸 𝑋 = 1 ×1
6+ 2 ×
1
6+ 3 ×
1
6+ 4 ×
1
6+ 5 ×
1
6+ 6 ×
1
6=
7
2
Example: A school class of 120 students is driven in 3 buses to a symphonic performance. There
are 36 students in one of the buses, 40 in another, and 44 in the third bus. When the buses arrive,
one of the 120 students is randomly chosen. Let 𝑋 denote the number of students on the bus of
that randomly chosen student, and find 𝐸[𝑋].
Sol: Since students is randomly selected
𝑃 𝑋 = 36 = 36
120 ,𝑃 𝑋 = 40 =
40
120 ,𝑃 𝑋 = 44 =
44
120
𝐸 𝑋 = 𝑥 𝑝 𝑥 , 𝑥 = 36,40,44
𝑥
𝐸 𝑋 = 36 ×36
120+ 40 ×
40
120+ 44 ×
44
120=
1208
30
-
Dr. Adnan Khan Feb 19,2014
1
MATH 230: Probability
Lec # 11
Random Variables:
Definition: A random variable is a function that associates a real number with each element of
the sample space. Let Ω be sample space then 𝑋 is defined as
𝑋: Ω → ℝ
Discrete random Variable:
If the random variable takes the values from set of integers or on at most countable number of
possible values than it is said to be discrete random variable.
Discrete Probability mass/density function:
The probability function 𝑝 𝑎 = 𝑃 𝑋 = 𝑎 defined on discrete random variable 𝑎 ∈ ℤ with the
following properties
𝑝 𝑎 = 𝑃 𝑋 = 𝑎 ≥ 0
𝑝 𝑎 =
𝑎
1
Cumulative Probability distribution function:
The 𝐹 𝑥 of discrete random variable X with probability mass function 𝑝 𝑥 is given as
𝐹(𝑥) = 𝑃 𝑋 ≤ 𝑥 = 𝑝 𝑋 ≤ 𝑥
𝑥
Expected value:
Let 𝑋 is discrete random variable with probability mass function 𝑝(𝑥 ). The expected value or
mean of 𝑋 is given as
𝜇 = 𝐸 𝑋 = 𝑥 𝑝(𝑥)
𝑥
Example: Let 𝑋 be random variable that takes values −1 , 0 , 1 with respective probabilities
𝑃 𝑋 = −1 = 0.2 , 𝑃 𝑋 = 0 = 0.5 , 𝑃 𝑋 = 1 = 0.3
Find 𝐸 𝑋2 and 𝐸 𝑋
Sol: Let 𝑌 = 𝑋2 ⇒ 𝐸 𝑋2 = 𝐸 𝑌
-
Dr. Adnan Khan Feb 19,2014
2
𝐸 𝑋 = 𝑥 𝑝 𝑥 , 𝑥 = −1,0,1
𝑥
𝐸 𝑋 = −1 × 0.2 + 0 × 0.5 + 1 × 0.3 = 0.1
𝑃 𝑌 = 1 = 𝑃 𝑋 = 1 + 𝑃 𝑋 = −1 = 0.5
𝑃 𝑌 = 0 = 𝑃 𝑋 = 0 = 0.5
𝐸 𝑌 = 𝐸 𝑋2 = 𝑦 𝑝 𝑦
𝑦
, 𝑦 = 0,1
𝐸 𝑋2 = 1 × 0.5 + 0 × 0.5 = 0.5
Observe that 𝐸 𝑋2 ≠ 𝐸 𝑋 2
Properties of Expectation:
Expectation of a function of random variable:
Let 𝑋 be discrete random variable with probability mass function 𝑝 𝑥𝑖 , 𝑖 ≥ 1, then any real
valued function 𝑔(𝑥𝑖) the expectation is given as
𝐸 𝑔 𝑥𝑖 = 𝑔 𝑥𝑖 𝑝 𝑥𝑖
𝑖
Example: Let 𝑋 be random variable that takes values −1 , 0 , 1 with respective probabilities
𝑃 𝑋 = −1 = 0.2 , 𝑃 𝑋 = 0 = 0.5 , 𝑃 𝑋 = 1 = 0.3
Find 𝐸 𝑋2
Sol:
𝐸 𝑋2 = 𝑥2𝑝 𝑥
𝑥
= 0.5
Proposition:
Let 𝑋 be discrete random variable and 𝑎, 𝑏 are some constants then
𝐸 𝑎𝑋 + 𝑏 = 𝑎𝐸 𝑋 + 𝑏
Proof :
-
Dr. Adnan Khan Feb 19,2014
3
𝐸 𝑎𝑋 + 𝑏 = 𝑎𝑥 + 𝑏 𝑝 𝑥
𝑥
𝐸 𝑎𝑋 + 𝑏 = 𝑎𝑥 𝑝 𝑥 + 𝑏𝑝 𝑥
𝑥
𝐸 𝑎𝑋 + 𝑏 = 𝑎 𝑥𝑝 𝑥 + 𝑏 𝑝 𝑥
𝑥𝑥
𝐸 𝑎𝑋 + 𝑏 = 𝑎𝐸 𝑋 + 𝑏 ∵ 𝑥𝑝 𝑥
𝑥
= 𝐸 𝑋 , 𝑝 𝑥
𝑥
= 1
𝑹𝒆𝒔𝒖𝒍𝒕: let 𝑎 = 0 then
𝐸 𝑏 = 𝑏
Variance:
Let 𝑋 be a discrete random variable with probability mass function 𝑝 𝑥 and expected value
𝜇 = 𝐸 𝑋 then variance is defined as
𝑉𝑎𝑟 𝑋 = 𝐸 𝑋 − 𝐸 𝑋 2
Variance of 𝑋 defines that on the average how far the random variable form the average.
𝑉𝑎𝑟 𝑋 = 𝐸 𝑋 − 𝐸 𝑋 2
𝑉𝑎𝑟 𝑋 = 𝑥 − 𝜇 2𝑝 𝑥
𝑥
𝑉𝑎𝑟 𝑋 = 𝑥2 − 2𝜇𝑥 + 𝜇2 𝑝 𝑥
𝑥
𝑉𝑎𝑟 𝑋 = 𝑥2𝑝 𝑥
𝑥
− 2𝜇 𝑥𝑝 𝑥
𝑥
+ 𝜇2 𝑝 𝑥
𝑥
𝑉𝑎𝑟 𝑋 = 𝐸 𝑋2 − 2𝜇𝐸 𝑋 + 𝜇2
𝑉𝑎𝑟 𝑋 = 𝐸 𝑋2 − 𝜇2 = 𝐸 𝑋2 − 𝐸 𝑋 2
Example: Find the 𝑉𝑎𝑟 𝑋 where 𝑋 represents that a fair die is rolled
Sol: The probability mass function is given as
-
Dr. Adnan Khan Feb 19,2014
4
𝑝(𝑥) = 1
6 , 𝑥 = 1,2,3,4,5,6
𝐸 𝑋 = 𝑥 𝑝 𝑥
𝑥
=7
2
𝐸 𝑋2 = 𝑥2 𝑝 𝑥
𝑥
=91
6
𝑉𝑎𝑟 𝑋 = 𝐸 𝑋2 − 𝐸 𝑋 2 =91
6−
7
2
2
=35
12
-
Dr. Adnan Khan March 24, 2014
1
MATH 230: Probability
Lec # 17
Continuous Random variable:
Let 𝑋 be a continuous random variable if there exist and nonnegative function defined on all real
values have a property that, for any given set of real numbers 𝐵 the following statement holds
𝑃{𝑋 ∈ 𝐵} = ∫ 𝑓(𝑥) 𝑑𝑥𝐵
The function 𝑓 defined above is called probability mass function or probability mass function
for random variable 𝑋. The 𝑃(𝑋 ∈ 𝐵) is the area under the curve 𝑓(𝑥) and it can be calculated by
integrating the probability function 𝑓(𝑥) over the set 𝐵.
The above expression should be equal to one upon integration
𝑃{𝑋 ∈ (−∞, ∞)} = ∫ 𝑓(𝑥) 𝑑𝑥 ∞
−∞
= 1
For any given interval 𝐵 = [𝑎, 𝑏] the probability of 𝑋 is defined as
𝑃{𝑋 ∈ [𝑎, 𝑏]} = 𝑃{𝑎 ≤ 𝑋 ≤ 𝑏} = ∫ 𝑓(𝑥) 𝑑𝑥 𝑏
𝑎
The probability of 𝑋 between 𝑎 and 𝑏 shown in the figure.
Now let 𝑎 = 𝑏 then probability at that point is zero as the area under function is negligible
𝑃{𝑋 = 𝑎} = ∫ 𝑓(𝑥) 𝑑𝑥 𝑎
𝑎
= 𝐹(𝑎) − 𝐹(𝑎) = 0
Hence the probability of continuous random variable at given fixed point s zero.
-
Dr. Adnan Khan March 24, 2014
2
Example: Suppose that X is a continuous random variable whose probability density function is
given by 𝑓(𝑥)
(a) Find 𝐶? (b) Find 𝑃(𝑋 ≥ 1)
𝑓(𝑥) = {𝐶(4𝑥 − 2𝑥2), 0 < 𝑥 < 2
0 , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Sol: Since
𝑃{𝑋 ∈ (−∞, ∞)} = ∫ 𝑓(𝑥) 𝑑𝑥 ∞
−∞
= 1
𝑃{𝑋 ∈ (−∞, ∞)} = ∫ 𝐶(4𝑥 − 2𝑥2) 𝑑𝑥 2
0
= 1
𝐶 = 3
8
Hence Probability mass function is given as
𝑓(𝑥) = {3
8(4𝑥 − 2𝑥2), 0 < 𝑥 < 2
0 , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
(b) 𝑃(𝑋 ≥ 1)
𝑃{𝑋 ≥ 1} = ∫3
8(4𝑥 − 2𝑥2) 𝑑𝑥
∞
1
𝑃{𝑋 ≥ 1} = ∫3
8(4𝑥 − 2𝑥2) 𝑑𝑥
2
1
=1
2
Example: The amount of time in hours that a computer functions before breaking down is a
continuous random variable with probability density function given by 𝑓(𝑥). What is the
probability that
(a) A computer will function between 50 and 150 hours before breaking down?
(b) It will function for fewer than 100 hours?
𝑓(𝑥) = {𝜆𝑒−
𝑥100, 𝑥 ≥ 0
0 , 𝑥 < 0
Sol: Since total probability is equal to one then
𝑃{𝑋 ∈ (−∞, ∞)} = ∫ 𝑓(𝑥) 𝑑𝑥 ∞
−∞
= 1
𝑃{𝑋 ∈ (−∞, ∞)} = ∫ 𝜆𝑒−𝑥
100 𝑑𝑥 ∞
−∞
= 1
-
Dr. Adnan Khan March 24, 2014
3
𝑃{𝑋 ∈ (−∞, ∞)} = ∫ 𝜆𝑒−
𝑥100 𝑑𝑥
∞
0
= 1
𝜆 = 1
100
(a) The probability of a computer will function between 50 and 150 hours before breaking down
is given as
𝑃{50 ≤ 𝑋 ≤ 100} = ∫1
100𝑒−
𝑥100 𝑑𝑥
100
50
𝑃{50 ≤ 𝑋 ≤ 100} = 𝑒−12 − 𝑒−
32 ≈ 0.384
(b) The probability that the computer will function for fewer than 100 hours is calculated as
𝑃{𝑋 < 100} = ∫1
100𝑒−
𝑥100 𝑑𝑥
100
0
≈ 0.633
Example: The lifetime in hours of a certain kind of radio tube is a random variable having a
probability density function given by
𝑓(𝑥) = {0 , 𝑥 ≤ 100
100
𝑥2 , 𝑥 > 100
What is the probability that exactly 2 of 5 such tubes in a radio set will have to be replaced
within the first 150 hours of operation?
Sol: Let 𝐸𝑖 , 𝑖 = 1,2,3,4, ⋯ be the events such that ith tube is replaced then
𝑃(𝐸𝑖) = ∫ 𝑓(𝑥) 𝑑𝑥 150
−∞
𝑃(𝐸𝑖) = ∫100
𝑥2 𝑑𝑥
150
100
=1
3
We assumed that all tubes open independently
𝑃(2 of 5 ) = (52
) × (1
3)
2
× (2
3)
3
=80
243= 0.34
Example: Find the value of 𝑐 in given probability mass function 𝑓(𝑥)
𝑓(𝑥) = {0 , 𝑥 ≤ 0
𝑐𝑥𝑒−𝑥 , 𝑥 > 0
Sol: the total probability should be equal to 1
-
Dr. Adnan Khan March 24, 2014
4
𝑃(𝑋) = ∫ 𝑓(𝑥)𝑑𝑥∞
−∞
= 1
𝑃(𝑋) = ∫ 𝑐𝑥𝑒−𝑥𝑑𝑥∞
0
= 1 ⇒ 𝑐 = 1
Hence
𝑓(𝑥) = {0 , 𝑥 ≤ 0
𝑥𝑒−𝑥 , 𝑥 > 0
-
Dr. Adnan Khan March 31, 2014
1
MATH 230: Probability
Lec # 19
Normal random variable:
Let 𝑋 be a continuous random variable then 𝑋 is said to be normally distributed or 𝑋 is normal
random variable with parameter 𝜇 and 𝜎2 if
𝑓(𝑥) = 1
√2𝜋𝜎𝑒
−(𝑥−𝜇)2
2𝜎2 , −∞ < 𝑥 < +∞
Then 𝑓(𝑥) is probability density function. It is denoted by 𝑋~ 𝑁(𝜇, 𝜎) and this density function
is belled shaped and symmetric about 𝜇
Fig
To prove 𝑓(𝑥) is an pdf,the integral should be equal to 1
∫ 𝑓(𝑥)𝑑𝑥∞
−∞
= ∫1
√2𝜋𝜎𝑒
−(𝑥−𝜇)2
2𝜎2 𝑑𝑥∞
−∞
∫ 𝑓(𝑥)𝑑𝑥∞
−∞
= 1
√2𝜋𝜎∫ 𝑒
−(𝑥−𝜇)2
2𝜎2 𝑑𝑥∞
−∞
Let 𝑦 = 𝑥 − 𝜇
𝜎 ⇒ 𝑑𝑥 = 𝜎𝑑𝑦
∫ 𝑓(𝑥)∞
−∞
= 1
√2𝜋𝜎∫ 𝑒−
𝑦2
2 𝜎 𝑑𝑦∞
−∞
∫ 𝑓(𝑥)∞
−∞
= 1
√2𝜋∫ 𝑒−
𝑦2
2 𝑑𝑦∞
−∞
We have to show that
𝐼 = ∫ 𝑒−
𝑦2
2 𝑑𝑦∞
−∞
= √2𝜋
Let
𝐼2 = ∫ 𝑒−𝑦2
2 𝑑𝑦∞
−∞
× ∫ 𝑒−𝑥2
2 𝑑𝑥∞
−∞
𝐼2 = ∫ ∫ 𝑒−(𝑥2+𝑦2)
2 𝑑𝑦∞
−∞
𝑑𝑥 ∞
−∞
Changing variables to polar coordinates
-
Dr. Adnan Khan March 31, 2014
2
𝑥 = 𝑟 cos 𝜃
𝑦 = 𝑟 sin 𝜃
𝑑𝑦 𝑑𝑥 = 𝑟 𝑑𝜃 𝑑𝑟
𝐼2 = ∫ ∫ 𝑒−𝑟2
2
2𝜋
0
𝑟 𝑑𝜃𝑑𝑟 ∞
0
𝐼2 = 2𝜋 × ∫ 𝑒−𝑟2
2
∞
0
𝑟 𝑑𝑟
𝐼2 = 2𝜋 ∵ ∫ 𝑒−𝑟2
2
∞
0
𝑟 𝑑𝑟 = 1
𝐼 = √2𝜋
Hence
∫ 𝑓(𝑥)∞
−∞
= 1
√2𝜋∫ 𝑒−
𝑦2
2 𝑑𝑦∞
−∞
=1
√2𝜋× √2𝜋 = 1
Standard Normal
Let 𝑍 =𝑋−𝜇
𝜎 then standard normal distribution is given as
𝑓(𝑧) = 1
√2𝜋𝑒−
𝑧2
2 , −∞ < 𝑧 < +∞
Expectation of Normal random variable:
Let 𝑋~𝑁(𝜇, 𝜎) and 𝑍 =𝑋−𝜇
𝜎
𝐸[𝑍] = ∫ 𝑧 𝑓(𝑧)𝑑𝑧 ∞
−∞
𝐸[𝑍] = 1
√2𝜋∫ 𝑧 𝑒−
𝑧2
2 𝑑𝑧∞
−∞
= −1
√2𝜋 𝑒−
𝑥2
2 |−∞
∞
= 0
𝑋 = 𝜇 + 𝜎𝑍
𝐸[𝑋] = 𝐸[𝜇 + 𝜎𝑍] = 𝜇 + 𝜎𝐸[𝑍]
𝐸[𝑋] = 𝜇 ∵ 𝐸[𝑍] = 0
-
Dr. Adnan Khan March 31, 2014
3
Variance of Normal random variable:
𝑉𝑎𝑟(𝑋) = 𝐸[𝑋2] − (𝐸[𝑋])2
Using same substitution
𝐸[𝑍2] = ∫ 𝑧2 𝑓(𝑧)𝑑𝑧 ∞
−∞
𝐸[𝑍] = 1
√2𝜋∫ 𝑧2 𝑒−
𝑧2
2 𝑑𝑧∞
−∞
𝐸[𝑍2] = 1
𝑉𝑎𝑟[𝑍] = 𝐸[𝑍2] − (𝐸[𝑍])2
𝑉𝑎𝑟[𝑍] = 0
𝑋 = 𝜇 + 𝜎𝑍
𝑉𝑎𝑟[𝑋] = 𝑉𝑎𝑟[𝜇 + 𝜎𝑍] = 𝜎2𝑉𝑎𝑟[𝑍]
𝑉𝑎𝑟[𝑋] = 𝜎2 ∵ 𝑉𝑎𝑟[𝑍] = 1
-
Dr. Adnan Khan April 7, 2014
1
MATH 230: Probability
Lec # 21
Theorem: Let 𝑋 be normally distributed with parameters 𝜇 and 𝜎2. If 𝑌 = 𝑎𝑋 + 𝑏 then
𝑌 is normally distributed with parameters 𝑎𝜇 + 𝑏 and 𝑎2𝜎2
Proof: Let 𝐹𝑦(𝑥) be the cumulative distribution function (CDF) of random variable 𝑌
𝐹𝑦(𝑥) = 𝑃(𝑌 ≤ 𝑥)
𝐹𝑦(𝑥) = 𝑃(𝑎𝑋 + 𝑏 ≤ 𝑥)
𝐹𝑦(𝑥) = 𝑃 (𝑋 ≤𝑥 − 𝑏
𝑎)
𝐹𝑦(𝑥) = 𝐹𝑥 (𝑥 − 𝑏
𝑎)
∵𝑑
𝑑𝑥𝐹𝑥(𝑥) = 𝑓𝑥(𝑥)
𝑓𝑦(𝑥) = 𝑑
𝑑𝑥𝐹𝑦(𝑥) =
𝑑
𝑑𝑥𝐹𝑥 (
𝑥 − 𝑏
𝑎) =
1
𝑎𝑓𝑥 (
𝑥 − 𝑏
𝑎)
1
𝑎𝑓𝑥 (
𝑥 − 𝑏
𝑎) =
1
𝑎
1
√2𝜋𝜎 ∫ exp (−
{𝑥 − 𝑎
𝑎− 𝜇}
2
2𝜎2) 𝑑𝑥
∞
−∞
1
𝑎𝑓𝑥 (
𝑥 − 𝑏
𝑎) =
1
𝑎
1
√2𝜋𝜎 ∫ exp (−
{𝑥 − (𝑎𝜇 + 𝑏)}2
2𝑎2𝜎2) 𝑑𝑥
∞
−∞
𝑓𝑦(𝑥) = 1
√2𝜋(𝑎𝜎) ∫ exp (−
{𝑥 − (𝑎𝜇 + 𝑏)}2
2(𝑎𝜎)2) 𝑑𝑥
∞
−∞
Hence 𝑌 is normally distributed with parameters 𝑎𝜇 + 𝑏 and 𝑎2𝜎2
Example: If 𝑋~𝑁(𝜇, 𝜎2) then 𝑍~𝑁(0,1) where 𝑍 = (𝑥 − 𝜇)/𝜎 ?
Sol: Let 𝑋~𝑁(𝜇, 𝜎2) here 𝑎 = 1/𝜎 and 𝑏 = −𝜇/𝜎 Therefore
𝑍~𝑁 (1
𝜎𝜇 + (−
𝜇
𝜎) ,
1
𝜎2𝜎2)
𝑍~𝑁(0,1)
-
Dr. Adnan Khan April 7, 2014
2
Normal approximation to the binomial:
Let 𝑠𝑛 be the number of success in 𝑛 independent trials, each resulting in success with
probability 𝑝 then
𝑃 {𝑎 ≤𝑠𝑛 − 𝑛𝑝
√𝑛𝑝(1 − 𝑝)≤ 𝑏 } → Φ(𝑏) − Φ(𝑎) as 𝑛 → ∞
Normal approximation to binomial is better when 𝑛𝑝(1 − 𝑝) is large. Usually normal
approximation will quite good for values of 𝑛 with 𝑛𝑝(1 − 𝑝) ≥ 10.
Continuity correction:
Since binomial is discrete valued random variable and the probability of continuous random
variable at some discrete point is zero. In order to calculate the probability of continuous random
variable we need an interval hence this correction is made to approximate the binomial.
𝑃(𝑋 = 𝑖) = 𝑃 (𝑖 −1
2< 𝑋 < 𝑖 +
1
2)
Example: Let X be the number of times that a fair coin that is flipped 40 times lands on heads.
Find the probability that 𝑋 = 20. Use the normal approximation and then compare it with the
exact solution.
Sol:𝑋~𝐵𝑖𝑛(40,1/2)
𝑃(𝑋 = 20) = (4020
) (1
2)
20
(1
2)
20
= 0.1254
𝑋~𝑁(𝑛𝑝, 𝑛𝑝(1 − 𝑝)) or 𝑋~𝑁(20,10)
𝑃(𝑋 = 20) = 𝑃(19.5 < 𝑋 < 20.5)
𝑃(19.5 < 𝑋 < 20.5) = 𝑃 {19.5 − 20
√10<
𝑋 − 20
√10<
20.5 − 20
√10 }
𝑃(19.5 < 𝑋 < 20.5) = P {−0.16 <𝑋 − 20
√10< 0.16}
𝑃(19.5 < 𝑋 < 20.5) = Φ(0.16) − Φ(−0.16) ≈ 0.1272
Now approximate the binomial with Poisson random variable
𝑋~𝑃𝑜𝑖(𝑛𝑝) or 𝑋~𝑃𝑜𝑖(20)
𝑃(𝑋 = 20) = 𝑒−202020
20!≈ 0.088
Here Poisson approximation is poor as 𝑛𝑝 = 20 is good but 𝑛 is not large
-
Dr. Adnan Khan April 7, 2014
3
Example: The ideal size of a first-year class at a particular college is 150 students. The college,
knowing from past experience that, on the average, only 30 percent of those accepted for
admission will actually attend, uses a policy of approving the applications of 450 students.
Compute the probability that more than 150 first-year students attend this college?
Sol: Let 𝑋 be number of students that attend the college then 𝑋~𝐵𝑖𝑛(450,0.3). Using normal
approximation 𝑋~𝑁(𝑛𝑝, 𝑛𝑝(1 − 𝑝)) or 𝑋~𝑁(135,94.5)
𝑃(𝑋 ≥ 150.5) = 𝑃 {𝑋 − 135
√94.5≥
150.5 − 135
√94.5}
𝑃(𝑋 ≥ 150.5) = 𝑃 {𝑋 − 135
√94.5≥ 1.59} = 1 − Φ(1.59) ≈ 0.0559
Prob1Prob2Prob3Prob4Prob5Prob6Prob7Prob8Prob9