0% found this document useful (0 votes)
18 views46 pages

Week 2 Slides

Uploaded by

berkeunver2
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)
18 views46 pages

Week 2 Slides

Uploaded by

berkeunver2
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/ 46

Sets: Some review w-2

• To present the basic concepts of probability, we should review our


knowledge on sets
• A set is a collection of objects, usually denoted by capitals such as A,
B, C, etc.
• The members of a set are called the elements of the set, and are
usually determined as given or by the researcher in the form of a rule
• When x is an element of set A, we denote it as x Є A otherwise x A
Example:
If set A is defined as A= {1,3,5,7,9} then 1 Є A but 4 A
Sets: Some review
• Defining the set is exteremely important to form the relevant sample space
and hence to calculate the probabilitiy of any event
Example:
If set A involves all real numbers between 0 and 1 inclusive we denote
the rule as:
A={x: x Є R, 0 ≤ x ≤ 1}

• Sets can be formed from single elements, pairs or multiple elements


according to problem at hand
Example:
Any line in two dimensional space can be formed as:
A={(x,y): x,y Є R, ax + by = c}
Sets: Some review
Definitions:
• A set is any well-defined collection of objects, each of which is called a
member or an element of the set. The notation x ∈ A means that the
object x is a member of the set A. The notation x A means that x is not
a member of A
• A roster for a finite set specifies the membership of a set S as a list of
its elements within braces, i.e., in the form S = {a1, . . . , an}. Order of
the list is irrelevant, as is the number of occurrences of an object in the
list
• A defining predicate specifies a set in the form S = { x | P(x) }, where
P(x) is a predicate containing the free variable x. This means that S is
the set of all objects x (in whatever domain is under discussion) such
that P(x) is true
Sets: Some review
Definitions:
• A recursive description of a set S gives a roster B of basic objects
of S and a set of operations for constructing additional objects of
S from objects already known to be in S. That is, any object that
can be constructed by a finite sequence of applications of the
given operations to objects in B is also a member of S. There may
also be a list of axioms that specify when two sequences of
operations yield the same result
• The set with no elements is called the null set or the empty set,
denoted ∅ or { }
• A singleton is a set with one element
Sets (continued)
Definitions:
• Sets A and B are equal, written A = B, if they have exactly the same elements:
A = B ⇔ (∀x) (x ∈ A) (x ∈ B)

• Set B is a subset of set A, written B ⊆ A or A ⊇ B, if each element of B is an element


of A:
B ⊆ A ⇔ (∀x) (x ∈ B) → (x ∈ A)

• Set B is a proper subset of A if B is a subset of A and A contains at least one element


not in B
• A set is finite if it is either empty or else can be put in a one-to-one correspondence
with the set {1, 2, 3, . . . , n} for some positive integer n
• A set is infinite if it is not finite
• The cardinality |S| of a finite set S is the number of elements in S, denoted by n(S)
Set Operations
Definitions:
• The intersection of sets A and B is the set A ∩ B = { x | (x ∈ A) ∧ (x ∈ B) }. More
generally, the intersection of any family of sets is the set of objects that are
members of every set in the family. The notation

∩i∈I Ai = { x | x ∈ Ai for all i ∈ I }


is used for the intersection of the family of sets Ai indexed by the set I
• Two sets A and B are disjoint if A ∩ B = ∅
• A collection of sets { ai | i ∈ I } is disjoint if

