0% found this document useful (0 votes)
73 views58 pages

MetNum1 2023 1 Week 11 Corrected

The document provides an outline of topics to be covered in Week 11 of a statistics course, including probability theory, probability distributions, and a meme. It discusses sample spaces, events, Venn diagrams, conditional probability, and probability distributions. Examples and exercises are provided to illustrate fundamental probability concepts such as defining events and sample spaces, calculating probabilities, and applying rules like addition and complement.

Uploaded by

donbradman334
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views58 pages

MetNum1 2023 1 Week 11 Corrected

The document provides an outline of topics to be covered in Week 11 of a statistics course, including probability theory, probability distributions, and a meme. It discusses sample spaces, events, Venn diagrams, conditional probability, and probability distributions. Examples and exercises are provided to illustrate fundamental probability concepts such as defining events and sample spaces, calculating probabilities, and applying rules like addition and complement.

Uploaded by

donbradman334
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

CE23216 MetNum 1

Semester 2023/1

Week 11

Rehan Hussain, Ph.D.

1
Topics covered in Part 1

Week Title
Week 9 Introduction to statistics and probability
Week 10 Descriptive statistics and sampling techniques
Week 11 Probability theory
Week 12 Discrete and continuous probability distributions
Week 13 Variance, co-variance, and correlation
Week 14 Statistical inference methods
Week 15 Statistical analysis using Octave/MATLAB
Week 16 UAS

2
Outline

What's in this week’s lectures?

1. Sample spaces

2. Event relations and Venn diagrams

3. Conditional probability

4. Probability distributions
Meme of the week

4
Topic 1: sample spaces

5
Sample spaces

— The sample space (denoted as S) associated with an experiment is the


collection of all possible distinct outcomes of the experiment.

— The individual outcomes are called elementary outcomes (denoted as e1, e2,
e3, … and so on), simple events, or elements of the sample space.

— An event (denoted as A, B,… and so on) is the set of elementary outcomes


possessing a designated feature.

— An event is said to occur when any one of the elementary outcomes in that
event occurs.
Sample spaces

— Sample spaces can be either discrete (only having integer values) or continuous
(having any numerical value within a given range).

— For example:
Ø Rolling a regular six-sided die
S = {1,2,3,4,5,6} à discrete

Ø GPA of Chemical Engineering students


S = {x | 1.5 < x < 4} à continuous

7
Sample spaces
— To further illustrate sample spaces, let us revisit the situation of tossing a coin twice. The possible
outcomes for tossing a coin twice are HH, HT, TH, and TT. The corresponding sample space is

S = {HH, HT, TH, TT} or S = {e1, e2 , e3, e4}


— If A is the event of getting exactly one head and B is the event of getting no heads at all, the
sample spaces of A and B are defined as

A = {e2 , e3} B = {e4}


— The number of elements in each sample space are given by

𝑛 𝑆 =4 𝑛 𝐴 =2 𝑛 𝐵 =1
Class Exercise 1: sample spaces

When a radioactive isotope of type X decays, it releases either a pair of Y particles,


a pair of Z particles, or one Y and one Z particle. Using a tree diagram, or
otherwise, list the sample space S for the decay of two X particles.

9
Topic 2: event relations and
Venn diagrams

10
Event relations

— Union - A ∪ B
Ø The event consisting of all outcomes that are either in A or B or
both.

— Intersection - A ∩ B
Ø The event consisting of all outcomes that are in both A and B (also
known as the joint probability).

— The complement of A (denoted as A’ or 𝐴̅ or Ac)


Ø The set of all outcomes in S that are not contained in A.
Probability and event notation

— In terms of the introduced notation, the probability of event A must


satisfy the following equations:

0≤𝑃 𝐴 ≤1
𝑛(𝐴)
𝑃 𝐴 =
𝑛(𝑆)
𝑃 𝐴 = - 𝑃(𝑒)
!"" $ %& '
𝑃 ∅ =0
𝑃 𝑆 = - 𝑃(𝑒) = 1
𝑃 𝐴 +𝑃 𝐴) =1 !"" $ %& (

12
Worked Example 1: probabilities of events
A random experiment has the sample space {a,b,c,d}, with all outcomes being equally
likely. Let events A = {a,b}, B = {b,c,d}, and C = {d}.
Find (a) P(A), (b) P(B), (c) P(C), (d) P(A¢ ), (e) P(A ∩ B), (f) P(A U B), and (g) P(A ∩ C).

Solution:
(a) P(A) = P(a) + P(b) = 0.25 + 0.25 = 0.5
(b) P(B) = P(b) + P(c) + P(d) = 0.25 + 0.25 + 0.25 = 0.75
(c) P(C) = P(d) = 0.25
(d) P(A¢) = 1 – P(A) = 0.5
(e) A ∩ B = {b}, P(A ∩ B) = 0.25
(f) A U B = {a,b,c,d}, P(A U B) = 1.0
(g) A ∩ C = ∅, P(A ∩ C) = 0

13
Venn diagrams and event relations

• In a Venn diagram, a
rectangle represents the
sample space and circles (or
similar) drawn inside the
rectangle represent events.

• Here are some examples of


event relations represented
on a Venn diagram:

14
Venn diagrams and event relations

— For a sample space with three events, the Venn diagram contains eight distinct
regions. In the diagram below, these are labelled as a, b, c, d, e, f, g, and i.

D ∩ H = regions g and f
T ∩ H = regions g and e
D ∪ T = regions a, d, e, g, b, f
H ) ∩ D = regions b and d
D ∩ H ∩ T = region g

15
Worked Example 2: Venn diagrams and
event relations
Four puppy dogs from different litters
are available for a new method of
training. The dogs are labelled from
1-4, as shown in the table:

Two dogs will be selected by lottery (i.e., at random) to receive the training.
Considering all possible choices:
(a) Make a Venn diagram showing the following events:
A: The selected dogs are of the same sex.
B: The selected dogs are of the same age.
(b) Find (i) A ∪ B , (ii) A ∩ B and (iii) 𝐴!
Worked Example 2: Venn diagrams and
event relations
Solution:
The elementary outcomes are the possible choices of a pair of dogs, as follows:
e1 = {1,2}, e2 = {1,3}, e3 = {1,4}, e4 = {2,3}, e5 = {2,4}, e6 = {3,4}

(a) A = {e1,e6} The Venn diagram can be constructed as follows:

B = {e2, e3, e6}

(b) (i) A ∪ B = {e1 ,e2, e3, e6}


(ii) A ∩ B = {e6}
(iii) 𝐴) = {e2 , e3, e4, e5}
Worked Example 3: Venn diagrams and
probability
Pick a number between 1 and 12 at random. Define events A and B such that:
A: the chosen number is a factor of 20
B: the chosen number is a multiple of 3.

(a) Draw a Venn diagram representing the possible outcomes.


(b) What is the probability that the number chosen is a factor of 20?
(c) What is the probability that the number chosen is neither a factor of 20 nor a
multiple of 3?
Worked Example 3: Venn diagrams and
probability
Solution: The corresponding Venn
(a) S = {1,2,3,…,12} diagram is:
A = {1,2,4,5,10}
A
B = {3,6,9,12} B

& ' *
(b) 𝑃 𝐴 = & (
= +,

(c) 𝑆 − 𝐴 ∪ 𝐵 = 𝐴 ∪ 𝐵 ) = 7,8,11
)
3 1
∴𝑃 𝐴∪𝐵 = =
12 4
Mutually exclusive (disjoint) events

• In Worked Example 3, events A and B are known as mutually exclusive (or


disjoint), as they share no common outcomes.
• In terms of notation,
𝐴 ∩ 𝐵 = Ø

20
Addition rule of probability

— For any two events A and B, the probability of union is given by:

𝑃 𝐴∪𝐵 =𝑃 𝐴 +𝑃 𝐵 −𝑃 𝐴∩𝐵

— This is known as the addition rule of probability.

— If A and B are mutually exclusive, then 𝑃 𝐴 ∩ 𝐵 = 0

∴𝑃 𝐴∪𝐵 =𝑃 𝐴 +𝑃 𝐵
21
Worked Example 5: addition rule

