Lecture4 Slides
Lecture4 Slides
Example 4–9: Find Q 1 , Q 2 , and Q 3 for the data set 15, 13, 6, 5, 12, 50, 22, 18.
Solution
Step 1 Arrange the data in order.
5, 6, 12, 13, 15, 18, 22, 50
Step 2 Find the median (Q 2 ).
5, 6, 12, 13, 15, 18, 22, 50
↑
MD
13 + 15
Q= =MD = 14
2 2
Step 3 Find the median of the data values less than 14.
5, 6, 12, 13
↑
Q1
6 + 12
=
Q = 9
1 2
So Q 1 is 9.
Step 4 Find the median of the data values greater than 14.
15, 18, 22, 50
↑
Q3
18 + 22
=Q = 20
3 2
Here Q 3 is 20. Hence, Q 1 = 9, Q 2 = 14, and Q 3 = 20.
Midhinge:
Q +Q
Midhinge = 1 3
2
Using the same method of calculations as in the median, we can get Q 1 and Q 3 equation as
follows:
n 3n
−F 4 −F
=
Q L + 4 = L +
1 Q1 i , Q
3 Q3 i
fQ fQ3
1
Example 4–10: Based on the grouped data below, find the interquartile range (IQR).
Time to travel to work f
1 – 10 8
11 – 20 14
21 – 30 12
31 – 40 9
41 – 50 7
Solution
n 50
Class Q 1= = = 12.5 → class Q1 is the 2nd class
4 4
n
−F
=
Q L + 4
1 Q1 i
fQ
1
3n 3(50)
Class Q=
3 = = 37.5 → class Q3 is the 4th class
4 4
3n
4 −F
=
Q L + i
3 Q3 f
Q3
37.5− 34
= 30.5 + 10 =
34.3889
9
IQR = Q 3 - Q 1 = 34.3889 - 13.7143 = 20.6746
Outliers
An outlier is an extremely high or an extremely low data value when compared with the rest of
the data values.
data value < Q 1 – (1.5) IQR or data value > Q 3 + (1.5) IQR
Solution
The data value 50 is extremely suspect. These are the steps in checking for an outlier.
Step 1 Find Q 1 and Q 3 . From the previous example, Q 1 is 9 and Q 3 is 20.
Step 2 Find the interquartile range (IQR), which is Q 3 - Q 1 .
IQR = Q 3 - Q 1 = 20 - 9 = 11
Step 4 Subtract the value obtained in step 3 from Q 1 , and add the value obtained in step 3 to Q 3 .
9 - 16.5 = -7.5 and 20 + 16.5 = 36.5
Step 5 Check the data set for any data values that fall outside the interval from -7.5 to 36.5. The
value 50 is outside this interval; hence, it can be considered an outlier.
A boxplot is a graph of a data set obtained by drawing a horizontal line from the minimum data
value to Q 1 , drawing a horizontal line from Q 3 to the maximum data value, and drawing a box
Example 4–12: The number of meteorites found in 10 states of the United States is 89, 47, 164,
296, 30, 215, 138, 78, 48, 39. Construct a boxplot for the data.
Solution
Step 3 Find Q 1 .
30, 39, 47, 48, 78
↑
Q1
Step 4 Find Q 3 .
89, 138, 164, 215, 296
↑
Q3
Step 6 Located the lowest value, Q 1 , median, Q 3 , and the highest value on the scale.
Sample Space: The set of all possible outcomes of a random experiment is called the sample
space of the experiment. The sample space is denoted as S.
sample point: Each outcome in a sample space is called an element or a member of the sample
space, or simply a sample point. If the sample space has a finite number of elements, we may list
the members separated by commas and enclosed in braces.
• Flipping (Tossing) a coin once, S = {H, T}, where H and T correspond to heads and tails,
respectively.
Event B: “H” appears. How many ways?
• Drawing (Picking) a card from a deck, S = { A♣, A♦, A♥ , A♠, 2♣,…, K♠}.
Consider the situation of sampling until k defectives are observed. Suppose the experiment is to
sample items randomly until one defective item is observed. The sample space for this case is:
S = {D,ND,NND,NNND, . . . }.
If the experiment stopped after the third test. Define the event A!!!
Subjective probability is based on a person’s own personal reasoning and judgment (Educated
guess)
1- Impossible event and denoted by the symbol φ, which contains no elements at all.
P(ϕ ) = 0.
2- Sure (certain)and denoted by the symbol S, which contains all elements.
P( S ) = 1.
Counting Methods:
Ashraf, Samar
Ashraf, Mona
Mohamed, Samar
Mohamed
Mohamed, Mona
Hassan, Samar
Hassan, Mona
Rule 2: If an operation can be performed in n 1 ways, and if for each of these a second operation
can be performed in n 2 ways, and for each of the first two a third operation can be
performed in n 3 ways, and so forth, then the sequence of k operations can be performed in
n 1 n 2 · · · n k ways.
Example:
(a) How many four digit numbers can be formed using only the digits 1, 2, 3, 4, 5 and 6?
(b) How many four digit numbers from (a) have no repeated digits?
(c) How many four digit numbers from (b) are greater than 5000?
(d) How many even four digit numbers from (b)?
Solution: (a) 6 * 6 * 6 * 6 = 1296.
(b) 6 * 5 * 4 * 3 = 360.
(c) 2 * 5* 4 * 3 = 120.
(d) 3 * 5 * 4 * 3 =180.
3- Permutations:
Definition: A permutation is a different arrangement of a set of objects.
Consider the number of permutations that are possible by taking two letters at a time from four.
These would be ab, ac, ad, ba, bc, bd, ca, cb, cd, da, db, and dc. Using Rule 1 again, we have two
positions to fill, with n 1 = 4 choices for the first and then n 2 = 3 choices for the second, for a total
of
n 1 n 2 = (4)(3) = 12
permutations. In general, n distinct objects taken r at a time can be arranged in
n(n − 1)(n − 2) · · · (n − r + 1) ways.
Theorem: The number of permutations of n distinct objects taken r at a time is
n!
n
Pr =
(n − r )!
Example 5.16: How many ways can three letters be formed from the four letters A, B, C, and D?
Solution: The total number of ways is
4! 4!
4
P= = = (4)(3)(2)(1) = 24 .
(4 − 3)! 1!
3
A, B, C C, A, B
A, B, D C, A, D
A, C, D C, B, A
A, C, B C, B, D
A, D, B C, D, A
A, D, C C, D, B
B, A, C D, A, B
B, A, D D, A, C
B, C, A D, B, A
B, C, D D, B, C
B, D, A D, C, A
B, D, C D, C, B
4- Combinations:
Example 5.19: How many ways can three letters be formed from the four letters A, B, C, and D
disregarding the order?
Solution: The total number of ways is
4 4! 4!
=C3 =
4
= = (4) .
3 3!(4 − 3)! 3!1!
A, B, C C, A, B
A, B, D C, A, D
A, C, D C, B, A
A, C, B C, B, D
A, D, B C, D, A
A, D, C C, D, B
B, A, C D, A, B
B, A, D D, A, C
B, C, A D, B, A
B, C, D D, B, C
B, D, A D, C, A
B, D, C D, C, B
Example 6.2: A die is loaded in such a way that an even number is twice as likely to occur as an
odd number. If E is the event that a number less than 4 occurs on a single toss of the
die, find P(E).
Solution: The sample space is S = {1, 2, 3, 4, 5, 6}. We assign a probability of w to each odd
number and a probability of 2w to each even number. Since the sum of the probabilities
must be 1, we have 9w = 1 or w = 1/9. Hence, probabilities of 1/9 and 2/9 are assigned to
each odd and even number, respectively. Therefore,
1 2 1 4
E = {1, 2, 3} and P(E) = + + =
9 9 9 9
Example 6.5: In a poker hand consisting of 5 cards, find the probability of holding 2 aces and 3
jacks.