0% found this document useful (0 votes)
24 views

Lecture4 Slides

Uploaded by

philopateer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Lecture4 Slides

Uploaded by

philopateer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Quartiles and Deciles

Case 1: Ungrouped Data


Quartiles: divide the distribution into four groups, separated by Q 1 , Q 2 , Q 3 .

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.

Interquartile range (IQR)


IQR = Q 3 - Q 1

Midhinge:
Q +Q
Midhinge = 1 3
2

PHM111s - Probability and Statistics


Deciles: divide the distribution into 10 groups, as shown. They are denoted by D 1 , D 2 , etc.

Case 2: Grouped Data

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

Construct the cumulative frequency distribution

Height (in cm) f cf


1 – 10 8 8
11 – 20 14 22
21 – 30 12 34
31 – 40 9 43
41 – 50 7 50

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 

PHM111s - Probability and Statistics


 12.5−8 
=
10.5 +   10 =
13.7143
 14 

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

Example 4–11: Check the following data set for outliers.


5, 6, 12, 13, 15, 18, 22, 50

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 3 Multiply this value by 1.5.


1.5(11) = 16.5

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.

3–4 Exploratory Data Analysis

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

PHM111s - Probability and Statistics


whose vertical sides pass through Q 1 and Q 3 with a vertical line inside the box passing through the
median or Q 2 .

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 1 Arrange the data in order:


30, 39, 47, 48, 78, 89, 138, 164, 215, 296

Step 2 Find the median.


30, 39, 47, 48, 78, 89, 138, 164, 215, 296

Median
78 + 89
Q= =MD = 83.5
2 2

Step 3 Find Q 1 .
30, 39, 47, 48, 78

Q1

Step 4 Find Q 3 .
89, 138, 164, 215, 296

Q3

Step 5 Draw a scale for the data on the x axis.

Step 6 Located the lowest value, Q 1 , median, Q 3 , and the highest value on the scale.

Step 7 Draw a box. Fi


Positively skewed distribution

PHM111s - Probability and Statistics


Probability
Random Experiment: An experiment whose results can’t be predicted with certainty (or that can
result in different outcomes, even though it is repeated in the same manner
every time), is called a random experiment.

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.

Event: An event is a subset of the sample space of a random experiment.

• Throwing (Rolling) a die, S = {1, 2, 3, 4, 5, 6}.


Event A: even number appears. How many ways?

• 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♠}.

PHM111s - Probability and Statistics


Event C: “Heart” appears. How many ways?

Sample spaces can also be described graphically with tree diagrams.

Example 5.2: An experiment consists of flipping a coin


and then flipping it a second time if a head
occurs. If a tail occurs on the first flip, then
a die is tossed once. To list the elements of
the sample space providing the most
information, we construct the tree diagram
of the opposite figure. The various paths
along the branches of the tree give the
distinct sample points. Starting with the top
left branch and moving to the right along
the first path, we get the sample point HH,
indicating the possibility that heads occurs
on two successive flips of the coin. Likewise, the sample point T3 indicates the
possibility that the coin will show a tail followed by a 3 on the toss of the die. By
proceeding along all paths, we see that the sample space is:
S = {HH, HT, T1, T2, T3, T4, T5, T6}.
Example 5.3: Suppose that three items are selected at
random from a manufacturing process.
Each item is inspected and classified
defective, D, or nondefective, N. To list
the elements of the sample space
providing the most information, we
construct the tree diagram of the
following figure. Now, the various paths
along the branches of the tree give the
distinct sample points. Starting with the
first path, we get the sample point DDD,
indicating the possibility that all three
items inspected are defective. As we proceed along the other paths, we see that the
sample space is:
S = {DDD, DDN, DND, DNN, NDD, NDN, NND, NNN}.
Event A: one defective occurs (of course ⇒also two nondefectives!!!). How many ways?

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!!!

PHM111s - Probability and Statistics


Example 5.4: Given the sample space S = {t | t ≥ 0}, where t is the life in years of a certain
electronic component, then the event A that the component fails before the end of the
fifth year is the subset A = {t | 0 ≤ t < 5}.
Different Types of Probability:

Experimental (Observed) Probability

No. of times "A" occured


P(A) = .
No. of times Exp. was repeated
Theoretical (Classical) Probability

No. of ways "A" should occur