In Worked Example 2, what is the probability that the selected puppies are either
of the same sex or the same age (or both)?

Solution:
A = [Same sex] = {e1, e6} à P(A) = 2/6
B = [Same age] = {e2, e3, e6} à P(B) = 3/6
A ∩ B = {e6} à P(A ∩ B) = 1/6

∴𝑃 𝐴∪𝐵 =𝑃 𝐴 +𝑃 𝐵 −𝑃 𝐴∩𝐵
! # $ % !
="+"−"="=#
Other rules for event relations

Commutative law (event order is DeMorgan’s law:


unimportant): — (𝐴 ∪ 𝐵)′ = 𝐴¢ ∩ 𝐵¢ à “The
— 𝐴 ∩ 𝐵 = 𝐵 ∩ 𝐴 and 𝐴 ∪ 𝐵 = 𝐵 ∪ 𝐴 complement of the union is the
intersection of the complements.”
Distributive law (like in algebra): — (𝐴 ∩ 𝐵)′ = 𝐴¢ ∪ 𝐵¢ à “The
— (𝐴 ∪ 𝐵) ∩ 𝐶 = (𝐴 ∩ 𝐶) ∪ (𝐵 ∩ 𝐶) complement of the intersection is
— (𝐴 ∩ 𝐵) ∪ 𝐶 = (𝐴 ∪ 𝐶) ∩ (𝐵 ∪ 𝐶) the union of the complements.”

Associative law (like in algebra): Complement law:


— (𝐴 ∪ 𝐵) ∪ 𝐶 = 𝐴 ∪ (𝐵 ∪ 𝐶) — (𝐴¢)¢ = 𝐴
— (𝐴 ∩ 𝐵) ∩ 𝐶 = 𝐴 ∩ (𝐵 ∩ 𝐶)

23
Class Exercise 2: event relations

Three coins are tossed simultaneously.


• P is the event of getting at least 2 heads
• Q is the event of getting no heads
• R is the event of getting heads on the second coin

(a) List the elementary outcomes (e1, e2, …) of tossing three coins.
(b) Define the sample space of each event and state which pairs of events are
mutually exclusive.

24
Topic 3: conditional
probability

25
Conditional probability
— So far, we have looked at events that were independent, such as tossing
coins; in other words, the outcome of one event does not affect the
outcome of the other.

— Sometimes, however, the outcome of one event depends on another


event. To reflect this, we define conditional probability, 𝑃(𝐵|𝐴), as the
probability of event B occurring, given that event A has already occurred.

— 𝑃(𝐵|𝐴) is defined as the fraction of probability A that intersects with B:

𝑃 𝐴∩𝐵
𝑃 𝐵|𝐴 =
𝑃(𝐴)

26
Worked Example 4: conditional probability
Complementary alternative medicine (CAM), including acupuncture, yoga, and
massage has become more popular. The table shows the proportion of people in
various weight categories who used CAM in the past year:

.38

(a) What is the probability that a person selected at random from this population will
have used CAM in the past year?
(b) A person selected at random is found to be overweight. What is the probability
that this person used CAM in the past year?
Worked Example 4: conditional probability