∩i∈I Ai = ∅
• A collection of sets is pairwise disjoint (or mutually disjoint) if every pair of
sets in the collection are disjoint
Set Operations
Definitions:
• The union of sets A and B is the set A ∪ B = { x | (x ∈ A) ∨ (x ∈ B) }. More
generally, the union of a family of sets is the set of objects that are members
of at least one set in the family. The notation
∪i∈I Ai = { x | x ∈ Ai for some i ∈ I }
is used for the union of the family of sets Ai indexed by the set I
• A partition of a set S is a pairwise disjoint family P = {Ai} of nonempty subsets
whose union is S
Set Operations (cont.)
Definitions:
• The complement of the set A is the set A = U − A = { x | x A}
containing every object not in A, where the context provides that
the objects range over some specific universal domain U. (The
notation A or Ac is sometimes used instead of A)
• The set difference is the set A − B = { x | (x ∈ A) ∧ (x B) }. The set
difference is sometimes written A \ B
• The symmetric difference of A and B is the set A ⊕ B = { x | (x ∈ A
− B) ∨ (x ∈ B − A) }. This is sometimes written A ∆ B
Set Operations (cont.)
Definitions:
• The Cartesian product A×B of two sets A and B is the set { (a, b) |
(a ∈ A) ∧ (b ∈ B) }, which contains all ordered pairs whose first
coordinate is from A and whose second coordinate is from B
• The power set of A is the set P(A) of all subsets of A. The
alternative notation 2A for P(A) emphasizes the fact that the power
set has 2n elements if A has n elements
• A Venn diagram is a family of n simple closed curves (typically
circles or ellipses) arranged in the plane so that all possible
intersections of the interiors are nonempty and connected
Venn Diagram

A B
Venn Diagram
Set Operations (cont.)
Random experiment and Sample Space
Definitions:
• An experiment that can result in different outcomes, even though
it is repeated in the same manner every time, is called a Random
Experiment.
• Tossing a coin or Rolling a dice are random experiments that we
know every possible outcome but do not know the result of the
experiment, whether Head or Tail, or number on the dice
• For any experiment the Sample Space is the set of all possible
outcomes of the experiment (usually denoted by S)
Random experiment and Sample Space
Examples:
• If we toss a coin once we know that it will be Head (H) or Tail(T). There is
no other alternative, ie all possible outcomes. Our sample space S will
be S={H, T}
• Similarly rolling a dice will result a number in 1-6, there is no other
alternative. So the set of all possible outcomes in Rolling a dice is
S={1,2,3,4,5,6}.
• Think about tossing two coins, what would be our S in that case?
• Similarly roll two dice at the same time, what would be S?
• If there are more than one event (simultaneous occurance) it is
practical to list all possible outcomes with a Tree Diagram
Sample Space – Tree Diagrams
Example:
• Tossing two coins, what would be our S in that case?

Coin 1 Coin 2 Sample Space


H (H,H)
H T (H,T)

T H (T,H)
T (T,T)
Sample Space – Tree Diagrams
Example:
• Roll two dice at the same time, what would be S?
Dice 1
1 2 3 4 5 6

Dice 2 123456 123456 123456


123456 123456 123456
S=
{(1,1),(1,2),(1,3),…,(2,1),(2,2),…,(3,1),(3,2),…..,(6,1),(6,2),…,(6,6)}
Sample Space – Tree Diagrams
Example:
• An automobile manufacturer provides vehicles equipped with selected
options. Each vehicle is ordered
• With or without an automatic transmission
• With or without air conditioning
• With one of three choices of a stereo system
• With one of four exterior colors
How many alternatives we can have to select a car?
In other words what is our Sample Space S?

Try to Show by a Tree Diagram…


All possible combinations, ie. Sample Space by a Tree Diagram
Discrete or Continuous Sample Space
Definition:
• A sample space is discrete if it consists of a finite or countable
infinite set of outcomes.
• A sample space is continuous if it contains an interval (either
finite or infinite) of real numbers.

• Rolling a dice discrete or continuous?


• Generating a random number x such that 0 ≤ x ≤ 1 , discrete or
continuous?
Probability of an event
Definition:
• An event is a subset of the sample space of a random experiment.
And the probability of an event E is defined as

𝒏𝒖𝒎𝒃𝒆𝒓 𝒐𝒇 𝒐𝒖𝒕𝒄𝒐𝒎𝒆𝒔 𝒊𝒏𝒗𝒐𝒍𝒗𝒊𝒏𝒈 𝑬𝒗𝒆𝒏𝒕 𝑬


