0% found this document useful (0 votes)
9 views131 pages

Probability & Statistics

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)
9 views131 pages

Probability & Statistics

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/ 131

BITS Pilani

Pilani Campus

PROBABILITY & STATISTICS


Probability & Statistics, CSIW ZC213
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Lecture 1

PROBABILITY CONCEPT WHY PROBABILITY


The concept of probability is frequently encountered in everyday
communication. Probability theory constitutes a branch of mathematics for
Example, a physician may say that a patient has a 50-50 chance of dealing with uncertainty
surviving a certain operation. Probability is the study of randomness and uncertainty. In the
Another physician may say that she is 95 percent certain that a early days, probability was associated with games of chance
patient has a particular disease. (gambling).
Most people express probabilities in terms of percentages. 1. The range of applications extends beyond games into business
decisions, insurance, law, medical tests, and the social sciences.
But, it is more convenient to express probabilities as fractions. Thus, 2. The stock market, “the largest casino in the world,” cannot do
we may measure the probability of the occurrence of some event by without it.
a number between 0 and 1.
The more likely the event, the closer the number is to one. An event 3. The telephone network, call centers and airline companies
that can’t occur has a probability of zero, and an event that is with their randomly fluctuating loads could not have been
certain to occur has a probability of one economically designed without probability theory
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
RANDOM EXPERIMENTS SAMPLE SPACE
The set of all possible outcomes for an experiment is the
The experiments (trials) when performed repeatedly sample space and is designated by S.
Giving different results (outcomes) are called The roll of a dice
Random experiments. A usual six-sided die has a sample space
S = { 1, 2, 3, 4 , 5 , 6 }
Experiment Outcomes Toss a coin Three Times
Flip a coin Heads, Tails First Coin Tossing : H, T
Second Coin Tossing : H, T
Numbers: 0, 1, 2, ..., Third Coin Tossing : H, T
Exam Marks
100
Assembly Time t > 0 seconds Sample Space Solution:
S = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}
Course Grades F, D, C, B, A, A+
5 6
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

EVENT Events:

An event consists of one or more outcomes and is a subset of the A  B and B  A


sample space
Example: A dice is rolled. Event A is rolling an even number.
A={2,4,6}
A and B
A and B

A B
A  B B  A
A B A B

A and B are mutually A and B are not


A & B are Mutually Exclusive A & B are not Mutually Exclusive
exclusive. mutually exclusive. 8
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
REVIEW OF SET THEORY COUNTING PRINCIPLES

1. A = ( A) = A i.e complement of a complement is A itself Sum Rule Principle : Suppose some event E can occur in m
2. Distributive laws: ways and a second event F occur in n ways, and suppose both
(i) A  (B  C) = (A  B)  (A  C)
events cannot occur Simultaneously. Then E or F can occur
in m + n ways.
(ii) A  (B  C) = (A  B)  (A  C)
Example : Suppose there are 8 male professors and 5 female
3. De Morgan’s laws: professors teaching probability class.
(i) A  B = A  B
(ii) A  B = A  B A Student can choose a professor in 8 + 5 = 13 Ways
4. Commutative laws: 5. (i) (A  B)  (A  B) = A
Suppose there are 3 different books on probability 5 different
(i)𝐴 ∪ 𝐵 = 𝐵 ∪ 𝐴 (ii) (A  B)  (B  A) = B
books on statistics and 4 different books on numerical
(ii) 𝐴 ∩ 𝐵 = 𝐵 ∩ 𝐴 (iii) A  A =  ; A  A = S or U methods.
Then there are 3 + 5 + 4 = 12 ways to choose one of the books
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Multiplication Counting Rule Fundamental principles of counting


If one event can occur in m ways and a second event can occur in n
ways, the number of ways the two events can occur in sequence is
m· n ways. This rule can be extended for any number of events
If a task A can be performed in m ways,
occurring in a sequence while a task B can be performed in n ways,
Example 1: A meal consists of a main dish, a side dish, and a dessert.
then performing task
How many different meals can be selected if there are 4 main dishes,
2 side dishes and 5 desserts available?
# of main # of side # of
dishes dishes desserts
4  2  5 = 40
There are 40 meals available.
11 11/9/2024 12
BITS Pilani, Pilani Campus
Fundamental principles of counting Example 2:

In how many ways a president and a vice president can be


If a task A can be performed in m ways, chosen from a group of 25 for village panchyat .

while a task B can be performed in n ways,


then performing task Solution: From a group of 25 a president can be chosen in 25
• A or B can be in any one of m+n ways. ways and a Vice president can be chosen in 24 ways

• A and B can be in any one of mn ways .


The number of ways of a president and a vice president can be
chosen in 25*24=600 ways. using multiplication principle

11/9/2024 13
BITS Pilani, Pilani Campus

PERMUTATIONS Permutation of n Objects Taken r


at a Time
A permutation is an ordered arrangement of objects. The number The number of permutations of n elements taken r at a time is
of different permutations of n distinct
n Pr = n! .
objects is n!. (n − r)!
# in the
“n factorial”
n! = n · (n – 1)· (n – 2)· (n – 3)· …· 3· 2· 1 group # taken from
Example 3: the group

How many different surveys are required to cover all


possible question arrangements if there are 7 questions in Example 4: You are required to read 5 books from a list of
a survey? 8. In how many different orders can you do so?

Pr = 8 P5 = 8! = 8! = 8  7  6  5  4  3  2  1 = 6720 ways
n
7! = 7 · 6 · 5 · 4 · 3 · 2 · 1 = 5040 surveys (8 − 5)! 3! 3  2 1

15
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
Suggested Problems Example 2(3.22)
Example 1: In how many ordered ways can a television direct If among n objects k are alike and the others are all distinct, the numbe
or schedule 6 different commercials during the 6 time slots r of permutations of these n objects taken all together in n!/k!.
allocated to commercials during the telecast of the first per (a) How many permutations are there of the letters of the world CLASS
iod of a hockey game? ?
Answer: Since the CLASS contains 2 letters same , therefore the numbe
Answer: Here n = 6, r = 6
r of permutations of the world CLASS is n!/k!
Therefore nPr = 6P6 =6!/(6-6) ! = 6! = 720 ways. = 5!/2! = (5x4x3x2x1)/2x1 = 60 ways.
OR (b) In how many ways can the television director of Exercise 3.21 fill
First commercial in first slot can be chosen in 6 ways, the 6 time slots allocated to commercials, if there are 4 different co
for 2nd slot remaining 5 commercial can be chosen in 5 ways mmercials, of which a given one is to be shown 3 times while each
and so on. Therefore 6 commercial in 6 slot can be chosen of the others is to be shown once?
Answer: n = 6 commercials out of which one commercial is repeated 3
in
times. Therefore no. of ways is n!/k! = 6!/3! =120 ways
= 6x5x4x3x2x1 = 720 ways
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Combination of n Objects Taken r


at a Time Example 3(3.25)
A combination is a selection of r objects from a group of n
things when order does not matter. The number of A carton of 12 rechargeable batteries contains one that is
combinations of r objects selected from a group of n objects defective. In how many ways can an inspector to choose
nC r =
is n! . 3 of the batteries and (a) get the one that is defective; (b)
# in the (n − r )! r ! not get the one that is defective
collection # taken from the
collection Answer: n = 12, one is defective , 11 are good
Example: You are required to read 5 books from a list of 8. (a) The number of ways that the inspector choose 3 of the
In how many different ways can you do so if the order batteries and get the one that is defective is 11𝐶2 x 1C1
doesn’t matter? = 11!/9! 2! = 55 ways
(b) Not get the one that is defective can be chosen in 11𝐶3 w
C 5 = 8! = 8  7  6  5! = 56 combinations ays =11!/ 8! 3! = 165 ways
8
3!5! 3!5!
19
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
PROBABILITY DEFINITION Example 2
If the outcome of a trial consists of n exhaustive, mutually exclusive
and equally likely possible cases, of which m of them are favorable Two Dice are thrown. What is the probability that sum
cases to an event E, then the probability of the numbers is shown is 9.
of the event E, usually denoted by P(E) is defined as Solution: (1,1), (1,2)(1,6) 
(2,1), (2,2)(2,6)
P(E) = m/n  
S = 
− 
where m is the number of outcomes which satisfy the event E and n is

the number of elements in sample space (6,1), (6,2)(6,6) 
Example 1: A school has 820 male students and 835 female students. If a student
from the school is selected at random, what is the probability that the student would
be a female? A = (3,6), (4,5), (5,4), (6,3)
835 Therefore 4
P( A) =
number of female students
Solution: P female = total number of studets =  .505
820 + 835 36
21 22
. BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Example 3 COMPLEMENTARY EVENTS

An urn contains 5 red and 8 white balls. If seven of The complement of Event E is the set of all outcomes in
them are drawn at random, what is the probability the sample space that are not included in event E.
that the drawn lot contains 2 red and 5 white (Denoted E′ ( E )( and read “E prime.” or E complement)
Solution: Total balls= 5 red+8 white =13 balls P(E) + P (E′ ) = 1 P(E) = 1 – P (E′ ) P (E′ ) = 1 – P(E)
S=13𝐶7 = 429 ways, the number of ways drawing 2 Example 4: There are 5 red chips, 4 blue chips, and 6 white chips
red balls out of 5 is 5C2 ways and number of ways in a basket. Find the probability of randomly selecting a chip that is
drawing 5 white balls from 8 is 8C5 ways not blue.
Therefore P(2R and 5 W balls)= 5c  8c = 140 2 5

13c 429 4
=  0.267
7
P (selecting a blue chip)
15
Using multiplication theorem
4 11
P (not selecting a blue chip) =1− =  0.733
15 15
23 24
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
AXIOMS OF PROBABILITY Suggested Problems

Axiom 1 : For any event A in S , 0  P(A)  1. Example (3.35): An experiment has the four possible mutually
exclusive outcomes A, B, C, D. Check whether the following
Axiom 2 : P(S) =1. assignments of probability are permissible:

(a) P(A)= 0.38, P(B) = 0.16, P(C) =0.11, P(D) = 0.35Permissible


Axiom 3 : If A1, A2, … An are mutually exclusive (b) P(A)= 0.31, P(B) = 0.27, P(C) =0.28, P(D) = 0.16 NOT
events in a sample space S, then (c) P(A)= 0.32, P(B) = 0.27, P(C) = -0.06, P(D) = 0.47 NOT
(d) P(A)= 1/2, P(B) = 1/4, P(C) = 1/8, P(D) = 1/16 NOT
(e) P(A)= 5/8, P(B) = 1/6, P(C) = 1/3, P(D) = 2/9 NOT
P(A1  A2  ….. An ) = P(A1) + P(A2) + ...+ P(An)

26
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

THE ADDITION RULE Example 2

The probability that event A or B will occur is given by A number is choosen from the numbers {1,2,3------50}What is the
probability that the number choosen is divisible by 6 or 8.
P (A U B) = P (A) + P (B) – P (A ∩ B ). Solution: Sample space S= out of 50 numbers one number can be
If events A and B are mutually exclusive, then the rule choosen in 50𝐶1 = 50 ways
can be simplified to P (A U B) = P (A) + P (B).
Let A be the event that the number is divisible by 6 and B be the
Example 1: You roll a dice. Find the probability that you roll a even that the number is divisible by 8. Then
number less than 3 or a 4.
A={6,12,18,24,30,36,42,48}, B={8,16,24,32,40,48}
The events are mutually exclusive P(A)= 8/50 , P(B)= 6/50, P (A ∩ B )=2/50
P (roll a number less than 3 or a 4) = P (number is less than 3) + P (4) Using Addition rule we get
2 1 3 P (A U B) = P (A) + P (B) – P (A ∩ B )
= + = = 0.5
6 6 6 P (A U B)= 8/50+6/50-2/50=12/50

27 28
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
Example 3 Continuation
A basket contains 3 black, 4 white and 5 red balls. 3 balls are 3c 4c 5c
choosen at random. What is the probability that = 3
+ + 3 3

(i) All are white, (ii) All are of same colour (iii) All are of different 12c 12c 12c
3 3 3

colours, (iv) Atleast one white (v) Atmost one is white (vi) one is
red. = 0.06818
Solution: Total balls= 3black+4 white+ 5 red =12 (iii) All are of different colours ⇒ it can be
12!
S = 12c3 =
9!3!
= 220 ways 1B&1W&1R
4c 4 P(All are of different colours)= P(1B&1W&1R)
=
= 3c  4c  5c
3
(i) P(All are white)=
12c 220 3
1
(using mutliplication
1 1

12c
(ii) All are of same colour implies it can be 3B or 3W or 3R
3
principle)
3 4  5
Therefore P(All are of same colour)=P(3B or 3Wor 3R)= = = 0.2727
220
=P(3B)+P(3W)+P(3R)
All are mutually exclusive 29 30
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Continuation Practice problems

(iv) Atleast one is white ⇒ 1.Suppose a student is selected at random from 80 students where
30 are taking mathematics, 20 are taking chemistry and 10 are taking
1W& 2others or 2W & 1 other or 3W & 0 others both. Find the probability ‘p’ that the student is taking Mathematics
P(atleast one is white)=P(1W& 2others)+P(2W & 1 or chemistry?.
other)+P(3W & 0 others) 2. If A and B are events with P(A U B) = 7/8, P(A ∩ B) = ¼ and P(A') = 5/8, find
P(A), P(B) and P(A ∩ B').
(4c1  8c2 ) + (4c2  8c1 ) + (4c3  8c0 )
=
12c3 2
[A=(A ∩B)U(A ∩B') => P(A ∩ B')= P(A) - P(A∩B)]
=
41
= 0.7454 And [B=(A ∩B)U(B ∩A') => P(B ∩ A')= P(B) - P(A∩B)]
220
Sol: (i)P(A)= 1- P(A') =1-5/8=3/8,
(v) P(Atmost one is white)= Do it yourself (ii) Using addition theorem we get
P (A U B) - P (A) + P (A ∩ B ) =P (B)
(vi) P(one is red)= Do it yourself
Therefore P (B)=7/8-3/8+1/4=3/4
(iii) P(A ∩ B')= P(A) - P(A∩B)
= 3/8-1/4=1/8
31 32
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
Continued Continued

3. If A, B, and C three events occurring in the sample space


S, then prove that P(AUBUC) = P(A) + P(B) + P(C) - 6. From 6 +ve numbers & 8 –ve numbers, 4 numbers are
P(A∩B) - P(B∩C) - P(A∩C) + P(A ∩ B ∩ C) chosen at random without replacement and multiply.
4. If A and B are events with P(A) =1/2, P(AUB) = 3/4 and What is the probability that the product is a +ve number?
P(B1) = 5/8, find P(A∩B), P(A1∩B1), P(A1 U B1) and Answer : To get the product of 4 no. as a +ve no., we
P(A1∩B).
should have A: 4+ve no. & 0 –ve no. B: 2+ve no. & 2 –
5. A box contain 15 balls which are numbered from 1 to 15.
A ball is drawn at random and the number is recorded. ve no. C: 0+ve no. & 4 –ve no.
Find the probability that the number is : (i) even, (ii) less Let D be the event of getting 4 no. that the product is a +ve
than 5, (iii) even and less than 5 no. i.e., P(D)=P(AUBUC)=P(A)+P(B)+P(C)
and (iv) even or less than 5. =[6𝑐4 ∗ 8𝑐0 + 6𝑐2 ∗ 8𝑐2 + 6𝑐0 ∗ 8𝑐4 ] / 14𝑐4
Answer : 7/15, 4/15, 2/15 and 9/15 = 0.5045

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Suggested Problems Suggested Problems

Example (3.39.) Show that P(A∩B) ≤ P(A) , P(AUB) ≥P(A) Example (3.51):If the probability of event A is p, the odds that it will occur are given by the
ratio of p to 1-p. Odds are usually given as a ratio of two positive integers having no common
Answer: (a) We know that A = (A∩B)U(A∩B1) factor, and if an event is more likely not to occur than to occur, it is customary to give the
odds that it will not occur rather than the odds that it will occur. What are the odds for or
P(A) =P[(A∩B)U(A∩B1)] = P(A∩B) + P(A∩B1), against the occurrence of an even if its probability is (a) 4/7 (b) 0.05 (c) 0.80
Answer : If the probability of event A is given by P(A) = a / (a+b), then the odd for
since (A∩B) & (A∩B1) are mutually exclusive events occurrence of the event is given by a:b
 P(A) ≥ P(A∩B), Since P(A∩B1) ≥ 0 (a) If p = 4/7 = 4/(4+3),
therefore odds for occurrence of the event is 4:3
(b) If p = 0.05 = 5/100 = 1 /20 = 1/(1+19)
(b) We know that AUB = (A∩B1)U(A∩B)U(B∩A1) therefore odd against the occurrence is 19:1
P(AUB)= P(A∩B1) + P(A∩B) + P(B∩A1) = P(A)+ P(B∩A1) , (c) If p = 0.80 = 80/100 = 4/5 = 4/(4+1)
therefore odds for occurrence of the event is 4:1
P(AUB) ≥ P(A) Since P(B∩A1) ≥ 0
35 36
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
BITS Pilani THE ADDITION RULE
Pilani Campus

The probability that event A or B will occur is given by


P (A U B) = P (A) + P (B) – P (A ∩ B ).
If events A and B are mutually exclusive, then the rule
can be simplified to P (A U B) = P (A) + P (B).
Example 1: You roll a dice. Find the probability that you roll a
number less than 3 or a 4.

The events are mutually exclusive


Probability & Statistics, CSIW ZC213 P (roll a number less than 3 or a 4) = P (number is less than 3) + P (4)

Lecture 2 38
BITS Pilani, Pilani Campus

Example 2 Example 3
A number is choosen from the numbers {1,2,3------50}What is the A basket contains 3 black, 4 white and 5 red balls. 3 balls are
probability that the number choosen is divisible by 6 or 8. choosen at random. What is the probability that
Solution: Sample space S= out of 50 numbers one number can be (i) All are white, (ii) All are of same colour (iii) All are of different
choosen in colours, (iv) Atleast one white (v) Atmost one is white (vi) one is
red.
Let A be the event that the number is divisible by 6 and B be the Solution: Total balls= 3black+4 white+ 5 red =12
even that the number is divisible by 8. Then
S=
A={6,12,18,24,30,36,42,48}, B={8,16,24,32,40,48}
P(A)= 8/50 , P(B)= 6/50, P (A ∩ B )=2/50 (i) P(All are white)=
Using Addition rule we get
P (A U B) = P (A) + P (B) – P (A ∩ B ) (ii) All are of same colour implies it can be 3B or 3W or 3R
P (A U B)= 8/50+6/50-2/50=12/50 Therefore P(All are of same colour)=P(3B or 3Wor 3R)=
=P(3B)+P(3W)+P(3R)
39 40
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
Continuation Continuation

(iv) Atleast one is white


=
1W& 2others or 2W & 1 other or 3W & 0 others
P(atleast one is white)=P(1W& 2others)+P(2W & 1
= 0.06818 other)+P(3W & 0 others)
(iii) All are of different colours it can be
1B&1W&1R =
P(All are of different colours)= P(1B&1W&1R)
= (using mutliplication (v) P(Atmost one is white)= Do it yourself
principle) (vi) P(one is red)= Do it yourself

41 42
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Practice problems Continued


1.Suppose a student is selected at random from 80 students where 30 3. If A, B, and C three events occurring in the sample space
are taking mathematics, 20 are taking chemistry and 10 are taking S, then prove that P(AUBUC) = P(A) + P(B) + P(C) -
both. Find the probability ‘p’ that the student is taking Mathematics or P(A∩B) - P(B∩C) - P(A∩C) + P(A ∩ B ∩ C)
chemistry?.
4. If A and B are events with P(A) =1/2, P(AUB) = 3/4 and
2. If A and B are events with P(A U B) = 7/8, P(A ∩ B) = ¼ and P(A') = 5/8, find
P(A), P(B) and P(A ∩ B').
P(B1) = 5/8, find P(A∩B), P(A1∩B1), P(A1 U B1) and
[A=(A ∩B)U(A ∩B') => P(A ∩ B')= P(A) - P(A∩B)]
P(A1∩B).
And [B=(A ∩B)U(B ∩A') => P(B ∩ A')= P(B) - P(A∩B)]
5. A box contain 15 balls which are numbered from 1 to 15.
Sol: (i)P(A)= 1- P(A') =1-5/8=3/8,
A ball is drawn at random and the number is recorded.
(ii) Using addition theorem we get
Find the probability that the number is : (i) even, (ii) less
P (A U B) - P (A) + P (A ∩ B ) =P (B)
than 5, (iii) even and less than 5
Therefore P (B)=7/8-3/8+1/4=6/8
and (iv) even or less than 5.
(iii) P(A ∩ B')= P(A) - P(A∩B)
Answer : 7/15, 4/15, 2/15 and 9/15
= 3/8-1/4=1/8
43
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
Continued Suggested Problems
Example (3.39.) Show that P(A∩B) ≤ P(A) , P(AUB) ≥P(A)
Answer: (a) We know that A = (A∩B)U(A∩B1)
P(A) =P[(A∩B)U(A∩B1)] = P(A∩B) + P(A∩B1),
since (A∩B) & (A∩B1) are mutually exclusive events
⇒ P(A) ≥ P(A∩B), Since P(A∩B1) ≥ 0

(b) We know that AUB = (A∩B1)U(A∩B)U(B∩A1)


P(AUB)= P(A∩B1) + P(A∩B) + P(B∩A1) = P(A)+ P(B∩A1) ,
P(AUB) ≥ P(A) Since P(B∩A1) ≥ 0

46
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

CONDITIONAL
Suggested Problems
PROBABILITY
Example (3.51):If the probability of event A is p, the odds that it will occur are
given by the ratio of p to 1-p. Odds are usually given as a ratio of two positive
integers having no common factor, and if an event is more likely not to occur than
to occur, it is customary to give the odds that it will not occur rather than the odds
that it will occur. What are the odds for or against the occurrence of an even if its
probability is (a) 4/7, (b) 0.05, c) 0.80
Answer : If the probability of event A is given by P(A) = a / (a+b), then the odd for
occurrence of the event is given by a:b
(a) If p = 4/7 = 4/(4+3),
therefore odds for occurrence of the event is 4:3
(b) If p = 0.05 = 5/100 = 1 /20 = 1/(1+19)
therefore odd against the occurrence is 19:1
(c) If p = 0.80 = 80/100 = 4/5 = 4/(4+1)
therefore odds for occurrence of the event is 4:1
47 48
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
Examples on Conditional Examples on Conditional
Probability Probability

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Examples on Conditional Examples on Conditional


Probability Probability
Example 4:53% of residents had homeowner’s insurance.
Of these, 27% also had car insurance. If a resident is
selected at random, find the probability that the resident
has both homeowner’s and car insurance.

Solution:

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


INDEPENDENT EVENTS Examples on Independent Events

1. A problem in statistics is given to 3 students A,B,C. Their


chances of solving it are 1/2,1/3/,1/4. Find the probability that
the problem is solved.
Solution: Problem can be solved by either A or B or C
Therefore we have to use
P(AUBUC) = P(A) + P(B) + P(C) - P(A∩B) - P(B∩C) - P(A∩C) +
P(A ∩ B ∩ C)
Using complement of the event i.e the problem is not solved .
Therefore P(problem solved is )=1-P(not solved)

Note: If A, B,C are independent


or P(A ∩ B) = P(A) × P(B) then

53 54
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Examples on Independent Misceallenous examples


Events
1. A box A contains 2 white balls and 4 black balls. Another box B
contains 5 white balls and 7 black balls. A ball is transferred from
box A to box B, than a ball is drawn from box B. What is the
probability that it is white.

2. A person X can hit a target three times in five shots, a second person
Y twice in five shots and a third person Z thrice in four shots. They
all fire once simultaneously. Find the probability that (i) atleast two
shot hit, (ii) exactly two shots hit.

3. If A and B are two events with P(A)= ½, P(B)= 1/3 and


Find

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Continued BAYES' THEOREM
4. The probability that Ram will hit a target is 0.56 and the
probability that shyam will hit the target is 0.45. The
probability that both will hit the target is 0.25. find the
probability that
(i) at least one will hit the target
(ii) exactly one will hit the target.

5. If A and B are two events such that

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Geometrical Representation of Bayes Proof:


theorem
We have
B

Using distributive law in the R.H.S, we get


Since B ∩ Ai (i = 1 to n) are mutually exclusive, we have by
applying addition rule of probability,

Using multiplication rule on each term on R.H.S, namely

59
BITS Pilani, Pilani Campus
The Theorem of Total Probability
(tree diagram )
Proof:
The conditional Probability of Ai for any i given B is given as
B

But we know that


A1 A2 A3 Ak &

Hence the theorem proved


61 62
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Examples Tree Diagram


Example 1. A certain firm has plants A, B, C Product is Defective

producing, respectively 35 %, 15% and 50% of the A

total output. The probabilities of a non – defective Product is not defective

product are, respectively, 0.75, 0.95 and 0.85.A Product is defective


Customer receives a bad product, what is the Firm B

Chance that product came from the plant C? Product is non-defective

Product is found to be Bad


C

Product is good

64
63
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
Solution Example 2
Let X: “ Customer receives a defective product”.
The chances that an academician, a business man and a
Clearly, P(X)= politician becoming Vice Chancellor of an university are
0.5, 0.3 and 0.2 respectively. The probability that
=0.17 research work will be promoted in the university by these
Therefore, the chance that product is manufactured 3 gentlemen are respectively are 0.8, 0.6 and 0.4. It is
found Research work has been promoted by the
by the plant C is university. What is the chance that an academician has
become the VC?
= = 0.4412

65
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Tree Diagram Continued


Research
0.8 Promoted
Example 3. An office has 4 secretaries handling
0.2 respectively 20%, 60%,15% and 5% of the files of all
0.5 A Not government reports. The probability that they misfile
such reports are respectively 0.05, 0.1, 0.1 and 0.05.
0.6 Yes
0.3 Find the probability that the misfiled report can be
VC
B 0.4 blamed on the first secretary.
0.2 Not Example 4. In a class 70% are boys and 30% are girls.
0.4 Yes 5% of boys and 3% of girls are irregular to the classes.
PP 0.6 What is the probability of a student selected at random
is irregular to the classes and what is the probability
Not
that the irregular student is a girl?
67 68
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
Continued Suggested Problems
Example (3.78). Two firms V and W consider bidding on a road-
Example 5. Three machines A, B and C produce building job, which may or may not be awarded depending on the
respectively 60%, 30% and 10% of the total amounts of the bids. Firm V submits a bid and the probability is ¾
number of items of a factory. The percentage of that it will get the job provided firm W does not bid. The probability
is ¾ that W will bid, and if it does, the probability that V will get the
defective outputs of these machines are 2%, 3% job is only1/3. (a) what is the probability that V will get the job? (b)
and 4%. An item is selected at random and is If V gets the job, what is the probability that W did not bid?
found to be defective. (i) Find the probability that Answer: Given P(V/W1)=3/4, P(W) = 1/3, P(V/W)=1/3 P(W1) = 2/3
the item was produced by machine C? (ii) What (a) V = (V∩W)U(V∩W1) = > P(V) = P(V∩W) + P(V∩W1)
is the probability that the item was produced by P(V) = P(V/W) P(W) + P(V/W1) P(W1) = 11/18
machine C or B? (b) P(W1/V) = P(V/W1) P(W1) / P(V) = 9/11

69 70
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

PROBABILITY & STATISTICS

BITS Pilani
Pilani|Dubai|Goa|Hyderabad Probability Distributions

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Binomial(Bernoulli trial) Experiments

A binomial experiment is a probability experiment that satisfies the following


conditions.
1. The experiment is repeated for a fixed number of trials, where each trial is
independent of other trials.
2. There are only two possible outcomes of interest for each trial. The outcomes
can be classified as a success (S) or as a failure (F).
3. The probability of a success P (S) is the same for each trial.
4. The random variable x counts the number of successful trials.

BITS Pilani, Pilani Campus

Symbol Description

n The number of times a trial is repeated. Example : Decide whether the experiment is a binomial
experiment. If it is, specify the values of n, p, and q, and list the possible values
p = P (S) The probability of success in a single trial. of the random variable x. If it is not a binomial experiment, explain why.
q = P (F) The probability of failure in a single trial. (q = 1 – p) You randomly select a card from a deck of cards, and note if the card
The random variable represents a count of the number of is an Ace. You then put the card back and repeat this process 8 times.
x
successes in n trials: x = 0, 1, 2, 3, … , n.
This is a binomial experiment. Each of the 8 selections represent an
independent trial because the card is replaced before the next one is drawn.
There are only two possible outcomes: either the card is an Ace or not.

n =8 p= 4 = 1 q = 1 − 1 = 12 x = 0,1,2,3,4,5,6,7,8
52 13 13 13
Problem : When a coin is tossed 4 times, find the
Binomial Distribution probability of getting (i) exactly one head,(ii) atmost 3
heads, (iii) atleast 2 heads

In a binomial experiment, the probability of exactly x successes in n trials is


given by the binomial distribution whose Pdf is given by Sol: Let x represent the number of heads
n! Let P(x)=P[X=x]=P(X) be the required Probability density
P[X = x] = P (x ) = nC x p xq n − x = p xq n − x . where p + q = 1
(n − x )! x ! function(Pdf)
Example 1: A bag contains 10 chips. 3 of the chips are red, 5 of the chips are Let x represents the number of heads
white, and 2 of the chips are blue. Three chips are selected, with replacement.
Find the probability that you select exactly one red chip

3
p = the probability of selecting a red chip = = 0.3
10
q = 1 – p = 0.7 P (1) = 3C 1(0.3)1(0.7)2
n=3
= 3(0.3)(0.49)
= 0.441

Problem : The probability that a pen manufactured by a factory


be defective is 0.1.If 12 such pens are manufactured, what is the
probability that (i) exactly 2 are defective,(ii) atleast 2 are
Continuation: defective,(iii)none is defective

Sol: Let x represent the number of defective pens


Let P(x)=P[X=x]=P(X) be the required Probability density
function(Pdf)
Continuation: Example : A bag contains 10 chips. 3 of the chips are red, 5 of the chips are white,
and 2 of the chips are blue. Four chips are selected, with replacement. Create a
probability distribution for the number of red chips selected.

3
p = the probability of selecting a red chip = = 0.3
10
q = 1 – p = 0.7
n=4
x = 0, 1, 2, 3, 4
x P (x )
0 0.240
1 0.412 The binomial probability
2 0.265 formula is used to find each
3 0.076 probability.
4 0.008

Example: The following probability distribution represents the


probability of selecting 0, 1, 2, 3, or 4 red chips when 4 chips are
selected.
Practice Problems:
1)In a consignment of electric lamps 5% are defective. If a
a.) Find the probability of selecting no more random sample of 8 lamps are inspected that is the probability
x P (x)
than 3 red chips.
0 0.24 that one or more lamps are defective.
1 0.412 b.) Find the probability of selecting at least 1
2 0.265 2) The probability that a person aged 60 years will live upto 70
red chip.
3 0.076 is 0.65. What is the probability that out of 10 persons aged 60
4 0.008
atleast 7 of them will live upto 70.
a.) P (no more than 3) = P (x  3) = P (0) + P (1) + P (2) + P (3)
= 0.24 + 0.412 + 0.265 + 0.076 = 0.993 Hint: let x represents the person aged 60 years will live upto
70 years. To find P(X  7)
b.) P (at least 1) = P (x  1) = 1 – P (0) = 1 – 0.24 = 0.76
Complement
Example:

Binomial Table:

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Sample Table

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Exercise: 4.13 Solution:

Use Table , to find


(a) B(7;18,0.45)
(b) b(7;18,0.45)
(c) B(8;11,0.95)
(d) b(8;11,0.95)
(e) 11

 b(k ;11, 0.35)


k =4

4
(f)  b(k ;10, 0.30)
k =2

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Exercise: 4.19

Q. A milk processing unit claims that of the processed


milk converted to powdered milk 95% does not spoil.
Find the probabilities that among 15 sample of the
powdered milk
(a)All 15 will not spoil
(b)At most 12 will not spoil
(c)At least 9 will not spoil

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Solution: Hyper geometric Distribution
Characteristics of a Hyper geometric
Random Variable
1. The experiment consists of randomly drawing n elements
without replacement from a set of N elements, X of which are
S’s (for success) and (N – X) of which are F’s (for failure).
2. The hyper geometric random variable x is the number of S’s in
the draw of n elements.

BITS Pilani, Pilani Campus

Hyper geometric Distribution Exercise:

The hyper geometric distribution gives the probability of an event occurring


multiple times when the number of possible successes is fixed. Q. A shipment of 120 burglar alarms contains 5 that are
N Number of possible trials defective. If 3 of these alarms are randomly selected
n Number of actual trials
X Number of possible successes
and shipped to a customer, find the probability that
x Number of actual successes the customer will get one bad unit by using.
(a)The formula for hyper geometric distribution
 X  N − X 
 
x n − x  (b)The formula for the binomial distribution as an
Pr(x successes out of n trials) =   
N  approximation
 
n 
N  N!
where  =
 x  x !(N − x )!

BITS Pilani, Pilani Campus


Solution: Solution:

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Example : A carton contains 24 light bulbs, three of which are defective.


What is the probability that, if a sample of six is chosen at random from the Example: Suppose that automobiles arrive at a
carton of bulbs, a) no defective b)3 will be defective? dealership in lots of 10 and that for time and resource

= x) =
( ) ( )
3 21
6− x
considerations, only 5 out of each 10 are inspected for
( )
x
P( X 24 safety. The 5 cars are randomly chosen from the 10 on
6
the lot. If 2 out of the 10 cars on the lot are below

0
3   21 
 6 
    = 0.40316 standards for safety, what is the probability that at least 1
P ( X = 0) =
 24 
6 
i.e., no defective
out of the 5 cars to be inspected will be found not
 
meeting safety standards?
P ( X = 3) =
(33 ) (321 ) = 0.00988
(624 ) i.e.,3 will be
defective.
N= 10 possible trials n= 5 actual trials
X = 2 possible successes x= 1 actual successes
N= 10 possible trials n= 5 actual trials
X = 2 possible successes x= 1 actual successes

 2  (10 − 2 )   2  8  2! 8! Example : In a communication system one telephone number out of fifteen called between
 1  (5 − 1)   1  4 
     
2 pm and 3pm on wee days is busy. What is the probability that if 6 randomly selected
1!1! 4!4! 5 telephone numbers are called
P (1) = = = = = 0.556
 10   10  10! (i) not more than three (ii) at least three of them will be busy.
5 5
9 Here x: telephone number is busy x 6− x
 1   14 
    5!5! Ans: Here n = 6, p = 1/15 q = 14/15; P(x) = 6c x    
 15   15 

 2  (10 − 2 )   2  8  2! 8! (i)The probability that not more than three will be busy
 2  (5 − 2 )   2  3 
P ( 2) =
   =
   =
1!1! 3!5!
=
2
= 0.222
=P (x ≤ 3) = P(0) + P(1) + P(2) + P(3) = 0.9997
 10   10  10! 9
5 5 (ii) The probability that at least three of them will be busy = P (x ≥ 3)
    5!5!
Thus, P(1) + P(2) = 0.556 + 0.222 = 0.778. or = P(3) + P(4) + P(5) + P(6) = 0.005
P(X  1) = 1 − P(X  1) = 1 - P(0) = 1 - 0.2222 = 0.778

BITS Pilani
Pilani Campus
Mean & Variance :

SSWT ZC111, P&S


132

Contact session 5

BITS Pilani, Pilani Campus


Example:

Question: Find the mean and variance of probability distribution of the number of
heads obtained in 3 flips of balanced coin Variance:
Answer:
X= Find the mean of probability distribution of the number of heads obtained in 3
flips of balanced coin 2 2 2 2 2
 1  1  1  1  1
x = 0,1, 2, 3  2 ( X ) = E  X −  =  0 −  f ( 0 ) + 1 −  f (1) +  2 −  f ( 2 ) +  3 −  f ( 3)
 2  2  2  2  2
1 3 3 1
f ( 0) = f (1) = f ( 2) = f ( 3) = 3
8 8 8 8 =
4
 ( X ) = E ( X ) = 0 f ( 0 ) + 1 f (1) + 2 f ( 2 ) + 3 f ( 3)
1 3 3 1
= 0  + 1 + 2  + 3 
8 8 8 8
3 6 3 12 3 133 134
= + + = =
8 8 8 8 2

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Mean and Variance of the Binomial distribution: Mean of the Binomial distribution (continuing) :
Let X follows binomial distribution with
Putting x=0, first term will be zero

f ( x ) = ( nx ) p x (1 − p )
n− x
, x = 0,1, 2,..., n
1 n ( n − 1)! p  p (1 − p )
x −1 n− x
n
=
( x − 1)! ( n − x )!
Where
n=total no of trails x =1
p=probability of success
( n − 1)! p x−1 (1 − p )
n− x
n
= np 
E ( X ) =  x  f ( x ) =  x  ( nx ) p x (1 − p )
n n
n− x
x =1 ( x − 1)!( n − x )!
x =0 x =0
( n − 1)! p x −1 (1 − p )( ) (
n −1 − x −1)
n n
n!
= x p x (1 − p ) = np 
n− x

x =0 x !( n − x )! x =1 ( x − 1)!( n − 1) − ( x − 1)
135 136

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Mean of the Binomial distribution (continuing) : Mean and variance of the Binomial distribution :

The Mean and variance of the binomial distribution are

b( x; n, p )
Let x − 1 = y; n − 1 = m

 = np and  2 = npq
m
m!
= np p y (1 − p )
m− y

y =0 y !( m − y )!

= np

E ( X ) = np
137 138

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Example: Example:
Question: In a bag 5 out of 20 are defective. Find the mean of the probability distribution of the number of
Question: Find the mean and variance of the probability distribution of the number of heads obtained in 3 defective in a sample of the randomly chosen for inspection.
flips a balanced coin.
Answer:
Answer: X= Number of heads in flipping a coin thrice

1 1
n = 3; p = ,q =
2 2
1 3
 = np = 3  =
2 2
1 1 3
2 = npq = 3   =
2 2 4 139 140

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Mean and variance of linear combination of Random variables
Example:
Theorem: If a and b are any constants, then
Question: If X any random variable with mean 5 and Variance 2, calculate the mean
and Variance of Y = 2 X − 3

E(X ) = 5; 2 (X ) = 2
E ( aX + b ) = aE ( X ) + b
Va r ( aX + b ) = a 2 var ( X ) E (Y ) = E ( 2 X − 3) = 2 E ( X ) − 3
= 25 − 3 = 7

 2 (Y ) =  2 ( 2 X − 3) = 2 2 var ( X )
= 4 2 = 8

141 142

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Example: Example:

In 256 sets of 12 tosses of a fair coin, in how many cases may one expect 8 If the mean is 3 and variance is 4 of a random variable 𝑋, check whether 𝑋
heads and 4 tails . follows binomial distribution?

Solution: Let 𝑋 be a random variable denoting the number of heads(remaining Solution: 𝜇 = 𝑛𝑝 = 3 and 𝜎 = 𝑛𝑝𝑞 = 4.
tails). Here 𝑛 = 12 . Therefore,
1 𝑛𝑝 3 1 3
Probability of getting heads 𝑝 = 1/2, therefore 𝑞 = 2 . = 4 . This implies 𝑞 = 4 . Hence 𝑞 = 4/3. This is not possible.
𝑛𝑝𝑞
12 1 8 1 4
Hence, 𝑃 𝑋 = 8 = ( ) = 0.12.
8 2 2
SO 𝑋 does not follow the binomial distribution
Therefore, the number of times to get 8 heads and 4tails appearing in 256
sets= 256*0.12=31 times.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Example: Exercise:

The mean and variance of Binomial distribution are 16 and 8. Find 𝑃 𝑋 ≥ 3 . 1. The probability is 0.02 that an item produced by a factory is defective. A shipment of 10,000
items is sent to a warehouse. Find the expected number 𝐸 defective items and the standard
deviation 𝜎.
1
Solution: 𝜇 = 𝑛𝑝 = 16, 𝜎 = 𝑛𝑝𝑞 = 8 . This gives 𝑞 = 1/2 and hence 𝑝 = 2 . 2. A students takes an 18-questions multiple choice exam, with 4 choices per question.
Suppose one of the choices is obviously incorrect, and the student makes an “educated “
Therefore, 𝑛𝑝 = 16 and this gives 𝑛 = 32. guess of the remaining choices. Find expected number 𝐸 of correct answers and the
standard deviation 𝜎.
1
Thus, 𝑃 𝑋 ≥ 3 = 1 − 𝑃 0 + 𝑃 1 + 𝑃 2 = 0.9999 3. The probability that a man hits the target is 𝑝 = . He fires 100 times. Find the expected
10
number of times he will hit the target.

Ans 1. 𝜇 = 100, 𝜎 = 12 2. 𝐸 = 200, 𝜎 = 2 3. 𝐸 = 10.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Chebyshev’s Theorem: Example

The standard deviation 𝜎 of a random variable 𝑋 measures the spread of the Suppose 𝑋 is a random variable with mean 𝜇 = 100 and standard deviation 𝜎 = 5.
values of 𝑋 about the mean 𝜇 of 𝑋. Accordingly, for smaller values of 𝜎, we a) Find the conclusion one can derive from Chebyshev’s inequality for 𝑘 = 2 and 𝑘 = 3.
would expect that 𝑋 will be closer to its mean 𝜇. This intuitive expectation is b) Estimate the probability that 𝑋 lies between 80 and 120.
made more precise by the following inequality c) Find an interval [𝑎, 𝑏] about the mean 𝜇 = 100 for which the probability that 𝑋 lies in the
interval is at least 99 percent.
Solution: a) Setting 𝑘 = 2, we get
Chebyshev’s Inequality: 1 1
𝜇 − 𝑘𝜎 = 100 − 2 5 = 90, 𝜇 + 𝑘𝜎 = 100 + 2 5 = 110, 1 − =1− =
𝑘2 22
Let 𝑋 be a random variable with mean 𝜇 and standard deviation 𝜎 . 3
.
4
Then for any positive number 𝑘, the probability that value of 𝑋 lies Thus, from Chebshev’s inequality we can conclude that probability that 𝑋 lies between 90 and
1
in the interval 𝜇 − 𝑘𝜎 ≤ 𝑋 ≤ 𝜇 + 𝑘𝜎 ≥ 1 − 2 . 3
110 is at least .
𝑘 4
8
Similarly for 𝑘 = 3 we get 𝑃 85 ≤ 𝑋 ≤ 115 ≥ .
9
b) Here 𝑘𝜎 = 20, since 𝜎 = 5, we get 5𝑘 = 20 this implies 𝑘 = 4. Thus, by Chebyshev’s
inequality
1 1 15
𝑃 80 ≤ 𝑋 ≤ 120 ≥ 1 − = 1− = .
𝑘2 42 16

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Example

1
Example:
c) Here we set, 1 − 𝑘 2 = 0.99 and solve for 𝑘. This yields
1 1
1 − 0.99 ≥ 𝑘 2 or 0.01 = 𝑘 2 this implies 𝑘 = 10.
Thus the desired interval is,
𝑎, 𝑏 = 𝜇 − 𝑘𝜎, 𝜇 + 𝑘𝜎 = 100 − 10 5 , 100 + 10 5 = 50,150 .

150

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Exercise
BITS Pilani
Pilani Campus

1. Suppose a random variable 𝑋 has the mean 𝜇 = 25 and standard deviation


𝜎 = 2. Use Chebshev’s inequality to estimate (a) 𝑃(𝑋 ≤ 35) (b) 𝑃 𝑋 ≥ 20 .
Ans a) 0.96 b)0.84

2. Let 𝑋 be random variable with mean 𝜇 = 40 and 𝜎 = 5. Find the value of 𝑎


and 𝑏 for which 𝑃 40 − 𝑏 ≤ 𝑋 ≤ 40 + 𝑏 ≥ 0.95.

Ans 𝑏 = 23.4

SSWT ZC111, P&S

Contact session 6

BITS Pilani, Pilani Campus


Poisson distribution: Application of Poisson Distribution

A Poisson distribution is a discrete probability distribution. It gives the probability of an event


happening a certain number of times (k) within a given interval of time or space.
Poisson distribution could be used to explain or predict:
You can use a Poisson distribution to predict or explain the number of events occurring within a given • Text messages per hour
interval of time or space. “Events” could be anything from disease cases to customer purchases to
meteor strikes. The interval can be any specific amount of time or space, such as 10 days or 5 square • Machine malfunctions per year
inches.
The Poisson distribution has only one parameter, λ (lambda), which is the mean number of events. • Website visitors per month
We can use a Poisson distribution if:
1. Individual events happen at random and independently. That is, the probability of one event doesn’t
• Influenza cases per year
affect the probability of another event. • Number of Telephone calls per minute
2. You know the mean number of events occurring within a given interval of time or space. This number
is called λ (lambda), and it is assumed to be constant. • Number of misprints per page etc.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Poisson Distribution Formula Example:

𝑒 −𝜆 𝜆 𝑘 An average of 0.61 soldiers died by horse kicks per year in each Prussian army corps. Calculate the
The probability mass function of the Poisson distribution is:𝑃 𝑋 = 𝑘 = probability that exactly two soldiers died in Army Corps, assuming that the number of horse kick
𝑘!
Where deaths per year follows a Poisson distribution.
Solution: 𝑘 = 2 deaths by horse kick
• 𝑋 is random variable following a Poisson Distribution
𝜆=0.61 deaths by horse kick per year.
• 𝑘 is the number of times an event occurs
• 𝑃 𝑋 = 𝑘 probability that the events will occure 𝑘 times 𝑒 −𝜆 𝜆𝑘
𝑃 𝑥=𝑘 =
• 𝑒 is Euler’s constant (approximately 2.718) 𝑘!

• 𝜆 is the average number of times an event occurs 𝑒 −0.62 0.622


𝑃 𝑋=2 = =0.101
2!
Note that if random variable 𝑋 poissonly distributed then variance of X is also 𝜆(average of X).
The probability that exactly two soldiers died in the Army Corps is 0.101.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Example:

A person receives on average 3 e-mails per hour.


Example:
a) What is the probability that he will receive 5 e-mails over a period two hours?
b) What is the probability that he will receive more than 2 e-mails over a period two hours?
Question: For health reasons, home need to be inspected for radon gas which decays and produces
Solution: We are given the average per hour but we asked to find probabilities over a period of two hours.
We therefore need to find the average 𝜆 over a period of two hours. alpha particles. One device counts the number of alpha particles that hit its detector. To a good
𝜆 = 3 ∗ 2 = 6 e-mails over 2 hours approximation, in one area, the count for the next week follows a Poisson distribution with mean 1.3.
a) The probability that he will receive 5 e-mails over a period two hours is given by the Poisson probability
formula Determine
𝑒 −6 65
𝑝(𝑋 =5)= =0.16062.
5! (a) The probability of exactly one particle next week.
b) More than 2 e-mails means 3 e-mails or 4 e-mails or 5 e-mails … (b) The probability of one or more particles next week.
𝑃 𝑋 >2 =𝑃 𝑥 =3 +𝑝 𝑥 =4 +𝑝 𝑥 =5 +⋯
(c) The probability of a least two but no more than four particles next week.
𝑃 𝑋 >2 =1− 𝑃 𝑋 =0 +𝑃 𝑋 =1 +𝑝 𝑋 =2
𝑒 −6 60 𝑒 −6 6 𝑒 −6 62 (d) The variance of the Poisson distribution
𝑃 𝑋 >2 =1− + + = 0.938
0! 1! 2!

158

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Exercise

Answer: 1. A customer help center receives on average 3.5 calls every hour.
a) What is the probability that it will receive at most 4 calls every hour?
b) What is the probability that it will receive at least 5 calls every hour? [Ans; a) 0.725, b) 0.2746

2. My computer crashes on average once every 4 months;


a) What is the probability that it will not crash in a period of 4 months? [Ans; 0.367]
b) What is the probability that it will crash once in a period of 4 months?[Ans 0.367]
c) What is the probability that it will crash twice in a period of 4 months?[Ans : 0.183]
d) What is the probability that it will crash three times in a period of 4 months?[Ans:0.061]
3. It is known that the number of heavy trucks arriving at a railway station follows the Poisson
distribution. If the average number of truck arrivals during a specified period of an hour is 2, find the
probabilities that during a given hour
a) no heavy truck arrive, Ans: 0.1353
b) at least two trucks will arrive. Ans; 0.5945

159

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Poisson distribution Table: Poisson distribution Table

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Poisson approximation To Binomial distribution : Example:

It is known that 5% of the books bound at a certain bindery have


defective bindings. Find the probability that 2 of 100 books bound by
this bindery will have defective bindings using

(a)The formula for the binomial distribution;


(b)The Poisson approximation to the binomial distribution

163 164

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Answer: Example:

Question: If a bank receives on the average  =6 bad checks per day, what are the probabilities that it
will receive

(a)4 bad checks on any given day?

(b)10 bad checks over any 2 consecutive days?

165 166

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Answer: Exercise: 4.56


:
Question: During inspection of continuous process of making large rolls of floor coverings, 0.5
imperfections are spotted per minute on average. Use the Poisson distribution to find the probabilities

(a) One imperfections in 4 minutes.

(b) At least two in 8 minutes

(c) At most one in 10 minutes

167 168

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Answer: Answer:

169 170

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Exercise: 4.59 Answer:


:Question:
A Conveyor belt Conveys Finished Products to the ware house at an average of 2 per minute.
Find the Probability that

(a)At most 3 will be conveyed in a given minute.

(b)At least 2 will be conveyed in an interval of 3 minutes.

(c)At most 20 will be conveyed during an interval of 5 minutes.

171 172

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Exercise: 4.63 Answer:
:

Question: A Company manufactures hydraulic gears and records show that the probability is
0.04 that one of its new gears will fail its inspection Test. What is the probability that the 5th
gear in a day will be the 1st one to fail the test?

173 174

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Exercise
BITS Pilani
Pilani Campus

1. Find the probability that at most 5 defective fuses will be found in a box of 200 fuses
if experiences shows that 2% of such fuses are defective. [Ans 0.785]
2. Suppose one percent of the items made by a machine are defective. In a sample of
100 items, find probability that sample contains: (a) no defective item (b) 1
defective item (c) 3 or more defective items.[ Ans (a) 0.368 (b) 0.368 (c) 0.080
3. Suppose 2 percent of the people on the average are left-handed. Find the
probability 3 or more left handed among 100 people.[Ans 0.325]
4. Wireless sets are manufactured with 25 soldered joints, each on the average 1 joint
in 500 defective. How many sets can be expected to the free from defective joints in
a consignment of 10000 sets,
Ans:0.9512

SSWT ZC111, P&S

Contact session 7

BITS Pilani, Pilani Campus


INTEGRATION FORMULAE
Continuous Random Variable (CRV)

A random variable is continuous if it has an uncountable


number of possible outcomes, represented by the intervals
on a number line. x
0 2 4 6 8 10
The function f(x) is called Probability Density Function
(P.D.F) for the continuous R.V. X, defined over the set of
real numbers R, if If f(x) and g(x) are two functions of x then
(i ) f ( x)  0
 f ( x) g ( x)dx = f ( x) g ( x)dx −  ( f ( x) g ( x)dx )dx
+
(ii )  −
f ( x) dx = 1

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Definition:

Let X be continuous random variable , then a probability distribution or


Random probability density function(pdf) of X is a function f(x)such that for any two
variable numbers a and b with ab, b
P( a  X  b) =  f ( x)
a
That is, the probability that X takes on a value in the interval [a,b] is the area
above this interval and under the graph of the density function, as illustrated
Discrete Continuous below. The graph of f(x) is often referred to as the density curve.

Cumulative Probability Density


Probability mass Cumulative
distribution function(pdf)
function(pmf) distributionfunction
function
f(x)
F(x)
f(x) F(x)

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Definition:

For a legitimate pdf, it must satisfy the following conditions:


For any random variable X (discrete or continuous), its cumulative distribution
function F(x) is given by
F(x)=P(X x)
(i ) f ( x)  0
x
+ F ( x) =  f (t )dt and f ( x) = F ' ( x).
(ii ) −
f ( x) dx = 1 = area under the entire graph of f(x) −

Where f(x) is simply called probability density function

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Problem:
Mean and variance of Continuous Probability
distribution
+∞ If the probability density function of a random variable is given by
1. 𝑀𝑒𝑎𝑛(𝜇) = 𝐸𝑥𝑝𝑒𝑐𝑡𝑎𝑡𝑖𝑜𝑛 𝑜𝑓 𝑋 = 𝐸 𝑋 = ‫׬‬−∞ 𝑥𝑓 𝑥 𝑑𝑥
 x for 0  x  1
+∞ 
2. 𝑆𝑒𝑐𝑜𝑛𝑑 𝑒𝑥𝑝𝑒𝑐𝑡𝑎𝑡𝑖𝑜𝑛 𝑜𝑓 𝑋 = 𝐸 𝑋2 = ‫׬‬−∞ 𝑥 2 𝑓 𝑥 𝑑𝑥 f ( x ) = 2 − x for 1  x  2

2  0 otherwise
3. 𝑉𝑎𝑟𝑖𝑎𝑐𝑒 𝑉 = 𝜎 2 = 𝐸 𝑋 2 − 𝐸 𝑋
Find the probabilities that a random variable having this probability density will
+∞ take on a value (a) between 0.2 and 0.8 (b) between 0.6 and 1.2

= න 𝑥 − 𝜇 2 𝑓 𝑥 𝑑𝑥
−∞
4. 𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛 𝜎 = 𝑉𝑎𝑟𝑖𝑎𝑛𝑐𝑒

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Solution: Problem:

0.8
P(0.2  x  0.8) =  f ( x)dx
0.2
0.8
=  xdx =
0.2

x2
0.8

2 0.2
= 0.3

1.2
P(0.6  x  1.2) =  f ( x)dx
0.6
1 1.2
= 
0.6
f ( x)dx +  f ( x)dx
1

 xdx +  (2 − x)dx =    
1 1.2
1 2 1.2
= x2
2 0.6
+ 2 x− x
2 1
= 0.54
0.6 1

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Solution:

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Problem:
Problem:

Let X be a continuous random variable with the following pdf:


2( x − 1) ; 1  x  2
f ( x) = 
0 ; elsewhere
Find the mean and the variance of X.
Solution:  2 2
μ = E(X) =  x f ( x) dx =  x [ 2( x − 1)] dx = 2  x ( x − 1) dx = 5/3
− 1 1
 2 2
E(X 2 ) =  x 2 f ( x) dx =  x 2 [ 2( x − 1)] dx = 2  x 2 ( x − 1) dx = 17/6
− 1 1

Var(X) = σ 2X = E(X 2 ) − μ 2 = 17/6 – (5/3)2 = 1/18

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Example : Let X be a random variable with the


following probability density function:
k 2 Find the value of k , mean, variance
 x ; −1  x  2
f ( x) =  3

and E(4X+3).
0 ; elsewhere


Solution:
we know that  f(x) = 1
-
 2 2
kx kx 2
 dx = 1   3 dx = 1
−
3 −1

 k
3 
x3
3
2

−1
=1
k
9
(9) = 1

k = 1

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Practice Problems:

 2
1
2
1 1 x=2 
1 2
μ = E(X) =  x f ( x) dx =  x[ x ] dx =  x 3 dx =  x 4 = 5/4
− −1
3 3 −1
3  4 x = −1

E(4X+3) = 4 E(X)+3 = 4(5/4) + 3 =8

Variance – Do it as H.W

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Practice Problems:

Normal Distribution

The continuous probability distribution having p.d.f𝒇 𝒙 is given by


𝟏 − 𝒙−𝝁 𝟐
𝒇 𝒙 = 𝒆 𝟐𝝈𝟐
𝝈 𝟐𝝅
Where −∞ < 𝑥 < +∞, −∞ < 𝜇 < +∞ 𝑎𝑛𝑑 𝜎 > 0
is normal distribution.

Mean and variance of Continuous Probability distribution


1. 𝑀𝑒𝑎𝑛 = 𝜇
2. 𝑉𝑎𝑟𝑖𝑎𝑐𝑒 𝑉 = 𝜎 2
3. Standard deviation=𝜎

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Normal Probability Curve Properties of Normal Distributions

1. The mean, median, and mode are equal.


The most important probability distribution in statistics is the
normal distribution.
2. The normal curve is bell-shaped and symmetric about the mean.

Normal curve 3. The total area under the curve is equal to one.

4. The normal curve approaches, but never touches the x-axis as it extends farther and
x farther away from the mean.

5. Between μ − σ and μ + σ (in the center of the curve), the graph curves downward. The
A normal distribution is a continuous probability distribution for graph curves upward to the left of μ − σ and to the right of μ + σ. The points at
which the curve changes from curving upward to curving downward are called the
a random variable, x. The graph of a normal distribution is called inflection points.
the normal curve.
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Normal Distribution
Inflection points Effect of Varying Probability
Total area = 1 Parameters (µ &  ) Probability is area under
curve!
x
μ − 3σ μ − 2σ μ−σ μ μ+σ μ + 2σ μ + 3σ d
P(c  x  d) =  c
f (x)dx ?
If x is a continuous random variable having a normal distribution with mean μ
and standard deviation σ, you can graph a normal curve with the equation f (x)
2
 1   x−  
1 −  
 
f (x) = e  2 
where  2
µ = Mean of the normal random variable x
 = Standard deviation
π = 3.1415 . . .
e = 2.71828 . . . x
P(x < a) is obtained from a table of normal probabilities
c d

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Example:
1. Which curve has the greater mean? The Standard Normal Distribution
𝑏
2. Which curve has the greater standard deviation? We have 𝑃 𝑎 ≤ 𝑥 ≤ 𝑏 = ‫𝑥𝑑 𝑥 𝑓 𝑎׬‬
− 𝒙−𝝁 𝟐
𝟏 𝑏
In case of Normal distribution 𝑃 𝑎 ≤ 𝑥 ≤ 𝑏 = ‫𝟐𝝈𝟐 𝒆 ׬‬ 𝑑𝑥
𝝈 𝟐𝝅 𝑎
𝑥−𝜇
B Putting 𝑍 = and the new limits 𝑧1 𝑡𝑜 𝑧2 then
A 𝜎
𝒛𝟐
𝟏 −𝒁𝟐
x 𝑷 𝒂 ≤ 𝒙 ≤ 𝒃 = 𝑷 𝒛𝟏 ≤ 𝒛 ≤ 𝒛𝟐 = න 𝒆 𝟐 𝒅𝒛
1 3 5 7 9 11 13 𝟐𝝅
𝒛𝟏
The line of symmetry of curve A occurs at x = 5. The line of
symmetry of curve B occurs at x = 9. Curve B has the greater mean. This is called standard normal probability distribution.
The normal probability values are calculated using the following function.
Curve B is more spread out than curve A, so curve B has the greater 𝑧
𝟏 −𝒁𝟐
standard deviation. 𝐹 𝑧 =∅ 𝑧 =𝐴 𝑧 = න𝒆 𝟐 𝑑𝑧
𝟐𝝅
0

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

The Standard Normal Distribution

The standard normal distribution is a normal distribution with a If each data value of a normally distributed random variable x is transformed into a z-score, the
result will be the standard normal distribution.
mean of 0 and a standard deviation of 1.

The horizontal scale


corresponds to z-
scores. z
−3 −2 −1 0 1 2 3
z
−3 −2 −1 0 1 2 3 After the formula is used to transform an x-value into a z-score,
Any x-value can be transformed into a z-score by using the formula the Standard Normal Table is used to find the cumulative area
z = Value - Mean
=
x -μ.
Standard deviation σ
under the curve.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Example: Example:
Find the cumulative area that corresponds to a z-score of 2.71. Find the cumulative area that corresponds to a z-score of −0.25.

Standard Normal Table


Standard Normal Table
z .00 .01 .02 .03 .04 .05 .06 .07 .08 .09 z .09 .08 .07 .06 .05 .04 .03 .02 .01 .00

0.0 .5000 .5040 .5080 .5120 .5160 .5199 .5239 .5279 .5319 .5359
−3.4 .0002 .0003 .0003 .0003 .0003 .0003 .0003 .0003 .0003 .0003
0.1 .5398 .5438 .5478 .5517 .5557 .5596 .5636 .5675 .5714 .5753

0.2 .5793 .5832 .5871 .5910 .5948 .5987 .6026 .6064 .6103 .6141 −3.3 .0003 .0004 .0004 .0004 .0004 .0004 .0004 .0005 .0005 .0005

−0.3 .3483 .3520 .3557 .3594 .3632 .3669 .3707 .3745 .3783 .3821

2.6 .9953 .9955 .9956 .9957 .9959 .9960 .9961 .9962 .9963 .9964
−0.2 .3859 .3897 .3936 .3974 .4013 .4052 .4090 .4129 .4168 .4207
2.7 .9965 .9966 .9967 .9968 .9969 .9970 .9971 .9972 .9973 .9974
−0.1 .4247 .4286 .4325 .4364 .4404 .4443 .4483 .4522 .4562 .4602
2.8 .9974 .9975 .9976 .9977 .9977 .9978 .9979 .9979 .9980 .9981
−0.0 .4641 .4681 .4724 .4761 .4801 .4840 .4880 .4920 .4960 .5000

Find the area by finding 2.7 in the left hand column, and then Find the area by finding −0.2 in the left hand column, and then
moving across the row to the column under 0.01. moving across the row to the column under 0.05.
The area to the left of z = 2.71 is 0.9966. The area to the left of z = −0.25 is 0.4013

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Example:
The average on a statistics test was 78 with a standard deviation of 8. If
the test scores are normally distributed, find the probability that a student
receives a test score less than 90.

Example 1: Find the area under the standard normal curve to the left of z = −2.33.
Always draw the curve!
From the Standard Normal Table, the area is equal to
0.0099.

μ = 78 z = x - μ = 90 - 78
z
σ 8
−2.33
2. Find the area
0
under the standard normal curve to the right of z = 0.94. σ=8 = 1.5
0.8264 1 − 0.8264 = 0.1736
P(x < 90)
From the Standard Normal Table, the area is equal to
0.1736. The probability that a
z x student receives a test
0 0.94
3. Find the area under the standard normal curve between z = −1.98 and z = 1.07. μ =78 90
0.8577 z score less than 90 is
μ =0 1.5?
P(x < 90) = P(z < 1.5) = 0.9332 0.9332.
0.8577 − 0.0239 = 0.8338
0.0239
From the Standard Normal Table, the area is equal to
0.8338.

z
−1.98 0 1.07

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Example: Example:
The average on a statistics test was 78 with a standard deviation of 8. The average on a statistics test was 78 with a standard deviation of 8. If
If the test scores are normally distributed, find the probability that a the test scores are normally distributed, find the probability that a
student receives a test score greater than 85. student receives a test score between 60 and 80.

z1 = x - μ = 60 - 78 = -2.25
σ 8
μ = 78 z = x - μ = 85 - 78 x -μ 80 - 78
σ 8 P(60 < x < 80) z2 = = = 0.25
= 0.875  0.88 σ 8
σ=8 μ = 78
P(x > 85)
The probability that a σ=8 The probability that a
μ =78 85 x x
student receives a test 60 μ =7880 student receives a test
z score greater than 85 is z score between 60 and 80
μ = 0.88
? −2.25
? μ =0 ?0.25
0.1894. is 0.5865.
P(60 < x < 80) = P(−2.25 < z < 0.25) = P(z < 0.25) − P(z < −2.25)
P(x > 85) = P(z > 0.88) = 1 − P(z < 0.88) = 1 − 0.8106 = 0.1894
= 0.5987 − 0.0122 = 0.5865

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Problem:

c) P(13.6  X  18.8)
x −  13.6 − 16.2
z1 = = = −2.08
 1.25
x −  18.8 − 16.2
z2 = = = 2.08
 1.25

a ) P( X  16.8) P(13.6  X  18.8) = P( Z  2.08) − P( Z  −2.08) = 0.9812 − 0.0188 = 0.9624


x −  16.8 − 16.2
z= = = 0.48
 1.25
P( X  16.8) = P( Z  0.48) = 1 − P( Z  0.48) = 0.3156 d ) P(16.5  X  16.7) = 0.0606
a ) P( X  14.9)
x −  14.9 − 16.2
z= = = −1.04
 1.25
P( X  14.9) = P( Z  −1.04) = 0.149

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Practice Problems:
Problem:

The time for oil to percolate Solution : Example: You work in Quality Control for GE. Light bulb life has a normal
Given  = 20, P( X  31.5) = 0.25,  = ? distribution with  = 2000 hours and  = 200 hours. What’s the probability that a
to all parts of an engine can x −  31.5 − 20 9.2 bulb will last
z= = =
be treated as a random   
A. between 2000 and 2400
variable having a normal P( X  31.5) = 0.25
11.5 11.5
hours?
distribution with mean 20  P( Z  ) = 0.25 = 1 − P( Z  ) = 0.25
  B. less than 1470 hours?
seconds. Find its standard  P( Z 
11.5
) = 0.75 C. More than 2000 hours?
deviation if the probability is 
from table we have
0.25 that it will take a value 11.5
 = 0.675 Example: If X is a normal random
greater than 31.5 seconds 
  = 17.037 variable with mean 3 and the variance 16 then find
(i) P(X< 11) (ii) P(X > - 1) (iii) P(2 < X < 7)

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Solution
Example : A survey indicates that for each trip to a supermarket, a 1. (a) The figure at the left shows a normal curve with μ = 45 minutes and σ = 12
shopper spends an average of 45 minutes with a standard deviation of minutes. The area for x between 24 and 54 minutes is shaded.
12 minutes in the store. The lengths of time spent in the store are The z-scores that correspond to 24 minutes and to 54 minutes are
z1 = 24 – 45 / 12 = -1.75 and z2 = 54 – 45 / 12 = 0.75.
normally distributed and are represented by the variable x. A shopper
So, the probability that a shopper will be in the store between 24 and
enters the store. (a) Find the probability that the shopper will be in 54 minutes is
the store for each interval of time listed below. (b) Interpret your answer P(24 < x < 54) = P( -1.75 < z < 0.75)
when 200 shoppers enter the store. How many shoppers would you = P(z < 0.75 )- P(z < -1.75)
expect to be in the store for each interval of time listed below? = 0.7734 - 0.0401 = 0.7333.
(b) Interpretation When 200 shoppers enter the store, you would expect
1. Between 24 and 54 minutes 2. More than 39 minutes
200(0.7333) = 146.66, or about 147, shoppers to be in the store between 24 and 54
minutes.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Example:4
In a normal distribution 31% of the items are under 45 and 8% of the items are over 64. Find the mean and
standard deviation of the distribution.
Soln: Let 𝜇 & 𝜎 the mean and standard deviation of the normal distribution
2. (a) The figure at the left shows a normal curve with m = 45 minutes and s = 12 minutes. By data 𝑃 𝑥 < 45 = 0.31 𝑎𝑛𝑑 𝑃 𝑥 > 64 = 0.08
The area for x greater than 39 minutes is shaded.
45−𝜇
The Z- score that corresponds to 39 minutes is z = 39 – 45 / 12 = -0.5. When 𝑥 = 45, 𝑍 =
𝜎
= 𝑧1 (𝑠𝑎𝑦)
So, the probability that a shopper will be in the store more than 39 minutes is
64−𝜇
P(x > 39) = P(z > -0.5) = 1 – P(z < -0.5) = 1 - 0.3085 = 0.6915. When 𝑥 = 64, 𝑍 =
𝜎
= 𝑧2 (𝑠𝑎𝑦)

(b) Interpretation When 200 shoppers enter the store, you would expect 200(0.6915) = 138.3, Thus we have 𝑃 𝑍 < 𝑧1 = 0.31 𝑎𝑛𝑑 𝑃 𝑍 > 𝑧2 = 0.08
or about 138, shoppers to be in the store more than 39 minutes.
i.e0.5 + 𝐹 𝑧1 = 0.31 𝑎𝑛𝑑 0.5 − 𝐹 𝑧2 = 0.08

∴ 𝐹 𝑧1 = −0.19 𝑎𝑛𝑑 𝐹 𝑧2 = 0.42

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani Campus

Referring to normal probability tables we have

0.1915 ≈ 0.19 = 𝐹 0.5 𝑎𝑛𝑑 0.4192 ≈ 0.42 = 1.4

𝐹 𝑧1 = −0.19 𝑎𝑛𝑑 𝐹 𝑧2 = 0.42

∴ 𝐹 𝑧1 = −𝐹 0.5 𝑎𝑛𝑑 𝐹 𝑧2 = 𝐹(1.4)

𝑧1 = −0.5 𝑎𝑛𝑑 𝑧2 = 1.4

45 − 𝜇 64 − 𝜇
⟹ = −0.5 𝑎𝑛𝑑 = 1.4
𝜎 𝜎

𝜇 − 0.5𝜎 = 45

By solving we get 𝜇 = 50 𝑎𝑛𝑑 𝜎 = 10.


𝑎𝑛𝑑 𝜇 + 1.4𝜎 = 64
Probability and Statistics
∴ 𝑀𝑒𝑎𝑛 = 50 𝑎𝑛𝑑 𝑆. 𝐷 = 10 Session -09

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Objective

❑ Joint Probability Distributions

❑ Marginal Probability Distributions

❑ Conditional Probability Distributions

❑ Independence

❑ Expected value and Variance

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Introduction
Probability Distribution function (PDF):
p(x)

In many situations , we will be interested two or more characteristic 1. p(x) ≥ 0 for all values of x
(numerically) of the outcome of the random experiment. 2.  p(x) = 1
Example1 - two-dimensional sample space: In the development of a new
receiver for the transmission of digital information, each received bit is rated
as acceptable, suspect, or unacceptable, depending on the quality of the where the summation of p(x) is over all possible values of x.
received signal. Let X denote the number of acceptable bits and Y denote
the number of suspect bits .
Example2 Two electronic components of a missile system work in harmony
for the success of the total system. Let X and Y , the two random variables
which denote the life in hours of the two components.
Ex.3 –Both voltage & current might be interest in a certain experiment.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Joint Distribution (Discrete r.v. s) Marginal Probability Distributions

• Let X and Y be two discrete rv’s defined on the sample


space of an experiment.  Marginal Probability Distribution: the individual
probability distribution of a random variable ‘x’.
• The joint probability mass function 𝑝 𝑥, 𝑦 is defined
for each pair of numbers (x, y) by
𝑓 𝑥, 𝑦 = P(X=x and Y=y) such that
𝑝 𝑥, 𝑦 ≥ 0 and  Marginal Probability Distribution: the individual
probability distribution of a random variable ‘x’.
σ σ 𝑝 𝑥, 𝑦 = 1
Example: The marginal probability
Independence distribution for X and Y.

 In some random experiments, knowledge of the values y=number of x=number of bars of signal strength
times city
of X does not change any of the probabilities associated name is stated 1 2 3 Marginal
probability
with the values for Y. distribution of
Y
 If two random variables are independent, then 4 0.15 0.1 0.05 0.3

f ( x, y ) = f ( x). f ( y ) 3

2
0.02

0.02
0.1

0.03
0.05

0.2
0.17

0.25

1 0.01 0.02 0.25 0.28

wheref(x) and f(y) are marginal probability 0.2 0.25 0.55

Marginal probability distribution of X


P(X=3)

at x and y respectively

Conditional Probability Distributions

EX1: The joint probability distribution of random variables x


and y is as bellow
f ( x, y ) y\x 1 2 3
f ( x / y) =
f ( y) 1 0.1 0.1 0.2
where f(x,y) is probability at(x,y) 2 0.2 0.3 0.1

and f(y) is marginal probability at y i) Obtain the marginal probability distribution of x and y
ii) P(x=1 ∩ y=3)
iii)P(x=2 ∩ y=2)
 The conditional probability distribution is also probability iv)P(x=2 ∩ y≤3)
mass function.(PMF) v) P(x+y <4)
vi)P(x=1/ y=1)
vii) Are x and y independent random variable
Example

EX2: The joint probability distribution of random variables x and The joint probability distribution of two random variables X and Y is given by :
y is as bellow P(X=0,Y=1)=1/3, P(X=1,Y=-1)=1/3, P(X=1,Y=1)=1/3.
y\x 1 2 3
Find i) Marginal distribution of X and Y
1 1/12 1/6 0 ii) The conditional probability distribution of X given Y=1
2 0 1/9 1/5
3 1/18 ¼ 2/15
i) Obtain the marginal probability distribution of x and y
ii) Obtain the conditional probability distribution of x; given y =2

BITS Pilani, Pilani Campus

Problem-1

Ex5:The joint distribution can be given in tabular form. Let X1 and X2 have the Joint probability distribution f(x1,x2)
For example: of X1 and X2
y\x 0 1 2
0 1/9 2/9 1/9 x1
1 2/9 2/9 0 0 1 2
2 1/9 0 0 x2 0 0.1 0.4 0.1
1 0.2 0.2 0
i) Obtain the marginal probability a) Find P(X1+X2 >1)
distribution of x and y
b) Find the probability distribution f1(x1) = P (X1=x1) of the
ii) Obtain the conditional probability individual random variate X1.
distribution for y given x.
Solution
x1
0 1 2 b)Since the event X1 = 0 is composed of two pairs of
values(0,0) and (0,1) , we add their values (0,0) and (0,1) ;
x2 0 0.1 0.4 0.1
we add their corresponding probabilities to obtain
1 0.2 0.2 0
P(X1 = 0) = f(0,0) + f(0,1) =0.1 + 0.2 =0.3
continuing , we obtain P(X1= 1) = 0.6 and P(X1 = 2) = 0.1
a) The event X1+X2 >1 is composed of the pairs of ie f1(0) = 0.3, f1(1) =0.6 f1(2) = 0.1 is the probability
values (1,1), (2,0) and (2,1) distribution of X1.
Adding their corresponding probabilities
P(X1 + X2 > 1) = f(1,1) + f(2,0) + f(2,1)
= 0.2 + 0.1 + 0
=0.3

Joint probability distribution f(x1, x2 ) of X1 and X2


Problem-2
with Marginal Distributions
Let X1 and X2 have the Joint probability distribution
x1 f(x1,x2) of X1 and X2
0 1 2 Total
f2(x2) x1
x2 0 0.1 0.4 0.1 0.6
0 1 2
1 0.2 0.2 0.0 0.4
x2 0 0.1 0.4 0.1
Total 0.3 0.6 0.1 1.0
f1(x1) 1 0.2 0.2 0
The probability distribution f1(x1) of X1 appears in the lower
margin of this table. Find the conditional probability distribution of X1 given
The probability distribution f2(x2) of X2 appears in the right X2 =1. Are X1 and X2 independent?
hand margin of the table.
Consequently, the individual distributions are called
marginal probability distribution.
f (0,1) = .2 = .5
Solution: f1(0/1) =
f (1) .4
Joint probability distribution f(x1, x2 ) of X1 and X2 2
with Marginal Distributions f (1,1) = .2 = 0.5
f1(1/1) =
f (1) .4
x1 2
f (2,1) = 0 = 0
0 1 2 Total and f1(2/1) =
f2(x2) f (1) 0.4
2
x2 0 0.1 0.4 0.1 0.6
1 0.2 0.2 0.0 0.4 Since f1(0/1) = 0.5  0.3 = f1(0) the conditional
Total 0.3 0.6 0.1 1.0 probability distribution is not free of the value x2 .
f1(x1)
Also
f(0,1) = 0.2  (0.3)(0.4) =f1(0)f2(1)
so X1 and X2 are dependent.

November 9, 2024 243 November 9, 2024 244


November 9, 2024 245 November 9, 2024 246

Solution

Problem-3
• Two random variables are independent and each has a • Let X and Y be two independent random variables and each
binomial distribution with success probability 0.7 and 4 trials. has a binomial distribution with success probability 0.7 and 4
a) Find the joint probability distribution trials.
b) Find the probability that the first random variable is
greater than the second.
• Here n=4, p=0.7,x=no. of successes (0,1,2,3,4)
• Also, f(x, y) = f(x) f(y) for all x ,y the two random variables are
independent.

November 9, 2024 November 9, 2024

247 248
Using binomial distribution, first we find probabilities a) Using the relation f(x, y)=f(x) f(y) we find joint probabilities

X
0 1 2 3 4
0 0.000065 0.000612 0.000214 0.000333 0.000194
1 0.000612 0.0057153 0.0200 0.031116 0.018151
Y 2 0.000214 0.0200 0.070013 0.108909 0.063530
3 0.000333 0.031116 0.108909 0.169414 0.098825
4 0.000194 0.018151 0.063530 0.098825 0.057648

November 9, 2024 249 November 9, 2024 250

Problem-4
If X has mean 8 and variance 3 while Y has mean -12.5 and variance 2.25 and
b) To find the probability that the first random variable is greater the two are independent.
than the second. Find
i.e. To find f(x>y) a) E(X-Y)

b) Var(X-Y)
f(1>y) = f(1,0)= 0.000612
f(2>y) = f(2,0)+f(2,1)= 0.000214+0.0200=0.020214
f(3>y) = f(3,0)+f(3,1)+f(3,2)=0.140358
f(4>y) = f(4,0)+f(4,1)+f(4,2)+f(4,3)=0.344059

November 9, 2024 252

November 9, 2024 251


Solution
a) Given E(X) = 8 and E(Y) = -12.5
Exercise 1
E(X-Y) = E(X)-E(Y)
= 8-(-12.5)
• Suppose the joint pmf is given by
= 20.5

b) Given Var(X) = 3 and Var(Y) = 2.25


Var(X-Y) = Var(X)- Var(Y)
= 3 - 2.25 Find (i) Marginal probabilities of X and Y.
= 0.75 (ii) P(𝑌 ≥ 100)
(iii) Are X and Y independent ?
(iv) Conditional distribution of Y=100 for X=x.
November 9, 2024 253

Exercise 3
Exercise 2
• X and Y are two rv’s having the joint pmf
a) If X and Y are independent with 𝑝𝑋 0 = 0.5, 𝑝𝑋 1 = 0.3, 1
𝑓 𝑥, 𝑦 = (2𝑥 + 𝑦), where x and y can assume only the
27
𝑝𝑋 2 = 0.2 and 𝑝𝑌 0 = 0.6, 𝑝𝑌 1 = 0.1,
integer values 0,1 and 2.
𝑝𝑌 2 = 𝑝𝑌 3 = 0.05 and 𝑝𝑌 4 = 0.2.
Find the conditional distribution of Y for X=x.
Display the joint pmf of (X, Y).
b) Compute 𝑃 𝑋 ≤ 1 𝑎𝑛𝑑 𝑌 ≤ 1 from joint pmf and verify that it
equals the product 𝑃 𝑋 ≤ 1 ∙ 𝑃(𝑌 ≤ 1).
c) What is 𝑃(𝑋 + 𝑌 = 0)
d) Compute 𝑃(𝑋 + 𝑌 ≤ 1)
BITS Pilani
Pilani Campus
Joint Distribution (Continuous rv ‘s)
Let X and Y be continuous rv’s. A joint probability density function 𝑓(𝑥, 𝑦) for these two
variables is a function satisfying

1) 𝑓 𝑥, 𝑦 ≥ 0

∞ ∞
2) ‫׬‬−∞ ‫׬‬−∞ 𝑓(𝑥, 𝑦) 𝑑𝑥 𝑑𝑦 = 1
Also,

Session -10 Joint distribution 𝑏 𝑑

𝑃 𝑎 ≤ 𝑋 ≤ 𝑏, 𝑐 ≤ 𝑌 ≤ 𝑑 = න න 𝑓(𝑥, 𝑦) 𝑑𝑦 𝑑
Problem solving Continuous Joint distribution. Suggested 𝑎 𝑐
problems from Sec. 5.10

Marginal Probabilities
Two continuous random variables X and Y are said to be independent if for every
The marginal probability density function of X and Y, denoted by
pair of x and y values
𝑓𝑋(𝑥) and 𝑓𝑌(𝑦) are given by

∞ 𝑓 𝑥, 𝑦 = 𝑓𝑋(𝑥) ∙ 𝑓𝑌(𝑦)
𝑓𝑋 𝑥 = ‫׬‬−∞ 𝑓(𝑥, 𝑦) 𝑑𝑦 for −∞ < 𝑋 < ∞


If it is not satisfied, then X and Y are said to be dependent.
𝑓𝑌 𝑦 = ‫׬‬−∞ 𝑓(𝑥, 𝑦) 𝑑x for −∞ < Y < ∞
Joint Cumulative distribution Problem 1
Let X and Y be continuous rv’s. If the joint probability density of two random variables
is given by
Let 𝑓(𝑥, 𝑦) be a joint probability density function for these two variables.
−2x −3x
f( x 1 , x 2 ) = 6 e 1 2 for x 1 > 0 , x 2 > 0
Then the joint cumulative distribution function is given by

𝑥 𝑦 = 0 else where.

𝐹(𝑥, 𝑦) = න න 𝑓 𝑥, 𝑑𝑥𝑑𝑦
−∞ −∞

Find the probabilities that Solution

a) The first random variable will take on value between 23 −2x −3x
a)   6e 1 2 dx1dx2 = ( e −2 - e −4 ) (e −6 - e −9 )
1and 2 and the second random variable will take on a 12
value between 2 and 3.
b) The first random variable will take on a value less than = 0.0003
2 and the second random variable will take on a value
2 −2x −3x
greater than 2 b)   6e 1 2 dx1dx2 = ( 1-e −4 ) e −6 = 0.0025
0 2
Solution
Q.A candy company distributed boxes of chocolates with a mixture of creams, toffees, and nuts
coated in both light and dark chocolate. For a randomly selected box, let X and Y, respectively, be
  1 1
2
the proportions of the light and dark chocolates that are creams and suppose that the joint density a)
  f ( x, y ) d x d y =  5
(2x + 3 y)dxdy
−− 0 0
function is 0  x  1, 0  y  1
1 x=1
 2 ( 2 x + 3 y), 2x2 6xy
f (x, y) =  5
elsewhere
=  5
+
5
dy
 0, 0 x=0
1
1
 2 6y  2y 3y2
  =   5 + 5  d y = 5 + 5
a) Verify whether   f(x, y)dxdy = 1 0 0
−− 2 3
= + = 1
b) Find P[(X,Y)  A], where A is the region {(x,y) | 0<x<½,¼<y<½} 5 5
c) Find g(x) and h(y) for the joint density function.

Solution
Solution

By definition,
b) P  ( X , Y )  A  = P ( 0  X  12 , 14  Y  1
)  y =1
4x + 3
2 1
2 4xy 6y2
= 2 2 2
1 1
g(x) =  f (x, y)dy =  (2x + 3y)dy = + =
1 0 5 ( 2 x + 3 y ) d x d y − 0
5 5 10 y =0
5
4

1
2
2x2 6xy
x= 1
2 For 0x 1, and g(x)=0 elsewhere.
=  5
+
5
dy

4(1+ 3y)
1
1
x=0 2
h( y) =  f (x, y)dx =  (2x + 3y)dx =
4

1 1 Similarly, 5
 1
2
3y  y 3y 2 2
−
5
= 
0
+ dy = +
1  
10 5 10 10
4
1
4 For 0 y 1, and h(y)=0 elsewhere.
1  1 + 3  −  1 + 3  = 1 3
=  2  
10  4   4 1 6   1 6 0
Problem 2 Solution
If the joint probability density of two random variables is given by x x
1 2 −2x −3x
F(x1,x2) =   6e 1 2 dx1dx2
−2x −3x o 0
f( x1 , x2 ) = 6 e 1 2 for x1 > 0 , x2 > 0
for x1>0 , x2 >0
= 0 : else where
=0 else where.
Find the joint cumulative distribution function of the two random −2x −3x
variables. Also find the probability that both random variables will So that F(x1,x2) = (1-e 1 )(1-e 2)
take on values less than 1. for x1 >0 , x2 >0
= 0 ; else where

Problem 3
If t h e joint pro ba bilit y d e n s i t y o f t w o r a n d o m v a r i a b l e s is g i v e n
 The probability that both random variables will take on by
values less than 1 is
−2x −3x
1 1 −2x −3x f( x 1 , x 2 ) = 6 e 1 2 for x 1 > 0 , x 2 > 0
F(1,1) =   6 e 1 2 dx1dx2
o 0
= 0 else where.
= (1-e −2)(1-e −3) = 0.8216
F i n d t h e m a r g i n a l d e n s i t y of t h e first r a n d o m variable
Solution Problem 5
Integrating out x 2 we get
If t h e joint p r o b a b ilit y d e n s i t y o f t w o r a n d o m v a r i a b l e s is g i v e n b y
 −2x −3x
f 1 (x 1 ) =  6e 1 2 dx for x 1 > 0
2 −2x −3x
0 f( x 1 , x 2 ) = 6 e 1 2 for x 1 > 0 , x 2 > 0
=0 elsewhere
 −3x 

e
= 0 else where.

2 
f1 (x 1 ) = 6e -2x 1  −3 
  verif y t h a t f(x 1 ,x 2 ) = f 1 (x 1 ) .f 2 (x 2 ) . (i.e. E s t a b l i s h i n g i n d e p e n d e n c e b y
 0
f a c t o r i n g t h e join t pr o bab ilit y d ensity)
=-2 e -2x 1 ( e -  - e0)

f 1 (x 1 ) = 2e -2x 1 for x 1 >0


= 0 else where

Solution
Integrating out x 2 we get
In the similar way,
 −2x −3x −2x
1 
f 1 (x 1 ) =  6e 1 2 dx for x 1 > 0 f2(x2) = 6e-3x2 ( e ) for x2>0
0 2 −2 0
=0 elsewhere
 −3x 

e 2  =0 elsewhere
 
f1 (x 1 ) = 6e -2x 1  −3 
 
 0
f2(x2) = 3 e-3x2 for x2>0
-
=-2 e 1 ( e - e )
-2x 0

= 0 elsewhere
f 1 (x 1 ) = 2e -2x 1 for x 1 >0
= 0 else where
Problem 6
Thus,
If two random variables have the joint probability density
f 1 (x 1 ) . f 2 (x 2 ) = 6 e - 2 x 1 -3 x 2 for x1>0, x2>0
f(x1, x2) = 2 ( x + 2x ) for 0 < x1 < 1 , 0 < x2 < 1
3 1 2
= 0 elsewhere
= 0 else where

A n d w e could see that


Find the conditional density of the first given that the second
f 1 ( x 1 ) . f 2 (x 2 ) = f(x 1 , x 2 ) f o r a ll ( x 1 , x 2 ) takes on the value x2

Solution
 The conditional density of the first random variable given
that the second takes on the value x 2 is given by
First we have to find the marginal density of the
second random variable by integrating out x1 then we 2 ( x + 2x ) 2x + 4x
get f 1 (x 1 /x 2 ) = 3 1 2 = 1 2 for 0 < x 1 < 1, 0 < x 2 <1
1 (1+ 4x ) 1 + 4x
3 2 2
1
f2(x2) =  2 ( x + 2x )dx = 1 (1+ 4x ) for 0 < x2 < 1 and
0
3 1 2 1 3 2 and
= 0 , else where . f 1 (x 1 /x 2 ) = 0 for x 1  0 or x 1  1

x 2  0 or x 2  1
Exercise 1 Exercise 2
If two random variables have the joint density If two random variables have the joint density

Find the probability that 0.2<x<0.5 and 0.4<y<0.6 Find joint cumulative distribution function of two rv and use it to
verify the value obtained in the previous problem.

BITS Pilani
Pilani Campus

Exercise 3
If two random variables have the joint density

Find marginal densities and use them to find the probabilities


that a) x > 0.8 b) y < 0.5
Contact Session:11
Sampling Distribution

BITS Pilani, Pilani Campus


Sampling

➢Sampling is a process of selecting samples (small data) from populations (Big or Huge or
Contact Session -11:M5- Sampling distribution
Massive data). The main purpose of sampling is to analyze populations in an optimum manner
References
and draw valid inferences on them with the help of samples.
Time Type Description

Pre- CS-11 RL 5.1, RL 5.2 RL 5.1: Population and sample, random sample, parameters T1Sec 6.1, 6.2, 6.3

and statistics ➢Sampling is widely used in business as a means of gathering useful information about a
RL 5.2: Central limit theorem, Sampling distribution of mean population.
and variance, t-distribution

During CS-11 CS-11 Problem solving. Suggested problems from Sec. 6.2 and Sec. T1 ➢Data are gathered from samples and conclusions are drawn about the population as a part of
6.3 to cover examples on sampling distribution of mean and
the inferential statistics process
variance, t-distribution, x2 - distribution

➢A sample provides a reasonable means for gathering useful decision-making information that
Post-CS-11 HW Chapter6, Sec. 6.1, 6.2, 6.3 T1
might be otherwise unattainable and unaffordable.
Lab

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Examples Reasons for Sampling

• A house wife checks by taking three or four grains of rice (sample) from a cooking
pan of whole rice (population) and decides whether the whole rice in the cooking
pan properly cooked or not. Taking a sample instead of conducting a census offers several
advantages
• A pathologist examines a few drops of blood (sample) taken from the blood of
whole body(population) of a patient and decides the level of illness of patient. 1.The sample can save money.
• A quality control engineer checks the quality of few items (sample) in regular 2.The sample can save time.
intervals that are taken from lots of items (population) in the manufacturing process
and decides whether the lot is meeting with the specified standard quality or not. 3.For given resources, the sample can broaden the scope of the
In all the above instances, we can’t directly deal with populations and here sampling is study.
inevitable, that is compulsory and unavoidable and it gives satisfactory results in
understanding the populations in a proper manner. 4.If accessing the population is impossible, the sample is the only
option.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Random Versus Non random Sampling Stratified Random Sampling

➢In this, the population is divided into non overlapping


➢In random sampling every unit of the population has the same subpopulations called strata.
probability of being selected into the sample. ➢The researcher then extracts a random sample from each of the
➢In nonrandom sampling not every unit of the population has subpopulations.
the same probability of being selected into the sample. ➢The main reason for using stratified random sampling is that it has
the potential for reducing sampling error.
➢With stratified random sampling, the potential to match the
sample closely to the population is greater than it is with simple
random sampling because portions of the total sample are taken
from different population subgroups.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Population • If we collect the data relating to one or more characteristics from all units of
Population is an aggregate or totality of units or objects or things or individuals
the population then it becomes big data or huge data or massive data.
under statistical investigation with respect to one or more characteristics. It is a
• Theoretically, a population may be assumed to follow any of probability
complete or whole set of collection of targeted units for study. The targeted
distribution such as Binomial or Poisson of Normal or Exponential etc.
units may be human beings or non-human beings of interest. A population is
distributions.
also called Universal set.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Finite Population: Infinite Population:
If the population consists of large or infinitely many numbers of units then it is known as
If the number of units in the population is finite and limited then it is finite
infinite population. The number of units in the infinite population may not be known clearly.
population. The number of units in a finite population is clearly known.
These populations will give big or huge or massive data.
For example, the number of workers in a factory, the number of coconut trees For example, the number of orders put by customers per every hour in Amazon on line
in one acre land, etc. constitute finite populations. The size or number of units shopping for the last 5 years, the number of bacteria clustering in every half an hour in an

in a finite population is denoted by N. infected area, the number of stars in the sky etc. furnish infinite populations.
❑ Numbers of students in a class is 50 here N=50, which is finite. That is population finite. Ex:
The number of stars in the sky. Here N is infinite; therefore, the population is an infinite population.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Example:

Sampling: How many different samples of size n=2 can be chosen from a finite population
of size
The process of selecting samples is called sampling.
A) N=7
Note:
A sample with less than 30 terms is called small B) N=24
sample. Answer:
A sample with more than or equal to 30 terms is A) With replacement 7^2
called large sample. Without 7C 2
B) With replacement 24^2
Without 24C 2

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Pilani Campus
Population of Wages of employees of an organization Select different samples of varied sizes
Sample 1
1861 2495 1000 2497 1865 791 2090 2637 1327 1678 3000 2486 820 1678 2070 2638 2490 1865 1000 2090 596 3200

1680 2858 795 2495 2496 2501 1160 1480 1860 2490
Sample 2
2090 2840 2490 2640 659 827 2646 2638 2643 868 2840 2858 3000 2490 2998 3050 2070 2896 3200 2490 3280

1327 1866 1861 2486 2865 3011 2494 1489 1865 2855 Sample 3
2858 3240 2497 2865 656 2093 934 1861 868 795
2840 2499 2093 2660 1165 2600 2085 2640 2998 1861
2956 2495 2865 1865 3000 3019 1670 2858 2642 1680 Sample 4
2086 1000 2497 596 656 875 2085 934 1313
3038 3000 1313 596 656 3240 590 2501 2485 3015
Sample 5
2092 1679 3024 2497 2825 2630 2070 2900 1861 2636
820 1313 3000 2640 596 2640 2600 2495 934 2500
2495 2637 2497 1159 2640 3050 870 2896 2500 2638
926 2860 1481 875 2482 1860 2086 934 3200 2490

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Select different samples of varied sizes Parameters and statistics


Sample 6
2840 2499 1327 1861 2495 3024 3038 2497

Sample 7
The measures of population namely mean
2858 2490 868 1670 1480 2643 1480 1680 2085 2490 (  ) variance ( 2 ) , standard deviation ( ) are
Sample 8 known as population parameters or
parameters.
2495 2858 1861 2092 2499 3000 2660 1000 1679 926 2660

Sample 9
795 791 3200 2085 2638 2497 2486 1159 2640
The measures computed from the sample
observations namely mean ( x )
variance ( s2 ) standard deviation (s) are
Sample 10
3019 3240 3200 3050 3000 3015 2900 2896 2998

known as sample statistics or statistics.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Sampling Variability

➢The term "sampling variability" refers to the fact that the statistical information from
a sample (called a statistic) will vary as the random sampling is repeated.
Sampling distribution
➢Sampling variability will decrease as the sample size increases.
The probability distribution of a statistic calculated on
➢the samples must be randomly chosen, must be of the same size (not smaller than
the basis of a random sample. 30), and the more samples that are used, the more reliable the information gathered
will be.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Pilani Campus

Definition

Sample No. Sample size Mean SD


1 12 1994.42 843.23 Do you consider these sample means and
2 11 2830.18 349.94
sample SDs as variable? ➢ The probability distribution of a statistic (sample estimate) is
3 10 1866.70 988.57 called sampling distribution.
4 9 1338.00 704.36 If yes, should we not describe the distribution
5 10 1953.80 920.44 of these variables?
6 8 2447.63 590.64 ➢ The sampling distribution of a statistic depends on the
7 10 1974.40 638.05
The distribution of the sample estimates is distribution of the population, the size of the sample, and the
8 11 2157.27 715.10 called sampling distribution method of sample selection.
9 9 2032.33 891.53
10 9 3035.33 117.40
For example the distribution of sample means
Overall 100 2162.24 732.26 is called Sampling distribution of mean

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Sampling Distribution Of 𝒙 Example
➢ Suppose a small finite population consists of only N = 8 numbers: 54 55 59 63 64 68 69 70
➢ Suppose we take all possible samples of size n = 2 from this population with replacement.

➢The sample mean is one of the more common statistics used in


the inferential process.

➢The distribution of the values of the sample mean ( 𝑥ҧ ) in



repeated samples is called the sampling distribution of 𝒙

➢One way to examine the distribution possibilities is to take a


population with a particular distribution, randomly select
samples of a given size, compute the sample means, and attempt
to determine how the means are distributed.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Example

Sample Means from 90 Samples Ranging in Size from n = 2 to n = 30 from


➢Again using an Excel-produced histogram, we can see the shape of the distribution a Uniformly Distributed Population with a = 10 and b = 30
of these sample means.

➢Notice that the shape of the histogram for sample means is quite unlike the shape of the histogram for the population.

➢The sample means appear to “pile up” toward the middle of the distribution and “tail off” toward the extremes.

➢As sample sizes become much larger, the sample mean distributions begin to approach a normal distribution and the
variation among the means decreases.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Shapes of the Distributions of Central Limit Theorem
Sample Means

➢If samples of size n are drawn randomly from a population that


has a mean of µ and a standard deviation of σ, the sample
means, 𝑥ҧ , are approximately normally distributed for
sufficiently large sample sizes (n >= 30) regardless of the shape
of the population distribution.

➢If the population is normally distributed, the sample means are


normally distributed for any size sample.

➢From mathematical expectation

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Z - score for sample means


Ex:

➢The central limit theorem states that sample means are normally
• A population consist of five numbers 2,3,6,8 and 11 Consider all possible samples of size 2
distributed regardless of the shape of the population for large
that can be drawn with replacement from this population. Find a) Mean of population B)
samples and for any sample size with normally distributed
Mean of the sampling distribution of means.
populations.
➢Thus, sample means can be analyzed by using z scores
➢The formula to determine z scores for individual values from a
normal distribution:

➢If sample means are normally distributed, the z score formula


applied to sample means would be

➢ is the standard deviation of the statistic of interest is ,


sometimes referred to as the standard error of the mean.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Pilani Campus
Example
Example

Suppose the mean expenditure per customer at a tire store is $85.00, with a standard Suppose that during any hour in a large department store, the average number of shoppers is
deviation of $9.00. If a random sample of 40 customers is taken, what is the probability 448, with a standard deviation of 21 shoppers. What is the probability that a random sample of
that the sample average expenditure per customer for this sample will be $87.00 or more? 49 different shopping hours will yield a sample mean between 441 and 446 shoppers?
Solution For this problem, µ= 448, σ= 21, and n = 49. The problem is to determine P(441<= 𝑥ҧ <=446).
Because the sample size is greater than 30, the central limit theorem
The following
Can be used, and the sample means are normally distributed.
µ= $85 σ= $9

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Sampling from a Finite Population Rules for finite population

➢The earlier example was based on the assumption that the ➢As the size of the finite population becomes larger in
population was infinitely or extremely large. relation to sample size, the finite correction factor
approaches 1.
➢In cases of a finite population, a statistical adjustment can be
made to the z formula for sample means. The adjustment is ➢Suppose population size N=1000, then
called the finite correction factor Sample size n n/N Correction factor
10 0.01 0.9955
➢Following is the z formula for sample means when samples are 25 0.025 0.9879
drawn from finite populations. 50 0.05 0.9752
100 0.1 0.9492
200 0.2 0.8949
500 0.5 0.7075

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Example: A production company’s 350 hourly employees average 37.6 years of age, with a
standard deviation of 8.3 years. If a random sample of 45 hourly employees is taken, what is
the probability that the sample will have an average age of less than 40 years?

Central limit theorem

Solution If X is the mean of a sample of size ‘n’ taken from a


population having the
➢Using the z formula with the finite correction factor gives mean  and finite variance  2, then

➢This z value yields a probability of .4808. Z = X −  is a random variable whose



n
➢Therefore, the probability of getting a sample average age of less than distribution function approaches that of the standard
normal distribution as n → 
40 years is .4808 + .5000 = .9808.

BITS Pilani, Pilani Campus BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Problem 3) The mean of the sampling distribution

A population consists of five number 2,3,6,8,11. consider all possible (2,3)


2 + 3 = 2.5
→ (2,6) → 2+ 6 = 4
samples of size two, which can be drawn without replacement from the 2 2
population (2,8) →
2 +8 =5 (2,11) →
2 + 11 = 6.5
2 2
1) Find the mean of the population
(3,6) → 3 + 6 = 4.5 (3,8) → 3 + 8 = 5.5
2) Standard deviation S.D = 
2 2
3) The mean of the sampling distribution 3 + 11 = 7 +
(3,11) → (6,8) →
6 8=7
Solution:
=
 ( x −  )2 2 2
The possible samples are 5C2 =10
They are (2,3) (2,6) (2,8) (2,11)
N
(6,11) →
6 + 11 = 8.5 (8,11) →
8 + 11 = 9.5
2 2
= (2 − 6) + (3 − 6) + (6 − 6) + (8 − 6) + (11 − 6)
2 2 2 2 2
(3,6) (3,8) (3,11)
Mean of sampling distribution of means
5
(6,8) (6,11)

(8,11) 2.5 + 4 + 5 + 6.5 + 4.5 + 5.5 + 7 + 7 + 8.5 + 9.5 = 60 = 6


Mean of population  = 3.3 10 10
2 + 3 + 6 + 11 + 8 = 30 = 6
5 5

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Exercises:
Problem:

A random sample of size 100 is taken from an infinite population having mean  =76 and
 2 =256. what is the probability that X will be between 75and 78.
Solution:
n=100  =76  2 =256  = 16

Z =
X −

 F (1.25) − F (−0.625)
n
X = 75 75 − 76 = −0.625
1
, Z = 1 = 0.89944 - 0.2676
16
100
= 0.235
X = 78 , Z = 78 − 76 = 1.25
2
2 16
100
P[ 75  X  78 ] =P[ −0.625  Z  1.25 ]

11/9/2024 326

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

a) No of samples = C(N, n) = C(15,4) = Correction factor = (N-n) /(N – 1)


15!/(4!x11!) =
b) No of samples = C(35, 4) = 35! /(4! x 31!) (a) Correction factor = (640 – 8)/(640 – 1) =
=32 x 33 x 34 x 35 / 24 = (b) Correction factor = 7900 / 7999 =
(c) Correction factor = (20000-250)/19999 =

11/9/2024 327 11/9/2024 328

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
A wire bonding process is said in control if the
mean pull strength is 10 pounds. It is known that
the pull-strength measurements are normally
distributed with a std. deviation of 1.5 pounds.
Periodic samples of size 4 are taken from this Z= (7.75 -10)/ (1.5/2) =- 2.25 /0.75 = -3
process and the process is said to be out of control
if a sample mean is less than 7.75 pounds. F(z) = F(-3) = 0.0013
Observe that F(z) is small.
Comment.

11/9/2024 329 11/9/2024 330

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

BITS Pilani
Pilani|Dubai|Goa|Hyderabad

The entrance exam scores of a certain university


has a mean of 74 and std deviation 6.8. The exam
scores follow normal distribution.
A) If a student is randomly selected, what is the
probability that his exam score is less than 65?
B) If a sample of 50 students is selected at random,
what is the probability the mean score of this
group is greater than 75?
C) What is the distribution of mean scores of 50 Contact Session:12
students?
Sampling Distribution

11/9/2024 SS ZG622: Software Project Management – KG Krishna 331

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Current Session Topics
Statistical Inference :

The process of drawing inference about population on the basis


of sample data.

Types of Inference:

i. Estimation

ii. Testing of Hypothesis

11/9/2024 SS ZG622 Software Project Management – KG Krishna 333 11/9/2024 SS ZG622: Software Project Management – KG Krishna 334
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Estimation:

Estimation: A process in which we obtain the values of unknown Question:


population parameters with the help of sample data.
Given a random sample 6, 10, 13, 14 ,18, 20. Compute a point estimate of
Types of Estimation:
(i) Population mean
I. Point estimation : estimate for unknown population parameter (ii) Population S.D.
gives the single value.
Solution:
I. Interval estimation: estimate for unknown population parameter is i). Thus point estimate of Population mean is 13.5.
expressed by a range of values.
ii) Thus point estimate of Population SD is 5.13

Which will be more accurate?

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Degree of freedom (d.f./d.o.f.)
Sampling Distributions of mean for unknown σ and n < 30 : t-
distribution • It is denoted by Greek alphabet  (nu)

x −
t= with (n − 1) d .o. f . • It is the number in statistical calculation and represent how
s/ n many values involved in calculation have the freedom to vary.

Where sample S.D. is calculated by formula • d.o.f. = Number of observations of sample – Number of
population parameters which are calculated using sample data .
1 n
S =  i ( − )
2 2
x x
n − 1 i =1
• If there are 'n' observations , the d.o.f. will be (n-1) for
Note : For n>=30 , Normal distribution gives good approximation to t-distribution.
calculating one parameter.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Degree of freedom (d.o.f.)


Ex: Consider a sample of size 4 as 15,10,30,25.

Then mean of sample

= (15+10+30+25)/4
=20

Therefore d.o.f.= n-1


= 4-1
=3.

Thus three number have freedom to vary as long as mean is 20.


11/9/2024 340

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Critical Value Definition

A Critical Value is the number on the border line separating


sample statistics that are likely to occur from those that are
unlikely to occur

11/9/2024 SS ZG622 Software Project Management – KG Krishna 342

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Example: 1

• A process for making certain ball bearings is under control if


the diameters of bearing have a mean of 0.5 cm. if random
sample of 10 of these bearings has mean diameter of 0.5060
cm. and s.d. of 0.0040cm, is the process under control with
level of significance α = 0.005?

11/9/2024 SS ZG622 Software Project Management – KG Krishna 343 11/9/2024 SS ZG622 Software Project Management – KG Krishna 344

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Solution: Example:
• A treatment plant that sends effluent into the river claims the mean
Sample mean= 0.5060 Population mean: 0.5000 suspended solids is never above 40 mg/l. Measurements of the
Sample mean= 10 Sample S.D.=0.0040 suspended solids in river water on Sec 6.4 The Sampling
Distribution of the Variance 207 n = 14 Monday mornings yield x =
46 and s = 9.4 mg/l. Based on data collected over a period of many
years, it is reasonable to assume that the individual measurements
follow a normal distribution. Do the data support or refute the
treatment plant’s claim?
Degree of freedom= n-1=10-1=9
Since t= 4.7334> 3.250 with
level of significance = 0.005 and D.f=9

Hence the process in not under control


11/9/2024 345 11/9/2024 SS ZG622 Software Project Management – KG Krishna 346

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Solution: Example:
• The tensile strength (1,000 psi) of a new composite can be
modelled as a normal distribution. A random sample of size
25 specimens has mean x = 45.3 and standard deviation s =
7.9. Does this information tend to support or refute the claim
that the mean of the population is 40.5?

11/9/2024 SS ZG622 Software Project Management – KG Krishna 347 11/9/2024 SS ZG622 Software Project Management – KG Krishna 348

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Solution Chi-square( 2)distribution
•  2distribution curve is not symmetrical, lies
entirely in first quadrant, and hence not a
normal curve.

•  2 varies from 0 to ∞.
Chi-square Distribution for variance.
s2
x ~ N (  ,  ) then  = ( n − 1)
2
with (n − 1) d .o. f .
2
11/9/2024 SS ZG622 Software Project Management – KG Krishna 349 11/9/2024 SS ZG622 Software Project Management – KG Krishna 350

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Chi-square distribution Example:

A random sample of 10 observations are taken from a


normal population having variance = 42.5. Find the
approximate probability of obtaining the sample standard
between 3.14 and 8.94.

11/9/2024 SS ZG622 Software Project Management – KG Krishna 351 11/9/2024 SS ZG622 Software Project Management – KG Krishna 352

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Solution; Exercise
An optical firm purchases glass to be ground into lenses ,
and it is known from past experience that the variance of
the refractive index of this kind of glass is 1.26 .10-4. As it is
important that the various pieces of glass have nearly the
same index of refraction, the firm rejects such a shipment
if the sample variance of 20 pieces selected at random
exceeds 2.00.10-4 .
Assuming that the sample values may be looked upon as a
random sample from a normal population , what is the
probability that a shipment will be rejected even though
 2 = 1.26 .10-4 ?
11/9/2024 SS ZG622 Software Project Management – KG Krishna 353

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Solution
Exercise
n
 ( X − X )2
Using  2 statistic , we get  2 = (n − 1)s2 = i =1 i
Plastic sheeting produced by a machine must be periodically monitored for
2 2
possible fluctuations in thickness. Uncontrollable variation in the viscosity
19(2.00.10−4 ) = of the liquid mold produces some variation in thickness. Based on
= 30.2 experience with a great many samples, when the machine is working well,
1.26.10− 4
an observation on thickness has a normal
distribution with standard deviation σ = 1.35 mm.
And we could see from  2 table that for 19 degrees of Samples of 20 thickness measurements are collected regularly. A value of
freedom , the sample standard deviation exceeding 1.4mm signals concern about the
product. Find the probability that, when σ = 1.35, the next sample will signal
 2 0.05 = 30.1 concern about the product.
Thus the probability that a good shipment will be rejected
is less than 0.05
11/9/2024 356

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Solution Interval estimation
n
 ( X i − X )2
• The chi square statistic χ2 = (n − 1)s = i =1
2
Confidence Interval
2 2
• = 19 · 1.42 /1.22 = 30.6
• For 19 degrees of freedom, χ2 0.05 = 30.1. A range of values within which the population
parameter is expected to occur is called confidence
• The probability of a false signal of concern is less than
0.05. In the long run, a false signal will occur less than 5
interval and it is denoted by 1 − 𝛼
times in 100 samples.

11/9/2024 357 11/9/2024 358

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Confidence Interval Confidence Interval

▪ Confidence interval is an interval of numbers believed to


contain the parameter value.

• The probability, the method produces and interval that contains


the parameter is called the confidence level.

• Most studies use a confidence level close to 1 such as 0.95 0r


0.99

11/9/2024 359 11/9/2024 360

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Confidence Interval
Confidance interval for 
 For large sample (n  30) when  is known.
   
 x − z / 2 . , x + z / 2 .  with (1- ) .100% confidance.
 n n
 For large sample (n  30) when  is unknown.
 s s 
 x − z / 2 . , x + z / 2 .  with (1- ) .100% confidance.
 n n
 For small sample (n <30) when  is unknown.
 s s 
 x − t / 2 . , x + t / 2 .  with (1- ) .100% confidance.
 n n
11/9/2024 361 11/9/2024 SS ZG622 Software Project Management – KG Krishna 362

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Question: 3 Solution

11/9/2024 SS ZG622 Software Project Management – KG Krishna 363 11/9/2024 SS ZG622 Software Project Management – KG Krishna 364

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Question:4 Solution
To estimate the average number of pounds of copper recovered
Per ton of ore mine, a sample of 150 tons of ores is monitored
A sample mean of 11 pounds with a sample S.D of 3 pounds was
Obtained. Construct a 95% confidence interval on the mean
numbers of pounds of copper recovered per ton of ore mined

11/9/2024 SS ZG622 Software Project Management – KG Krishna 365 11/9/2024 SS ZG622 Software Project Management – KG Krishna 366

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Question:5
A random sample of size 50 taken from a N(𝜇, 5) has a mean 40.
Obtain a 95% confidence interval for 2 𝜇+3

11/9/2024 367 11/9/2024 368

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Question:6

11/9/2024 SS ZG622 Software Project Management – KG Krishna 369 11/9/2024 SS ZG622 Software Project Management – KG Krishna 370

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Question:7

Confidance interval for variance ( 2 )


 ( n − 1) s 2 ( n − 1) s 2 
 , 2 
  / 2 1−( / 2)
2

11/9/2024 SS ZG622 Software Project Management – KG Krishna 371 11/9/2024 372

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Question: 8 Exercise Questions:
• 1. A random sample of size n=100 is taken from a population
with  =5.1. Given that the sample mean is x =21.6,
construct a 95% confidence interval for the population mean

2. A random sample of size n=50 which have x =305.58


and s =36.97, construct a 99% confidence interval for the
population mean 

3. The mean weight loss of n=16 grinding balls after a certain


length of time in mill slurry is 3.42 grams with a S.D. of 0.68
gram. construct a 99% confidence interval for the true mean
weight loss of such grinding balls under the stated conditions.
11/9/2024 373 11/9/2024 374

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Maximum likelihood estimation Questions:9


• If  denotes the parameter to be estimated, then estimators • The number of defective hard drives produced daily
will be denoted by ˆ by a production line can be modeled as Poisson’s
n
.
• For Bernoulli trial
 xi distribution. The counts for ten days are 7 3 1 2 4
pˆ = i =1
1 2 3 1 2. Obtain max likelihood estimate of
n
n
probability of 0 or 1 defectives on one day.
x i
• For Poisson’s parameter ˆ = i =1

• For Normal population n

x i
n

( x − ˆ )
2

ˆ =
i
i =1
ˆ = i =1

11/9/2024
n n
375 11/9/2024 SS ZG622 Software Project Management – KG Krishna 376

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Solution; Exercise Question:
1. In one area along the interstate , the number of dropped
wireless phone connections per call follows a Poisson’s
distribution. From 4 calls, the number of dropped connection is 2
0 3 1.
• A)Find max likelihood estimate of
• B) Obtain max likelihood estimate that the next two calls will
be completed without any accidental drops.

11/9/2024 SS ZG622 Software Project Management – KG Krishna 377 11/9/2024 378

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Question: Question:
• Given 15 yields • The number of traffic accidents in 10 randomly chosen days is
• 5.57 5.76 4.18 4.64 7.02 6.62 6.33 7.24 5.57 7.89 4.67 as below 4 0 6 5 2 1 2 0 4 3. Use these data to estimate
7.24 6.43 5.59 5.39 the proportion of day that had 2 or fewer accidents that year.
• Taking the yields as a random sample from a normal
population • Sample of 10 grains of metallic sand taken from a large sand
• A) Obtain max likelihood estimate of the mean yield and pile have respective lengths(in mm) 2.2 3.4 1.6 0.8 2.7 3.3
variance. 1.6 2.8 2.5 1.9. Estimate the percentage of sand grains in the
entire pile whose length is between 2 and 3mm.
• B) Obtain max likelihood estimate of the coefficient of
variation  / 

11/9/2024 SS ZG622 Software Project Management – KG Krishna 379 11/9/2024 SS ZG622 Software Project Management – KG Krishna 380

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Question; BITS Pilani
Pilani|Dubai|Goa|Hyderabad

• An industrial engineer intends to use the mean of a random


sample of size n=150 to estimate the average mechanical
aptitude of assembly line workers in a large industry. If, on the
basis of experience, the engineer can assume that =6.2 for
such data, what can he assert with probability 0.99 about the
maximum size of his error?
• A research workers wants to determine the average time it
takes a mechanic to rotate the tires of the car , and she wants to
be able to assert with 95% confidence that the mean of her
sample is off by at most 0.50 minute. If she can presume from Contact Session -13
past experience that  =1.6 minutes, how large a sample will
she have to take?
11/9/2024 381 Sampling distribution
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Estimation Properties of good Estimator


• In studying a population, estimation is a route and it is about
• Unbiasedness: Expected value of estimator equals parameter.
estimating the parameter values of the population using the
statistic value of a sample.
• Consistency: Estimator approaches parameter as n gets larger.
Population
• Efficiency: Between two estimators. One with smaller variance
Enumeration Population is efficient.
Sampling
Sample

• Sufficiency: Conveys as much information as is possible about


Test of
Hypotheses
Estimation parameter from the sample

Point Interval
Estimation Estimation

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Estimation
Point Estimation-Methods
Point Estimator

• Method of Moments • A point estimator is any function T (Y1,Y2, ..,YN ) of a sample.


• Method of Maximum Likelihood Estimation Any statistic/Measure is a point estimator.
• Method of Minimum Variance N
1
• Method of Least Squares Yn =
N
Y
i =1
i

• Assume that Y1,Y2, ..,YN are i.i.d. N( m, σ2) random variables.


The sample mean (or average) is a point estimator (or an
estimator) of m.
• (i.i.d. means independent and identically distributed)

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Point Estimation
Point Estimation
Example
• Sample mean X̂ , is the point estimator for the • Let T be the time that is needed for a specific task in a factory to be
completed. In order to estimate the mean and variance of T, we observe a
mean. random sample T1,T2,⋯⋯,T6. Thus, Ti's are i.i.d. and have the same
• Point estimator for the variance is the mean of the distribution as T. We obtain the following values (in minutes):
• 18,21,17,16,24,20.
random variable Y = ( X −  ) 2, given by
• Find the values of the sample mean, the sample variance, and the sample
standard deviation for the observed sample.
𝑛
1 18 + 21 + 17 + 16 + 24 + 20
𝜎ො 2 =
𝑛−1
෍ (𝑋𝑘 − μො )2
Tˆ = = 19.33
𝑘=1 6

1 n
ˆ
S =
2

6 − 1 k =1
( X k − 19.33) 2 = 8.67

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Maximum Likelihood
Maximum Likelihood
Estimation (MLE)
• Suppose we have a random sample x1,x2, ..,xn whose • It is observed that a good estimate of
assumed probability distribution depends on some unknown
parameter θ. unknown parameter θ would be the value of θ
• Ex: that maximizes the probability
1) For Binomial unknown parameters are n, p. i.e. the likelihood of getting the data we
2) For Poisson unknown parameter is λ. observed (this is reason, why we called as
3) For Normal unknown parameters are 𝜇 𝑎𝑛𝑑 𝜎 2 . likelihood function)
Our goal is to find good estimate of θ(population parameter)
using sample and which can be done with the help of MLE.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Maximum Likelihood Maximum Likelihood

• Let x1,x2, ..,xn be i.i.d. random variables drawn • The maximum likelihood estimate (MLE) of θ is that value of θ
that maximizes likelihood(θ).
from some probability distribution that
• It is defined as
depends on some unknown parameter θ. n
L( ) =  f ( xi /  )
• The goal of MLE to maximize likelihood i =1

function n
log L( ) =  log f ( xi /  )
𝐿 𝜃 = 𝑓(x1,x2, ..., xn 𝜃 i =1

= 𝑓(x1 𝜃 *𝑓(x2 𝜃 …𝑓(xn 𝜃


n
L( ) =  f ( xi /  )
i =1

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
11/9/2024 393 11/9/2024 394

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

11/9/2024 395 11/9/2024 396

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Maximum Likelihood for a Binomial Maximum Likelihood
distribution Example 3:

• Suppose we wish to find the maximum likelihood • Consider a sample 0,1,0,0,1,0 from a binomial distribution, with the form
P[X=0]=(1-p), P[X=1]=p. Find the maximum likelihood estimate of p.
estimate (MLE) of θ for a Binomial distribution,
pk (k ,  ) = nCk k (1 −  ) n − k • Soln :

log pk (k ,  ) = log(nCk ) + k log( ) + (n − k ) log((1 −  )


 log pk (k ,  ) k n−k
= 0 0+ − =0
  1−
k
k − k = n − k   =
n

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Maximum Likelihood Maximum Likelihood


Example 3: Example 4:

• Consider a sample 0,1,0,0,1,0 from a binomial distribution, with the form


P[X=0]=(1-p), P[X=1]=p. Find the maximum likelihood estimate of p.
• A sample of three observations (𝑋1 = 0.4,
𝑋2 = 0.7, 𝑋3 = 0.9) is collected from a
• Soln : continuous distribution with density 𝑓 𝑥 =
L(p)=P[X=0] P[X=1] P[X=0] P[X=0] P[X=1] P[X=0]
=(1-p) p (1-p) (1-p) p (1-p)
𝜃𝑥 𝜃−1 ; 0 < 𝑥 < 1. Estimate 𝜃 by the method
=(1-p)3p2. of maximum likelihood.
Log L(p)=log[(1-p)3p2.]=log[(1-p)3]+log[(p2).]=3log(1-p)+2logp
LogL( p) −3 2 −3𝑝+2−2𝑝
=0 +𝑝 =0⇒ = 0 ⇒ 𝑝 =2/5
p
1−𝑝 𝑝(1−𝑝)
means,

That is , there is 1/3 chance to observe this sample if we believe the


population to be Binomial distributed .

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Maximum Likelihood
Example 5:

• Let 𝑦1 , 𝑦2 , … 𝑦𝑛 denote a random sample from


the probability density function 𝑦1 0, 𝜃 .
𝜃
𝑓 𝑦 =ቊ 𝜃+1 𝑦 0 < 𝑦 < 1; 𝜃 > 1
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Find the maximum-likelihood estimator for 𝜃

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

Maximum Likelihood
Example 6:

• Let 𝑥1 , 𝑥2 , … 𝑥𝑛 are independent identical


distribution (i.i.d) are random variables with
1 𝑥
density 𝑓 𝑥 = exp − , 𝜎>0
2𝜎 𝜎
Find estimator of 𝜎, using maximum likelihood
estimation.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
SSWT ZC111 P & S
CONTACT SESSION 14

BITS Pilani
Pilani Campus

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

HYPOTHESIS TESTING Stating a Hypothesis


Null hypothesis(𝑯𝟎 ):

Hypothesis is a decision making statement framed about the The hypothesis formulated for the purpose of its rejection under the assumption that it is true is called the Null hypothesis denoted by 𝑯𝟎 .

population which may or may not be true. Alternative hypothesis Ha or (H1):


Any hypothesis which is a complimentary to the null hypothesis is called Alternative hypothesis denoted by 𝑯𝟏 or 𝑯𝜶 .
In order to arrive at a decision regarding the population Example:1 To test whether process B is better than process A, we can formulate
through a sample of the population we have to make certain 𝑯𝟎 : There is no difference between process A and B

assumption referred to as hypothesis which may or may not be 𝑯𝟏 : There is significant difference between process A and B

true. Example:2 To test whether there is a relationship between two variates, we can formulate
𝑯𝟎 : There is no relationship between variates
There are two types of hypothesis 𝑯𝟏 : There is relationship between variates

1. Null hypothesis
2. Alternative hypothesis

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


TESTS OF HYPOTHESES

For example, in quality control work a random sample may serve to


➢ There are many problems in which, rather than estimate the value of a determine whether the “process mean” (for a given kind of
parameter, we must decide whether a statement concerning a measurement) has remained unchanged or whether it has changed to
parameter is true or false. such an extent that the process has gone out of control and
adjustments have to be made .
➢ Statistically speaking we test a hypothesis about a parameter.

409 410

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

➢ To illustrate the general concepts involved in deciding whether or not a statement about the
➢ It instructs a member of its research staff to paint each of 36
population is true or false, suppose that a customer protection agency wants to test a paint
boards using a different 1- gallon can of paint, with the intention
manufacturer’s claim that the average drying time of his new “ fast-drying ” paint is 20
of rejecting the claim if the mean of the drying time exceeds
minutes.
20.75 minutes .
➢ It instructs a member of its research staff to paint each of 36 boards using a different 1-
gallon can of paint, with the intention of rejecting the claim if the mean of the drying
time exceeds 20.75 minutes .
➢ Otherwise it will accept the claim, in either case it will take

➢ Otherwise it will accept the claim, in either case it will take whatever action is called for in whatever action is called for in its plans.
its plans.
412

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Types of Errors
No matter which hypothesis represents the claim, always begin the hypothesis test
assuming that the null hypothesis is true.
➢The situation described in this example is typical of testing a At the end of the test, one of two decisions will be made:
statistical hypothesis , and it may be summarized in the 1. reject the null hypothesis, or
2. fail to reject the null hypothesis.
following table , where we refer to the hypothesis being
A type I error occurs if the null hypothesis is rejected when actually it is true.
tested as hypothesis H:
Accept H Reject H A type II error occurs if the null hypothesis is not rejected when actually it is false.
H is true Correct decision Type I error
Type II error Correct decision
H is false

413

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

➢ If hypothesis H is true & it is not rejected


or ➢ The second error is called a Type II error and the
➢ If hypothesis H is false & it is rejected, probability of committing it is designated by the Greek letter
the decision is in either case correct. If hypothesis H is true but
rejected, it is rejected in error, and if hypothesis H is false β (beta). in our example for the given test criterion, α = 0.03
but not rejected, this is also an error. when μ = 20 minutes, and β = 0.27 when μ = 21 minutes.

➢ The first of these errors is called a Type I error. The


probability of committing it, when the hypothesis is true, is
designated by the Greek letter α (alpha).
415

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


NOTATION FOR THE HYPOTHESES
Making a Decision
𝐻1 : The alternative hypothesis is the claim we wish to establish.
𝐻0 : The null hypothesis is the negation of the claim.
The errors and their probabilities:
Type I error: Rejection of 𝐻0 when 𝐻0 is true.
Type II error: Nonrejection ( that is acceptance) of 𝐻0
when 𝐻0 is false.
α = probability of making a Type I error (also called the level of significance)
β = probability of making a Type II error
417

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Level of Significance Nature of the Test

➢ Level of significance is the probability level in which null hypothesis is rejecting in this level.
➢ By setting the level of significance at a small value, you are saying that you want the
 Three types of hypothesis tests

probability of rejecting a true null hypothesis to be small.  left-tailed test

 right-tailed test
➢ Commonly used levels of significance:
 two-tailed test
 = 0.10  = 0.05  = 0.01
 The type of test depends on the region of the sampling distribution that favors a
For example, if 0.05 or 5% level of significance is chosen in designing a test of a hypothesis,
rejection of H0.
then there are about 5 chances in 100 that we would reject the hypothesis when it should
be accepted. That is, we are about 95% confident that we have made the right decision,  This region is indicated by the alternative hypothesis.

which means that we could be wrong with probability 0.05.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Left-tailed Test Right-tailed Test
• The alternative hypothesis H1 contains the less-than inequality • The alternative hypothesis H1 contains the greater-than
symbol (<). H : μ  k inequality symbol (>).
0
H0: μ ≤ k
H1: μ < k
H1: μ > k P is the area to
P is the area to the the right of the
left of the test test statistic.
statistic.

z
-3 -2 -1 0 1 2 3 z
-3 -2 -1 0 1 2 3
Test
statistic Test
statistic

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Two-tailed Test Identifying Hypotheses


Example: Write the claim as a mathematical sentence. State the null and alternative
• The alternative hypothesis H1 contains the not equal inequality hypotheses and identify which represents the claim.
symbol (≠). Each tail has an area of ½P.
H0: μ = k A manufacturer claims that its rechargeable batteries have an average life of at least
1,000 charges.
H1: μ  k
P is twice the area to   1000
P is twice the area to
the right of the
the left of the negative Condition of equality
positive test statistic.
test statistic.
H0:   1000 (Claim)

z H1:  < 1000


-3 -2 -1 0 1 2 3
Complement of the null  This is a one-tailed or left-tailed test.
Test Test hypothesis
statistic statistic

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Identifying Hypotheses Identifying Hypotheses
Example: Write the claim as a mathematical sentence. State the null and alternative
hypotheses and identify which represents the claim. Example: Write the claim as a mathematical sentence. State the null and alternative
hypotheses and identify which represents the claim.
Is the average amount spent in the bookstore at most $25?
Statesville college claims that 94% of their graduates find employment within six
months of graduation. µ ≤ $25

p = 0.94 Condition of
equality
Condition of equality

H0: µ ≤ $25 (Claim)


H0: p = 0.94 (Claim)
H1: µ > $25
Ha: p  0.94
Complement of the null
Complement of the null hypothesis
hypothesis  This is a two-tailed test. Why?  This is a one-tailed or right-tailed test.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Identifying Hypotheses
Identifying Hypotheses
Example: For each claim, state H0 and H1. Then determine whether the Example: For each claim, state H0 and H1. Then determine whether the
hypothesis test is a left-tailed, right-tailed, or two-tailed test. Sketch a normal
sampling distribution and shade the area for the P-value. hypothesis test is a left-tailed, right-tailed, or two-tailed test. Sketch a
A university publicizes that the proportion of its students who graduate in 4 normal sampling distribution and shade the area for the P-value.
years is 82%.
A water faucet manufacturer announces that the mean flow rate of a
certain type of faucet is less than 2.5 gallons per minute.
Solution:
H0: p = 0.82 Solution:
H1: p ≠ 0.82 H0: μ ≥ 2.5 gpm P-value area
½ P-value area ½ P-value area
H1: μ < 2.5 gpm
Two-tailed test z
z Left-tailed test -z 0
-z 0 z

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


Identifying Hypotheses Steps for Hypothesis Testing

1. State the claim mathematically and verbally. Identify the null and
Example: For each claim, state H0 and H1. Then determine whether the
alternative hypotheses.
hypothesis test is a left-tailed, right-tailed, or two-tailed test. Sketch a normal
sampling distribution and shade the area for the P-value. H0: ? Ha: ?
2. Specify the level of significance. This sampling distribution is based
A cereal company advertises that the mean weight of the contents of its 20- α= ? on the assumption that H0 is true.
ounce size cereal boxes is more than 20 ounces. 3. Determine the standardized
Solution: sampling distribution and
P-value area
H0: μ ≤ 20 oz draw its graph. z
0
H1: μ > 20 oz 4. Calculate the test statistic
0 z
z and its standardized value.
Right-tailed test Add it to your sketch. z
0
Test statistic

430
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Steps for Hypothesis Testing


Decision Rule Based on P-value
5. Find the P-value. To use a P-value to make a conclusion in a hypothesis test, compare
6. Use the following decision rule. the P-value with .
1. If P  , then reject H0.
Is the P-value less than or 2. If P > , then fail to reject H0.
equal to the level of No Fail to reject H0. Example : The P-value for a hypothesis test is P = 0.0132. What is your decision if the
significance? level of significance is
Yes 1. 0.05?
Reject H0. Solution: Because 0.0132 < 0.05, you should reject the null hypothesis.

7. Write a statement to interpret the decision in the context of the original 2. 0.01?
claim. Solution:
Because 0.0132 > 0.01, you should fail to reject the null hypothesis.

431
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
Example: Finding the P-value Example: Finding the P-value

Find the P-value for a left-tailed hypothesis test with a test statistic of z = -1.99.
Find the P-value for a two-tailed hypothesis test with a test statistic of z = 1.82. Decide
Decide whether to reject H0 if the level of significance is α = 0.01.
whether to reject H0 if the level of significance is α = 0.05.

Solution: Solution:
For a left-tailed test, P = (Area in left tail) For a two-tailed test, P = 2(Area in tail of test statistic)
1 – 0.9656 =
P = 0.0233 P = 2(0.0344)
0.0344
0.9838 = 0.0688
z z
-1.99 0 0 1.82
Because 0.0233 > 0.01, you should fail to reject H0 Because 0.0688 > 0.05, you should fail to reject H0

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

SOLUTION

EXCERCISES

( 7.42)
n=64 , μ = 190, 𝑋ത = 187
1. A company wants to establish that the mean life of its batteries , when The test statistic (for large sample) is
used in a wireless mouse, is over 187 days. The data will consist of the life
z = (x̅ - μ) / (σ /√n) , so that
lengths of batteries in 64 different wireless mice.
a) Formulate the null and the alternative hypotheses. z α / 2 . (σ /√n) = E, which is the maximum error.
b) If the true mean is 190 days , what error can be made? (a) (i) Null hypothesis 𝐻0 : μ = 187 (ii) Alternative hypothesis 𝐻1 : μ > 187
(b) The Error is E = z α / 2 .σ / √n = x̅- μ
When μ = 190, E is 187 -190 = -3, implies that
➢ The error is of type II.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


SOLUTION
EXERCISES (CONTINUED) – 7.45

➢ If it erroneously rejects the null hypothesis that the dam is safe, it would commit the
type I error.
➢ If it erroneously accepts the null hypothesis that the dam is safe, it would commit
2. Suppose that an engineering firm is asked to check the safety of a type II error.
➢ In the classical theory of testing hypothesis we consider cost factors and other
dam. What type of error would it commit if it erroneously rejects the considerations that are partly arbitrary and partly subjective as they will affect the
choice of a sample size, the choice of an alternative hypothesis , the choice of α & β,
null hypothesis that the dam is safe? What would the likely impact of and so forth.
these errors be? ➢ In this approach , the maximum value of α ( the probability of falsely rejecting the null
hypothesis) is controlled.
➢ Even when costs are difficult to determine but the consequences of one error are
much more serious than for the other, the hypotheses should be labeled so that the
most serious error is the type I error. This would be the likely impact of these errors.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

EXERCISES (CONTINUED) – 7.47 SOLUTION

2. Suppose that a consumer protection agency wants to test a paint a) The size is large and hence the statistic is given
by
manufacturer’s claim that the average drying time of his new “ fast - z = (x̅ - μ) / (σ /√n)
= (20.50 – 20) / (2.4 / √36)
drying “ paint is 20 minutes . Assume that the S.D. of such drying time
= 0.5 / 0.4 = 1.25
is 2.4 minutes. If the no. of boards painted is 36 so that the paint It follows from a standard normal curve table that
the area of the shaded region is = Area to the right
manufacturer’s claim is rejected for the sample mean which may of Z = 1.25 ( i.e, to the right of
x̅ = 20.50 ), as z is positive.
exceed 20.50 minutes , then find = 0.5 – (Area between μ = 20 & x̅ = 20.5)
=0.5 – 0.3994 (i.e.,area between z=0 & z=1.25
(a) the probability of a Type I error; From the table)
=0.1056. Hence, the probability of erroneously
(b) the probability of a Type II error when μ = 21 minutes. rejecting the claim (i.e, the probability of a Type I
error) is 0.1056.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


EXERCISES (CONTINUED) – 7.49
SOLUTION (CONTINUED) - 7.47

b) When μ = 21 min., let us now consider the other probability , where


4. It is desired to test the null hypothesis μ = 100 pounds against the
the procedure fails to detect.

Now, alternative hypothesis μ < 100 pounds on the basis of the weights
Z = (20.50 – 21) / (2.4 / √36)
of a random sample of n = 40 packages shipped by truck. The
= - 0.5 / 0.4 = -1.25

∴ The area of the shaded region = Area to the left of x̅ = 20.5(∵ z is population has σ = 12 pounds . For what values of x̄ must the null
negative)
hypothesis be rejected if the probability of a Type I error is to be α
= 0.5 – (Area between x̅ = 20.50 & μ = 21 )

= 0.5 – 0.3994 ( area between z= - 1.25 & z=0, from the table) = 0.01?
= 0.1056

Hence, the probability of erroneously accepting the hypothesis is


0.1056 . i.e, the probability of Type II error is 0.1056.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

SOLUTION

NOTE : 1. If  = 0.05, the dividing lines, or critical values, of the criteria are –1.645 and 1.645 for the one-sided
Here the sample is large and so the statistics must be z, given by , alternatives, and
z = (x̄ − μ) / (σ/√ n) = (x̄ - 100) / (12 /√40) –1.96 and 1.96 for the two-sided alternative.
Here given, Ho : μ = 100 2. If  = 0.01, the dividing lines of the criteria are –2.33 and 2.33 for the one-sided alternatives, and –2.575
H1 : μ < 100 ( i.e, a one –tailed test) and 2.575 for the two-sided alternative.
We know that for a one –tailed test, Z 0.01 = 2.33 . Example: Suppose that we want to test on the basis of n = 35 determinations and at the
Since H1 is μ < 100 ( less than relation), we have that z = -2.33 0.05 level of significance whether the thermal conductivity of a certain kind of cement
i.e, We have (x̄ -100) / (12 / √40) = - 2.33 brick is 0. 340, as has been claimed. From the information gathered in similar studies, we
i.e., (x̄ -100) √40 = - 2.33 x 12 can expect that the variability of such determinations is given by  = 0.010 and by
i.e., x̄ (√40 ) - 100 √40 = - 27.96 experiment the mean of the 35 determinations is 0.343.
(or) x̄ (√40 ) = 100 √40 - 27.96
= 632.46 – 27.96 Solution: Step 1: Null hypothesis:  = 0.340
= 604.5 Alternative hypothesis:   0.340
Therefore, x̄ = 604.5 / √40 = 95.579
Thus, for x̄ < 95.58, the null hypothesis will be rejected (when α = 0.01 ).
Step 2: Level of significance:  = 0.05.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


The alternative hypothesis is two sided because we want to reject the null hypothesis if the mean is less Example : A trucking firm suspects the claim that the average lifetime of certain tires is at least 28,000 miles. To check the claim, the
firm puts 40 of these tires on its trucks and gets a mean lifetime of 27,463 miles with a standard deviation of 1,348 miles. What can
than or greater than 0.340. it conclude if the probability of a Type-I error is to be at most 0.01?

Step 3: Criterion: Reject the null hypothesis if Z < -1.96 or Z > 1.96, where Solution: 1. Null hypothesis:   28,000 miles
X −  Alternative hypothesis :  < 28,000 miles.
2. Level of significance:   0.01.
z= 0
3. Criterion: Since the probability of Type-I error is greatest when  = 28,000 miles, we proceed as if we were testing the null
 / n hypothesis  = 28,000 miles against the alternative hypothesis  < 28,000 miles at the 0.01 level of significance. Thus, the null
Step 4: Calculations: hypothesis must be rejected if Z < -2.33, where with  replaced by S.

0.343 − 0.340
z= = 1.77
27, 463 − 28, 000
0.010 / 35 4. Calculations: z = = −2.52
1,348 / 40
Step 5: Decision: Since Z = 1.77 falls on the interval from –1.96 to 1.96, the null hypothesis cannot be
5. Decision: Since Z = -2.52 is less than –2.33, the null hypothesis must be rejected at level of significance 0.01. In other words, the
rejected. That is, the difference between µ = 0.343 and  = 0.340 can be attributed to chance. trucking firm’s suspicion that
 < 28,000 miles is confirmed.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Course No. : S2-22_SSWTZC111


Session -15

BITS Pilani, Pilani Campus


HYPOTHESES CONCERNING ONE MEAN

➢ Suppose, for instance, we want to establish that the


thermal conductivity of a certain kind of cement
brick differs from 0.340, the value claimed.
We will test on the basis of the mean of the 35
determinations is 0.343 and at the 0.05 level of
significance.
From information gathered in similar studies, we can
expect that the variability of such determinations is
given by σ = 0.010.

450

BITS Pilani, Pilani Campus

➢ Following the outline of the preceding section, we begin with ➢ Returning now to the example dealing with the
steps 1 and 2 by writing thermal conductivity of the cement bricks where
α = 0.05, suppose that the mean of the 35
1. Null hypothesis: μ = 0.340 determinations is 0.343
Alternative hypothesis: μ ≠ 0.340 3. So we continue by writing
2. Level of significance: α = 0.05
(Two sided test) Criterion:
The test statistics is Z = (x̅ − μ0) / (σ /√n)
Z = (0.343 − 0.340) / (0.010 / √35) = 1.77 .

452

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


EXAMPLE
CALCULATING THE P- VALUE
➢ A process for producing vinyl floor covering has been stable for a long period
of time, and the surface hardness measurement of the flooring produced has
4. Decision: a normal distribution with mean 4.5 and standard deviation σ = 1.5.
Since Z = 1.77 < 1.96 (as α = 0.05, & zα =1.96, for a two– sided test ), the A second shift has been hired and trained and their
null hypothesis cannot be rejected. In other words, the null hypothesis is
production needs to be monitored.
accepted, since the calculated value of the statistic is LESS THAN the
tabulated value of it. Consider testing the hypothesis H0: μ = 4.5 versus
➢ The conclusion is that there is no significant difference between the sample H1: μ ≠ 4.5.
& the population mean. A random sample of hardness measurements is made of n = 25 vinyl
specimens produced by the second shift.
Calculate the P-value when using the test statistic
t = (x̅ − 4.5) / (1.5 / √25 ) if X = 3.9.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

P-VALUE FOR A GIVEN TEST STATISTIC AND NULL


HYPOTHESIS

Solution:
The observed value of the test statistic is ➢ We thus understand that the P-value is the probability of obtaining a value
t = (3.9 − 4.5) / (1.5/ √25) = −2.00 for the test statistic that is as extreme or more extreme than the value
actually observed, where the probability is calculated under the null
Since the alternative is two-sided, we must consider large
hypothesis.
positive values of t as well as large negative values.
From the t table, P value > 0.025
➢ In many practical situations if σ is unknown but the sample size is large, we
must make the approximation of substituting for it, the sample standard
deviation S .

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


STATISTIC FOR LARGE SAMPLE TEST
SOLUTION
CONCERNING MEAN

1. Null hypothesis: μ ≥ 28,000 miles


Z = (x̅ − μ0) / (S / √n) Alternative hypothesis: μ < 28,000 miles (one-sided test)

A LARGE SAMPLE TEST OF MEAN TYRE LIFE 2. Level of significance: α ≤ 0.01


Example:
➢ A trucking firm is suspicious of the claim that the average 3. Criterion: Since the probability of a Type I error is greatest when μ = 28,000
lifetime of certain tyre is at least 28,000 miles. To check the miles, we proceed as if we were testing the null hypothesis μ = 28,000 miles
claim, the firm puts 40 of these tyres on its trucks and gets a against the alternative hypothesis μ < 28,000 miles at the 0.01 level of significance.
mean lifetime of 27,463 miles with a standard deviation of 1,348
miles. What can it conclude if the probability of a Type I error is
to be at most 0.01?

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

The test statistic is


4.Calculation: ➢ If the sample size is small and σ is unknown, the tests just described cannot
Z = (x̅ − μ0) / (S / √n)
Z= (27,463 – 28,000) / ( 1,348 /√ 40) = - 2.52 be used. However, if the sample comes from a normal population (to within a
reasonable degree of approximation), we can base the test of the null
∴ I z I = 2.52 hypothesis μ = μ0 on the statistic.
5. Decision:
Since, I z I > tabulated value of z ( for one-sided test, if α = 0.01, zα = 2.33 ),
the null hypothesis must be rejected ( as the calculated value of the statistic is
GREATER THAN its tabulated value). In other words, the trucking firm’s
suspicion that μ < 28,000 miles is confirmed.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


A t TEST OF A NORMAL POPULATION MEAN
EXAMPLE:

➢ The specifications for a certain kind of ribbon call for a mean breaking
Statistic for small sample test strength of 180 pounds. If five pieces of the ribbon (randomly selected from
concerning mean (normal population) different rolls) have a mean breaking strength of 169.5 pounds with a
standard deviation of 5.7 pounds, test the null hypothesis μ = 180 pounds
t = (x̅ − μ0) / (S / √n) against the alternative hypothesis μ > 180 pounds at the 0.01 level of
significance. Assume that the population distribution is normal.
➢ which is a random variable having the t distribution with (n − 1)
degrees of freedom. The criteria for the one sample t test are
like those for Z but are based on the t distribution.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

SOLUTION

1. Null hypothesis: μ = 180 pounds


Alternative hypothesis: μ > 180 pounds (one-sided test) 5. Decision :
2. Level of significance: α = 0.01 Since ItI = 4.12 > 3.747,(i.e., cal. value I t I > tab.t (t0.01 for 4d.f = 3.747) the null
3. Criterion: hypothesis must be rejected at level α = 0.01. In other words, the breaking
3.747 is the value of t0.01 for(5−1=) 4 degrees of strength is below specifications. The exact tail probability, or P – value is
0.0073.
freedom and
The test statistics is t = (x̅ − μ0) / (S / √n)
4. Calculations:
t = (169.5 – 180) / (5.7 / √5 ) = - 4.12
∴ I t I = 4.12

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


TESTING OF HYPOTHESES ON MEAN FOR
LARGER AND SMALLER SAMPLES SOLUTION

STEP 1:
EXERCISES: Null Hypothesis H0 : There is no significant difference & let
μ = 73.2.
1. The mean of ball bearings manufactured by a company is 73.2 inches, with STEP 2:
S.D of 8.6 inches. If a sample of 45 is chosen at random and its mean is Alternative Hypothesis H1: There is significant difference
76.7 inches, test the significant difference between the means, as to which such that μ > 73.2 (One – tailed test).
one is superior at 1% level of significance.
STEP 3:
Since the sample is larger, the test statistic is
Z = (x̄ - μ) / (σ / √n)
= (76.7 – 73.2) / (8.6 / √45)
i.e, z = (3.5 x 6.7) / 8.6 = 2.72

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

SOLUTION (CONTINUED)
EXERCISES (CONTINUED)

2. The following are the timings between 6 calls for an


STEP 4: ambulance (in a particular city) and the patient’s arrival at
Given α = 1% = 0.01 the hospital : 27,15,20,32,18 and 26 minutes. Use this data
We know that Zα = Z0.01 (for a one-tailed test) is 2.33 to judge the genuineness of the ambulance service’s claim
that is taken on the average of 20 minutes between the call
STEP 5: for an ambulance and the patient’s arrival at the hospital.
Since the calculated value of z (=2.72) is > the tabulated SOLUTION:
value (2.33), NULL HYPOTHESIS H0 IS REJECTED.
STEP 1:
STEP 6: DECISION: Null Hypothesis H0 : There is no significant difference
Thus, we find that there is significant difference between Given μ = 20 mins.
the sample and population mean. STEP 2:
Alternative Hypothesis H1: There is significant difference.
i.e, μ ≠ 20 ( two – tailed test)

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


SOLUTION (CONTINUED):
STEP 5:
As the calculated value of t (=1.15) < the tabulated value (2.015) H0 is
STEP 3:
accepted.
Since the sample is smaller we use the statistic ‘t’, which is
STEP 6:
given by t = (x̄ - μ) / (s / √n) , where x̄ = Σxi / n
Therefore, we conclude that there is no significant difference between the
138 / 6 = 23
sample and population means. In other words, the claim of the hospital
∴ t = (23 – 20) / (s / √6) { where s2 = Σ ( xi - x̄ )2 / (n -1 ) ambulance service is genuine.
= 40.8
= 3 x √6 / 6.38 = 1.15 ∴ s = √ 40.8 = 6.38}

STEP 4:
Let us assume that α = 5% = 0.05 For (n – 1 =) 5 degrees of
freedom, t0.05 = 2.015

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

EXERCISES (CONTD).
SOLUTION :

(7.57) 9 measurements were made on a key performance indicator as follows: xi (xi - x̄) (xi - x̄)2
x̄ = 1026 / 9
123 106 114 128 113 109 120 102 111 123 9 81
= 114
(a) Conduct a test of hypothesis with the intent of showing that the mean key 106 -8 64
n=9
performance indicator is different from 107. Take α = 0.05 and assume a
114 0 0
normal population.
128 14 196
(b) Based on your conclusion in part (a), what error could you have made?
113 -1 1
109 -5 25
120 6 36
102 -12 144
111 -3 9
556

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


SOLUTION (CONTINUED): EXERCISES (CONTD.):

s2 = Σ ( xi - x̄ )2 / (n -1 ) (7.60)
= 556 / 8 = 69.5 In 64 randomly selected hours of production, the mean and the standard
s = √69.5 = 8.33 deviation of the number of acceptable pieces produced by an automatic
STEP 1: Null Hypothesis Ho : μ = 107 stamping machine are x = 1,038 and s = 146. At the 0.05 level of
significance, does this enable us to reject the null hypothesis μ = 1,000
Alternative Hypothesis H1: μ ≠ 107 (two=tailed test)
STEP 2: t = (x̄ - μ) / (s / √n)
against the alternative hypothesis μ > 1,000?
= ( 114 – 107) x √9 / 8.33 = 21 / 8.33 = 2.52
STEP3: We know that (for α = 0.05) t0.05 for 8 d.f = 2.306
STEP4: Since, calculated value of t > tabulated t value, H0 is rejected.
b) Type I error.

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

SOLUTION: SOLUTION (CONTINUED):

GIVEN: STEP 3:
x̄ = 1038 s = 146 & n= 64 Since the sample is larger, the test statistic is
STEP 1: Z = (x̄ - μ) / (s / √n)
Null Hypothesis H0 : There is no significant difference. = (1038 – 1000) / (146 / √64)
Given μ = 1000. i.e, z = (38 x 8) / 146 = 304 / 146 = 2.08
STEP 2: STEP 4:
Alternative Hypothesis H1: There is significant difference. Given α = 5% = 0.05
i.e, μ > 1000 ( one – tailed test) We know that Zα = 1.645 (for a one-tailed test).

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus


SOLUTION (CONTINUED): Example

STEP 5:
Since the calculated value of z is > the tabulated value , NULL HYPOTHESIS A builder claims that heat pumps are installed in 70% of all
H0 IS REJECTED. homes being constructed today in the city of Bangalore.
STEP 6: DECISION:
Would you agree with this claim if a random sample of
Thus, we find that there is significant difference between the sample and
population mean. new homes in this city shows that 28 out of 55 had heat
pumps installed? What P-value and confidence interval
are related in this situation?

BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Contact Session -16: M6- Tests of hypotheses and Linear regression


BITS Pilani
Pilani Campus

Time Type Description References

RL 6.3: Line of regression,


T1 Sec 11.1,
Pre- CS-16 RL 6.3 Population and Sample correlation
11.6
coefficient

Regression problems to be discussed


During CS-16 CS-16 Least square method, correlation T1
Probability & Statistics, CSIW ZC213 coefficient problems

Post-CS-16 HW Chapter 11, Sec. 11.1, 11.6 T1

Lecture 16 480
BITS Pilani, Pilani Campus
CURVE FITTING Method of Least Squares `
Let 𝑦 = 𝑓(𝑥) any function where 𝑥 is independent variable & 𝑦 be the Where a and b are the constants to be determined Let 𝑦𝑖
dependent variable. For 𝑥 = 𝑥1 , 𝑥2 , … , 𝑥𝑛 we can find the corresponding be the value of 𝑦 when 𝑥 = 𝑥𝑖 . Then value of 𝑌𝑖 is called
𝑦 values as 𝑦 = 𝑦1 , 𝑦2 , … , 𝑦𝑛 then the pairs of values the estimated value of 𝑦𝑖
𝑥1 , 𝑦1 , 𝑥2 , 𝑦2 , . . , 𝑥𝑛 , 𝑦𝑛 given 𝑛 points on the curve 𝑦 = 𝑓(𝑥) .
Generally it is not possible to find the actual curve when 𝑛 pairs of
values are given we try to find an approximate curve which most suits 𝑦𝑖 = 𝑎 + 𝑏𝑥𝑖 − − − ②
the given data. Such a curve is referred to as the curve of best fit. The
process of determining the curve of best fit is called curve fitting. The Let 𝑠 = σ 𝑦𝑖 − 𝑌𝑖 2
method generally employed for curve fitting is the method of least
squares . 2
Method of Least Squares Using ① ⟹ 𝑠 = σ 𝑦𝑖 − 𝑎 − 𝑏𝑥𝑖 −−−③
Suppose we wish to have a straight line that serves as best
approximation to the actual curve 𝑦 = 𝑓(𝑥) passing through 𝑛 given We determine 𝑎 & 𝑏 so that 𝑠 is minimum (least) the
points 𝑥1 , 𝑦1 , 𝑥2 , 𝑦2 , . . , 𝑥𝑛 , 𝑦𝑛 . This line be referred to as the line of 𝜕𝑠 𝜕𝑠
necessary conditions for this are = 0 and = 0
best fit and we take its equation as 𝑦 = 𝑎 + 𝑏𝑥−− − ① 𝜕𝑎 𝜕𝑏

481 482
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Method of Least Squares Fit a straight line 𝒚 = 𝒂 + 𝒃𝒙 to the following


data by the method of least squares
𝜕𝑠
Using ③ = Σ(𝑦𝑖−𝑎−𝑏𝑥𝑖)=0 𝑖.𝑒.Σ𝑦𝑖=𝑛𝑎+𝑏 Σ𝑥𝑖− − − ④
𝜕𝑎
𝜕𝑠
= Σ(𝑦𝑖−𝑎−𝑏𝑥𝑖) 𝑥𝑖=0
𝜕𝑏

Σ(𝑥𝑖𝑦𝑖−𝑎𝑥𝑖−𝑏𝑥𝑖)=0
𝒚 = 𝒂 + 𝒃𝒙 −−−−①
Σ𝑥𝑖𝑦𝑖=𝑎Σ𝑥𝑖+𝑏 Σ𝑥𝑖− − − ⑤
Normal equations to ① are
These ④ & ⑤ are known as normal equations which
are two simultaneous equations for finding 𝑎 & 𝑏
σ 𝑦 = 𝑛𝑎 + 𝑏 σ 𝑥 −−−− ②
substituting these values of 𝑎 & 𝑏 in ① we get the
equation of line of best fit for the given data
σ 𝑥𝑦 = 𝑎 σ 𝑥 + 𝑏 σ 𝑥 2 −−−− ③

483 484
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
Correlation
If 𝑥 and 𝑦 are any two variables such that decrease or increase in one
variable may result in decrease or increase in the other variable. If 𝑥
increases 𝑦 also increases or if 𝑥 decreases 𝑦 also decreases then we
say that 𝑥 & 𝑦 are positively correlated or directly correlated, If 𝑥
increases 𝑦 decreases or if 𝑥 decreases 𝑦 increases then 𝑥 and 𝑦 are
said to be negatively correlated or inversely correlated.

Example: The demand (𝑥) and price (𝑦) are directly correlated
supply (𝑥) & price (𝑦) are inversely correlated.
This correlation is measured by quantity known as correlation coefficient
which is defined as
From the above table σ 𝑥 − 𝑥ҧ 𝑦 − 𝑦ത
② ⟹15=5𝑎+𝑏(18)
𝑟=
𝑛 𝜎𝑥 𝜎𝑦
③ ⟹71=𝑎(18)+𝑏(170) Solving these equations we get 𝑎 = 1.646 and
𝑖𝑒 5𝑎+18𝑏=15 − − −(𝑖) b= 0.3761
18𝑎+110𝑏=71− − −(𝑖𝑖)
485 486
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

487 488
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
Regression

489 490
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

Regression Lines

491 492
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
493 494
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

495 496
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
497 498
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

499 500
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
501 502
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

503 504
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
505 506
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

507 508
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
509 510
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

511 512
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
513 514
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

515 516
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
517 518
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus

519 520
BITS Pilani, Pilani Campus BITS Pilani, Pilani Campus
521
BITS Pilani, Pilani Campus

You might also like