Solution:
A = a person used CAM
B = a person is overweight
(a) As 32% of the people used CAM and the individual was selected at random, the
unconditional probability of A, P(A) = 0.38.
(b) Given that the selected person is overweight, the third column shows that for the
subgroup of overweight persons, the proportion using CAM is 0.12 while the total
proportion is 0.33. Therefore, the conditional probability that the person used CAM given
that that they are overweight is
𝑃 𝐴∩𝐵 0.12
𝑃 𝐴|𝐵 = = = 0.316
𝑃(𝐵) 0.38
Worked Example 5: conditional probability
Of a sample of 400 machine parts, the table shows the number of parts that are
defective (D) and how many of these have surface flaws (F):
Parts Classified
Surface Flaws
Defective Total
Yes (F ) No (F' )
Yes (D ) 10 18 28
No (D' ) 30 342 372
Total 40 360 400

Based on these data, find the following conditional probabilities:


(a) 𝑃 𝐷|𝐹 , (b) 𝑃 𝐷′|𝐹 , (c) 𝑃 𝐷|𝐹′ , and (d) 𝑃 𝐷′|𝐹′ .

29
Worked Example 5: conditional probability
Solution:
Parts Classified
Surface Flaws 28 40
Defective Total 𝑃 𝐷 = 𝑃 𝐹 =
Yes (F ) No (F' ) 400 400
Yes (D ) 10 18 28
No (D' ) 30 342 372
Total 40 360 400

105 𝑃 𝐷 ∩ 𝐹′ 185
𝑃 𝐷∩𝐹 400 10 𝑃 𝐷|𝐹′ = = 400 = 18
𝑃 𝐷|𝐹 = = = 𝑃(𝐹′) 3605 360
𝑃(𝐹) 405 40 400
400

𝑃 𝐷′ ∩ 𝐹′ 3425
𝑃 𝐷′ ∩ 𝐹 305
400 30 𝑃 𝐷′|𝐹′ = = 400 = 342
𝑃 𝐷′|𝐹 = = = 𝑃(𝐹′) 3605 360
𝑃(𝐹) 405 40 400
400

30
Multiplication rule of probability

— The multiplication rule is a generalization of the definition of conditional


probability.

— It states that the probability of two events occurring is equal to the conditional
probability of an event multiplied by the probability of the conditioning event.

— In symbols:
𝑃 𝐴∩𝐵 = 𝑃 𝐴|𝐵 𝑃 𝐵
𝑃 𝐴∩𝐵 = 𝑃 𝐵|𝐴 𝑃 𝐴

31
Class Exercise 3: event relations

The following probabilities apply to two events, A and B:


1 1 3
𝑃 𝐴 = , 𝑃 𝐵 = , 𝑃 𝐴𝐵 =
2 4 4
(a) Calculate the following probabilities (you must state the relevant probability
law/equation used to calculate each):
i. 𝑃(𝐴> ),
ii. 𝑃(𝐴 ∩ 𝐵)
iii. 𝑃(𝐴 ∪ 𝐵)

(b) Construct a Venn diagram of these events. Hence, shade the area 𝑃(𝐴> ∩ 𝐵) on the
diagram and calculate its value.
32
Worked Example 6: multiplication rule

The probability that a part made in the first stage of a machining operation meets
specifications is 0.90. The probability that it meets specifications in the second
stage, given that it met specifications in the first stage is 0.95. What is the
probability that both stages meet specifications?

Solution:

Let A and B denote the events that the part has met 1st and 2nd stage
specifications, respectively. Hence,

𝑃(𝐴 ∩ 𝐵) = 𝑃(𝐵 | 𝐴) · 𝑃(𝐴) = (0.95)(0.90) = 0.855

33
Event independence
— Let us revisit the concept of independence. Two events A and B are said to be
independent if any one of the following equivalent statements is true:
1. 𝑃(𝐴 | 𝐵) = 𝑃(𝐴)
2. 𝑃(𝐵 | 𝐴) = 𝑃(𝐵)
3. 𝑃(𝐴 ∩ 𝐵) = P(𝐴) · P(𝐵)

— This means that occurrence of one event has no impact on the probability of
occurrence of the other event.

— Multiple events E1, E2, … , Ek are independent if and only if, for any subset of these
events:
𝑃(𝐸1 ∩ 𝐸2 ∩ … ∩ 𝐸𝑘) = 𝑃(𝐸1) · 𝑃(𝐸2) · ⋯ · 𝑃(𝐸𝑘)

34
Worked Example 7: event independence

Tables 1 and 2 are examples of 400 machine parts classified by whether they have surface
flaws (F) and/or are defective (D).

For each set of data, determine whether the two events are independent.

Table 1 Table 2
Surface Flaws Surface Flaws
Defective Yes (F) No (F') Total Defective Yes (F) No (F') Total
Yes (D) 10 18 28 Yes (D) 2 18 20
No (D') 30 342 372 No (D') 38 342 380
Total 40 360 400 Total 40 360 400

35
Worked Example 7: event independence

Solution:
Table 1 Table 2
Surface Flaws Surface Flaws
Defective Yes (F) No (F') Total Defective Yes (F) No (F') Total
Yes (D) 10 18 28 Yes (D) 2 18 20
No (D') 30 342 372 No (D') 38 342 380
Total 40 360 400 Total 40 360 400

For Table 1, For Table 2,


P(D|F) = 10/40 = 0.25 P(D|F) = 2/40 = 0.05
P(D) = 28/400 = 0.10 P(D) = 20/400 = 0.05
P(D|F) ≠ P(D) P(D|F) = P(D)

Therefore, events D and Therefore, events D and


F are dependent. F are independent.

36
Class Exercise 4: event independence

For a given chip manufacturer, the probability that a silicon wafer contains a
large contaminant particle is 0.01, and the wafers are assumed to be
independent (i.e., the probability that a wafer is contaminated does not depend
on the characteristics of any of the other wafers). If 15 random wafers are
analyzed, what is the probability that no large particles are found?

37
Counting possible outcomes

— In probability, we often need to count the number of possible outcomes. Often,


the number of possibilities follows the form 𝑛 × (𝑛 − 1) × (𝑛 − 2) … × 1.

— This type of expression is defined as n factorial, i.e.

— Two ways of counting the number of possibilities when selecting objects from a
larger group are combinations and permutations.

39
Combinations

— The number of distinct subsets that can be formed taking r objects at a time from
a set of n different objects (when order does not matter) is known as the number
of combinations, denoted as
# 𝑛! 𝑛
𝐶$ = =
𝑟! 𝑛 − 𝑟 ! 𝑟

— For example, the number of possible combinations of 3 objects taken from a set
of 5 objects is

5 5! 5 (4) 3 2 (1)
= = = 10
3 3! 5 − 3 ! 3 2 1 2 (1)
40
Worked Example 8: combinations
Five qualified individuals (two men and three women) wish to apply for two engineering job
positions in Pertamina. If the positions are filled by randomly selecting two of the five
applicants, what is the probability that neither of the men is selected?

Solution:
The number of ways two persons can be selected out of five is given by
5 5! 5 (4)
= = = 10
2 2! 5 − 2 ! 2 (1)

3
The number of possible pairs of women are =3
2
3
Let A be the event that both selected persons are women. 𝑃 𝐴 =
10
Permutations

— The number of subsets that can be formed taking r objects at a time from a
set of n different objects (where order is important) is known as the number
of permutations, denoted as

- 𝑛!
𝑃. =
𝑛−𝑟 !

— For example, the number of possible permutations of 3 objects taken from a


set of 5 objects is

* 5!
𝑃A = = 5(4)(3) = 60
5−3 !

42
Worked Example 9: permutations
A scrabble player gets the tiles RWODIAL for his next turn. According to the TWL dictionary, there are
15 valid two-letter words he could make. What is the probability that he will get one of these words if
he picks two letters at random?

Solution:
The number of possible two-letter words
(with or without meaning) are

' 7!
𝑃( = = 7(6) = 42
7−2 !

Let A be the event that the selected letters


result in a valid word.
15
𝑃 𝐴 = = 0.357
42
Class Exercise 5: counting outcomes

How many numbers greater than 5000 may be formed by using some
combination of the digits 3, 4, 5, 6, and 7 (but only those), without
repetition?

44
Topic 4: probability
distributions

45
Random variables

— A random variable is a function that assigns a real number to each outcome


in the sample space of a random experiment.

— For example, when tossing two coins, you could define a random variable X
as the number of heads obtained. Hence, the outcomes TT, HT, TH, and HH
take values of 0,1,1, and 2, respectively. The set of possible values of X
(also known as the range of X or RX) is {0,1,2}.

— Random variables can be either discrete or continuous. In this lecture, we


will look at discrete random variables.
Worked Example 10: discrete random
variable
Let X be the random variable corresponding to the number of heads obtained in
three tosses of a coin. List the numerical values of X and the corresponding
elementary outcomes.

Solution: Outcome Value of X


Numerical value of X Composition of the event
HHH 3 as an event
HHT 2
[X = 0] = { TTT }
HTH 2
[X = 1] = { HTT, THT, TTH }
HTT 1 [X = 2] = { HHT, HTH, THH }
THH 2 [X = 3] = { HHH }
THT 1
TTH 1
TTT 0
Probability distributions
— The probability distribution of a random variable X gives the probability for each value of
X. For a discrete random variable, the distribution can be specified by a list of the
possible values along with the probability of each.

— In general, the probability distribution of a discrete random variable X is described by its


probability mass function, which is defined as:

𝑓 𝑥% = 𝑃 𝑋 = 𝑥%

Note that:
1. 0 ≤ 𝑓 𝑥" ≤ 1
2. ∑%"#$ 𝑓 𝑥" = 1

48
Probability distributions

For example, if a fair coin is tossed three times, with X = number of heads, the
probability distribution of X is as follows:
𝒙𝒊
HHH 1/8 3 0.4
P(x = 0) = 1/8
HHT 1/8 2 P(x = 1) = 3/8 0.3
2 P(x = 2) = 3/8
HTH 1/8

P(X = xi)
P(x = 3) = 1/8 0.2
THH 1/8 2
0.1
HTT 1/8 1
Note: 0
THT 1/8 1 1 3 3 1
+ + + =1 0 1 2 3
TTH 1/8 1 8 8 8 8
xi
TTT 1/8 0
Cumulative distribution function

— The cumulative distribution function is the probability that a random


variable X will have a value less than or equal to x, i.e.

𝐹(𝑥) = 𝑃 𝑋 ≤ 𝑥 = - 𝑓 𝑥%
C! DC

— For a discrete random variable X, F(x) also satisfies the following


properties:

50
Cumulative distribution function

— For the previous coin tossing example, the cumulative


distribution function is as follows:
1.2
𝑥𝑖 𝑃(𝑋 = 𝑥𝑖) 𝐹(𝑥𝑖)
1

0 0.125 0.125 0.8

𝐹(𝑥𝑖)
0.6
1 0.375 0.5
0.4
2 0.375 0.875 0.2

3 0.125 1 0
0 1 2 3
𝑥𝑖

51
Class Activity: random variables
Let X be a random variable corresponding to the sum of the numbers obtained from rolling
two fair dice, e.g.

+ = 7

Activity: Let each person in the class roll two dice (e.g. using freeonlinedice.com) and
record the frequency of the value of x obtained. What does the frequency distribution look
like?

If the experiment was repeated a very large number (say 1000) times, what would you
expect the frequency distribution to look like?

52
Problem Set 3

53
Question 1

The sets A, B, and C are defined as follows:


A = {2, 4, 6, 8, 10, 12}
B = {3, 6, 9, 12, 15}
C = {1, 4, 7, 10, 13, 16}
(a) Draw a Venn diagram of the sample space S containing the numbers from
1–16 and show sets A, B, and C on the diagram.
(b) Find: (i) A ∪ B (ii) A ∩ B (iii) B ∩ A (iv) B ∪ A (v) B ∪ C
(c) (i) Is A ∪ B = B ∪ A? (ii) Is B ∩ C = B ∪ C?

54
Question 2

A silicon wafer is randomly selected from a batch that is classified by


contamination and location.

Location of Tool
Contamination Total
Center Edge
Low 514 68 582
High 112 246 358
Total 626 314 940

(a) What is the probability that the wafer has low contamination, given that it is
located at the center of the sputtering tool?
(b) Draw a Venn diagram of the information in the table.

55
Question 3

A chamber of commerce board has seven total members, drawn from a pool of
twenty candidates. There are two stages in the board's election process. First, a
president, secretary, and treasurer are chosen. After that, four general members
(without any specific title) are chosen. How many possible boards could be
chosen?

56
Questions 4, 5

5
Question 6
Question 7

Consider the following probability distribution:

x P (X =x ) (a) Draw a bar graph of the


0 0.6561 probability mass function.
1 0.2916 (b) Draw a line graph of the
2 0.0486 cumulative distribution
3 0.0036 function.
4 0.0001
(c) Find P(X ≤ 3)
1.0000

59

You might also like