P(A) = .
No. of outcomes
Subjective Probability

Subjective probability is based on a person’s own personal reasoning and judgment (Educated
guess)

Ex1. If the coin is flipped 50 times and it lands on heads 28 times:


28
Then the Experimental (Observed) probability is .
50
Ex2. On a die, to get a “3”:
1
Then the Theoretical (Classical) probability is .
6
Ex3. You came to a Lecture late: ???
Then the Subjective probability that the lecturer will drive you out of the hall is

Some Important Events:

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:

1- Multiplication rule of counting:

PHM111s - Probability and Statistics


Rule 1: If an operation can be performed in n 1 ways, and if for each of these ways a second
operation can be performed in n 2 ways, then the two operations can be performed together
in n 1 n 2 ways.
Example 5.13: How many ways are there to choose a male student out of three students (Ashraf –
Mohamed – Hassan) and a female student out of two students (Samar – Mona)?
Solution: Since the number of ways of choosing a male student out of three students (n 1 ) = 3
ways and the number of ways of choosing a female student out of two students (n 2 ) = 2
ways, then the number of ways of choosing is n 1 n 2 = (3)(2) = 6 ways.

Male students Female students Choices

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.

PHM111s - Probability and Statistics


Example 5.14: Sam is going to assemble a computer by himself. He has the choice of chips from
two brands, a hard drive from four, memory from three, and an accessory bundle
from five local stores. How many different ways can Sam order the parts?
Solution: Since n 1 = 2, n 2 = 4, n 3 = 3, and n 4 = 5, there are n l × n 2 × n 3 × n 4 = 2× 4 × 3 × 5 =
120 different ways to order the parts.

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.

2- Addition rule of counting:


If an operation can be performed in n 1 ways and a second operation can be performed in n 2
ways, and we cannot do both at the same time (mutually exclusive), then there are n 1 + n 2
ways to choose one of the actions.
Example: Suppose that we are planning a trip and are deciding between bus or train
transportation. If there are three bus routes and two train routes, then there are 3+2=5
different routes available for the trip.

3- Permutations:
Definition: A permutation is a different arrangement of a set of objects.

PHM111s - Probability and Statistics


Consider the three letters a, b, and c. The possible permutations are abc, acb, bac, bca, cab, and
cba. Thus, we see that there are 6 distinct arrangements.
n 1 n 2 n 3 = (3)(2)(1) = 6 permutations
by Rule 2. In general, n distinct objects can be arranged in
n(n − 1)(n − 2) · · · (3)(2)(1) = n! ways.

The number of permutations of the four letters a, b, c, and d will be 4! = 24.


If “n” different items and “r” items from them to be arranged given the order is important:

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:

PHM111s - Probability and Statistics


Now 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.
From the previous data, we notice that selecting ab is different from selecting ba and so on…
If we want to select from the previous disregarding the order, the all possible choices are: ab,
ac, ad, bc, bd and cd and each choice of these choices is called “Combination”

Theorem: The number of combinations of n distinct objects taken r at a time is


 n n!
n
Cr ≡   = .
 r  r !(n − r )!

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

PHM111s - Probability and Statistics


Example 6.1: A coin is tossed twice. What is the probability that at least 1 head occurs?
Solution: The sample space for this experiment is
S = {HH, HT, TH, TT}.
If the coin is balanced, each of these outcomes is equally likely to occur. Therefore, we
assign a probability of ω to each sample point. Then 4ω = 1, or ω = 1/4. If A represents
the event of at least 1 head occurring, then
1 1 1 3
A = {HH, HT, TH} and P(A) = + + =
4 4 4 4

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.

Solution: The number of ways of being dealt 2 aces from 4 cards is


 4 4!
=  = 6,
 2  2!2!
PHM111s - Probability and Statistics
and the number of ways of being dealt 3 jacks from 4 cards is
 4  4!
=  = 4.
 3  3!1!
By the multiplication rule, there are n = (6)(4) = 24 hands with 2 aces and 3 jacks. The total
number of 5-card poker hands, all of which are equally likely, is
 52  52!
= N =  = 2,598,960 .
 5 5!47!
Therefore, the probability of getting 2 aces and 3 jacks in a 5-card poker hand is
24
P(C) = = N = 0.9 × 10−5 .
2,598,960

PHM111s - Probability and Statistics

You might also like