P(E)=
𝒕𝒐𝒕𝒂𝒍 𝒏𝒖𝒎𝒃𝒆𝒓 𝒐𝒇 𝒐𝒖𝒕𝒄𝒐𝒎𝒆𝒔 𝒊𝒏 𝑺𝒂𝒎𝒑𝒍𝒆 𝑺𝒑𝒂𝒄𝒆
Probability of an event
Examples:
• Tossing a coin twice will give S={(H,H), (H,T), (T,H), (T,T)}. Let our event E
be the two heads, (H,H). Only one element in S satisfies this, so the
numerator of the ratio = 1. what about the denominator, it is the total
number of outcomes in S, which is 4. Hence by definition P(E)=1/4.
• In rolling a dice twice example suppose we are interested in the event E
that sum of two numbers shown on top is odd. What is P(E)=?
S={(1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (2,1), (2,2),…………,(6,6)} n(S)=36
E={(1,2),(1,4),(1,6),(2,1),(2,3),(2,5),(3,2),(3,4),(3,6),(4,1),(4,3),(4,5),(5,2),
(5,4),(5,6),(6,1),(6,3),(6,5)} n(E)=18
And P(E)= 18/36 = 1/2
Probability of an event
Example:
• Assume our experiment is Tossing a coin and Rolling a dice at the
same time?
• What is the sample space?
• Howmany different combinations are there?
• What is the probability that the coin will be H whatever the number on the
dice?
• What is the probability that the coin is T and number on the dice is even?
• 10 mins class excercise
Probability of an event
Example:
• Assume our experiment is Tossing a coin and Rolling a dice at the
same time?
• S = {(H,1),(H,2),(H,3),(H,4),(H,5),(H,6),(T,1),(T,2),(T,3),(T,4),(T,5),(T,6)}
• n(S) = 12, that is the number of elements in S
• E1 = the coin is H, n(E1) =6, then the probability P(E1) = 6/12 = 1 / 2
• E2 = the coin is T and the number on the dice is even
• Lets write E2 = {(T,2),(T,4),(T,6)}
• n(E2) = 3, P(E2) = n(E2) / n(S) = 3 / 12 = 1 /4
Probability of an event
• The union of two events is the event that consists of all outcomes
that are contained in either of the two events. We denote the
union as E1 ∪ E2 .
• The intersection of two events is the event that consists of all
outcomes that are contained in both of the two events. We denote
the intersection as E1 ∩ E2 .
• The complement of an event in a sample space is the set of
outcomes in the sample space that are not in the event. We
denote the complement of the event E as E’. The Ec notation is
also used in other literature to denote the complement .
Probability of an event
Example:
Measurements of the thickness of a plastic connector might be modeled
with the sample space S = R+, the set of positive real numbers.
Let E1 ={x: 10 ≤ x < 12 } and E2={x: 11 < x < 15 } then

E1 ∪ E2 = {x: 10 ≤ x < 15}


E1 ∩ E2 = {x: 11 < x < 12}
E1’ = E1c = {x: x<10 or x ≥ 12}

E1’ ∩ E2 = ={x: 12 ≤ x < 15 }


Mutually Exclusive Events
Definition:
• Two events, denoted as E1 and E2, such that E1 ∩ E2 = ∅ are said
to be mutually exclusive.

• A∩B=∅
Events
Probability of an event
Example:
The following table summarizes visits to emergency departments at four hospitals in
Arizona. People may leave without being seen by a physician, and those visits are
denoted as LWBS. The remaining visits are serviced at the emergency department,
and the visitor may or may not be admitted for a stay in the hospital. Let A denote the
event that a visit is to Hospital 1 and let B denote the event that the result of the visit is
LWBS. Calculate the number of outcomes in A ∩ B , A’, and A ∪ B.

Hospital 1 2 3 4 Total
Total 5292 6991 5640 4329 22,252
LWBS 195 270 246 242 953
Admitted 1277 1558 666 984 4485
Not admitted 3820 5163 4728 3103 16,814 10 mins
Probability of an event
Solution:
• The event A ∩ B consists of the 195 visits to Hospital 1 that result in
LWBS.
• The event A’ consists of the visits to Hospitals 2, 3, and 4 and contains
6991 + 5640 + 4329 = 16,690 visits.
• The event A ∪ B consists of the visits to Hospital 1 or the visits that
result in LWBS, or both, and contains 5292 + 270 + 246 + 242 = 6050
visits.
• Notice that the last result can also be calculated as the number of
visits in A plus the number of visits in B minus the number of visits in A
∩ B (that would otherwise be counted twice) 5292 + 953 - 195 = 6050
Finding sample space S
• In many of the previous examples, it is easy to determine the
number of outcomes in each event.
• In more complicated examples, determining the outcomes that
comprise the sample space (or an event) becomes more difficult.
• Instead, the counts of the numbers of outcomes in the sample
space and various events are used to analyze the random
experiments.
• These methods are referred to as counting techniques. Some
simple rules can be used to simplify the calculations. Let’s see
them;
Counting
• Remember the example of tossing a coin and Rolling a dice. What
is the number of elements in S. It was 2x6 = 12.
• Or Rolling two dices, n(S) = 6x6 = 36
• Both were independent events, meaning the occurence of one
does not effect the occurence of other
• This leads to a definition that ease the calculation of number of
possible outcomes for independent events
• If two events are independent from each other the combination of
these two is just simply multiplication of individual possibilities
• Or more formally;
Counting: Multiplication Rule
Definition:
• Assume an operation can be described as a sequence of k steps,
and the number of ways of completing step 1 is n1, and the
number of ways of completing step 2 is n2 for each way of
completing step 1, and the number of ways of completing step 3 is
n3 for each way of completing step 2, and so forth.
• The total number of ways of completing the operation is
n1 x n2 x ………….. x nk
Counting: Multiplication Rule
Example:
• Remember the car manifacturer example that we draw a tree
diagram to list all possible outcomes. There were
• With or without an automatic transmission (2 alternatives)
• With or without air conditioning (2 alternatives)
• With one of three choices of a stereo system (3 alternatives)
• With one of four exterior colors (4 alternatives)
Since all these properties are independent of each other we can
simply calculate the number of all possible alternatives without
listing them explicitly, n(S) = 2 x 2 x 3 x 4 = 48
Counting: Permutations
• Another useful calculation is the number of ordered sequences of
the elements of a set. Consider a set of elements, such as S {a, b,
c}.
• A permutation of the elements is an ordered sequence of the
elements. For example, abc, acb, bac, bca, cab, and cba are all of
the permutations of the elements of S.
• This leads to a more formal definition of permutations
Counting: Permutations
Definition:
• The number of permutations of n different elements is n! where

n! = n x (n-1) x (n-2) x (n-3) x ……….x 1

• This result follows from the multiplication rule.


• A permutation can be constructed by selecting the element to be placed in
the first position of the sequence from the n elements, then selecting the
element for the second position from the n - 1 remaining elements, then
selecting the element for the third position from the remaining n - 2 elements,
and so forth.
• Permutations such as these are sometimes referred to as linear
permutations.
Counting: Permutations
Example:
• Suppose you have 4 digits 1,4,5,9 and want to calculate number of all different four digit numbers
formed from these. Howmany numbers you can write?
• Since you have 4 digits and want to create 4 digit numbers you just calculate number of different
ordering of these digits
• You have four digits and and can form 4!=24 different numbers
• Try to list them..
• Or think other way
-- -- -- --
- 4 alternatives for digit 1
- 3 alternatives for digit 2, because you already used 1 digit
- 2 alternatives for digit 3, because you already used 2 digits
- 1 alternative for digit 4, others used already
That is 4x3x2x1 = 4x(4-1)x(4-2)x(4-3) = nx(n-1)x(n-2)x… with multiplication rule
Counting: Permutations of Subsets
• In some situations, we are interested in the number of arrangements of
only some of the elements of a set. The following result also follows
from the multiplication rule.

• Permutations of Subsets: The number of permutations of subsets of r


elements selected from a set of n different elements is

𝑛!
𝑃𝑟 = n x (n-1) x (n-2) x ….. x (n-r+1) =
𝑛
𝑛−𝑟 !

• Think about the previous problem this time form 2 digit numbers from 4
digits?
Counting: Permutations of Subsets
Example:
• A printed circuit board has eight different locations in which a
component can be placed. If four different components are to be
placed on the board, how many different designs are possible?

• Each design consists of selecting a location from the eight locations for
the first component, a location from the remaining seven for the
second component, a location from the remaining six for the third
component, and a location from the remaining five for the fourth
component. Therefore,
8 8!
𝑃4 = 8 x 7 x 6 x 5 = = 1680 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑡 𝑑𝑒𝑠𝑖𝑔𝑛 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒
8−4 !
Counting: Permutations of similar objects
• Sometimes we are interested in counting the number of ordered
sequences for objects that are not all different. The following
result is a useful, general calculation.

• Permutations of similar objects: The number of permutations of


objects of which n1 are of one type, n2 are of a second type,….,
and nr

𝑛!
𝑛1!𝑛2!𝑛3!𝑛4!..𝑛𝑟!
Counting: Permutations of similar objects
Example:
• A part is labeled by printing with four thick lines, three medium
lines, and two thin lines. If each ordering of the nine lines
represents a different label, how many different labels can be
generated by using this scheme?

9!
By the above definition it is = 1260 different labels
4!3!2!
Counting: Permutations of similar objects
Example:
• Consider a machining operation in which a piece of sheet metal
needs two identical-diameter holes drilled and two identical-size
notches cut. We denote a drilling operation as d and a notching
operation as n. In determining a schedule for a machine shop, we
might be interested in the number of different possible sequences
of the four operations. The number of possible sequences for two
drilling operations and two notching operations is
4!
=6
2!2!
We can list them as ddnn, dndn, dnnd, nddn, ndnd, nndd.
Counting: Combinations w-3
• Another counting problem of interest is the number of subsets of r
elements that can be selected from a set of n elements. Here,
order is not important. These are called combinations.
• Combinations: The number of combinations, subsets of size r
𝑛
that can be selected from a set of n elements, is denoted ( )as or
𝑟
𝐶𝑟 and
𝑛

𝑛
𝐶𝑟𝑛 = ( ) =
𝑛!
𝑟 𝑟! 𝑛−𝑟 !
Counting: Combinations
Example:
• A bin of 50 manufactured parts contains three defective parts and
47 nondefective parts. A sample of six parts is selected from the
50 parts without replacement. That is, each part can only be
selected once and the sample is a subset of the 50 parts. How
many different samples are there of size six that contain exactly
two defective parts?
Counting: Combinations
Solution:
• A subset containing exactly two defective parts can be formed by first
choosing the two defective parts from the three defective parts.
That is 𝐶23 = 3 different ways

• Then, the second step is to select the remaining four parts from the 47
acceptable parts in the bin. The second step can be completed in
𝐶447 = 178,365 different ways

• Therefore, from the multiplication rule, the number of subsets of size six that
contain exactly two defective items is 3 x 178,365 = 535,095
Counting: Combinations
Example:
• One more question, what is the probability that a sample contains
exactly two defective parts?

• We calculated the number of events that have exactly 2 defective parts that is
535,095.
• What was the probability? It was the ratio of events divided by sample space
• What is the size of the sample space in that case?
• It is just selecting 6 out of 50 that is 𝐶650 = 15,890,700
• So the probability that a selected sample will have exactly two defective parts
P(E)= n(E)/n(S) = 535,095 / 15,890,700 = 0.034
Assignment HW1
• Do excercise 2.16, 2.21, 2.34 and 2.46 of Chapter 2.1 in the Textbook
• Due Next Sunday at 23:00
• Send me via TEAMS (I will enter this as assignment, follow the assignments tab)
• Filename should be standart in the following format

HW#sStudent Id.doc

Red parts:
# represents the assignment number (1 for week one, 2 week two, etc)
Student Id is your THK Student id number (10 digits starting with the letter «s»; «s»+9 digits)

Example for week one the sample file name for student id: 123456789 would be
HW1s123456789.doc

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy