Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
54 views

Notes Stat324

This document contains lecture notes for a probability and statistics course taught by Dr. Abdullah Al-Shiha in the second semester of 1424/1425. The notes cover introductory topics in statistics including populations and samples, measures of central tendency such as the mean and measures of variability such as the variance and standard deviation. The notes also cover probability topics like sample spaces, events, operations on events including complements and intersections, and mutually exclusive events. Examples are provided throughout to illustrate key concepts.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Notes Stat324

This document contains lecture notes for a probability and statistics course taught by Dr. Abdullah Al-Shiha in the second semester of 1424/1425. The notes cover introductory topics in statistics including populations and samples, measures of central tendency such as the mean and measures of variability such as the variance and standard deviation. The notes also cover probability topics like sample spaces, events, operations on events including complements and intersections, and mutually exclusive events. Examples are provided throughout to illustrate key concepts.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 109

STAT – 324 Second Semester 1424/1425 Dr.

Abdullah Al-Shiha


Lectures' Notes
(Unrevised First Draft)

STAT – 324
Probability and Statistics for
Engineers

Second Semester 1424/1425


Sections: 1190 and 5735

Teacher: Dr. Abdullah Al-Shiha


Office: 2B43 Building # 4
Office Hours: Saturday & Monday 10-11am
Department of Statistics and Operations Research
College of Science, King Saud University

Textbook:
Probability and Statistics for Engineers and Scientists
By: R. E. Walpole, R. H. Myers, and S. L. Myers
(Sixth Edition)

Department of Statistics and O.R. − 1 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Chapter 1: Introduction to Statistics and Data Analysis:

1.1 Introduction:
* Populations and Samples:
Population Sample = Observations
(Some Unknown Parameters) (We calculate Some Statistics)
Example: KSU Students Example: 20 Students from KSU
(Height Mean) (Sample Mean)
N=Population Size n = Sample Size

• Let X1, X 2 ,K, X N be the population values (in general, they


are unknown)
• Let x1 , x 2 , K , x n be the sample values (these values are
known)
• Statistics obtained from the sample are used to estimate
(approximate) the parameters of the population.
* Scientific Data
* Statistical Inference
(1) Estimation:
→ Point Estimation
→ Interval Estimation (Confidence Interval)
(2) Hypotheses Testing

1.3 Measures of Location (Central Tendency):


• The data (observations) often tend to be concentrated
around the center of the data.
• Some measures of location are: the mean, mode, and
median.
• These measures are considered as representatives (or
typical values) of the data. They are designed to give
some quantitative measures of where the center of the
data is in the sample.

The Sample mean of the observations ( x ):


If x1 , x2 ,K, xn are the sample values, then the sample mean is
n
∑x
x1 + x2 + L + xn i =1 i
x= = (unit)
n n
Department of Statistics and O.R. − 2 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Example:
Suppose that the following sample represents the ages (in year)
of a sample of 3 men:
x1 = 30, x2 = 35, x3 = 27. (n=3)
Then, the sample mean is:
30 + 35 + 27 92
x= = = 30.67 (year)
3 3
n
Note: ∑ ( xi − x) = 0 .
i =1

1.4 Measures of Variability (Dispersion or Variation):


• The variation or dispersion in a set of data refers to how
spread out the observations are from each other.
• The variation is small when the observations are close
together. There is no variation if the observations are
the same.
• Some measures of dispersion are range, variance, and
standard deviation
• These measures are designed to give some quantitative
measures of the variability in the data.

The Sample Variance (S2):


Let x1 , x2 ,K, xn be the observations of the sample. The sample
variance is denoted by S2 and is defined by:
n
∑ ( xi − x)
2
i =1 ( x1 − x) 2 + ( x2 − x) 2 + L + ( xn − x) 2
S =
2
= (unit)2
n −1 n −1
n
where x = ∑ xi / n is the sample mean.
i =1
Note:
(n −1) is called the degrees of freedom (df) associated with the
sample variance S2.

The Standard Deviation (S):


The standard deviation is another measure of variation. It is the
square root of the variance, i.e., it is:

Department of Statistics and O.R. − 3 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

n
∑ ( xi − x)
2
i =1
S = S2 = (unit)
n −1
Example:
Compute the sample variance and standard deviation of the
following observations (ages in year): 10, 21, 33, 53, 54.
Solution:
n=5
n 5
∑ xi ∑ xi
i =1 i =1 10 + 21 + 33 + 53 + 54 171
x= = = = = 34.2 (year)
n 5 5 5
n 5
∑ ( xi − x) ∑ ( xi − 34.2)
2 2

S 2 = i =1 = i =1
n −1 5 −1

=
(10 − 34.2 ) + (21 − 34.2 )2 + (33 − 34.2 )2 + (53 − 34.2 )2 + (54 − 34.2 )2
2

4
1506.8
= = 376.7 (year)2
4
The sample standard deviation is:
S = S 2 = 376.7 = 19.41 (year)

* Another Formula for Calculating S2:


n 2
∑ xi − n x
2

S 2 = i =1 (It is simple and more accurate)


n −1
For the previous Example,
xi 10 21 33 53 54 ∑ x i = 171
x i2 100 441 1089 2809 2916 ∑ x i2 = 7355
n
∑ xi2 − n x
2

7355 − (5)(34.2)
2
1506.8 2
S =
2 i =1
= = = 376.7 (year)
n −1 5 −1 4

Department of Statistics and O.R. − 4 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Chapter 2: Probability:

• An Experiment: is some procedure (or process) that we


do and it results in an outcome.
2.1 The Sample Space:
Definition 2.1:
• The set of all possible outcomes of a statistical
experiment is called the sample space and is denoted by
S.
• Each outcome (element or member) of the sample space
S is called a sample point.
2.2 Events:
Definition 2.2:
An event A is a subset of the sample space S. That is A⊆S.
• We say that an event A occurs if the outcome (the
result) of the experiment is an element of A.
• φ⊆S is an event (φ is called the impossible event)
• S⊆S is an event (S is called the sure event)
Example:
Experiment: Selecting a ball from a box containing 6 balls
numbered 1,2,3,4,5 and 6. (or tossing a die)
• This experiment has 6 possible outcomes
The sample space is S={1,2,3,4,5,6}.
• Consider the following events:
E1=getting an even number ={2,4,6}⊆S
E2 =getting a number less than 4={1,2,3}⊆S
E3 =getting 1 or 3={1,3}⊆S
E4 =getting an odd number={1,3,5}⊆S
E5 =getting a negative number={ }=φ ⊆S
E6 =getting a number less than 10 = {1,2,3,4,5,6}=S⊆S
Notation:
n(S)= no. of outcomes (elements) in S.
n(E)= no. of outcomes (elements) in the event E.
Example:
Experiment: Selecting 3 items from manufacturing process;
each item is inspected and classified as defective (D) or non-
defective (N).
Department of Statistics and O.R. − 5 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

• This experiment has 8 possible outcomes


S={DDD,DDN,DND,DNN,NDD,NDN,NND,NNN}

• Consider the following events:


A={at least 2 defectives}= {DDD,DDN,DND,NDD}⊆S
B={at most one defective}={DNN,NDN,NND,NNN}⊆S
C={3 defectives}={DDD}⊆S
Some Operations on Events:
Let A and B be two events defined on the sample space S.
Definition 2.3: Complement of The Event A:
• Ac or A' or A S
• A = {x ∈S: x∉A }
c

• Ac consists of all points of S


that are not in A.
• Ac occurs if A does not.

Definition 2.4: Intersection:


• A∩B =AB={x ∈S: x∈A and x∈B} S

• A∩B Consists of all points in


both A and B.
• A∩B Occurs if both A and B occur
together.

Department of Statistics and O.R. − 6 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Definition 2.5: Mutually Exclusive (Disjoint) Events:


Two events A and B are mutually exclusive (or disjoint) if and
only if A∩B=φ; that is, A and B have no common elements (they
do not occur together).

A∩B ≠ φ A∩B = φ
A and B are not A and B are mutually
mutually exclusive exclusive (disjoint)

Definition 2.6: Union: S


• A∪B = {x ∈S: x∈A or x∈B }
• A∪B Consists of all outcomes in
A or in B or in both A and B.
• A∪B Occurs if A occurs,
or B occurs, or both A and B occur.
That is A∪B Occurs if at least one of
A and B occurs.

2.3 Counting Sample Points:


• There are many counting techniques which can be used to
count the number points in the sample space (or in some
events) without listing each element.
• In many cases, we can compute the probability of an
event by using the counting techniques.
Combinations:
In many problems, we are interested in the number of ways of
selecting r objects from n objects without regard to order. These
selections are called combinations.
• Notation:
n factorial is denoted by n ! and is defined by:
n!= n × (n − 1) × (n − 2 ) × L × (2 ) × (1) for n = 1, 2, L
0!= 1

Department of Statistics and O.R. − 7 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Example: 5!= 5 × 4 × 3 × 2 × 1 = 120


Theorem 2.8:
The number of combinations of n distinct objects taken r at a
⎛ n⎞
time is denoted by ⎜⎜ ⎟⎟ and is given by:
r ⎝ ⎠

⎛n⎞ n!
⎜⎜ ⎟⎟ = ; r = 0, 1, 2, K, n
⎝ r ⎠ r ! (n − r )!

Notes:
⎛ n⎞
• ⎜⎜ ⎟⎟ is read as “ n “ choose “ r ”.
⎝ ⎠
r
⎛n⎞ ⎛n⎞ ⎛n⎞ ⎛n⎞ ⎛ n ⎞
• ⎜⎜ ⎟⎟ = 1 , ⎜⎜ ⎟⎟ = 1 , ⎜⎜ ⎟⎟ = n , ⎜⎜ ⎟⎟ = ⎜⎜ ⎟⎟
⎝n⎠ ⎝0⎠ ⎝1⎠ ⎝r ⎠ ⎝n − r⎠
⎛ n⎞
• ⎜⎜ ⎟⎟ = The number of different ways of selecting r objects
⎝r⎠
from n distinct objects.
⎛ n⎞
• ⎜⎜ ⎟⎟ = The number of different ways of dividing n distinct
⎝ ⎠
r
objects into two subsets; one subset contains r
objects and the other contains the rest (n−r) bjects.
Example:
If we have 10 equal–priority operations and only 4 operating
rooms are available, in how many ways can we choose the 4
patients to be operated on first?
Solution:
n = 10 r=4
The number of different ways for selecting 4 patients from 10
patients is
⎛10 ⎞ 10! 10! 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1
⎜⎜ ⎟⎟ = = =
⎝ 4 ⎠ 4! (10 − 4 )! 4! × 6! (4 × 3 × 2 × 1) × (6 × 5 × 4 × 3 × 2 × 1)
= 210 (different ways )

2.4. Probability of an Event:


• To every point (outcome) in the sample space of an
experiment S, we assign a weight (or probability), ranging
Department of Statistics and O.R. − 8 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

from 0 to 1, such that the sum of all weights


(probabilities) equals 1.
• The weight (or probability) of an outcome measures its
likelihood (chance) of occurrence.
• To find the probability of an event A, we sum all
probabilities of the sample points in A. This sum is called
the probability of the event A and is denoted by P(A).
Definition 2.8:
The probability of an event A is the sum of the weights
(probabilities) of all sample points in A. Therefore,
1. 0 ≤ P ( A) ≤ 1
2. P (S ) = 1
3. P(φ ) = 0
Example 2.22:
A balanced coin is tossed twice. What is the probability that at
least one head occurs?
Solution:
S = {HH, HT, TH, TT}
A = {at least one head occurs}= {HH, HT, TH}
Since the coin is balanced, the outcomes are equally likely; i.e.,
all outcomes have the same weight or probability.
Outcome Weight
(Probability)
HH P(HH) = w
HT P(HT) = w 4w =1 ⇔ w =1/4 = 0.25
TH P(TH) = w P(HH)=P(HT)=P(TH)=P(TT)=0.25
TT P(TT) = w
sum 4w=1
The probability that at least one head occurs is:
P(A) = P({at least one head occurs})=P({HH, HT, TH})
= P(HH) + P(HT) + P(TH)
= 0.25+0.25+0.25
= 0.75
Theorem 2.9:
If an experiment has n(S)=N equally likely different outcomes,
then the probability of the event A is:

Department of Statistics and O.R. − 9 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

n( A) n( A) no. of outcomes in A
P( A) = = =
n( S ) N no. of outcomes in S
Example 2.25:
A mixture of candies consists of 6 mints, 4 toffees, and 3
chocolates. If a person makes a random selection of one of these
candies, find the probability of getting:
(a) a mint
(b) a toffee or chocolate.
Solution:
Define the following events:
M = {getting a mint}
T = {getting a toffee}
C = {getting a chocolate}
Experiment: selecting a candy at random from 13 candies
n(S) = no. of outcomes of the experiment of selecting a candy.
= no. of different ways of selecting a candy from 13 candies.
⎛13 ⎞
= ⎜⎜ ⎟⎟ = 13
⎝ 1 ⎠
The outcomes of the experiment are equally likely because the
selection is made at random.
(a) M = {getting a mint}
n(M) = no. of different ways of selecting a mint candy
from 6 mint candies
⎛6⎞
= ⎜⎜ ⎟⎟ = 6
⎝ ⎠
1
n (M ) 6
P(M )= P({getting a mint})= =
n(S ) 13
(b) T∪C = {getting a toffee or chocolate}
n(T∪C) = no. of different ways of selecting a toffee
or a chocolate candy
= no. of different ways of selecting a toffee
candy + no. of different ways of selecting a
chocolate candy
⎛ 4⎞ ⎛ 3⎞
= ⎜⎜ ⎟⎟ + ⎜⎜ ⎟⎟ = 4 +3 =7
⎝ ⎠
1 ⎝ ⎠
1
= no. of different ways of selecting a candy

Department of Statistics and O.R. − 10 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

from 7 candies
⎛7⎞
= ⎜⎜ ⎟⎟ = 7
⎝ ⎠
1
n(T ∪ C ) 7
P(T∪C )= P({getting a toffee or chocolate})= =
n (S ) 13
Example 2.26:
In a poker hand consisting of 5 cards, find the probability of
holding 2 aces and 3 jacks.
Solution:
Experiment: selecting 5 cards from 52 cards.
n(S) = no. of outcomes of the experiment of selecting 5 cards
from 52 cards.
⎛ 52 ⎞ 52!
= ⎜⎜ ⎟⎟ = = 2598960
⎝ ⎠5 5! × 47!
The outcomes of the experiment are equally likely because the
selection is made at random.
Define the event A = {holding 2 aces and 3 jacks}
n(A) = no. of ways of selecting 2 aces and 3 jacks
= (no. of ways of selecting 2 aces) × (no. of
ways of selecting 3 jacks)
= (no. of ways of selecting 2 aces from 4 aces) × (no.
of ways of selecting 3 jacks from 4 jacks)
⎛ 4⎞ ⎛ 4⎞
= ⎜⎜ ⎟⎟ × ⎜⎜ ⎟⎟
⎝ 2⎠ ⎝ 3⎠
4! 4!
= × = 6 × 4 = 24
2! × 2! 3! ×1!
P(A )= P({holding 2 aces and 3 jacks })
n ( A) 24
= = = 0.000009
n(S ) 2598960

2.5 Additive Rules:


Theorem 2.10:
If A and B are any two events, then:
P(A∪B)= P(A) + P(B) − P(A∩B)
Corollary 1:
If A and B are mutually exclusive (disjoint) events, then:
Department of Statistics and O.R. − 11 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

P(A∪B)= P(A) + P(B)


Corollary 2:
If A1, A2, …, An are n mutually exclusive (disjoint) events, then:
P(A1∪ A2 ∪… ∪A n)= P(A1) + P(A2) +… + P(An)
⎛ n ⎞ n
P⎜ U Ai ⎟ = ∑ P ( Ai )
⎝ i =1 ⎠ i =1
Note: Two event Problems:
* In Venn diagrams, consider
the probability of an event A as
the area of the region
corresponding to the event A.
* Total area= P(S)=1
* Examples:
P(A)= P(A∩B)+ P(A∩BC)
P(A∪B)= P(A) + P(AC∩B)
P(A∪B)= P(A) + P(B) − P(A∩B) Total area= P(S)=1
P(A∩BC)= P(A) − P(A∩B)
P(AC∩BC)= 1 − P(A∪B)
etc.,
Example 2.27:
The probability that Paula passes Mathematics is 2/3, and the
probability that she passes English is 4/9. If the probability that
she passes both courses is 1/4, what is the probability that she
will:
(a) pass at least one course?
(b) pass Mathematics and fail English?
(c) fail both courses?
Solution:
Define the events: M={Paula passes Mathematics}
E={Paula passes English}
We know that P(M)=2/3, P(E)=4/9, and P(M∩E)=1/4.
(a) Probability of passing at least one course is:
P(M∪E)= P(M) + P(E) − P(M∩E)
2 4 1 31
= + − =
3 9 4 36
(b) Probability of passing Mathematics and failing English is:
P(M∩EC)= P(M) − P(M∩E)
Department of Statistics and O.R. − 12 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

2 1 5
= − =
3 4 12
(c) Probability of failing both courses is:
P(MC∩EC)= 1 − P(M∪E)
31 5
= 1− =
36 36
Theorem 2.12:
If A and AC are complementary events, then:
P(A) + P(AC) = 1 ⇔ P(AC) = 1 − P(A)

2.6 Conditional Probability:


The probability of occurring an event A when it is known that
some event B has occurred is called the conditional probability
of A given B and is denoted P(A|B).

Definition 2.9:
The conditional probability of the
event A given the event B is defined by:
P( A ∩ B )
P( A | B ) = ; P(B ) > 0
P(B )
Notes:
P( A ∩ B )
1. P ( A | B ) = = P(S)=Total area=1
P(B )
n ( A ∩ B ) / n (S ) n ( A ∩ B )
= = ; for equally likely outcomes case
n ( B ) / n (S ) n( B )
P( A ∩ B )
2. P(B | A) =
P ( A)
3. P ( A ∩ B ) = P ( A ) P ( B | A )
(Multiplicative Rule=Theorem 2.13)
= P(B ) P( A | B )
Example:
339 physicians are classified as given in the table below. A
physician is to be selected at random.
(1) Find the probability that:
(a) the selected physician is aged 40 – 49
(b) the selected physician smokes occasionally
(c) the selected physician is aged 40 – 49 and smokes
occasionally
Department of Statistics and O.R. − 13 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

(2) Find the probability that the selected physician is aged


40 – 49 given that the physician smokes occasionally.

Smoking Habit
Daily Occasionally Not at all
(B1) (B2) (B3) Total
20 - 29 (A1) 31 9 7 47
30 - 39 (A2) 110 30 49 189
Age

40 - 49 (A3) 29 21 29 79
50+ (A4) 6 0 18 24
Total 176 60 103 339
Solution:
.n(S) = 339 equally likely outcomes.
Define the following events:
A3 = the selected physician is aged 40 – 49
B2 = the selected physician smokes occasionally
A3 ∩ B2 = the selected physician is aged 40 – 49 and smokes
occasionally
(1) (a) A3 = the selected physician is aged 40 – 49
n( A3 ) 79
P( A3 ) = = = 0.2330
n(S ) 339
(b) B2 = the selected physician smokes occasionally
n(B2 ) 60
P(B2 ) = = = 0.1770
n(S ) 339
(c) A3 ∩ B2 = the selected physician is aged 40 – 49 and
smokes occasionally.
n( A3 ∩ B2 ) 21
P( A3 ∩ B2 ) = = = 0.06195
n (S ) 339
(2) A3|B2 = the selected physician is aged 40 – 49 given that the
physician smokes occasionally
P( A3 ∩ B2 ) 0.06195
(i) P( A3 | B2 ) = = = 0.35
P(B2 ) 0.1770
n( A3 ∩ B2 ) 21
(ii) P( A3 | B2 ) = = = 0.35
n(B2 ) 60
21
(iii) We can use the restricted table directly: P( A3 | B2 ) = = 0.35
60

Department of Statistics and O.R. − 14 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Notice that P(A3|B2)=0.35 > P(A3)=0.233.


The conditional probability does not equal unconditional
probability; i.e., P(A3|B2) ≠ P(A3) ! What does this mean?
Note:
• P(A|B)=P(A) means that knowing B has no effect on the
probability of occurrence of A. In this case A is
independent of B.
• P(A|B)>P(A) means that knowing B increases the
probability of occurrence of A.
• P(A|B)<P(A) means that knowing B decreases the
probability of occurrence of A.

Independent Events:
Definition 2.10:
Two events A and B are independent if and only if P(A|B)=P(A)
and P(B|A)=P(B). Otherwise A and B are dependent.
Example:
In the previous example, we found that P(A3|B2) ≠ P(A3).
Therefore, the events A3 and B2 are dependent, i.e., they are not
independent. Also, we can verify that P(B2| A3) ≠ P(B2).

2.7 Multiplicative Rule:


Theorem 2.13:
If P(A) ≠ 0 and P(B) ≠ 0, then:
P(A∩B) = P(A) P(B|A)
= P(B) P(A|B)
Example 2.32:
Suppose we have a fuse box containing 20 fuses of which 5 are
defective (D) and 15 are non-defective (N). If 2 fuses are
selected at random and removed from the box in succession
without replacing the first, what is the probability that both fuses
are defective?
Solution:
Define the following events:
A = {the first fuse is defective}
B = {the second fuse is defective}
A∩B={the first fuse is defective and the second fuse is
Department of Statistics and O.R. − 15 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

defective} = {both fuses are defective}


We need to calculate P(A∩B).
5
P(A) =
20
4
P(B|A) =
19
P(A∩B) = P(A) P(B|A)
5 4
= × = 0.052632
20 19

First Selection Second Selection: given that


the first is defective (D)

Theorem 2.14:
Two events A and B are independent if and only if
P(A∩B)= P(A) P(B)
*(Multiplicative Rule for independent events)

Note:
Two events A and B are independent if one of the following
conditions is satisfied:
(i) P(A|B)=P(A)
⇔ (ii) P(B|A)=P(B)
⇔ (iii) P(A∩B)= P(A) P(B)

Theorem 2.15: (k=3)


• If A1, A2, A3 are 3 events, then:
P(A1∩ A2 ∩A3)= P(A1) P(A2| A1) P(A3| A1∩ A2)
• If A1, A2, A3 are 3 independent events, then:
P(A1∩ A2 ∩A3)= P(A1) P(A2) P(A3)

Department of Statistics and O.R. − 16 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Example 2.36:
Three cards are drawn in succession, without replacement, from
an ordinary deck of playing cards. Fined P(A1∩ A2 ∩A3), where
the events A1, A2 , and A3 are defined as follows:
A1 = {the 1-st card is a red ace}
A2 = {the 2-nd card is a 10 or a jack}
A3 = {the 3-rd card is a number greater than 3 but less than 7}
Solution:
P(A1) = 2/52
P(A2 |A1) = 8/51
P(A3| A1 ∩A2) = 12/50
P(A1∩ A2 ∩A3)
= P(A1) P(A2| A1) P(A3| A1∩ A2)
2 8 12
= × ×
52 51 50
192
=
132600
= 0.0014479

2.8 Bayes' Rule:


Definition:
The events A1, A2,…, and An constitute a partition of the sample
space S if:
n
• ∪ A i = A1 ∪ A2 ∪ … ∪ An = S
i =1
• Ai ∩Aj = φ, ∀ i ≠j
Theorem 2.16: (Total Probability)
If the events A1, A2,…, and An constitute
a partition of the sample space S
such that P(Ak)≠0 for k=1, 2, …, n,
then for any event B:
n
P(B) = ∑ P(A k ∩B)
k =1
n
= ∑ P(A k ) P(B | A k )
k =1

Department of Statistics and O.R. − 17 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Tree Diagram

Example 2.38:
Three machines A1, A2, and A3 make 20%, 30%, and 50%,
respectively, of the products. It is known that 1%, 4%, and 7%
of the products made by each machine, respectively, are
defective. If a finished product is randomly selected, what is the
probability that it is defective?
Solution:
Define the following events:
B = {the selected product is defective}
A1 = {the selected product is made by machine A1}
A2 = {the selected product is made by machine A2}
A3 = {the selected product is made by machine A3}
20 1
P(A1) = = 0.2 ; P(B|A1)= = 0.01
100 100
30 4
P(A2) = = 0.3 ; P(B|A2)= = 0.04
100 100
50 7
P(A3) = = 0.5 ; P(B|A3)= = 0.07
100 100
3
∑ P(A k ) P(B | A k )
P(B) = k =1

= P(A1) P(B|A1) + P(A2) P(B|A2) + P(A3) P(B|A3)


= 0.2×0.01 + 0.3×0.04 + 0.5×0.07
= 0.002 + 0.012 + 0.035
= 0.049

Department of Statistics and O.R. − 18 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Question:
If it is known that the selected product is defective, what is the
probability that it is made by machine A1?
Answer:
P(A1 ∩ B) P(A1 )P(B | A1 ) 0.2 × 0.01 0.002
P(A1|B) = = = = = 0.0408
P(B) P(B) 0.049 0.049
This rule is called Bayes' rule.

Theorem 2.17: (Bayes' rule)


If the events A1,A2,…, and An constitute a partition of the sample
space S such that P(Ak)≠0 for k=1, 2, …, n, then for any event B
such that P(B)≠0:
P(A i ∩B) P(A i ) P(B | A i ) P(A i ) P(B | A i )
P(Ai | B) = = n
=
P(B) P(B)
∑ P(A k ) P(B | A k )
k =1
for i = 1, 2, …, n.

Department of Statistics and O.R. − 19 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Example 2.39:
In Example 2.38, if it is known that the selected product is
defective, what is the probability that it is made by:
(a) machine A2?
(b) machine A3?
Solution:
P(A 2 ) P(B | A 2 ) P(A 2 ) P(B | A 2 )
(a) P(A2|B)= n
=
P(B)
∑ P(A k ) P(B | A k )
k =1
0.3× 0.04 0.012
= = =0.2449
0.049 0.049

P(A 3 ) P(B | A 3 ) P(A 3 ) P(B | A 3 )


(b) P(A3|B)= n
=
P(B)
∑ P(A k ) P(B | A k )
k =1
0.5× 0.07 0.035
= = =0.7142
0.049 0.049

Note:
P(A1|B) = 0.0408, P(A2|B) = 0.2449, P(A3|B) = 0.7142
3
• ∑ P(A k | B) = 1
k =1
• If the selected product was found defective, we should
check machine A3 first, if it is ok, we should check
machine A2, if it is ok, we should check machine A1.
Department of Statistics and O.R. − 20 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Chapter 3: Random Variables and Probability


Distributions:

3.1 Concept of a Random Variable:


• In a statistical experiment, it is often very important to
allocate numerical values to the outcomes.
Example:
• Experiment: testing two components. (D=defective,
N=non-defective)
• Sample space: S={DD,DN,ND,NN}
• Let X = number of defective components when two
components are tested.
• Assigned numerical values to the outcomes are:

Sample point Assigned


(Outcome) Numerical
Value (x)
DD 2
DN 1
ND 1
NN 0

• Notice that, the set of all possible values of the random


variable X is {0, 1, 2}.
Definition 3.1:
A random variable X is a function that associates each element
in the sample space with a real number (i.e., X : S → R.)

Notation: " X " denotes the random variable .


" x " denotes a value of the random variable X.
Types of Random Variables:
• A random variable X is called a discrete random variable
if its set of possible values is countable, i.e.,
.x ∈ {x1, x2, …, xn} or x ∈ {x1, x2, …}
• A random variable X is called a continuous random
variable if it can take values on a continuous scale, i.e.,
.x ∈ {x: a < x < b; a, b ∈R}
Department of Statistics and O.R. − 21 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

• In most practical problems:


o A discrete random variable represents count data,
such as the number of defectives in a sample of k
items.
o A continuous random variable represents measured
data, such as height.

3.2 Discrete Probability Distributions


• A discrete random variable X assumes each of its values
with a certain probability.
Example:
• Experiment: tossing a non-balance coin 2 times
independently.
• H= head , T=tail
• Sample space: S={HH, HT, TH, TT}
• Suppose P(H)=½P(T) ⇔ P(H)=1/3 and P(T)=2/3
• Let X= number of heads
Sample point Probability Value of X
(Outcome) (x)
HH P(HH)=P(H) P(H)=1/3×1/3 = 1/9 2
HT P(HT)=P(H) P(T)=1/3×2/3 = 2/9 1
TH P(TH)=P(T) P(H)=2/3×1/3 = 2/9 1
TT P(TT)=P(T) P(T)=2/3×2/3 = 4/9 0
• The possible values of X are: 0, 1, and 2.
• X is a discrete random variable.
• Define the following events:
Event (X=x) Probability = P(X=x)
(X=0)={TT} P(X=0) = P(TT)=4/9
(X=1)={HT,TH} P(X=1) =P(HT)+P(TH)=2/9+2/9=4/9
(X=2)={HH} P(X=2) = P(HH)= 1/9
• The possible values of X with their probabilities are:
x 0 1 2 Total
P(X=x)=f(x) 4/9 4/9 1/9 1.00

The function f(x)=P(X=x) is called the probability function


(probability distribution) of the discrete random variable X.

Department of Statistics and O.R. − 22 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Definition 3.4:
The function f(x) is a probability function of a discrete random
variable X if, for each possible values x, we have:
1. f(x) ≥ 0
2. ∑ f ( x) = 1
all x
3. f(x)= P(X=x)
Note:
• P(X∈A) = ∑ f ( x) = ∑ P( X = x)
all x∈ A all x∈ A
Example:
For the previous example, we have:
x 0 1 2 Total
f(x)= P(X=x) 4/9 4/9 1/9 2
∑ f ( x) = 1
x=0
P(X<1) = P(X=0)=4/9
P(X≤1) = P(X=0) + P(X=1) = 4/9+4/9 = 8/9
P(X≥0.5) = P(X=1) + P(X=2) = 4/9+1/9 = 5/9
P(X>8) = P(φ) = 0
P(X<10) = P(X=0) + P(X=1) + P(X=2) = P(S) = 1

Example 3.3:
A shipment of 8 similar microcomputers
to a retail outlet contains 3 that are
defective and 5 are non-defective.
If a school makes a random purchase of 2
of these computers, find the probability
distribution of the number of defectives.
Solution:
We need to find the probability distribution of the random
variable: X = the number of defective computers purchased.
Experiment: selecting 2 computers at random out of 8
⎛8 ⎞
n(S) = ⎜⎜ ⎟⎟ equally likely outcomes
⎝ ⎠
2
The possible values of X are: x=0, 1, 2.
Consider the events:

Department of Statistics and O.R. − 23 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

⎛3⎞ ⎛5⎞
(X=0)={0D and 2N} ⇒ n(X=0)= ⎜⎜ ⎟⎟ × ⎜⎜ ⎟⎟
⎝0⎠ ⎝ 2⎠
⎛ 3⎞ ⎛ 5⎞
(X=1)={1D and 1N} ⇒ n(X=1)= ⎜⎜ ⎟⎟ × ⎜⎜ ⎟⎟
⎝ 1 ⎠ ⎝1 ⎠
⎛3⎞ ⎛5⎞
(X=2)={2D and 0N} ⇒ n(X=2)= ⎜⎜ ⎟⎟ × ⎜⎜ ⎟⎟
⎝ 2⎠ ⎝ 0⎠
⎛3⎞ ⎛5⎞
⎜ ⎟×⎜ ⎟
n( X = 0) ⎜⎝ 0 ⎟⎠ ⎜⎝ 2 ⎟⎠ 10
f(0)=P(X=0)= = =
n( S ) ⎛8 ⎞ 28
⎜⎜ ⎟⎟
⎝ 2⎠
⎛ 3⎞ ⎛ 5⎞
⎜ ⎟×⎜ ⎟
n( X = 1) ⎜⎝1 ⎟⎠ ⎜⎝1 ⎟⎠ 15
f(1)=P(X=1)= = =
n( S ) ⎛8 ⎞ 28
⎜⎜ ⎟⎟
⎝ 2⎠
⎛3⎞ ⎛5⎞
⎜ ⎟×⎜ ⎟
n( X = 2) ⎜⎝ 2 ⎟⎠ ⎜⎝ 0 ⎟⎠ 3
f(2)=P(X=2)= = =
n( S ) ⎛8 ⎞ 28
⎜⎜ ⎟⎟
⎝ 2⎠
In general, for x=0,1, 2, we have:
⎛3 ⎞ ⎛ 5 ⎞
⎜ ⎟×⎜ ⎟
n( X = x) ⎜⎝ x ⎟⎠ ⎜⎝ 2 − x ⎟⎠
f(x)=P(X=x)= =
n( S ) ⎛8 ⎞
⎜⎜ ⎟⎟
⎝ 2⎠
The probability distribution of X is:
x 0 1 2 Total
f(x)= P(X=x) 10 15 3 1.00
28 28 28
The probability distribution of X can be written as a formula as
follows:
⎧⎛ 3 ⎞ ⎛ 5 ⎞
⎪ ⎜⎜ ⎟⎟ × ⎜⎜ ⎟⎟
⎪⎪ ⎝ x ⎠ ⎝ 2 − x ⎠ ; x = 0, 1, 2 Hypergeometric
f ( x) = P( X = x) = ⎨ ⎛8 ⎞ Distribution
⎪ ⎜⎜ ⎟⎟
⎪ ⎝ 2⎠
⎪⎩0 ; otherwise

Department of Statistics and O.R. − 24 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Definition 3.5:
The cumulative distribution function (CDF), F(x), of a discrete
random variable X with the probability function f(x) is given by:
F(x) = P(X≤x)= ∑ f (t ) = ∑ P( X = t ) ; for −∞<x<∞
t≤x t≤x
Example:
Find the CDF of the random variable X with the probability
function:
x 0 1 2
f(x) 10 15 3
28 28 28
Solution:
F(x)=P(X≤x) for −∞<x<∞

For x<0: F(x)=0


10
For 0≤x<1: F(x)=P(X=0)=
28
10 15 25
For 1≤x<2: F(x)=P(X=0)+P(X=1)= + =
28 28 28
10 15 3
For x≥2: F(x)=P(X=0)+P(X=1)+P(X=2)= + + =1
28 28 28
The CDF of the random variable X is:
⎧ 0 ; x<0
⎪10
⎪ ; 0 ≤ x <1
⎪ 28
F ( x) = P( X ≤ x) = ⎨
⎪ 25 ; 1 ≤ x < 2
⎪ 28
⎪1 ; x≥2

Note:
F(−0.5) = P(X≤−0.5)=0
25
F(1.5)=P(X≤1.5)=F(1) =
28
F(3.8) =P(X≤3.8)=F(2)= 1

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

Department of Statistics and O.R. − 25 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

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


P(a < X < b) = P(a < X ≤ b) − P(X=b) = F(b) − F(a) − f(b)
Result:
Suppose that the probability function of X is:
x x1 x2 x3 … xn
f(x) f(x1) f(x2) f(x3) … f(xn)
Where x1< x2< … < xn. Then:
F(xi) = f(x1) + f(x2) + … + f(xi) ; i=1, 2, …, n
F(xi) = F(xi −1 ) + f(xi) ; i=2, …, n
f(xi) = F(xi) − F(xi −1 )

Example:
In the previous example,
25 10 15
P(0.5 < X ≤ 1.5) = F(1.5) − F(0.5) = − =
28 28 28
25 3
P(1 < X ≤ 2) = F(2) − F(1) = 1 − =
28 28

3.3. Continuous Probability Distributions


For any continuous random variable, X, there exists a non-
negative function f(x), called the probability density function
(p.d.f) through which we can find probabilities of events
expressed in term of X.

b
P(a < X < b) = ∫ f(x) dx
a
= area under the curve
of f(x) and over the
interval (a,b)

P(X∈A) = ∫ f(x) dx
A
= area under the curve
f: R → [0, ∞) of f(x) and over the
region A

Department of Statistics and O.R. − 26 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Definition 3.6:
The function f(x) is a probability density function (pdf) for a
continuous random variable X, defined on the set of real
numbers, if:
1. f(x) ≥ 0 ∀ x ∈R

2. ∫ f(x) dx = 1
-∞
b
3. P(a ≤ X ≤ b) = ∫ f(x) dx ∀ a, b ∈R; a≤b
a
Note:
For a continuous random variable X, we have:
1. f(x) ≠ P(X=x) (in general)
2. P(X=a) = 0 for any a∈R
3. P(a ≤ X ≤ b)= P(a < X ≤ b)= P(a ≤ X < b)= P(a < X < b)
4. P(X∈A) = ∫ f(x) dx
A

Total area = ∫ ∞
f ( x ) dx = 1 area = P(a ≤ X ≤ b )
−∞
= ∫ a f ( x ) dx
b

area = P( X ≥ b ) area = P( X ≤ a )
= ∫ b f ( x ) dx = ∫ −∞ f ( x ) dx
∞ a

Department of Statistics and O.R. − 27 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Example 3.6:
Suppose that the error in the reaction temperature, in oC, for a
controlled laboratory experiment is a continuous random
variable X having the following probability density function:
⎧1 2
⎪ x ; −1< x < 2
f ( x) = ⎨ 3
⎪⎩0 ; elsewhere

1. Verify that (a) f(x) ≥ 0 and (b) ∫ f(x) dx = 1
-∞
2. Find P(0<X≤1)

Solution:
X = the error in the reaction
temperature in oC.
X is continuous r. v.

⎧1 2
⎪ x ; −1< x < 2
f ( x) = ⎨ 3
⎪⎩0 ; elsewhere

1. (a) f(x) ≥ 0 because f(x) is a quadratic function.


∞ −1 21 ∞
(b) ∫ f(x) dx = ∫ 0 dx + ∫ x 2 dx + ∫ 0 dx
-∞ -∞ -13 2
21 ⎡1 x=2 ⎤
= ∫ x 2 dx = ⎢ x 3 ⎥
-13 ⎣9 x = −1⎦
1
= (8 − (−1)) = 1
9

1 11
2. P(0<X≤1) = ∫ f(x) dx = ∫ x 2 dx
0 03
⎡1 x =1⎤
= ⎢ x3 ⎥
⎣9 x = 0⎦
1
= (1 − (0))
9
1
=
9

Department of Statistics and O.R. − 28 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Definition 3.7:
The cumulative distribution function (CDF), F(x), of a
continuous random variable X with probability density function
f(x) is given by:
x
F(x) = P(X≤x)= ∫ f(t) dt ; for −∞<x<∞
-∞
Result:
P(a < X ≤ b) = P(X ≤ b) − P(X ≤ a) = F(b) − F(a)

Example:
in Example 3.6,
1. Find the CDF
2. Using the CDF, find P(0<X≤1).
Solution:
⎧1 2
⎪ x ; −1< x < 2
f ( x) = ⎨ 3
⎪⎩0 ; elsewhere
For x< −1:
x x
F(x) = ∫ f(t) dt = ∫ 0 dt = 0
-∞ -∞
For −1≤x<2:
x −1 x1
F(x) = ∫ f(t) dt = ∫ 0 dt + ∫ t 2 dt
-∞ -∞ -13
x1
= ∫ t 2 dt
-13
⎡1 t=x ⎤ 1 1
= ⎢ t3 ⎥ = ( x − (−1)) = ( x + 1)
3 3

⎣9 t = −1⎦ 9 9
For x≥2:
x −1 21 x 21
F(x) = ∫ f(t) dt = ∫ 0 dt + ∫ t 2 dt + ∫ 0 dt = ∫ t 2 dt = 1.
-∞ -∞ -13 2 -13
Therefore, the CDF is:
⎧ 0 ; x < −1
⎪⎪ 1
F ( x) = P( X ≤ x) = ⎨ ( x 3 + 1) ; − 1 ≤ x < 2
⎪9
⎪⎩ 1 ; x ≥ 2

Department of Statistics and O.R. − 29 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

2. Using the CDF,


2 1 1
P(0<X≤1) = F(1) − F(0) = − =
9 9 9

Department of Statistics and O.R. − 30 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Chapter 4: Mathematical Expectation:

4.1 Mean of a Random Variable:


Definition 4.1:
Let X be a random variable with a probability distribution f(x).
The mean (or expected value) of X is denoted by µX (or E(X))
and is defined by:
⎧ ∑ x f ( x) ; if X is discrete
⎪⎪all x
E(X) = µ X = ⎨ ∞
⎪ ∫ x f ( x) dx ; if X is continuous
⎪⎩− ∞

Example 4.1: (Reading Assignment)

Example: (Example 3.3)


A shipment of 8 similar microcomputers to a retail outlet
contains 3 that are defective and 5 are non-defective. If a school
makes a random purchase of 2 of these computers, find the
expected number of defective computers purchased
Solution:
Let X = the number of defective computers purchased.
In Example 3.3, we found that the probability distribution of X
is:
x 0 1 2
f(x)= P(X=x) 10 15 3
28 28 28
or:
⎧⎛ 3 ⎞ ⎛ 5 ⎞
⎪ ⎜⎜ ⎟⎟ × ⎜⎜ ⎟⎟
⎪⎪ ⎝ ⎠ ⎝
x 2 − x ⎠ ; x = 0, 1, 2
f ( x) = P( X = x) = ⎨ ⎛8 ⎞
⎪ ⎜⎜ ⎟⎟
⎪ ⎝ 2⎠
⎪⎩0 ; otherwise
The expected value of the number of defective computers
purchased is the mean (or the expected value) of X, which is:
2
E(X) = µ X = ∑ x f ( x)
x=0
= (0) f(0) + (1) f(1) +(2) f(2)
Department of Statistics and O.R. − 31 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

10 15 3
= (0) + (1) +(2)
28 28 28
15 6 21
= + = = 0.75 (computers)
28 28 28
Example 4.3:
Let X be a continuous random variable that represents the life
(in hours) of a certain electronic device. The pdf of X is given
by:
⎧ 20,000
⎪ ; x > 100
f ( x) = ⎨ x 3
⎪⎩0 ; elsewhere
Find the expected life of this type of devices.
Solution:

E(X) = µ X = ∫ x f ( x) dx
−∞
∞ 20000
= ∫ x dx
100 x3
∞ 1
= 20000 ∫ dx
x2 100
⎡ 1 x=∞ ⎤
= 20000 ⎢− ⎥
⎣ x x = 100⎦
= − 20000 ⎡⎢0 −
1 ⎤
= 200 (hours)
⎣ 100 ⎥⎦
Therefore, we expect that this type of electronic devices to last,
on average, 200 hours.

Theorem 4.1:
Let X be a random variable with a probability distribution f(x),
and let g(X) be a function of the random variable X. The mean
(or expected value) of the random variable g(X) is denoted by
µg(X) (or E[g(X)]) and is defined by:
⎧ ∑ g ( x) f ( x) ; if X is discrete
⎪⎪all x
E[g(X)] = µ g(X) = ⎨ ∞
⎪ ∫ g ( x) f ( x) dx ; if X is continuous
⎪⎩− ∞

Department of Statistics and O.R. − 32 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Example:
Let X be a discrete random variable with the following
probability distribution
x 0 1 2
f(x) 10 15 3
28 28 28
2
Find E[g(X)], where g(X)=(X −1) .
Solution:
g(X)=(X −1)2
2 2
E[g(X)] = µ g(X) = ∑ g ( x) f ( x) = ∑ ( x − 1) 2 f ( x)
x=0 x=0
= (0−1) f(0) + (1−1) f(1) +(2−1)2 f(2)
2 2

10 15 3
= (−1)2 + (0)2 +(1)2
28 28 28
10 3 13
= +0+ =
28 28 28
Example:
In Example 4.3, find E⎛⎜ ⎞⎟ .
1
⎝X⎠
Solution:
⎧ 20,000
⎪ ; x > 100
f ( x) = ⎨ x 3
⎪0 ; elsewhere

1
g(X) =
X
∞ ∞ 1
⎛1⎞
E⎜ ⎟ = E[g(X)] = µ g(X) = ∫ g ( x) f ( x) dx = ∫ f ( x) dx
⎝X⎠ −∞ −∞ x
∞ 1 20000 ∞ 1 20000 ⎡ 1 x = ∞ ⎤
= ∫ dx = 20000 ∫ dx = ⎢ ⎥
100 x x
3
100 x
4 − 3 ⎣ x 3 x = 100⎦
− 20000 ⎡ 1 ⎤
= ⎢ 0 − = 0.0067
3 ⎣ 1000000 ⎥⎦

4.2 Variance (of a Random Variable):


The most important measure of variability of a random variable
X is called the variance of X and is denoted by Var(X) or σ 2X .

Department of Statistics and O.R. − 33 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Definition 4.3:
Let X be a random variable with a probability distribution f(x)
and mean µ. The variance of X is defined by:
⎧ ∑ ( x − µ ) 2 f ( x) ; if X is discrete
⎪⎪all x
Var(X) = σ 2X = E[(X − µ) 2 ] = ⎨ ∞
⎪ ∫ ( x − µ ) 2 f ( x) dx ; if X is continuous
⎪⎩− ∞
Definition:
The positive square root of the variance of X, σ X = σ 2X , is
called the standard deviation of X.

Note:
Var(X)=E[g(X)], where g(X)=(X −µ)2

Theorem 4.2:
The variance of the random variable X is given by:
Var(X) = σ 2X = E(X 2 ) − µ 2
⎧ ∑ x 2 f ( x) ; if X is discrete
⎪⎪all x
where E(X 2 ) = ⎨ ∞
⎪ ∫ x 2 f ( x) dx ; if X is continuous
⎪⎩− ∞
Example 4.9:
Let X be a discrete random variable with the following
probability distribution
x 0 1 2 3
f(x) 0.51 0.38 0.10 0.01
Find Var(X)= σ 2X .
Solution:
3
µ = ∑ x f ( x) = (0) f(0) + (1) f(1) +(2) f(2) + (3) f(3)
x=0
= (0) (0.51) + (1) (0.38) +(2) (0.10) + (3) (0.01)
= 0.61
1. First method:
3
Var(X) = σ 2X = ∑ ( x − µ ) 2 f ( x)
x =0

Department of Statistics and O.R. − 34 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

3
= ∑ ( x − 0.61) 2 f ( x)
x=0
=(0−0.61)2 f(0)+(1−0.61)2 f(1)+(2−0.61)2 f(2)+ (3−0.61)2 f(3)
=(−0.61)2 (0.51)+(0.39)2 (0.38)+(1.39)2 (0.10)+ (2.39)2 (0.01)
= 0.4979
2. Second method:
Var(X) = σ 2X = E(X 2 ) − µ 2
3 2 2 2 2
E(X 2 ) = ∑ x 2 f(x) = (0 ) f(0) + (1 ) f(1) +(2 ) f(2) + (3 ) f(3)
x =0
= (0) (0.51) + (1) (0.38) +(4) (0.10) + (9) (0.01)
= 0.87
2
Var(X) = σ X = E(X 2 ) − µ 2 = 0.87 − (0.61) = 0.4979
2

Example 4.10:
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
2
Var(X) = σ 2X = E(X ) − µ = 17/6 − (5/3) = 1/18
2 2

4.3 Means and Variances of Linear Combinations of


Random Variables:
If X1, X2, …, Xn are n random variables and a1, a2, …, an are
constants, then the random variable :
n
Y = ∑ ai X i = a1 X 1 + a2 X 2 + L + an X n
i =1
is called a linear combination of the random variables
X1,X2,…,Xn.

Theorem 4.5:
If X is a random variable with mean µ=E(X), and if a and b are
constants, then:

Department of Statistics and O.R. − 35 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

E(aX±b) = a E(X) ± b

µaX±b = a µX ± b
Corollary 1: E(b) = b (a=0 in Theorem 4.5)
Corollary 2: E(aX) = a E(X) (b=0 in Theorem 4.5)

Example 4.16:
Let X be a random variable with the following probability
density function:
⎧1 2
⎪ x ; −1< x < 2
f ( x) = ⎨ 3
⎪⎩0 ; elsewhere
Find E(4X+3).
Solution:
∞ 2 1 12 1 ⎡1 x=2 ⎤
µ = E(X) = ∫ x f ( x) dx = ∫ x [ x 2 ] 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
Another solution:

E[g(X)] = ∫ g ( x) f ( x) dx ; g(X) = 4X+3
−∞
∞ 2 1
E(4X+3) = ∫ (4 x + 3) f ( x) dx = ∫ (4 x + 3) [ x 2 ] dx = L = 8
−∞ −1 3

Theorem:
If X1, X2, …, Xn are n random variables and a1, a2, …, an are
constants, then:
E(a1X1+a2X2+ … +anXn) = a1E(X1)+ a2E(X2)+ …+anE(Xn)

n n
E ( ∑ ai X i ) = ∑ ai E ( X i )
i =1 i =1
Corollary:
If X, and Y are random variables, then:
E(X ± Y) = E(X) ± E(Y)
Theorem 4.9:
If X is a random variable with variance Var ( X ) = σ X2 and if a and
b are constants, then:

Department of Statistics and O.R. − 36 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Var(aX±b) = a2 Var(X)

2 2 2
σ aX +b = a σ X
Theorem:
If X1, X2, …, Xn are n independent random variables and a1, a2,
…, an are constants, then:
Var(a1X1+a2X2+…+anXn)
= a12 Var(X1)+ a 22 Var (X2)+…+ a 2n Var(Xn)

n n
Var ( ∑ ai X i ) = ∑ ai2 Var ( X i )
i =1 i =1

σ a21X1 + a 2 X 2 +…+ a n X n = a12σ X2 1 + a 22σ X2 2 + … + a 2nσ X2 n
Corollary:
If X, and Y are independent random variables, then:
2 2
• Var(aX+bY) = a Var(X) + b Var (Y)
2 2
• Var(aX−bY) = a Var(X) + b Var (Y)
• Var(X ± Y) = Var(X) + Var (Y)
Example:
Let X, and Y be two independent random variables such that
E(X)=2, Var(X)=4, E(Y)=7, and Var(Y)=1. Find:
1. E(3X+7) and Var(3X+7)
2. E(5X+2Y−2) and Var(5X+2Y−2).
Solution:
1. E(3X+7) = 3E(X)+7 = 3(2)+7 = 13
Var(3X+7)= (3)2 Var(X)=(3)2 (4) =36
2. E(5X+2Y−2)= 5E(X) + 2E(Y) −2= (5)(2) + (2)(7) − 2= 22
Var(5X+2Y−2)= Var(5X+2Y)= 52 Var(X) + 22 Var(Y)
= (25)(4)+(4)(1) = 104

Department of Statistics and O.R. − 37 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

4.4 Chebyshev's Theorem:


* Suppose that X is any
random variable with mean
E(X)=µ and variance
Var(X)= σ 2 and standard
deviation σ.
* Chebyshev's Theorem gives
a conservative estimate of the
probability that the random
variable X assumes a value
within k standard deviations
(kσ) of its mean µ, which is
P(µ− kσ <X< µ +kσ).
1
* P(µ− kσ <X< µ +kσ)≈ 1−
k2

Theorem 4.11:(Chebyshev's Theorem)


Let X be a random variable with mean E(X)=µ and variance
Var(X)=σ2, then for k>1, we have:
1 1
P(µ− kσ <X< µ +kσ) ≥ 1− ⇔ P(|X −µ| < kσ) ≥ 1−
k2 k2

Example 4.22:
Let X be a random variable having an unknown distribution
with mean µ=8 and variance σ2=9 (standard deviation σ=3).
Find the following probability:
(a) P(−4 <X< 20)
(b) P(|X−8| ≥ 6)
Solution:
(a) P(−4 <X< 20)= ??
1
P(µ− kσ <X< µ +kσ)≥ 1−
k2
Department of Statistics and O.R. − 38 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

(−4 <X< 20)= (µ− kσ <X< µ +kσ)

− 4= µ− kσ ⇔ − 4= 8− k(3) or 20= µ+ kσ ⇔ 20= 8+ k(3)


⇔ − 4= 8− 3k ⇔ 20= 8+ 3k
⇔ 3k=12 ⇔ 3k=12
⇔ k=4 ⇔ k=4

1 1 15
1− 2
=1− =
k 16 16
15 15
Therefore, P(−4 <X< 20) ≥ , and hence, P(−4 <X< 20)≈
16 16
(approximately)

(b) P(|X −8| ≥ 6)= ??


P(|X−8| ≥ 6)=1 − P(|X−8| < 6)
P(|X −8| < 6)= ??
1
P(|X −µ| < kσ)≥ 1−
k2
(|X−8| < 6) = (|X −µ| < kσ)
6= kσ ⇔ 6=3k ⇔ k=2
1 1 3
1− 2
=1−
=
k 4 4
3 3
P(|X−8| < 6) ≥ ⇔1 − P(|X−8| < 6) ≤ 1 −
4 4
1
⇔ 1 − P(|X−8| < 6) ≤
4
1
⇔ P(|X−8| ≥ 6) ≤
4
1
Therefore, P(|X−8| ≥ 6) ≈ (approximately)
4
Another solution for part (b):
P(|X−8| < 6) = P(−6 <X−8 < 6)
= P(−6 +8<X < 6+8)
= P(2<X < 14)
(2<X <14) = (µ− kσ <X< µ +kσ)
2= µ− kσ ⇔ 2= 8− k(3) ⇔ 2= 8− 3k ⇔ 3k=6 ⇔ k=2

Department of Statistics and O.R. − 39 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

1 1 3
1− =1−=
k2 4 4
3 3
P(2<X < 14) ≥ ⇔ P(|X−8| < 6) ≥
4 4
3
⇔1 − P(|X−8| < 6) ≤ 1 −
4
1
⇔ 1 − P(|X−8| < 6) ≤
4
1
⇔ P(|X−8| ≥ 6) ≤
4
1
Therefore, P(|X−8| ≥ 6) ≈ (approximately)
4

Department of Statistics and O.R. − 40 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Chapter 5: Some Discrete Probability Distributions:

5.2: Discrete Uniform Distribution:


If the discrete random variable X assumes the values x1, x2, …,
xk with equal probabilities, then X has the discrete uniform
distribution given by:
⎧1
⎪ ; x = x1 , x2 ,L, xk
f ( x) = P( X = x) = f ( x; k ) = ⎨ k
⎪⎩0 ; elsewhere
Note:

f(x)=f(x;k)=P(X=x)
• k is called the parameter of the distribution.
Example 5.2:
• Experiment: tossing a balanced die.
• Sample space: S={1,2,3,4,5,6}
• Each sample point of S occurs with the same probability
1/6.
• Let X= the number observed when tossing a balanced die.
• The probability distribution of X is:
⎧1
⎪ ; x = 1, 2,L, 6
f ( x) = P( X = x) = f ( x;6) = ⎨ 6
⎪⎩0 ; elsewhere
Theorem 5.1:
If the discrete random variable X has a discrete uniform
distribution with parameter k, then the mean and the variance of
X are:
k
∑ xi
E(X) = µ = i =1
k
k
∑ ( xi − µ )
2

Var(X) = σ2 = i =1
k
Example 5.3:
Find E(X) and Var(X) in Example 5.2.
Solution:

Department of Statistics and O.R. − 40 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

k
∑ xi
1+ 2 + 3 + 4 + 5 + 6
E(X) = µ = i =1
= = 3.5
k 6
k k
∑ ( xi − µ ) ∑ ( xi − 3.5)
2 2

Var(X) = σ2 = i =1
= i =1
k 6
(1 − 3.5) + (2 − 3.5) 2 + L + (6 − 3.5) 2 35
2
= =
6 12

5.3 Binomial Distribution:

Bernoulli Trial:
• Bernoulli trial is an experiment with only two possible
outcomes.
• The two possible outcomes are labeled:
success (s) and failure (f)
• The probability of success is P(s)=p and the probability of
failure is P(f)= q = 1−p.
• Examples:
1. Tossing a coin (success=H, failure=T, and p=P(H))
2. Inspecting an item (success=defective, failure=non-
defective, and p=P(defective))
Bernoulli Process:
Bernoulli process is an experiment that must satisfy the
following properties:
1. The experiment consists of n repeated Bernoulli trials.
2. The probability of success, P(s)=p, remains constant from
trial to trial.
3. The repeated trials are independent; that is the
outcome of one trial has no effect on the outcome of
any other trial
Binomial Random Variable:
Consider the random variable :
X = The number of successes in the n trials in a Bernoulli
process

Department of Statistics and O.R. − 41 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

The random variable X has a binomial distribution with


parameters n (number of trials) and p (probability of success),
and we write:
X ~ Binomial(n,p) or X~b(x;n,p)
The probability distribution of X is given by:
⎧⎛ n ⎞ x n− x
⎪⎜⎜ ⎟⎟ p (1 − p ) ; x = 0, 1, 2, K, n
f ( x) = P( X = x) = b( x; n, p ) = ⎨⎝ x ⎠
⎪0 ;
⎩ otherwise

We can write the probability distribution of X as a table as


follows.
x f(x)=P(X=x)=b(x;n,p)
0 ⎛n⎞ 0
⎜⎜ ⎟⎟ p (1 − p )
n−0 n
= (1 − p )
⎝0⎠
1 ⎛n⎞ 1
⎜⎜ ⎟⎟ p (1 − p )n−1
⎝1⎠
2 ⎛n⎞ 2
⎜⎜ ⎟⎟ p (1 − p )n−2
⎝ 2⎠
M M
n − 1 ⎛⎜ n ⎞⎟ p n −1 (1 − p )1
⎜ ⎟
⎝ n − 1⎠
n ⎛n⎞ n
⎜⎜ ⎟⎟ p (1 − p )0 = p n
⎝n⎠
Total 1.00

Department of Statistics and O.R. − 42 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Example:
Suppose that 25% of the products of a manufacturing process
are defective. Three items are selected at random, inspected, and
classified as defective (D) or non-defective (N). Find the
probability distribution of the number of defective items.
Solution:
• Experiment: selecting 3 items at random, inspected, and
classified as (D) or (N).
• The sample space is
S={DDD,DDN,DND,DNN,NDD,NDN,NND,NNN}
• Let X = the number of defective items in the sample
• We need to find the probability distribution of X.
(1) First Solution:
Outcome Probability x
NNN 3 3 3 27 0
× × =
The probability distribution
4 4 4 64 .of X is
NND 3 3 1 9 1 .x .f(x)=P(X=x)
× × =
4 4 4 64 0 27
NDN 3 1 3 9 1 64
× × =
4 4 4 64 1 9 9 9 27
+ + =
NDD 3 1 1 3 2 64 64 64 64
× × =
4 4 4 64 2 3 3 3 9
+ + =
DNN 1 3 3 9 1 64 64 64 64
× × =
4 4 4 64 3 1
DND 1 3 1 3 2 64
× × =
4 4 4 64
DDN 1 1 3 3 2
× × =
4 4 4 64
DDD 1 1 1 1 3
× × =
4 4 4 64
(2) Second Solution:
Bernoulli trial is the process of inspecting the item. The results
are success=D or failure=N, with probability of success
P(s)=25/100=1/4=0.25.
The experiments is a Bernoulli process with:
• number of trials: n=3
• Probability of success: p=1/4=0.25
• X ~ Binomial(n,p)=Binomial(3,1/4)
Department of Statistics and O.R. − 43 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

• The probability distribution of X is given by:


⎧⎛ 3 ⎞ 1 x 3 3 − x
1 ⎪⎜⎜ ⎟⎟ ( ) ( ) ; x = 0, 1, 2, 3
f ( x) = P( X = x) = b( x;3, ) = ⎨⎝ x ⎠ 4 4
4 ⎪
⎩0 ; otherwise
1 ⎛ 3⎞ 1 3 27
f (0) = P ( X = 0) = b(0;3, ) = ⎜⎜ ⎟⎟ ( ) 0 ( ) 3 = The probability
4 ⎝0⎠ 4 4 64
distribution of X is
1 ⎛ 3 ⎞ 1 1 3 2 27
f (1) = P( X = 1) = b(1;3, ) = ⎜⎜ ⎟⎟ ( ) ( ) = x f(x)=P(X=x)
4 ⎝1⎠ 4 4 64
=b(x;3,1/4)
1 ⎛ ⎞ 1 3
3 9 0 27/64
f (2) = P( X = 2) = b(2;3, ) = ⎜⎜ ⎟⎟ ( ) 2 ( )1 =
4 ⎝ 2⎠ 4 4 64 1 27/64
1 ⎛ 3⎞ 1 3 1 2 9/64
f (3) = P( X = 3) = b(3;3, ) = ⎜⎜ ⎟⎟ ( ) 3 ( ) 0 =
4 ⎝ 3⎠ 4 4 64 3 1/64

Theorem 5.2:
The mean and the variance of the binomial distribution b(x;n,p)
are:
µ=np
σ = n p (1 −p)
2

Example:
In the previous example, find the expected value (mean) and the
variance of the number of defective items.
Solution:
Department of Statistics and O.R. − 44 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

• X = number of defective items


2
• We need to find E(X)=µ and Var(X)=σ
• We found that X ~ Binomial(n,p)=Binomial(3,1/4)
• .n=3 and p=1/4
The expected number of defective items is
E(X)=µ = n p = (3) (1/4) = 3/4 = 0.75
The variance of the number of defective items is
Var(X)=σ2 = n p (1 −p) = (3) (1/4) (3/4) = 9/16 = 0.5625
Example:
In the previous example, find the following probabilities:
(1) The probability of getting at least two defective items.
(2) The probability of getting at most two defective items.
Solution:
X ~ Binomial(3,1/4)
⎧⎛ 3 ⎞ 1 x 3 3− x
1 ⎪⎜⎜ ⎟⎟ ( ) ( ) for x = 0, 1, 2, 3
f ( x) = P( X = x) = b( x;3, ) = ⎨⎝ x ⎠ 4 4
4 ⎪
⎩0 otherwise
.x .f(x)=P(X=x)=b(x;3,1/4)
0 27/64
1 27/64
2 9/64
3 1/64
(1) The probability of getting at least two defective items:
9 1 10
P(X≥2)=P(X=2)+P(X=3)= f(2)+f(3)= + =
64 64 64
(2) The probability of getting at most two defective item:
P(X≤2) = P(X=0)+P(X=1)+P(X=2)
27 27 9 63
= f(0)+f(1)+f(2) = + + =
64 64 64 64
or
1 63
P(X≤2)= 1−P(X>2) = 1−P(X=3) = 1− f(3) = 1− =
64 64
Example 5.4: Reading assignment
Example 5.5: Reading assignment
Example 5.6: Reading assignment

Department of Statistics and O.R. − 45 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

5.4 Hypergeometric Distribution :

• Suppose there is a population with 2 types of elements:


1-st Type = success
2-nd Type = failure
• N= population size
• K= number of elements of the 1-st type
• N −K = number of elements of the 2-nd type
• We select a sample of n elements at random from the
population
• Let X = number of elements of 1-st type (number of
successes) in the sample
• We need to find the probability distribution of X.

There are to two methods of selection:


1. selection with replacement
2. selection without replacement
(1) If we select the elements of the sample at random and with
replacement, then
K
X ~ Binomial(n,p); where p =
N
(2) Now, suppose we select the elements of the sample at
random and without replacement. When the selection is made
without replacement, the random variable X has a
hypergeometric distribution with parameters N, n, and K. and we
write X~h(x;N,n,K).
The probability distribution of X is given by:

Department of Statistics and O.R. − 46 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

f ( x) = P( X = x) = h( x; N , n, K )
⎧⎛ K ⎞ ⎛ N − K ⎞
⎪ ⎜⎜ ⎟⎟ × ⎜⎜ ⎟⎟
⎪⎪ ⎝ x ⎠ ⎝ n − x ⎠ ; x = 0, 1, 2,L, n
=⎨ ⎛N⎞
⎪ ⎜⎜ ⎟⎟
⎪ ⎝n⎠
⎪⎩0 ; otherwise
Note that the values of X must satisfy:
0≤x≤K and 0≤n−x≤ N−K

0≤x≤K and n−N+K≤ x≤ n

Example 5.8: Reading assignment


Example 5.9:
Lots of 40 components each are called acceptable if they contain
no more than 3 defectives. The procedure for sampling the lot is
to select 5 components at random (without replacement) and to
reject the lot if a defective is found. What is the probability that
exactly one defective is found in the sample if there are 3
defectives in the entire lot.
Solution:

• Let X= number of defectives in the sample


• N=40, K=3, and n=5
• X has a hypergeometric distribution with parameters
N=40, n=5, and K=3.
• X~h(x;N,n,K)=h(x;40,5,3).
• The probability distribution of X is given by:

Department of Statistics and O.R. − 47 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

⎧ ⎛ 3 ⎞ ⎛ 37 ⎞
⎪ ⎜⎜ ⎟⎟ × ⎜⎜ ⎟⎟
⎪⎪ ⎝ x ⎠ ⎝ 5 − x ⎠ ; x = 0, 1, 2,L,5
f ( x) = P( X = x) = h( x;40,5,3) = ⎨ ⎛ 40 ⎞
⎪ ⎜⎜ ⎟⎟
⎪ ⎝ 5⎠
⎪⎩0 ; otherwise
But the values of X must satisfy:
0≤x≤K and n−N+K≤ x≤ n ⇔ 0≤x≤3 and −42≤ x≤ 5
Therefore, the probability distribution of X is given by:
⎧ ⎛ 3 ⎞ ⎛ 37 ⎞
⎪ ⎜⎜ ⎟⎟ × ⎜⎜ ⎟⎟
⎪⎪ ⎝ ⎠ ⎝
x 5 − x ⎠ ; x = 0, 1, 2,3
f ( x) = P( X = x) = h( x;40,5,3) = ⎨ ⎛ 40 ⎞
⎪ ⎜⎜ ⎟⎟
⎪ ⎝ 5⎠
⎪⎩0 ; otherwise
Now, the probability that exactly one defective is found in the
sample is
⎛ 3 ⎞ ⎛ 37 ⎞ ⎛ 3 ⎞ ⎛ 37 ⎞
⎜⎜ ⎟⎟ × ⎜⎜ ⎟⎟ ⎜⎜ ⎟⎟ × ⎜⎜ ⎟⎟

.f(1)=P(X=1)=h(1;40,5,3)= ⎝ ⎠ ⎝ ⎠ = ⎝1 ⎠ ⎝ 4 ⎠ = 0.3011
1 5 1
⎛ 40 ⎞ ⎛ 40 ⎞
⎜⎜ ⎟⎟ ⎜⎜ ⎟⎟
⎝ 5⎠ ⎝ 5⎠
Theorem 5.3:
The mean and the variance of the hypergeometric distribution
h(x;N,n,K) are:
K
µ= n
N
K N −n
σ2 = n ⎛⎜1 − ⎞⎟
K
N ⎝ N ⎠ N −1
Example 5.10:
In Example 5.9, find the expected value (mean) and the variance
of the number of defectives in the sample.
Solution:
• X = number of defectives in the sample
2
• We need to find E(X)=µ and Var(X)=σ
• We found that X ~ h(x;40,5,3)
• N=40, n=5, and K=3
The expected number of defective items is

Department of Statistics and O.R. − 48 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

K 3
E(X)=µ = n = 5 × = 0.375
N 40
The variance of the number of defective items is
K ⎛ K⎞ N −n 3 40 − 5
= 5 × ⎛⎜1 − ⎞⎟
3
Var(X)=σ2 = n ⎜1 − ⎟ = 0.311298
N ⎝ N ⎠ N −1 40 ⎝ 40 ⎠ 40 − 1

Relationship to the binomial distribution:


⎛n⎞
* Binomial distribution: b( x; n, p) = ⎜⎜ ⎟⎟ p x (1 − p ) n − x ; x = 0, 1, K, n
⎝ x⎠
⎛ K ⎞⎛ N − K ⎞
⎜⎜ ⎟⎟ ⎜⎜ ⎟⎟

* Hypergeometric distribution: h( x; N , n, K ) = ⎝ ⎠ ⎝ ⎠ ; x = 0, 1,L, n
x n x
⎛N⎞
⎜⎜ ⎟⎟
⎝n⎠
If n is small compared to N and K, then the hypergeometric
distribution h(x;N,n,K) can be approximated by the binomial
K
distribution b(x;n,p), where p= ; i.e., for large N and K and
N
small n, we have:
K
h(x;N,n,K)≈ b(x;n, )
N
⎛ K ⎞⎛ N − K ⎞
⎜⎜ ⎟⎟ ⎜⎜ ⎟⎟ n− x
⎝ x ⎠ ⎝ n − x ⎠ ≈ ⎛⎜ n ⎞⎟ ⎛ K ⎞ ⎛1 − K ⎞ ; x = 0,1,L, n
x

⎛N⎞ ⎜ x ⎟⎜ N ⎟ ⎜ ⎟
⎝ ⎠ ⎝ ⎠ ⎝ N ⎠
⎜⎜ ⎟⎟
⎝n ⎠
Note:
If n is small compared to N and K, then there will be almost no
difference between selection without replacement and selection
K K −1 K − n +1
with replacement ( ≈ ≈L≈ ).
N N −1 N − n +1

Example 5.11: Reading assignment

Department of Statistics and O.R. − 49 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

5.6 Poisson Distribution:


• Poisson experiment is an experiment yielding numerical
values of a random variable that count the number of
outcomes occurring in a given time interval or a specified
region denoted by t.
X = The number of outcomes occurring in a given time
interval or a specified region denoted by t.
• Example:
1. X = number of field mice per acre (t= 1 acre)
2. X= number of typing errors per page (t=1 page)
3. X=number of telephone calls received every day (t=1
day)
4. X=number of telephone calls received every 5 days
(t=5 days)
• Let λ be the average (mean) number of outcomes per unit
time or unit region (t=1).
• The average (mean) number of outcomes (mean of X) in
the time interval or region t is:
µ=λt
• The random variable X is called a Poisson random
variable with parameter µ (µ=λt), and we write
X~Poisson(µ), if its probability distribution is given by:
⎧ e− µ µ x
⎪⎪ ; x = 0, 1, 2, 3, K
f ( x) = P( X = x) = p ( x; µ ) = ⎨ x!

⎪⎩ 0 ; otherwise
Theorem 5.5:
The mean and the variance of the Poisson distribution
Poisson(x;µ) are:
µ = λt
σ = µ= λt
2

Note:
• λ is the average (mean) of the distribution in the unit
time (t=1).
• If X=The number of calls received in a month (unit
time t=1 month) and X~Poisson(λ), then:

Department of Statistics and O.R. − 50 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

(i) Y = number of calls received in a year.


Y ~ Poisson (µ); µ=12λ (t=12)
(ii) W = number of calls received in a day.
W ~ Poisson (µ); µ=λ/30 (t=1/30)
Example 5.16: Reading Assignment
Example 5.17: Reading Assignment
Example:
Suppose that the number of typing errors per page has a Poisson
distribution with average 6 typing errors.
(1) What is the probability that in a given page:
(i) The number of typing errors will be 7?
(ii) The number of typing errors will at least 2?
(2) What is the probability that in 2 pages there will be 10
typing errors?
(3) What is the probability that in a half page there will be no
typing errors?
Solution:
(1) X = number of typing errors per page.
X ~ Poisson (6) (t=1, λ=6, µ=λt=6)
e −6 6 x
f ( x) = P( X = x) = p ( x;6) = ; x = 0, 1, 2, K
x!
e −6 6 7
(i) f (7) = P( X = 7) = p (7;6) = = 0.13768
7!

(ii) P(X≥2) = P(X=2)+ P(X=3)+ . . . = ∑ P( X = x)
x=2
P(X≥2) = 1− P(X<2) = 1 − [P(X=0)+ P(X=1)]
e −6 60 e −6 61
=1 − [f(0) + f(1)] = 1 − [ + ]
0! 1!
= 1 − [0.00248+0.01487]
= 1 − 0.01735 = 0.982650
(2) X = number of typing errors in 2 pages
X ~ Poisson(12) (t=2, λ=6, µ=λt=12)
e − 1212 x
f ( x) = P( X = x) = p ( x;12) = : x = 0 , 1 , 2K
x!
e −121210
f (10) = P ( X = 10) = = 0.1048
10

Department of Statistics and O.R. − 51 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

(3) X = number of typing errors in a half page.


X ~ Poisson (3) (t=1/2, λ=6, µ=λt=6/2=3)
e− 3 3x
f ( x) = P( X = x) = p ( x;3) = : x = 0 , 1 , 2K
x!
e − 3 (3)0
P ( X = 0) = = 0.0497871
0!

Theorem 5.6: (Poisson approximation for binomial


distribution:
Let X be a binomial random variable with probability
distribution b(x;n,p). If n→∞, p→0, and µ=np remains constant,
then the binomial distribution b(x;n,p) can approximated by
Poisson distribution p(x;µ).
• For large n and small p we have:
b(x;n,p) ≈ Poisson(µ) (µ=np)
⎛n⎞ x e−µ µ x
⎜⎜ ⎟⎟ p (1 − p ) n − x ≈ ; x = 0,1,L, n; ( µ = np)
⎝ ⎠
x x !

Example 5.18: Reading Assignment

Department of Statistics and O.R. − 52 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Chapter 6: Some Continuous Probability Distributions:

6.1 Continuous Uniform distribution:


(Rectangular Distribution)
The probability density function of
the continuous uniform random
variable X on the interval [A, B] is
given by:
⎧ 1
⎪ ; A≤ x≤ B
f ( x) = f ( x; A, B) = ⎨ B − A
⎪⎩ 0 ; elsewhere
We write X~Uniform(A,B).

Theorem 6.1:
The mean and the variance of the continuous uniform
distribution on the interval [A, B] are:
A+ B
µ=
2
2 ( B − A) 2
σ =
12
Example 6.1:
Suppose that, for a certain company, the conference time, X, has
a uniform distribution on the interval [0,4] (hours).
(a) What is the probability density function of X?
(b) What is the probability that any conference lasts at
least 3 hours?
Solution:
⎧1
⎪ ; 0≤ x≤4
(a) f ( x) = f ( x;0,4) = ⎨ 4
⎪⎩ 0 ; elsewhere
4 41 1
(b) P(X≥3) = ∫ f ( x) dx = ∫ dx =
3 34 4

Department of Statistics and O.R. − 53 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

6.2 Normal Distribution:


„ The normal distribution is one of the most important
continuous distributions.
„ Many measurable
characteristics are normally or
approximately normally
distributed, such as, height and
weight.
„ The graph of the probability
density function (pdf) of a
normal distribution, called the
normal curve, is a bell-shaped
curve.

„ The pdf of the normal distribution depends on two


parameters: mean = E(X)= µ and variance =Var(X) = σ2.
„ If the random variable X has a normal distribution with
mean µ and variance σ2, we write:
X ~ Normal(µ,σ) or X ~ N(µ,σ)
„ The pdf of X ~ Normal(µ,σ) is given by:
1⎛ x−µ ⎞
− ⎜
2
⎧− ∞ < x < ∞
1 ⎟ ⎪
f ( x) = n( x; µ ,σ ) = e 2⎝ σ ⎠ ; ⎨− ∞ < µ < ∞
σ 2π ⎪ σ >0

„ The location of the normal


distribution depends on µ and
its shape depends on σ.

Suppose we have two normal


distributions:
_______ N(µ1, σ1)
----------- N(µ2, σ2)
µ1 < µ2, σ1=σ2

Department of Statistics and O.R. − 54 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

µ1 = µ2, σ1<σ2
µ1 < µ2, σ1<σ2
„ Some properties of the normal curve f(x) of N(µ,σ):
1. f(x) is symmetric about the mean µ.
2. f(x) has two points of inflection at x= µ±σ.
3. The total area under the curve of f(x) =1.
4. The highest point of the curve of f(x) at the mean µ.

6.3 Areas Under the Normal Curve:

Definition 6.1:
The Standard Normal Distribution:
• The normal distribution with mean µ=0 and variance
σ2=1 is called the standard normal distribution and is
denoted by Normal(0,1) or N(0,1). If the random variable
Z has the standard normal distribution, we write
Z~Normal(0,1) or Z~N(0,1).
• The pdf of Z~N(0,1) is
given by:
1 2
1 −2z
f ( z ) = n( z;0,1) = e

• The standard normal distribution, Z~N(0,1), is very


important because probabilities of any normal distribution
can be calculated from the probabilities of the standard
normal distribution.

Department of Statistics and O.R. − 55 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

• Probabilities of the standard normal distribution Z~N(0,1)


of the form P(Z≤a) are tabulated (Table A.3, p681).
a
P(Z≤a) = ∫ f(z) dz
−∞
1 2
a 1 − 2z
=∫ e dz
-∞ 2π
= from the table

• We can transfer any normal distribution X~N(µ,σ) to the


standard normal distribution, Z~N(0,1) by using the
following result.
X −µ
• Result: If X~N(µ,σ), then Z = ~N(0,1).
σ
Areas Under the Normal Curve of X~N(µ,σ)
The probabilities of the normal distribution N(µ,σ) depends on
µ and σ.

a ∞ b
P(X<a)= ∫ f(x) dx P(X>b)= ∫ f(x) dx P(a<X<b)= ∫ f(x) dx
-∞ b a

Probabilities of Z~N(0,1):
Suppose Z ~ N(0,1).

P(Z≤a) =From P(Z≥b) = 1−P(Z≤b) P(a≤Z≤b) =


Table (A.3) P(Z≤b)−P(Z≤a)
Department of Statistics and O.R. − 56 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Note: P(Z=a)=0 for every a .

Example:
Suppose Z~N(0,1).
(1) Z 0.00 0.01 …
P(Z≤1.50)=0.9332 : ⇓
1.5 ⇒ 0.9332
:

(2) Z 0.00 … 0.08


P(Z≥0.98)=1−P(Z≤0.98) : : : ⇓
=1 − 0.8365 : … … ⇓
= 0.1635 0.9⇒ ⇒ ⇒ 0.8365

(3) Z … 0.02 0.03


P(−1.33≤ Z≤2.42) : : ⇓ ⇓
= P(Z≤2.42) −1.3 ⇒ 0.0918
− P(Z≤−1.33) : ⇓
= 0.9922 − 0.0918 2.4 ⇒ 0.9922
= 0.9004
(4) P(Z≤0)=P(Z ≥0)=0.5

Example:
Suppose Z~N(0,1). Find the Z … 0.04
value of k such that : : ⇑
P(Z≤k)= 0.0207. ⇑
Solution: −2.0 ⇐⇐ 0.0207
.k = −2.04 :

Example 6.2: Reading assignment


Example 6.3: Reading assignment

Probabilities of X~N(µ,σ):
X −µ
„ Result: X ~N(µ,σ) ⇔ Z = ~ N(0,1)
σ

Department of Statistics and O.R. − 57 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

X −µ a−µ a−µ
„ X ≤a ⇔ ≤ ⇔ Z≤
σ σ σ

a−µ⎞
1. P( X ≤ a ) = P⎛⎜ Z ≤ ⎟
⎝ σ ⎠
a−µ⎞
2. P( X ≥ a ) = 1 − P( X ≤ a ) = 1 − P⎛⎜ Z ≤ ⎟
⎝ σ ⎠
b−µ⎞ a−µ⎞
3. P(a ≤ X ≤ b ) = P( X ≤ b ) − P( X ≤ a ) = P⎛⎜ Z ≤ ⎛
⎟ − P⎜ Z ≤ ⎟
⎝ σ ⎠ ⎝ σ ⎠
4. P(X=a)=0 for every a.
5. P(X≤µ) = P(X≥µ)=0.5

Example 6.4: Reading assignment


Example 6.5: Reading assignment
Example 6.6: Reading assignment

Example:
Suppose that the hemoglobin level for healthy adults males has a
normal distribution with mean µ=16 and variance σ2=0.81
(standard deviation σ=0.9).
(a) Find the probability that a randomly chosen healthy adult
male has hemoglobin level less than 14.
(b) What is the percentage of healthy adult males who have
hemoglobin level less than 14?
Solution:
Let X = the hemoglobin level for a healthy adult male
X ~ N(µ,σ)= N(16, 0.9).
14 − µ ⎞ 14 − 16 ⎞
(a) P(X ≤14)= P⎛⎜ Z ≤ ⎛
⎟ = P⎜ Z ≤ ⎟
⎝ σ ⎠ ⎝ 0.9 ⎠
= P(Z ≤−2.22)=0.0132
(b) The percentage of healthy adult
males who have hemoglobin level less
than 14 is
P(X ≤14) × 100% = 0.01320× 100%
=1.32%
Therefore, 1.32% of healthy adult males
have hemoglobin level less than 14.
Department of Statistics and O.R. − 58 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Example:
Suppose that the birth weight of Saudi babies has a normal
distribution with mean µ=3.4 and standard deviation σ=0.35.
(a) Find the probability that a randomly chosen Saudi baby has a
birth weight between 3.0 and 4.0 kg.
(b) What is the percentage of Saudi babies who have a birth
weight between 3.0 and 4.0 kg?
Solution:
X = birth weight of a Saudi baby
µ = 3.4 σ = 0.35 (σ2 = 0.352 = 0.1225)
X ~ N(3.4,0.35 )
(a) P(3.0<X<4.0)=P(X<4.0)−P(X<3.0)
4.0 − µ ⎞ 3.0 − µ ⎞
= P⎛⎜ Z ≤ ⎛
⎟ − P⎜ Z ≤ ⎟
⎝ σ ⎠ ⎝ σ ⎠
4.0 − 3.4 ⎞ 3.0 − 3.4 ⎞
= P⎛⎜ Z ≤ ⎛
⎟ − P⎜ Z ≤ ⎟
⎝ 0.35 ⎠ ⎝ 0.35 ⎠
= P(Z≤1.71) − P(Z ≤ −1.14)
= 0.9564 − 0.1271
= 0.8293
(b) The percentage of Saudi babies who have a birth weight
between 3.0 and 4.0 kg is
P(3.0<X<4.0) × 100%= 0.8293× 100%= 82.93%
Notation:
P(Z≥ZA) = A
Result:
ZA = − Z1−A
Example:
Z ~ N(0,1)
P(Z≥Z0.025) = 0.025
P(Z≥Z0.95) = 0.95
P(Z≥Z0.90) = 0.90 Z … 0.06
Example: : : ⇑
Z ~ N(0,1) ⇑
Z0.025 = 1.96 1.9 ⇐⇐ 0.975
Z0.95 = −1.645 P(Z≥Z0.025) = 0.025
Z0.90 = −1.285 Z0.025 = 1.96

Department of Statistics and O.R. − 59 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

6.4 Application of the Normal Distribution:

Example 6.7: Reading assignment


Example 6.8: Reading assignment

Example 6.9:
In an industrial process, the diameter of a ball bearing is an
important component part. The buyer sets specifications on the
diameter to be 3.00±0.01 cm. The implication is that no part
falling outside these specifications will be accepted. It is known
that, in the process, the diameter of a ball bearing has a normal
distribution with mean 3.00 cm and standard deviation 0.005
cm. On the average, how many manufactured ball bearings will
be scrapped?
Solution:
µ=3.00
σ=0.005
X=diameter
X~N(3.00, 0.005)
The specification limits are:
3.00±0.01
x1=Lower limit=3.00−0.01=2.99
x2=Upper limit=3.00+0.01=3.01
P(x1<X< x2)=P(2.99<X<3.01)=P(X<3.01)−P(X<2.99)
3.01 − µ ⎞ 2.99 − µ ⎞
= P⎛⎜ Z ≤ ⎛
⎟ − P⎜ Z ≤ ⎟
⎝ σ ⎠ ⎝ σ ⎠
3.01 − 3.00 ⎞ 2.99 − 3.00 ⎞
= P⎛⎜ Z ≤ ⎛
⎟ − P⎜ Z ≤ ⎟
⎝ 0.005 ⎠ ⎝ 0.005 ⎠
= P(Z≤2.00) − P(Z ≤ −2.00)
= 0.9772 − 0.0228
= 0.9544
Therefore, on the average, 95.44% of manufactured ball
bearings will be accepted and 4.56% will be scrapped?

Example 6.10:
Gauges are use to reject all components where a certain
dimension is not within the specifications 1.50±d. It is known
Department of Statistics and O.R. − 60 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

that this measurement is normally distributed with mean 1.50


and standard deviation 0.20. Determine the value d such that the
specifications cover 95% of the measurements.
Solution:
µ=1.5
σ=0.20
X= measurement
X~N(1.5, 0.20)
The specification limits are:
1.5±d
x1=Lower limit=1.5−d
x2=Upper limit=1.5+d
P(X> 1.5+d)= 0.025 ⇔ P(X< 1.5+d)= 0.975
P(X< 1.5−d)= 0.025
P(X< 1.5−d)= 0.025
X − µ (1.5 − d ) − µ ⎞
⇔ P⎛⎜ ≤ ⎟ =0.025
⎝ σ σ ⎠
⎛ (1.5 − d ) − µ ⎞ Z … 0.06
⇔ P⎜ Z ≤ ⎟ =0.025
⎝ σ ⎠ : : ⇑
⎛ (1.5 − d ) − 1.5 ⎞ ⇑
⇔ P⎜ Z ≤ ⎟ =0.025
⎝ 0.20 ⎠ −1.9 ⇐⇐ 0.025
⎛ −d ⎞ −d
⇔ P⎜ Z ≤ ⎟ =0.025 P(Z≤ ) = 0.025
⎝ 0.20 ⎠ 0.20
−d −d
⇔ = −1.96 = −1.96
0.20 0.20
⇔ −d= (0.20)(−1.96) −d
Note: =Z0.025
⇔ d= 0.392 0.20
The specification limits are:
x1=Lower limit=1.5−d = 1.5 − 0.392 = 1.108
x2=Upper limit=1.5+d=1.5+0.392= 1.892
Therefore, 95% of the measurements fall within the
specifications (1.108, 1.892).
Example 6.11: Reading assignment
Example 6.12: Reading assignment
Example 6.13: Reading assignment
Example 6.14: Reading assignment

Department of Statistics and O.R. − 61 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

TABLE:
Areas Under The Standard Normal Curve
Z~Normal(0,1)
Z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
-3.4 0.0003 0.0003 0.0003 0.0003 0.0003 0.0003 0.0003 0.0003 0.0003 0.0002
-3.3 0.0005 0.0005 0.0005 0.0004 0.0004 0.0004 0.0004 0.0004 0.0004 0.0003
-3.2 0.0007 0.0007 0.0006 0.0006 0.0006 0.0006 0.0006 0.0005 0.0005 0.0005
-3.1 0.0010 0.0009 0.0009 0.0009 0.0008 0.0008 0.0008 0.0008 0.0007 0.0007
-3.0 0.0013 0.0013 0.0013 0.0012 0.0012 0.0011 0.0011 0.0011 0.0010 0.0010
-2.9 0.0019 0.0018 0.0018 0.0017 0.0016 0.0016 0.0015 0.0015 0.0014 0.0014
-2.8 0.0026 0.0025 0.0024 0.0023 0.0023 0.0022 0.0021 0.0021 0.0020 0.0019
-2.7 0.0035 0.0034 0.0033 0.0032 0.0031 0.0030 0.0029 0.0028 0.0027 0.0026
-2.6 0.0047 0.0045 0.0044 0.0043 0.0041 0.0040 0.0039 0.0038 0.0037 0.0036
-2.5 0.0062 0.0060 0.0059 0.0057 0.0055 0.0054 0.0052 0.0051 0.0049 0.0048
-2.4 0.0082 0.0080 0.0078 0.0075 0.0073 0.0071 0.0069 0.0068 0.0066 0.0064
-2.3 0.0107 0.0104 0.0102 0.0099 0.0096 0.0094 0.0091 0.0089 0.0087 0.0084
-2.2 0.0139 0.0136 0.0132 0.0129 0.0125 0.0122 0.0119 0.0116 0.0113 0.0110
-2.1 0.0179 0.0174 0.0170 0.0166 0.0162 0.0158 0.0154 0.0150 0.0146 0.0143
-2.0 0.0228 0.0222 0.0217 0.0212 0.0207 0.0202 0.0197 0.0192 0.0188 0.0183
-1.9 0.0287 0.0281 0.0274 0.0268 0.0262 0.0256 0.0250 0.0244 0.0239 0.0233
-1.8 0.0359 0.0351 0.0344 0.0336 0.0329 0.0322 0.0314 0.0307 0.0301 0.0294
-1.7 0.0446 0.0436 0.0427 0.0418 0.0409 0.0401 0.0392 0.0384 0.0375 0.0367
-1.6 0.0548 0.0537 0.0526 0.0516 0.0505 0.0495 0.0485 0.0475 0.0465 0.0455
-1.5 0.0668 0.0655 0.0643 0.0630 0.0618 0.0606 0.0594 0.0582 0.0571 0.0559
-1.4 0.0808 0.0793 0.0778 0.0764 0.0749 0.0735 0.0721 0.0708 0.0694 0.0681
-1.3 0.0968 0.0951 0.0934 0.0918 0.0901 0.0885 0.0869 0.0853 0.0838 0.0823
-1.2 0.1151 0.1131 0.1112 0.1093 0.1075 0.1056 0.1038 0.1020 0.1003 0.0985
-1.1 0.1357 0.1335 0.1314 0.1292 0.1271 0.1251 0.1230 0.1210 0.1190 0.1170
-1.0 0.1587 0.1562 0.1539 0.1515 0.1492 0.1469 0.1446 0.1423 0.1401 0.1379
-0.9 0.1841 0.1814 0.1788 0.1762 0.1736 0.1711 0.1685 0.1660 0.1635 0.1611
-0.8 0.2119 0.2090 0.2061 0.2033 0.2005 0.1977 0.1949 0.1922 0.1894 0.1867
-0.7 0.2420 0.2389 0.2358 0.2327 0.2296 0.2266 0.2236 0.2206 0.2177 0.2148
-0.6 0.2743 0.2709 0.2676 0.2643 0.2611 0.2578 0.2546 0.2514 0.2483 0.2451
-0.5 0.3085 0.3050 0.3015 0.2981 0.2946 0.2912 0.2877 0.2843 0.2810 0.2776
-0.4 0.3446 0.3409 0.3372 0.3336 0.3300 0.3264 0.3228 0.3192 0.3156 0.3121
-0.3 0.3821 0.3783 0.3745 0.3707 0.3669 0.3632 0.3594 0.3557 0.3520 0.3483
-0.2 0.4207 0.4168 0.4129 0.4090 0.4052 0.4013 0.3974 0.3936 0.3897 0.3859
-0.1 0.4602 0.4562 0.4522 0.4483 0.4443 0.4404 0.4364 0.4325 0.4286 0.4247
-0.0 0.5000 0.4960 0.4920 0.4880 0.4840 0.4801 0.4761 0.4721 0.4681 0.4641
0.0 0.5000 0.5040 0.5080 0.5120 0.5160 0.5199 0.5239 0.5279 0.5319 0.5359
0.1 0.5398 0.5438 0.5478 0.5517 0.5557 0.5596 0.5636 0.5675 0.5714 0.5753
0.2 0.5793 0.5832 0.5871 0.5910 0.5948 0.5987 0.6026 0.6064 0.6103 0.6141
0.3 0.6179 0.6217 0.6255 0.6293 0.6331 0.6368 0.6406 0.6443 0.6480 0.6517
0.4 0.6554 0.6591 0.6628 0.6664 0.6700 0.6736 0.6772 0.6808 0.6844 0.6879
0.5 0.6915 0.6950 0.6985 0.7019 0.7054 0.7088 0.7123 0.7157 0.7190 0.7224
0.6 0.7257 0.7291 0.7324 0.7357 0.7389 0.7422 0.7454 0.7486 0.7517 0.7549
0.7 0.7580 0.7611 0.7642 0.7673 0.7704 0.7734 0.7764 0.7794 0.7823 0.7852
0.8 0.7881 0.7910 0.7939 0.7967 0.7995 0.8023 0.8051 0.8078 0.8106 0.8133
0.9 0.8159 0.8186 0.8212 0.8238 0.8264 0.8289 0.8315 0.8340 0.8365 0.8389
1.0 0.8413 0.8438 0.8461 0.8485 0.8508 0.8531 0.8554 0.8577 0.8599 0.8621
1.1 0.8643 0.8665 0.8686 0.8708 0.8729 0.8749 0.8770 0.8790 0.8810 0.8830
1.2 0.8849 0.8869 0.8888 0.8907 0.8925 0.8944 0.8962 0.8980 0.8997 0.9015
1.3 0.9032 0.9049 0.9066 0.9082 0.9099 0.9115 0.9131 0.9147 0.9162 0.9177
1.4 0.9192 0.9207 0.9222 0.9236 0.9251 0.9265 0.9279 0.9292 0.9306 0.9319
1.5 0.9332 0.9345 0.9357 0.9370 0.9382 0.9394 0.9406 0.9418 0.9429 0.9441
1.6 0.9452 0.9463 0.9474 0.9484 0.9495 0.9505 0.9515 0.9525 0.9535 0.9545
1.7 0.9554 0.9564 0.9573 0.9582 0.9591 0.9599 0.9608 0.9616 0.9625 0.9633
1.8 0.9641 0.9649 0.9656 0.9664 0.9671 0.9678 0.9686 0.9693 0.9699 0.9706
1.9 0.9713 0.9719 0.9726 0.9732 0.9738 0.9744 0.9750 0.9756 0.9761 0.9767
2.0 0.9772 0.9778 0.9783 0.9788 0.9793 0.9798 0.9803 0.9808 0.9812 0.9817
2.1 0.9821 0.9826 0.9830 0.9834 0.9838 0.9842 0.9846 0.9850 0.9854 0.9857
2.2 0.9861 0.9864 0.9868 0.9871 0.9875 0.9878 0.9881 0.9884 0.9887 0.9890
2.3 0.9893 0.9896 0.9898 0.9901 0.9904 0.9906 0.9909 0.9911 0.9913 0.9916
2.4 0.9918 0.9920 0.9922 0.9925 0.9927 0.9929 0.9931 0.9932 0.9934 0.9936
2.5 0.9938 0.9940 0.9941 0.9943 0.9945 0.9946 0.9948 0.9949 0.9951 0.9952
2.6 0.9953 0.9955 0.9956 0.9957 0.9959 0.9960 0.9961 0.9962 0.9963 0.9964
2.7 0.9965 0.9966 0.9967 0.9968 0.9969 0.9970 0.9971 0.9972 0.9973 0.9974
2.8 0.9974 0.9975 0.9976 0.9977 0.9977 0.9978 0.9979 0.9979 0.9980 0.9981
2.9 0.9981 0.9982 0.9982 0.9983 0.9984 0.9984 0.9985 0.9985 0.9986 0.9986
3.0 0.9987 0.9987 0.9987 0.9988 0.9988 0.9989 0.9989 0.9989 0.9990 0.9990
3.1 0.9990 0.9991 0.9991 0.9991 0.9992 0.9992 0.9992 0.9992 0.9993 0.9993
3.2 0.9993 0.9993 0.9994 0.9994 0.9994 0.9994 0.9994 0.9995 0.9995 0.9995
3.3 0.9995 0.9995 0.9995 0.9996 0.9996 0.9996 0.9996 0.9996 0.9996 0.9997
3.4 0.9997 0.9997 0.9997 0.9997 0.9997 0.9997 0.9997 0.9997 0.9997 0.9998

Department of Statistics and O.R. − 62 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

6.6 Exponential Distribution:

Definition:
The continuous random variable X has an
exponential distribution with parameter β,
if its probability density function is given
by:
⎧ 1 −x / β
⎪ e ; x>0
f ( x) = ⎨ β
⎪ 0 ; elsewhere

and we write X~Exp(β)

Theorem:
If the random variable X has an exponential distribution with
parameter β, i.e., X~Exp(β), then the mean and the variance of
X are:
E(X)= µ = β
Var(X) = σ2 = β2
Example 6.17:
Suppose that a system contains a certain type of component
whose time in years to failure is given by T. The random
variable T is modeled nicely by the exponential distribution with
mean time to failure β=5. If 5 of these components are installed
in different systems, what is the probability that at least 2 are
still functioning at the end of 8 years?
Solution:
β=5
T~Exp(5)
The pdf of T is:
⎧1 − t / 5
⎪ e ;t >0
f (t ) = ⎨ 5
⎪⎩ 0 ; elsewhere
The probability that a given component is still functioning after
8 years is given by:
∞ ∞1
P(T>8)= ∫ f (t ) dt = ∫ e − t / 5 dt = e −8/5 = 0.2
8 85

Department of Statistics and O.R. − 63 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Now define the random variable:


X= number of components functioning after 8 years out of 5
components
X~ Binomial(5, 0.2) (n=5, p= P(T>8)= 0.2)
⎧⎛ 5 ⎞ 5− x
⎪⎜⎜ ⎟⎟ 0.2 0.8 ; x = 0, 1, K, 5
x
f ( x) = P( X = x) = b( x;5,0.2) = ⎨⎝ x ⎠
⎪0 ;
⎩ otherwise
The probability that at least 2 are still functioning at the end of 8
years is:
P(X≥2)=1 − P(X<2)=1 − [P(X=0)+P(X=1)]
⎛5⎞ ⎛ 5⎞
= 1 − [ ⎜⎜ ⎟⎟ 0.2 0 0.85 − 0 + ⎜⎜ ⎟⎟ 0.21 0.85 −1 ]
⎝0⎠ ⎝1⎠
= 1 − [ 0.85 + 5 × 0.2 × 0.8 4 ]
= 1 − 0.7373
= 0.2627

Department of Statistics and O.R. − 64 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Chapter 8: Fundamental Sampling Distributions and Data


Descriptions:

8.1 Random Sampling:


Definition 8.1:
A population consists of the totality of the observations with
which we are concerned. (Population=Probability Distribution)
Definition 8.2:
A sample is a subset of a population.
Note:
• Each observation in a population is a value of a random
variable X having some probability distribution f(x).
• To eliminate bias in the sampling procedure, we select a
random sample in the sense that the observations are
made independently and at random.
• The random sample of size n is:
X1, X2, …, Xn
It consists of n observations selected independently and
randomly from the population.

8.2 Some Important Statistics:


Definition 8.4:
Any function of the random sample X1, X2, …, Xn is called a
statistic.

Central Tendency in the Sample:


Definition 8.5:
If X1, X2, …, Xn represents a random sample of size n, then the
sample mean is defined to be the statistic:
n
∑X
X 1 + X 2 + L + X n i =1 i
X= = (unit)
n n
Note:
• X is a statistic because it is a function of the random
sample X1, X2, …, Xn.
• X has same unit of X1, X2, …, Xn.
• X measures the central tendency in the sample (location).

Department of Statistics and O.R. − 65 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Variability in the Sample:


Definition 8.9:
If X1, X2, …, Xn represents a random sample of size n, then the
sample variance is defined to be the statistic:
n
∑(Xi − X )
2
( X1 − X )2 + ( X 2 − X )2 + L + ( X n − X )2
S 2 = i =1 = (unit)2
n −1 n −1
Theorem 8.1: (Computational Formulas for S2)
n 2 n n
∑ Xi − nX n ∑ X i2 − ( ∑ X i ) 2
2

S 2 = i =1 = i =1 i =1
n −1 n(n − 1)
Note:
• S2 is a statistic because it is a function of the random
sample X1, X2, …, Xn.
• S2 measures the variability in the sample.
Definition 8.10:
The sample standard deviation is defined to be the statistic:
n
∑(Xi − X )
2
i =1
S = S2 = (unit)
n −1
Example 8.1: Reading Assignment
Example 8.8: Reading Assignment
Example 8.9: Reading Assignment

8.4 Sampling distribution:


Definition 8.13:
The probability distribution of a statistic is called a sampling
distribution.
• Example: If X1, X2, …, Xn represents a random sample of
size n, then the probability distribution of X is called the
sampling distribution of the sample mean X .

8.5 Sampling Distributions of Means:


Result:
If X1, X2, …, Xn is a random sample of size n taken from a
normal distribution with mean µ and variance σ2, i.e. N(µ,σ),

Department of Statistics and O.R. − 66 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

then the sample mean X has a normal distribution with mean


E( X ) = µ X = µ
and variance
σ2
Var ( X ) = σ X2 =
n

• If X1, X2, …, Xn is a random sample of size n from


σ
N(µ,σ), then X ~N( µ X , σ X ) or X ~N(µ, ).
n
σ X −µ
• X ~ N(µ, ) ⇔ Z= ~N(0,1)
n σ/ n

Theorem 8.2: (Central Limit Theorem)


If X1, X2, …, Xn is a random sample of size n from any
distribution (population) with mean µ and finite variance σ2,
then, if the sample size n is large, the random variable
X −µ
Z=
σ/ n
is approximately standard normal random variable, i.e.,
X −µ
Z= ~N(0,1) approximately.
σ/ n

X −µ σ
• Z= ~N(0,1) ⇔ X ~ N(µ, )
σ/ n n
• We consider n large when n≥30.

Department of Statistics and O.R. − 67 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

• For large sample size n, X has approximately a normal


σ2
distribution with mean µ and variance , i.e.,
n
σ
X ~N(µ, ) approximately.
n
• The sampling distribution of X is used for inferences
about the population mean µ.

Example 8.13:
An electric firm manufactures light bulbs that have a length of
life that is approximately normally distributed with mean equal
to 800 hours and a standard deviation of 40 hours. Find the
probability that a random sample of 16 bulbs will have an
average life of less than 775 hours.
Solution:
X= the length of life
µ=800 , σ=40
X~N(800, 40)
n=16
µ X = µ =800
σ 40
σX = = = 10
n 16
σ
X ~ N(µ, )=N(800,10)
n
X −µ X − 800
⇔ Z= =Z = ~N(0,1)
σ/ n 10
⎛ X − µ 775 − µ ⎞
P( X < 775) = P⎜ < ⎟
⎝σ / n σ / n ⎠
⎛ X − 800 775 − 800 ⎞
= P⎜ < ⎟
⎝ 10 10 ⎠
775 − 800 ⎞
= P⎛⎜ Z < ⎟
⎝ 10 ⎠
= P(Z < −2.50)
= 0.0062

Department of Statistics and O.R. − 68 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Sampling Distribution of the Difference between Two


Means:
Suppose that we have two populations:
• 1-st population with mean µ1 and variance σ12
• 2-nd population with mean µ2 and variance σ22
• We are interested in comparing µ1 and µ2, or
equivalently, making inferences about µ1−µ2.
• We independently select a random sample of size n1 from
the 1-st population and another random sample of size n2
from the 2-nd population:
• Let X 1 be the sample mean of the 1-st sample.
• Let X 2 be the sample mean of the 2-nd sample.
• The sampling distribution of X 1 − X 2 is used to make
inferences about µ1−µ2.

Theorem 8.3:
If n1 and n2 are large, then the sampling distribution of X 1 − X 2
is approximately normal with mean
E ( X 1 − X 2 ) = µ X 1 − X 2 = µ1 − µ 2
and variance
σ 12 σ 22
Var ( X 1 − X 2 ) = σ X2 1 − X 2 = +
n1 n2
that is:

Department of Statistics and O.R. − 69 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

σ 12 σ 22
X 1 − X 2 ~ N( µ1 − µ 2 , + )
n1 n2

( X 1 − X 2 ) − ( µ1 − µ 2 )
Z= ~N(0,1)
σ 12 σ 22
+
n1 n2
Note:
σ 12 σ 22 σ 12 σ 22 σ1 σ2
σX = σ X2 1 − X 2 = + ≠ + = +
1−X2 n1 n2 n1 n2 n1 n2

Example 8.15: Reading Assignment

Example 8.16:
The television picture tubes of manufacturer A have a mean
lifetime of 6.5 years and standard deviation of 0.9 year, while
those of manufacturer B have a mean lifetime of 6 years and
standard deviation of 0.8 year. What is the probability that a
random sample of 36 tubes from manufacturer A will have a
mean lifetime that is at least 1 year more than the mean lifetime
of a random sample of 49 tubes from manufacturer B?
Solution:
Population A Population B
µ1=6.5 µ2=6.0
σ1=0.9 σ2=0.8
n1=36 n2=49
• We need to find the probability that the mean lifetime of
manufacturer A is at least 1 year more than the mean
lifetime of manufacturer B which is P( X 1 ≥ X 2 + 1 ).
• The sampling distribution of X 1 − X 2 is
σ 12 σ 22
X 1 − X 2 ~N( µ1 − µ 2 , + )
n1 n2
• E ( X 1 − X 2 ) = µ X 1 − X 2 = µ1 − µ 2 =6.5− 6.0=0.5
σ 12 σ 22 (0.9) 2 (0.8) 2
• Var ( X 1 − X 2 ) = σ X2 1 − X 2 = + = + =0.03556
n1 n2 36 49

Department of Statistics and O.R. − 70 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

σ 12 σ 22
• σX = + = 0.03556 = 0.189
1−X2 n1 n2
• X 1 − X 2 ~N(0.5,0.189)
( X 1 − X 2 ) − ( µ1 − µ 2 )
• Recall Z = ~N(0,1)
σ 12 σ 22
+
n1 n2
P( X 1 ≥ X 2 + 1 ) = P( X 1 − X 2 ≥ 1 )
⎛ ⎞
⎜ ⎟
⎜ ( X − X 2 ) − ( µ1 − µ 2 ) 1 − ( µ1 − µ 2 ) ⎟
= P⎜ 1 ≥ ⎟
⎜ σ1 σ 2
2 2
σ 12 σ 22 ⎟
⎜ + +
⎝ n 1 n 2 n 1 n2 ⎟⎠
1 − 0.5 ⎞
= P⎛⎜ Z ≥ ⎟
⎝ 0.189 ⎠
= P(Z≥2.65)
= 1 − P(Z<2.65)
= 1 − 0.9960
= 0.0040

8.7 t-Distribution:
• Recall that, if X1, X2, …, Xn is a random sample of size n
from a normal distribution with mean µ and variance σ2,
i.e. N(µ,σ), then
X −µ
Z= ~N(0,1)
σ/ n
• We can apply this result only when σ2 is known!
• If σ2 is unknown, we replace the population variance σ2
n
∑(Xi − X )
2

with the sample variance S 2 = i =1 to have the


n −1
following statistic
X −µ
T=
S/ n
Result:
If X1, X2, …, Xn is a random sample of size n from a normal

Department of Statistics and O.R. − 71 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

distribution with mean µ and variance σ2, i.e. N(µ,σ), then the
statistic
X −µ
T=
S/ n
has a t-distribution with ν=n−1degrees of freedom (df), and we
write T~ t(ν).
Note:
• t-distribution is a continuous
distribution.
• The shape of t-distribution is
similar to the shape of the standard
normal distribution.
Notation:

• t α = The t-value above which we find an area equal to α,


that is P(T> t α) = α
• Since the curve of the pdf of T~ t(ν) is symmetric about
0, we have
t1 − α = − t α
• Values of tα are tabulated in Table A-4 (p.683).

Example:
Find the t-value with ν=14 (df) that leaves an area of:
(a) 0.95 to the left.
(b) 0.95 to the right.
Solution:
ν = 14 (df); T~ t(14)

Department of Statistics and O.R. − 72 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

(a) The t-value that leaves an area of 0.95 to the left is


t0.05 = 1.761

(b) The t-value that leaves an area of 0.95 to the right is


t0.95 = − t 1 − 0.95 = − t 0.05 = − 1.761

Example:
For ν = 10 degrees of freedom (df), find t0.10 and t 0.85 .
Solution:
t0.10 = 1.372
t0.85 = − t1−0.85 = − t 0.15 = −1.093 (t 0.15 = 1.093)

Department of Statistics and O.R. − 73 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Sampling Distribution of the Sample Proportion:


Suppose that the size of a population is N. Each element of the
population can be classified as type A or non-type A. Let p be
the proportion of elements of type A in the population. A
random sample of size n is drawn from this population. Let p̂ be
the proportion of elements of type A in the sample.

Let X = no. of elements of type A in the sample


p =Population Proportion
no. of elements of type A in the population
=
N
p̂ = Sample Proportion
no. of elements of type A in the sample X
= =
n n
Result:
(1) X ~ Binomial (n, p)
X
(2) E( p̂ )= E( )= p
n
X pq
(3) Var( p̂ ) = Var( ) = ; q =1− p
n n
(4) For large n, we have
pq
p̂ ~ N(p, ) (Approximately)
n
pˆ − p
Z= ~ N(0,1) (Approximately)
pq
n

Department of Statistics and O.R. − 74 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Sampling Distribution of the Difference between Two


Proportions:

Suppose that we have two populations:


• p1 = proportion of the 1-st population.
• P2 = proportion of the 2-nd population.
• We are interested in comparing p1 and p2, or equivalently,
making inferences about p1− p2.
• We independently select a random sample of size n1 from
the 1-st population and another random sample of size n2
from the 2-nd population:
• Let X1 = no. of elements of type A in the 1-st sample.
• Let X2 = no. of elements of type A in the 2-nd sample.
X1
• pˆ1 = = proportion of the 1-st sample
n1
X
• pˆ 2 = 2 = proportion of the 2-nd sample
n2
• The sampling distribution of pˆ1 − pˆ 2 is used to make
inferences about p1− p2.
Result:
(1) E ( pˆ 1 − pˆ 2 ) = p1 − p2
p1 q1 p2 q2
(2) Var ( pˆ 1 − pˆ 2 ) = + ; q1 = 1 − p1 , q2 = 1 − p2
n1 n2
(3) For large n1 and n2, we have

Department of Statistics and O.R. − 75 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

p1 q1 p2 q2
pˆ 1 − pˆ 2 ~ N ( p1 − p2 , + ) (Approximately)
n1 n2
( pˆ − pˆ 2 ) − ( p1 − p2 )
Z= 1 ~ N(0,1) (Approximately)
p1 q1 p2 q2
+
n1 n2

Department of Statistics and O.R. − 76 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Critical Values of the t-distribution (tα )

α
ν 0.40 0.30 0.20 0.15 0.10 0.05 0.025
1 0.325 0.727 1.376 1.963 3.078 6.314 12.706
2 0.289 0.617 1.061 1.386 1.886 2.920 4.303
3 0.277 0.584 0.978 1.250 1.638 2.353 3.182
4 0.271 0.569 0.941 1.190 1.533 2.132 2.776
5 0.267 0.559 0.920 1.156 1.476 2.015 2.571
6 0.265 0.553 0.906 1.134 1.440 1.943 2.447
7 0.263 0.549 0.896 1.119 1.415 1.895 2.365
8 0.262 0.546 0.889 1.108 1.397 1.860 2.306
9 0.261 0.543 0.883 1.100 1.383 1.833 2.262
10 0.260 0.542 0.879 1.093 1.372 1.812 2.228
11 0.260 0.540 0.876 1.088 1.363 1.796 2.201
12 0.259 0.539 0.873 1.083 1.356 1.782 2.179
13 0.259 0.537 0.870 1.079 1.350 1.771 2.160
14 0.258 0.537 0.868 1.076 1.345 1.761 2.145
15 0.258 0.536 0.866 1.074 1.341 1.753 2.131
16 0.258 0.535 0.865 1.071 1.337 1.746 2.120
17 0.257 0.534 0.863 1.069 1.333 1.740 2.110
18 0.257 0.534 0.862 1.067 1.330 1.734 2.101
19 0.257 0.533 0.861 1.066 1.328 1.729 2.093
20 0.257 0.533 0.860 1.064 1.325 1.725 2.086
21 0.257 0.532 0.859 1.063 1.323 1.721 2.080
22 0.256 0.532 0.858 1.061 1.321 1.717 2.074
23 0.256 0.532 0.858 1.060 1.319 1.714 2.069
24 0.256 0.531 0.857 1.059 1.318 1.711 2.064
25 0.256 0.531 0.856 1.058 1.316 1.708 2.060
26 0.256 0.531 0.856 1.058 1.315 1.706 2.056
27 0.256 0.531 0.855 1.057 1.314 1.703 2.052
28 0.256 0.530 0.855 1.056 1.313 1.701 2.048
29 0.256 0.530 0.854 1.055 1.311 1.699 2.045
30 0.256 0.530 0.854 1.055 1.310 1.697 2.042
40 0.255 0.529 0.851 1.050 1.303 1.684 2.021
60 0.254 0.527 0.848 1.045 1.296 1.671 2.000
120 0.254 0.526 0.845 1.041 1.289 1.658 1.980
∞ 0.253 0.524 0.842 1.036 1.282 1.645 1.960

Department of Statistics and O.R. − 77 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Critical Values of the t-distribution (tα )

α
ν 0.02 0.015 0.01 0.0075 0.005 0.0025 0.0005
1 15.895 21.205 31.821 42.434 63.657 127.322 636.590
2 4.849 5.643 6.965 8.073 9.925 14.089 31.598
3 3.482 3.896 4.541 5.047 5.841 7.453 12.924
4 2.999 3.298 3.747 4.088 4.604 5.598 8.610
5 2.757 3.003 3.365 3.634 4.032 4.773 6.869
6 2.612 2.829 3.143 3.372 3.707 4.317 5.959
7 2.517 2.715 2.998 3.203 3.499 4.029 5.408
8 2.449 2.634 2.896 3.085 3.355 3.833 5.041
9 2.398 2.574 2.821 2.998 3.250 3.690 4.781
10 2.359 2.527 2.764 2.932 3.169 3.581 4.587
11 2.328 2.491 2.718 2.879 3.106 3.497 4.437
12 2.303 2.461 2.681 2.836 3.055 3.428 4.318
13 2.282 2.436 2.650 2.801 3.012 3.372 4.221
14 2.264 2.415 2.624 2.771 2.977 3.326 4.140
15 2.249 2.397 2.602 2.746 2.947 3.286 4.073
16 2.235 2.382 2.583 2.724 2.921 3.252 4.015
17 2.224 2.368 2.567 2.706 2.898 3.222 3.965
18 2.214 2.356 2.552 2.689 2.878 3.197 3.922
19 2.205 2.346 2.539 2.674 2.861 3.174 3.883
20 2.197 2.336 2.528 2.661 2.845 3.153 3.850
21 2.189 2.328 2.518 2.649 2.831 3.135 3.819
22 2.183 2.320 2.508 2.639 2.819 3.119 3.792
23 2.177 2.313 2.500 2.629 2.807 3.104 3.768
24 2.172 2.307 2.492 2.620 2.797 3.091 3.745
25 2.167 2.301 2.485 2.612 2.787 3.078 3.725
26 2.162 2.296 2.479 2.605 2.779 3.067 3.707
27 2.158 2.291 2.473 2.598 2.771 3.057 3.690
28 2.154 2.286 2.467 2.592 2.763 3.047 3.674
29 2.150 2.282 2.462 2.586 2.756 3.038 3.659
30 2.147 2.278 2.457 2.581 2.750 3.030 3.646
40 2.125 2.250 2.423 2.542 2.704 2.971 3.551
60 2.099 2.223 2.390 2.504 2.660 2.915 3.460
120 2.076 2.196 2.358 2.468 2.617 2.860 3.373
∞ 2.054 2.170 2.326 2.432 2.576 2.807 3.291

Department of Statistics and O.R. − 78 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Chapter 9: One- and Two-Sample Estimation Problems:

9.1 Introduction:
• Suppose we have a population with some unknown
parameter(s).
Example: Normal(µ,σ)
µ and σ are parameters.
• We need to draw conclusions (make inferences) about the
unknown parameters.
• We select samples, compute some statistics, and make
inferences about the unknown parameters based on the
sampling distributions of the statistics.

* Statistical Inference
(1) Estimation of the parameters (Chapter 9)
→ Point Estimation
→ Interval Estimation (Confidence Interval)
(2) Tests of hypotheses about the parameters (Chapter 10)

9.3 Classical Methods of Estimation:

Point Estimation:
A point estimate of some population parameter θ is a single
value θˆ of a statistic Θ̂ . For example, the value x of the statistic
X computed from a sample of size n is a point estimate of the
population mean µ.

Interval Estimation (Confidence Interval = C.I.):


An interval estimate of some population parameter θ is an
interval of the form (θˆL , θˆU ), i.e, θˆL <θ<θˆU . This interval
contains the true value of θ "with probability 1−α", that is
P( θˆL <θ<θˆU )=1−α.
• ( θˆL ,θˆU )= θˆL <θ<θˆU is called a (1−α)100%
confidence interval (C.I.) for θ.
• 1−α is called the confidence coefficient
• θˆL = lower confidence limit
Department of Statistics and O.R. − 79 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

• θˆU = upper confidence limit


• α=0.1, 0.05, 0.025, 0.01 (0<α<1)

9.4 Single Sample: Estimation of the Mean (µ):


Recall:
• E( X ) = µ X = µ
σ2
• Var ( X ) = σ X2 =
n
σ ⎞
• X ~ N ⎛⎜ µ ,

⎝ n⎠
X −µ
• Z= ~N(0,1)
σ/ n
(σ2 is known)
X −µ
• T= ~ t(n−1)
S/ n
(σ2 is unknown)
• We use the sampling distribution of X to make
inferences about µ.

Notation:
Za is the Z-value leaving an area of a to the
right; i.e., P(Z>Za)=a or equivalently,
P(Z<Za)=1−a

Point Estimation of the Mean (µ):


n
• The sample mean X = ∑ X i / n is a "good" point estimate
i =1
for µ.
Interval Estimation (Confidence Interval) of the Mean (µ):
(i) First Case: σ2 is known:
Result:
n
If X = ∑ X i / n is the sample mean of a random sample of size n
i =1
from a population (distribution) with mean µ and known
variance σ2, then a (1−α)100% confidence interval for µ is :

Department of Statistics and O.R. − 80 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

σ σ
( X − Zα , X + Zα )
2
n 2
n
σ
⇔ X ± Zα
2
n
σ σ
⇔ X − Zα < µ < X + Zα
2
n 2
n
where Z α is the Z-value leaving an area
2
of α/2 to the right; i.e., P(Z> Z α )=α/2, or
2
equivalently, P(Z< Z α )=1−α/2.
2
Note:
σ σ
We are (1−α)100% confident that µ ∈ ( X − Z α , X + Zα )
2
n 2
n

Example 9.2:
The average zinc concentration recorded from a sample of zinc
measurements in 36 different locations is found to be 2.6
gram/milliliter. Find a 95% and 99% confidence interval (C.I.)
for the mean zinc concentration in the river. Assume that the
population standard deviation is 0.3.
Solution:
µ = the mean zinc concentration in the river.
Population Sample
µ=?? n=36
σ=0.3 X =2.6
First, a point estimate for µ is X =2.6.

(a) We want to find 95% C.I. for µ.


α = ??
95% = (1−α)100%
⇔ 0. 95 = (1−α)
⇔ α=0.05
⇔ α/2 = 0.025

Department of Statistics and O.R. − 81 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Z α = Z0.025
2
= 1.96
A 95% C.I. for µ is
σ
X ± Zα
2
n
σ σ
⇔ X − Zα < µ < X + Zα
2
n 2
n

⇔ 2.6 − (1.96)⎛⎜
0.3 ⎞ ⎛ 0.3 ⎞
⎟ < µ < 2.6 + (1.96)⎜ ⎟
⎝ 36 ⎠ ⎝ 36 ⎠
⇔ 2.6 − 0.098 < µ < 2.6 + 0.098
⇔ 2.502 < µ < 2.698
⇔ µ ∈( 2.502 , 2.698)
We are 95% confident that µ ∈( 2.502 , 2.698).

(b) Similarly, we can find that (Homework) A 99% C.I. for µ is


2.471 < µ < 2.729
⇔ µ ∈( 2.471 , 2.729)
We are 99% confident that µ ∈( 2.471 , 2.729)
Notice that a 99% C.I. is wider that a 95% C.I..
Note:
Error
|-----------|
______|______________ X _____ µ _________|____
σ σ
X − Zα X + Zα
2
n 2
n
|----------------------|--------------------------|
σ σ
Zα Zα
2
n 2
n

Theorem 9.1:
If X is used as an estimate of µ, we can then be (1−α)100%
σ
confident that the error (in estimation) will not exceed Z α .
2
n

Department of Statistics and O.R. − 82 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Example:
In Example 9.2, we are 95% confident that the sample mean
X = 2.6 differs from the true mean µ by an amount less than
σ ⎛ 0.3 ⎞
Zα = (1.96)⎜ ⎟ = 0.098 .
2
n ⎝ 36 ⎠
Note:
σ
Let e be the maximum amount of the error, that is e = Z α ,
2
n
then:
2
σ σ ⎛ σ⎞
e = Zα ⇔ n = Zα ⇔ n = ⎜ Zα ⎟
e ⎜ ⎟
2
n 2 ⎝ 2 e⎠
Theorem 9.2:
If X is used as an estimate of µ, we can then be (1−α)100%
confident that the error (in estimation) will not exceed a
2
⎛ σ ⎞⎟

specified amount e when the sample size is n = Z α .
⎜ e ⎟
⎝ 2 ⎠
Note:
1. All fractional values of n = ( Z α σ / e) 2 are rounded up to the
2
next whole number.
2. If σ is unknown, we could take a preliminary sample of
size n≥30 to provide an estimate of σ. Then using
n
S= ∑ ( X i − X ) /( n − 1)
2
as an approximation for σ in
i =1
Theorem 9.2 we could determine approximately how
many observations are needed to provide the desired
degree of accuracy.
Example 9.3:
How large a sample is required in Example 9.2 if we want to be
95% confident that our estimate of µ is off by less than 0.05?
Solution:
We have σ= 0.3 , Z α = 1.96 , e=0.05. Then by Theorem 9.2,
2

Department of Statistics and O.R. − 83 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

2
⎛ σ ⎞ ⎛ 0 .3 ⎞
2
n = ⎜ Z α ⎟ = ⎜1.96 × ⎟ = 138.3 ≈ 139
⎜ e ⎟ ⎝ 0. 05 ⎠
⎝ 2 ⎠
Therefore, we can be 95% confident that a random sample of
size n=139 will provide an estimate X differing from µ by an
amount less than e=0.05.

Interval Estimation (Confidence Interval) of the Mean (µ):


(ii) Second Case: σ2 is unknown:
Recall:
X −µ
• T= ~ t(n−1)
S/ n
Result:
n n
If X = ∑ X i / n and S = ∑ ( X i − X ) 2 /(n − 1) are the sample mean
i =1 i =1
and the sample standard deviation of a random sample of size n
from a normal population (distribution) with unknown variance
σ2, then a (1−α)100% confidence interval for µ is :
S S
( X − tα , X + tα )
2
n 2
n
S
⇔ X ± tα
2
n
S S
⇔ X − tα < µ < X + tα
2
n 2
n

where t α is the t-value with ν=n−1 degrees of freedom leaving


2
an area of α/2 to the right; i.e., P(T> t α )=α/2, or equivalently,
2
P(T< t α )=1−α/2.
2
Example 9.4:
The contents of 7 similar containers of sulfuric acid are 9.8,
10.2, 10.4, 9.8, 10.0, 10.2, and 9.6 liters. Find a 95% C.I. for the
mean of all such containers, assuming an approximate normal
distribution.
Department of Statistics and O.R. − 84 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Solution:
n n
.n=7 X = ∑ X i / n = 10.0 S= ∑ ( X i − X ) /(n − 1) = 0.283
2
i =1 i =1
n
First, a point estimate for µ is X = ∑ X i / n = 10.0
i =1
Now, we need to find a confidence interval for µ.
α = ??
95%=(1−α)100% ⇔ 0. 95=(1−α) ⇔ α=0.05 ⇔ α/2=0.025
t α = t0.025 =2.447 (with ν=n−1=6 degrees of freedom)
2
A 95% C.I. for µ is 0.025
X ± tα
S ↓
2
n 6 → t0.025=2.447
S S
⇔ X − tα < µ < X + tα
2
n 2
n

⇔ 10.0 − (2.447)⎛⎜
0.283 ⎞ ⎛ 0.283 ⎞
⎟ < µ < 10.0 + (2.447)⎜ ⎟
⎝ 7 ⎠ ⎝ 7 ⎠
⇔ 10.0 − 0.262< µ < 10.0 + 0.262
⇔ 9.74 < µ < 10.26
⇔ µ ∈( 9.74 , 10.26)
We are 95% confident that µ ∈( 9.74 , 10.26).

9.5 Standard Error of a Point Estimate:


• The standard error of an estimator is its standard
deviation.
n
• We use X = ∑ X i / n as a point estimator of µ, and we used
i =1
the sampling distribution of X to make a (1−α)100% C.I.
for µ.
• The standard deviation of X , which is σ X = σ / n , is
called the standard error of X . We write s.e.( X )= σ / n .
• Note: a (1−α)100% C.I. for µ, when σ2 is known, is
σ
X ± Zα = X ± Z α s.e( X ) .
2
n 2

Department of Statistics and O.R. − 85 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

• Note: a (1−α)100% C.I. for µ, when σ2 is unknown and


the distribution is normal, is
S
X ± tα = X ± t α sˆ.e( X ) . (ν=n−1 df)
2
n 2

9.7 Two Samples: Estimating the Difference between


Two Means (µ1−µ2):
Recall: For two independent samples:
• µ X1 − X 2 = µ1 − µ 2 = E ( X 1 − X 2 )
σ 12 σ 22
• σ 2
X1 − X 2 = + = Var ( X 1 − X 2 )
n1 n2
σ 12 σ 22
• σX = σ X2 1 − X 2 = +
1−X2 n1 n2
( X 1 − X 2 ) − ( µ1 − µ 2 )
• Z= ~N(0,1)
σ 12 σ 22
+
n1 n2

Point Estimation of µ1−µ2:


• X 1 − X 2 is a "good" point estimate for µ1−µ2.

Confidence Interval of µ1−µ2:


(i) First Case: σ 12 and σ 22 are known:
( X 1 − X 2 ) − ( µ1 − µ 2 )
• Z= ~N(0,1)
σ 12 σ 22
+
n1 n2
• Result:
a (1−α)100% confidence interval for µ1−µ2 is :
σ 12 σ 22 σ 12 σ 22
( X1 − X 2 ) − Zα + < µ1 − µ 2 < ( X 1 − X 2 ) + Z α +
2
n1 n2 2
n1 n2

σ 12 σ 22
or ( X 1 − X 2 ) ± Z α +
2
n1 n2

Department of Statistics and O.R. − 86 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

⎛ σ 12 σ 22 σ 12 σ 22 ⎞⎟

or ( X 1 − X 2 ) − Z α + , ( X1 − X 2 ) + Z α +
⎜ n n n n2 ⎟
⎝ 2 1 2 2 1 ⎠

(ii) Second Case: σ 12 = σ 22 =σ2 is unknown:


• If σ 12 and σ 22 are unknown but σ 12 = σ 22 =σ2, then the
pooled estimate of σ2 is
(n1 − 1) S12 + (n2 − 1) S 22
S 2p =
n1 + n2 − 2
where S12 is the variance of the 1-st sample and S 22 is the
variance of the 2-nd sample. The degrees of freedom of S 2p
is ν=n1+n2−2.
• Result:
a (1−α)100% confidence interval for µ1−µ2 is :
S 2p S 2p S 2p S 2p
( X 1 − X 2 ) − tα + < µ1 − µ 2 < ( X 1 − X 2 ) + t α +
2
n1 n2 2
n1 n2
or
1 1 1 1
( X 1 − X 2 ) − tα S p + < µ1 − µ 2 < ( X 1 − X 2 ) + t α S p +
2
n1 n2 2
n1 n2
1 1
or ( X 1 − X 2 ) ± t α S p +
2
n1 n2
⎛ 1 1 1 1 ⎞⎟

or ( X 1 − X 2 ) − t α S p + , ( X 1 − X 2 ) + tα S p +
⎜ n n n n2 ⎟⎠
⎝ 2 1 2 2 1

where t α is the t-value with ν=n1+n2−2 degrees of freedom.


2
Example 9.6: (1st Case: σ 12 and σ 22 are known)
An experiment was conducted in which two types of engines, A
and B, were compared. Gas mileage in miles per gallon was
measured. 50 experiments were conducted using engine type A
and 75 experiments were done for engine type B. The gasoline
used and other conditions were held constant. The average gas
mileage for engine A was 36 miles per gallon and the average
for engine B was 42 miles per gallon. Find 96% confidence
interval for µB−µA, where µA and µB are population mean gas
Department of Statistics and O.R. − 87 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

mileage for engines A and B, respectively. Assume that the


population standard deviations are 6 and 8 for engines A and B,
respectively.
Solution:
Engine A Engine B
nA=50 nB=75
X A =36 X B =42
σA=6 σB=8
A point estimate for µB−µA is X B − X A =42−36=6.
α = ??
96% = (1−α)100% ⇔ 0. 96 = (1−α) ⇔ α=0.04 ⇔ α/2 = 0.02
Z α = Z0.02 = 2.05
2
A 96% C.I. for µB−µA is
σ B2 σ A2 σ B2 σ A2
( X B − X A ) − Zα + < µB − µ A < ( X B − X A ) + Zα +
2
nB nA 2
nB nA
σ B2 σ A2
( X B − X A ) ± Zα +
2
nB nA
82 62
(42 − 36) ± Z 0.02 +
75 50
64 36
6 ± (2.05) +
75 50
6 ± 2.571
3.43 < µB−µA < 8.57
We are 96% confident that µB−µA ∈(3.43, 8.57).

Example 9.7: (2nd Case: σ 12 = σ 22 unknown) Reading Assignment


Example: (2nd Case: σ 12 = σ 22 unknown)
To compare the resistance of wire A with that of wire B, an
experiment shows the following results based on two
independent samples (original data multiplied by 1000):
Wire A: 140, 138, 143, 142, 144, 137
Wire B: 135, 140, 136, 142, 138, 140
Assuming equal variances, find 95% confidence interval for
µA−µB, where µA (µB) is the mean resistance of wire A (B).
Department of Statistics and O.R. − 88 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Solution:
Wire A Wire B .
nA=6 nB=6
X A =140.67 X B =138.50
S2A=7.86690 S2B=7.10009
____________________________________
A point estimate for µA−µB is X A − X B =140.67−138.50=2.17.
95% = (1−α)100% ⇔ 0. 95 = (1−α) ⇔ α=0.05 ⇔ α/2 = 0.025
ν= df = nA+nB − 2= 10
t α = t0.025 = 2.228
2
(n A − 1) S A2 + (n B − 1) S B2
S 2p =
n A + nB − 2
(6 − 1)(7.86690) + (6 − 1)(7.10009)
= =7.4835
6+6−2
S p = S 2p = 7.4835 = 2.7356
A 95% C.I. for µA−µB is
1 1 1 1
( X A − X B ) − tα S p + < µ A − µ B < ( X A − X B ) + tα S p +
2
n A nB 2
n A nB
1 1
or ( X A − X B ) ± t α S p +
2
n A nB
1 1
(140.67 − 138.50) ± (2.228) (2.7356) +
6 6
2.17 ± 3.51890
−1.35< µA−µB < 5.69
We are 95% confident that µA−µB ∈(−1.35, 5.69)

9.9 Single Sample: Estimating of a Proportion:

Department of Statistics and O.R. − 89 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

.p = Population proportion of successes (elements of Type A) in


the population
A no. of elements of type A
= =
A+ B Total no. of elements
.n = sample size
X = no. of elements of type A in the sample of size n.
p̂ = Sample proportion of successes (elements of Type A) in
the sample
X
=
n
Recall that:
(1) X ~ Binomial (n, p)
X
(2) E( p̂ )= E( )= p
n
X pq
(3) Var( p̂ ) = Var( ) = ; q =1− p
n n
(4) For large n, we have
pq
p̂ ~ N(p, ) (Approximately)
n
pˆ − p
Z= ~ N(0,1) (Approximately)
pq
n

Point Estimation for p:


A good point estimator for the population proportion p is given
by the statistic (sample proportion):
X
pˆ =
n

Confidence Interval for p:


Result:
For large n, an approximate (1−α)100% confidence interval for
p is :
pˆ qˆ
pˆ ± Z α ; qˆ = 1 − pˆ
2
n
or
Department of Statistics and O.R. − 90 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

⎛ pˆ qˆ pˆ qˆ ⎞
⎜ pˆ − Z , pˆ + Z α ⎟
⎜ α ⎟
⎝ 2
n 2
n ⎠
or
pˆ qˆ pˆ qˆ
pˆ − Z α < p < pˆ + Z α
2
n 2
n

Example 9.10:
In a random sample of n=500 families owing television sets in
the city of Hamilton, Canada, it was found that x=340
subscribed to HBO. Find 95% confidence interval for the actual
proportion of families in this city who subscribe to HBO.
Solution:
.p = proportion of families in this city who subscribe to HBO.
.n = sample size = 500
X = no. of families in the sample who subscribe to HBO=340.
p̂ = proportion of families in the sample who subscribe to HBO.
X 340
= = = 0.68
n 500
qˆ = 1 − pˆ = 1 − 0.68 = 0.32
A point estimator for p is
X 340
p̂ = = = 0.68
n 500

Now,
95% = (1−α)100% ⇔ 0. 95 = (1−α) ⇔ α=0.05 ⇔ α/2 = 0.025
Z α = Z0.025 = 1.96
2
A 95% confidence interval for p is:
pˆ qˆ
pˆ ± Z α ; qˆ = 1 − pˆ
2
n
(0.68)(0.32)
0.68 ± 1.96
500
0.68 ± 0.04
0.64< p < 0.72
We are 95% confident that p ∈(0.64,0.72).

Department of Statistics and O.R. − 91 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

9.10 Two Samples: Estimating the Difference between


Two Proportions:

Suppose that we have two populations:


• .p1 = proportion of the 1-st population.
• .p2 = proportion of the 2-nd population.
• We are interested in comparing p1 and p2, or equivalently,
making inferences about p1− p2.
• We independently select a random sample of size n1 from
the 1-st population and another random sample of size n2
from the 2-nd population:
• Let X1 = no. of elements of type A in the 1-st sample.
X1~Binomial(n1, p1)
E(X1)= n1 p1
Var(X1)=n1 p1 q1 (q1=1− p1)
• Let X2 = no. of elements of type A in the 2-nd sample.
X2~Binomial(n2, p2)
E(X2)= n2 p2
Var(X2)=n2 p2 q2 (q2=1− p2)
X1
• pˆ1 = = proportion of the 1-st sample
n1
X
• pˆ 2 = 2 = proportion of the 2-nd sample
n2
• The sampling distribution of pˆ1 − pˆ 2 is used to make
inferences about p1− p2.
Department of Statistics and O.R. − 92 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Result:
(1) E ( pˆ 1 − pˆ 2 ) = p1 − p2
p1 q1 p2 q2
(2) Var ( pˆ 1 − pˆ 2 ) = + ; q1 = 1 − p1 , q2 = 1 − p2
n1 n2
(3) For large n1 and n2, we have
p1 q1 p2 q2
pˆ 1 − pˆ 2 ~ N ( p1 − p2 , + ) (Approximately)
n1 n2
( pˆ − pˆ 2 ) − ( p1 − p2 )
Z= 1 ~ N(0,1) (Approximately)
p1 q1 p2 q2
+
n1 n2

Point Estimation for p1− p2:


A good point estimator for the difference between the two
proportions, p1− p2, is given by the statistic:
X1 X 2
pˆ 1 − pˆ 2 = −
n1 n2

Confidence Interval for p1− p2:


Result:
For large n1 and n2, an approximate (1−α)100% confidence
interval for p1− p2 is :
pˆ 1 qˆ1 pˆ 2 qˆ 2
( pˆ 1 − pˆ 2 ) ± Z α +
2
n1 n2
or
⎛ pˆ 1 qˆ1 pˆ 2 qˆ 2 pˆ 1 qˆ1 pˆ 2 qˆ 2 ⎞
⎜ ( pˆ − pˆ ) − Z + , ( pˆ 1 − pˆ 2 ) + Z α + ⎟
⎜ 1 2 α ⎟
⎝ 2
n1 n2 2
n1 n2 ⎠
or
pˆ1 qˆ1 pˆ 2 qˆ2 pˆ1 qˆ1 pˆ 2 qˆ2
( pˆ1 − pˆ 2 ) − Z α + < p1 − p2 < ( pˆ1 − pˆ 2 ) + Z α +
2
n1 n2 2
n1 n2
Example 9.13:
A certain change in a process for manufacture of component
parts is being considered. Samples are taken using both existing
and the new procedure to determine if the new process results in
an improvement. If 75 of 1500 items from the existing
procedure were found to be defective and 80 of 2000 items from
Department of Statistics and O.R. − 93 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

the new procedure were found to be defective, find 90%


confidence interval for the true difference in the fraction of
defectives between the existing and the new process.
Solution:
.p1 = fraction (proportion) of defectives of the existing process
.p2 = fraction (proportion) of defectives of the new process
p̂1 = sample fraction of defectives of the existing process
p̂2 = sample fraction of defectives of the new process

Existing Process New Process


n1 = 1500 n2 = 2000
X1=75 X2=80
X1 75 X2 80
pˆ 1 = = = 0.05 pˆ 2 = = = 0.04
n1 1500 n2 2000
qˆ1 = 1 − 0.05 = 0.95 qˆ 2 = 1 − 0.04 = 0.96

Point Estimation for p1− p2:


A point estimator for the difference between the two
proportions, p1− p2, is:
pˆ1 − pˆ 2 = 0.05 − 0.04 = 0.01
Confidence Interval for p1− p2:
A 90% confidence interval for p1− p2 is :
pˆ 1 qˆ1 pˆ 2 qˆ 2
( pˆ 1 − pˆ 2 ) ± Z α +
2
n1 n2
pˆ 1 qˆ1 pˆ 2 qˆ 2
( pˆ 1 − pˆ 2 ) ± Z 0.05 +
n1 n2
(0.05)(0.95) (0.04)(0.96)
0.01 ± 1.645 +
1500 2000
0.01 ± 0.01173
−0.0017 < p1− p2 < 0.0217
We are 90% confident that p1− p2 ∈(−0.0017, 0.0217).
Note:
Since 0∈90% confidence interval=(−0.0017, 0.0217), there is no
reason to believe that the new procedure produced a significant
decrease in the proportion of defectives over the existing
method (p1− p2 ≈ 0 ⇔ p1 ≈ p2).
Department of Statistics and O.R. − 94 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Chapter 10: One- and Two-Sample Tests of Hypotheses:

Consider a population with some unknown parameter θ. We are


interested in testing (confirming or denying) some conjectures
about θ. For example, we might be interested in testing the
conjecture that θ = θo, where θo is a given value.

10.1-10.3: Introduction +:
• A statistical hypothesis is a conjecture concerning (or a
statement about) the population.
• For example, if θ is an unknown parameter of the
population, we may be interested in testing the conjecture
that θ > θo for some specific value θo.
• We usually test the null hypothesis:
H o : θ = θo (Null Hypothesis)
Against one of the following alternative hypotheses:

⎪ θ ≠ θo
⎪ (Alternative Hypothesis
H1 : ⎨ θ > θo or Research Hypothesis)
⎪ θ < θo
⎪⎩

• Possible situations in testing a statistical hypothesis:


Ho is true Ho is false
Accepting Ho Correct Decision Type II error
(β)
Rejecting Ho Type I error Correct Decision
(α)

Type I error = Rejecting Ho when Ho is true


Type II error = Accepting Ho when Ho is false
P(Type I error) = P(Rejecting Ho | Ho is true) = α
P(Type II error) = P(Accepting Ho | Ho is false) = β

• The level of significance of the test:


α = P(Type I error) = P(Rejecting Ho | Ho is true)

Department of Statistics and O.R. − 95 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

• One-sided alternative hypothesis:


Ho: θ = θo or Ho: θ = θo
H 1 : θ > θo H 1 : θ < θo
• Two-sided alternative hypothesis:
Ho : θ = θo
H 1 : θ ≠ θo

• The test procedure for rejecting Ho (accepting H1) or


accepting Ho (rejecting H1) involves the following steps:

1. Determining a test statistic (T.S.)


2. Determining the significance level α
3. Determining the rejection region (R.R.) and the
acceptance region (A.R.) of Ho .
R.R. of Ho depends on H1 and α
• H1 determines the direction of the R.R. of Ho
• α determines the size of the R.R. of Ho

H1: θ ≠ θo H1: θ > θo H1: θ < θo


Two-sided alternative One-sided alternative One-sided alternative
4. Decision:
We reject Ho (accept H1) if the value of the T.S. falls in
the R.R. of Ho , and vice versa.

Department of Statistics and O.R. − 96 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

10.5: Single Sample: Tests Concerning a Single Mean


(Variance Known):
Suppose that X1, X2, …, Xn is a random sample of size n from
distribution with mean µ and (known) variance σ2.
Recall:
• E( X ) = µ X = µ
σ2
• Var ( X ) = σ X2 =
n
σ ⎞ X −µ
• X ~ N ⎛⎜ µ , ⎟ ⇔ Z= ~N(0,1)
⎝ n⎠ σ/ n
• Test Procedure:
Hypotheses Ho: µ = µo Ho: µ = µo Ho: µ = µo
H1: µ ≠ µo H1: µ > µo H1 : µ < µo
Test Statistic X − µo
Z= ~N(0,1)
(T.S.) σ/ n
R.R. and A.R.
of Ho

Decision: Reject Ho (and accept H1) at the significance level α if:


Z > Z α/2 Z > Zα Z < − Zα
or Z < − Z α/2
Two-Sided Test One-Sided Test One-Sided Test

Example 10.3:
A random sample of 100 recorded deaths in the United States
during the past year showed an average of 71.8 years. Assuming
a population standard deviation of 8.9 year, does this seem to
indicate that the mean life span today is greater than 70 years?
Use a 0.05 level of significance.
Solution:
.n=100, X =71.8, σ=8.9
µ=average (mean) life span
µo=70

Department of Statistics and O.R. − 97 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Hypotheses:
Ho: µ = 70
H1: µ > 70
T.S. :
X − µ o 71.8 − 70
Z= = = 2.02
σ / n 8.9 / 100
Level of significance:
α=0.05
R.R.:
Z α=Z0.05=1.645
Z > Z α =Z0.05=1.645
Decision:
Since Z=2.02 ∈R.R., i.e., Z=2.02>Z0.05, we reject Ho at
α=0.05 and accept H1: µ > 70. Therefore, we conclude that the
mean life span today is greater than 70 years.
Example 10.4:
A manufacturer of sports equipment has developed a new
synthetic fishing line that he claims has a mean breaking
strength of 8 kilograms with a standard deviation of 0.5
kilograms. Test the hypothesis that µ=8 kg against the
alternative that µ≠8 kg if a random sample of 50 lines is tested
and found to have a mean breaking strength of 7.8 kg. Use a
0.01 level of significance.
Solution:
.n=50, X =7.8, σ=0.5,
α=0.01, α/2 = 0.005
µ= mean breaking strength
µo=8
Hypotheses:
Ho : µ = 8
H1 : µ ≠ 8
T.S. :
X − µo 7.8 − 8
Z= = = −2.83
σ / n 0.5 / 50
Z α/2=Z0.005=2.575 and − Z α/2= −Z0.005= −2.575

Department of Statistics and O.R. − 98 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Decision:
Since Z= −2.83 ∈R.R., i.e., Z= −2.83 < −Z0.005, we reject
Ho at α=0.01 and accept H1: µ ≠ 8. Therefore, we conclude that
the claim is not correct.

10.7: Single Sample: Tests on a Single Mean (Variance


Unknown):
Suppose that X1, X2, …, Xn is a random sample of size n from
normal distribution with mean µ and unknown variance σ2.
Recall:
X −µ
• T= ~ t(ν) ; ν= n−1
S/ n
n
• S = ∑ ( X i − X ) 2 /(n − 1)
i =1
• Test Procedure:
Hypotheses Ho: µ = µo Ho: µ = µo Ho: µ = µo
H1: µ ≠ µo H1: µ > µo H1 : µ < µo
Test Statistic X − µo
T= ~ t(n−1)
(T.S.) S/ n
R.R. and
A.R. of Ho

Decision: Reject Ho (and accept H1) at the significance level α if:


T > t α/2 T > tα T < − tα
or T < − t α/2
Two-Sided Test One-Sided Test One-Sided Test

Example 10.5:
… If a random sample of 12 homes included in a planned study
indicates that vacuum cleaners expend an average of 42
kilowatt-hours per year with a standard deviation of 11.9
kilowatt-hours, does this suggest at the 0.05 level of significance
that the vacuum cleaners expend, on the average, less than 46
Department of Statistics and O.R. − 99 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

kilowatt-hours annually? Assume the population of kilowatt-


hours to be normal.
Solution:
.n=12, X =42, S=11.9, α=0.05
µ=average (mean) kilowatt-hours annual expense of a vacuum
cleaner
µo=46
Hypotheses:
Ho: µ = 46
H1: µ < 46
T.S. :
X − µo 42 − 46
T= = = −1.16 ;
S / n 11.9 / 12
ν=df= n−1=11
− t α/2= − t0.05= −1.796
Decision:
Since T=−1.16∉R.R. (T=−1.16∈A.R.), we do not reject Ho
at α=0.05 (i.e, accept Ho: µ = 46) and reject H1: µ < 46.
Therefore, we conclude that µ is not less than 46 kilowatt-hours.

10.8: Two Samples: Tests on Two Means:


Recall: For two independent samples:
• If σ 12 and σ 22 are known, then we have:
( X 1 − X 2 ) − ( µ1 − µ 2 )
Z= ~N(0,1)
σ 12 σ 22
+
n1 n2
• If σ 12 and σ 22 are unknown but σ 12 = σ 22 =σ2, then we have:
( X 1 − X 2 ) − ( µ1 − µ 2 )
T= ~t(n1+n2−2)
1 1
Sp +
n1 n2
Where the pooled estimate of σ2 is
(n1 − 1) S12 + (n2 − 1) S 22
S 2p =
n1 + n2 − 2
The degrees of freedom of S 2p is ν=n1+n2−2.
Now, suppose we need to test the null hypothesis
Department of Statistics and O.R. − 100 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Ho : µ1 = µ2 ⇔ Ho : µ1 − µ2 = 0
Generally, suppose we need to test
Ho : µ1 − µ2 = d (for some specific value d)
Against one of the following alternative hypothesis

⎪ µ1 − µ2 ≠ d

H1 : ⎨ µ1 − µ2 > d
⎪ µ1 − µ2 < d
⎪⎩

Hypotheses Ho : µ1 − µ2 = d Ho : µ1 − µ2 = d Ho : µ1 − µ2 = d
H1 : µ1 − µ2 ≠ d H1 : µ1 − µ2 > d H1 : µ1 − µ2 < d
Test Statistic (X − X2) − d
Z= 1 ~N(0,1) {if σ 12 and σ 22 are known}
(T.S.) σ 2
σ 2
1
+ 2
n1 n2
or
( X1 − X 2 ) − d
T= ~t(n1+n2−2) {if σ 12 = σ 22 =σ2 is unknown}
1 1
Sp +
n1 n2
R.R. and
A.R. of Ho

Or Or Or

Decision: Reject Ho (and accept H1) at the significance level α if:


T.S. ∈ R.R. T.S. ∈ R.R. T.S. ∈ R.R.
Two-Sided Test One-Sided Test One-Sided Test

Example10.6:
An experiment was performed to compare the abrasive wear of
Department of Statistics and O.R. − 101 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

two different laminated materials. Twelve pieces of material 1


were tested by exposing each piece to a machine measuring
wear. Teen pieces of material 2 were similarly tested. In each
case, the depth of wear was observed. The samples of material 1
gave an average wear of 85 units with a sample standard
deviation of 4, while the samples of materials 2 gave an average
wear of 81 and a sample standard deviation of 5. Can we
conclude at the 0.05 level of significance that the mean abrasive
wear of material 1 exceeds that of material 2 by more than 2
units? Assume populations to be approximately normal with
equal variances.
Solution:
Material 1 material 2
n1=12 n2=10
X 1 =85 X 2 =81
S1=4 S2=5
Hypotheses:
Ho: µ1 = µ2 + 2 (d=2)
H1: µ1 > µ2 + 2
Or equivalently,
Ho: µ1 − µ2 = 2 (d=2)
H1: µ1 − µ2 > 2
Calculation:
α=0.05
(n1 − 1) S12 + (n2 − 1) S 22 (12 − 1)(4) 2 + (10 − 1)(5) 2
S 2p = = = 20.05
n1 + n2 − 2 12 + 10 − 2
Sp=4.478
ν= n1+n2−2=12+10 −2 = 20
t0.05 = 1.725
T.S.:
( X1 − X 2 ) − d (85 − 81) − 2
T= = = 1.04
1 1 1 1
Sp + (4.478) +
n1 n2 12 10
Decision:
Since T=1.04 ∈A.R. (T=1.04< t0.05 = 1.725), we accept (do
not reject) Ho and reject H1: µ1 − µ2 > 2 at α=0.05.

Department of Statistics and O.R. − 102 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

10.11 One Sample: Tests on a Single Proportion:

Recall:
• .p = Population proportion of elements of Type A in the
population
A no. of elements of type A
• = =
A+ B Total no. of elements
• .n = sample size
• X = no. of elements of type A in the sample of size n.
• p̂ = Sample proportion elements of Type A in the sample
X
=
n
• For large n, we have
pˆ − p X − np
Z= = ~ N(0,1) (Approximately, q=1−p)
pq npq
n
Hypotheses Ho: p = po Ho: p = po Ho: p = po
H1: p ≠ po H1: p > po H1 : p < p o
Test Statistic pˆ − po X − npo
Z= = ~N(0,1) (qo=1−po)
(T.S.) p o qo npo qo
n
R.R. and A.R.
of Ho

Decision: Reject Ho (and accept H1) at the significance level α if:


Z > Z α/2 Z > Zα Z < − Zα
or Z < − Z α/2
Two-Sided Test One-Sided Test One-Sided Test
Department of Statistics and O.R. − 103 − King Saud University
Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Example 10.10:
A builder claims that heat pumps are installed in 70% of all
homes being constructed today in the city of Richmond. Would
you agree with this claim if a random survey of new homes in
the city shows that 8 out of 15 homes had heat pumps installed?
Use a 0.10 level of significance.
Solution:
.p = Proportion of homes with heat pumps installed in the city.
.n=15
X= no. of homes with heat pumps installed in the sample = 8
p̂ = proportion of homes with heat pumps installed in the
X 8
sample = = = 0.5333
n 15
Hypotheses:
Ho: p = 0.7 ( po=0.7)
H1: p ≠ 0.7
Level of significance:
α=0.10
T.S.:
pˆ − po 0.5333 − 0.70
Z= = = −1.41
p o qo (0.7)(0.3)
n 15
or
X − npo 8 − (15)(0.7)
Z= = = −1.41
npo qo (15)(0.7)(0.3)
Zα/2= Z0.05= 1.645

Decision:
Since Z= −1.41 ∈A.R., we accept (do not reject) Ho: p=0.7
and reject H1: p ≠ 0.7 at α=0.1. Therefore, we agree with the
claim.

Example 10.11: Reading Assignment

Department of Statistics and O.R. − 104 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

10.12 Two Samples: Tests on Two Proportions:

Suppose that we have two populations:


• .p1 = proportion of the 1-st population.
• .p2 = proportion of the 2-nd population.
• We are interested in comparing p1 and p2, or equivalently,
making inferences about p1− p2.
• We independently select a random sample of size n1 from
the 1-st population and another random sample of size n2
from the 2-nd population:
• Let X1 = no. of elements of type A in the 1-st sample.
• Let X2 = no. of elements of type A in the 2-nd sample.
X1
• pˆ1 = = proportion of the 1-st sample
n1
X
• pˆ 2 = 2 = proportion of the 2-nd sample
n2
• The sampling distribution of pˆ1 − pˆ 2 is used to make
inferences about p1− p2.
• For large n1 and n2, we have
( pˆ 1 − pˆ 2 ) − ( p1 − p2 )
Z= ~ N(0,1) (Approximately)
p1 q1 p2 q2
+
n1 n2

Department of Statistics and O.R. − 105 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Suppose we need to test:


Ho : p 1 = p 2

⎪ p1 ≠ p2
⎪ p1 > p2
H1 : ⎨
⎪ p1 < p2
⎪⎩
Or, equivalently,
Ho: p1 − p2 =0

⎪ p1 − p2 ≠ 0

H1 : ⎨ p1 − p2 > 0
⎪ p1 − p2 <0
⎪⎩
Note, under Ho: p1= p2= p, the pooled estimate of the proportion
p is:
X1 + X 2
pˆ = ( qˆ = 1 − pˆ )
n1 + n2
The test statistic (T.S.) is
( pˆ 1 − pˆ 2 )
Z= ~N(0,1)
⎛1 1 ⎞
pˆ qˆ ⎜⎜ + ⎟⎟
⎝ n1 n2 ⎠
Hypotheses Ho: p1 − p2 =0 Ho: p1 − p2 =0 Ho: p1 − p2 =0
H1 : p 1 − p 2 ≠ 0 H1 : p 1 − p 2 > 0 H1 : p 1 − p 2 < 0
Test Statistic ( pˆ 1 − pˆ 2 )
Z= ~N(0,1)
(T.S.) ⎛1 1 ⎞
pˆ qˆ ⎜⎜ + ⎟⎟
⎝ n1 n2 ⎠
R.R. and
A.R. of Ho

Decision: Reject Ho (and accept H1) at the significance level α if:


Z > Z α/2 Z > Zα Z < − Zα
or Z < − Z α/2
Two-Sided Test One-Sided Test One-Sided Test

Department of Statistics and O.R. − 106 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Example 10.12:
A vote is to be taken among the residents of a town and the
surrounding county to determine whether a proposed chemical
plant should be constructed. The construction site is within the
town limits and for this reason many voters in the county feel
that the proposal will pass because of the large proportion of
town voters who favor the construction. To determine if there is
a significant difference in the proportion of town voters and
county voters favoring the proposal, a poll is taken. If 120 of
200 town voters favor the proposal and 240 of 500 county voters
favor it, would you agree that the proportion of town voters
favoring the proposal is higher than the proportion of county
voters? Use a 0.025 level of significance.

Solution:
.p1 = proportion of town voters favoring the proposal
.p2 = proportion of county voters favoring the proposal
p̂1 = sample proportion of town voters favoring the proposal
p̂2 = sample proportion of county voters favoring the proposal

Town County
n1 = 200 n2 = 500
X1=120 X2=240
X 1 120 X 2 240
pˆ 1 = = = 0.60 pˆ 2 = = = 0.48
n1 200 n2 500
qˆ1 = 1 − 0.60 = 0.40 qˆ 2 = 1 − 0.48 = 0.52

The pooled estimate of the proportion p is:


X 1 + X 2 120 + 240
pˆ = = = 0.51
n1 + n2 200 + 500
qˆ = 1 − 0.51 = 0.49
Hypotheses:
Ho : p 1 = p 2
H1 : p 1 > p 2
or

Department of Statistics and O.R. − 107 − King Saud University


Unrevised First Draft
STAT – 324 Second Semester 1424/1425 Dr. Abdullah Al-Shiha

Ho: p1 − p2 =0
H1 : p 1 − p 2 > 0

Level of significance:
α=0.025
Zα= Z0.025= 1.96
T.S.:
( pˆ 1 − pˆ 2 ) (0.60 − 0.48)
Z= = = 2.869
⎛1 1 ⎞ ⎛ 1 1 ⎞
pˆ qˆ ⎜⎜ + ⎟⎟ (0.51)(0.49)⎜ + ⎟
⎝ n1 n2 ⎠ ⎝ 200 500 ⎠

Decision:
Since Z= 2.869 ∈R.R. (Z= 2.869> Zα= Z0.025= 1.96), we
reject Ho: p1 = p2 and accept H1: p1 > p2 at α=0.025. Therefore,
we agree that the proportion of town voters favoring the
proposal is higher than the proportion of county voters.

Department of Statistics and O.R. − 108 − King Saud University


Unrevised First Draft

You might also like