Probability: Basic Concepts - Gadjah Mada...
Transcript of Probability: Basic Concepts - Gadjah Mada...
+
Probability: Basic Concepts SUNU WIBIRAMA
Basic Probability and Statistics Department of Electrical Engineering and Information Technology Faculty of Engineering, Universitas Gadjah Mada
+Some important things:
1. Please read chapter 2 from Walpole’s book (page 31-75) to build your basic understanding of probability
2. We will have to make some notes and hand-computation today. So be prepared with a pencil and paper
3. Student that can solve the problem offered in this class today gets “positive mark”. It helps your final grade in case you don’t have sufficient grade to get B
4. One student can only answer once
+Today’s Dialogue
4.0. Counting Sample Points 4.1. Events 4.2. Probability of an Event 4.3. Conditional probability and independence 4.4. Rules for calculating probability
+Why PROBABILITY?
Statistics measures observed data to describe “inner-information” provided by the data
We also interested in presentation and interpretation of chance outcomes
Hence, we often deal with experiment: a process to generate a set of data
Can we know exactly what will be obtained through experiment? It’s difficult to get exact information of the result, but it’s possible to predict the result
That’s why we have to understand basic theory of probability
+Today’s Dialogue
4.0. Counting Sample Points 4.1. Events 4.2. Probability of an Event 4.3. Conditional probability and independence 4.4. Rules for calculating probability
+4.0 Counting Sample Points Set of all possible outcomes of a statistical experiment is called
the sample space (S).
Each outcome in sample space is called : element / member / sample points
Example 1: Coin S = { H, T } S : sample space when a coin is tossed once H : Head T : Tail
Example 2: DICE S1 = {1, 2, 3, 4, 5, 6} S2 = {even, odd}
S1 provides more information than S2 . Use sample space that provides most information of outcomes.
+4.0 Counting Sample Points
Types of sample points: Finite: you can list all members
Infinite: you should state in rule Example: if the possible outcomes of an experiment are the set of cities in the world with a population over 1 million
Counting sample points: Tree Diagram
Multiplication Rule
Permutation
Combination
S = {x | x is a city with population over 1 million}
+Tree Diagram
Example:
An experiment consists of flipping a coin and then flipping it a second time if head (H) occurs. If a tail (T) occurs on the first flip, then a dice is tossed once.
To list all possible sample points, we construct tree diagram. We see that the sample space is:
S = {HH, HT, T1, T2, T3, T4, T5, T6}
+Multiplication Rule
Should we list all sample points with tree diagram? No, if we have very large sample points
We can use multiplication rule: If an operation can be performed in n1 ways, and if for each of these, a second operation can be performed n2 ways, and so forth, then the sequence of k operations can be performed in (n1)(n2) ………(nk) ways.
Example 1: Compute a sample points if two dices are tossed together
Example 2: How many menus can be formed if you have 4 soup, 3 sandwiches, 5 desserts, and 4 drinks?
+Multiplication Rule
Example 3: 8 digits phone number in Yogyakarta consists of 0274 for 1st, 2nd , 3rd, and 4th numbers. How many phone number can be formed in Yogyakarta?
Example 4: Suppose in Yogyakarta, we have 8 digits car plate number with AB as the 1st and 2nd digits. 3rd – 6th digits are number. 7th and 8th digits are alphabet from A to Z. How many car plate can be produced in Yogyakarta?
+Permutation
Frequently, we are interested in a sample space that contains all possible orders or arrangements of a group of objects.
We will use permutation to generate sample points
A permutation is defined as an arrangement of all or part of a set of objects
General formula of permutations of n distinct objects taken r at a time is
nPr = P nr
⎡
⎣⎢
⎤
⎦⎥ =
n!n − r( )!
+Permutation
Example 1: How many arrangements can be formed from the characters A, B, and C?
Example 2: How many arrangements can be created if we choose 2 characters from four characters A, B, C, and D ?
Example 3: Two coupons are taken from 200 coupons to be nominated as 1st and 2nd winner. In how many ways we can arrange 1st and 2nd winner?
+Combination
In several cases, the order of arrangement is not so necessary to be considered.
We can use combination to compute sample points
The number of combinations of n distinct objects taken r at a time is
Obviously, combination result is less than permutation’s
nCr = C nr
⎡
⎣⎢
⎤
⎦⎥ =
n!r! n − r( )!
nCr ≤ nPr
+Combination
Example 1: Find the number of committees that can be formed consisting of 2 chemists and 1 physicist
Example 2: 10 blue balls is saved inside a box. If we grab 3 balls out of the box, find all possible ways to get those balls.
+Today’s Dialogue
4.0. Counting Sample Points 4.1. Events 4.2. Probability of an Event 4.3. Conditional probability and independence 4.4. Rules for calculating probability
+4.1 Events
In any given experiment, we may be interested in occurrence of certain events rather than in the outcome of a specific element in the sample space.
For instance, we are interested in the event A that the outcome when a die is tossed is divisible by 3. Then event A is : A = {3, 6} of the sample space S. We can call A is subset of S
An event is a subset of sample space.
An event may be a subset that include entire sample space of S, or a no element at all.
Event A is defined as null set if contains no element. For example: A is the event of detecting microscopic organism by the naked eye in biological experiment. Then
∅( )
A =∅
+4.1 Events
Field 1: complement The complement of an event A with respect to S is the set of all elements of S that are not in A. We denote the complement of A by the symbol A’
Field 2: intersection The intersection of two events A and B, denoted by the symbol , is the event containing all elements that are common to A and B. Sometime we can write directly as
Field 3: mutual exclusive Two events A and B are mutually exclusive or disjoint if that is if A and B have no elements in common
Field 4: union The union of the two events A and B, denoted by the symbol is the event containing all the elements that belong to A or B or both
A( )
ABA∩ B( )
A∩ B =∅
A∪ B
Geometric representation of event : Venn Diagram
Mutual exclusive Non-mutual exclusive
+4.1 Events
Example 1: complement Consider S = {A, B, C, D, E, F, G}. If event A = {A, C, E, G}, define A’ !
Example 2: intersection if M = {o, p , q, r, s, t} and N = {o, b, c, t}, define
Example 3: mutual exclusive A cable television company offers eight channels: ESPN, Fox, NHK, NBC, HBO, CNN, Discovery, and Cartoon Network. If A is a program that belongs to NHK and B belongs to HBO, are A and B mutually exclusive?
Example 4: union If A = {a, b, c} and B = {b, c, d, e} , define
M ∩ N
A∪ B
+Today’s Dialogue
4.0. Counting Sample Points 4.1. Events 4.2. Probability of an Event 4.3. Conditional probability and independence 4.4. Rules for calculating probability
+4.2 Probability of an Event The probability of an event A is the sum of the weights of all
sample points in A. Therefore:
Example: A coin is tossed twice. What is the probability that at least one head occurs?
Solution: Compute the sample space: S = {HH, HT, TH, TT} Define A = {HH, HT, TH}
0 ≤ P(A) ≤ 1, P(∅) = 0, and P(S) = 1
P(A) = 14+14+14=34
+
Example 1: A mixture of candies contains 6 mints, 4 toffees, and 3 chocolates. If a person makes a random selection of these candies, find the probability of getting: (a) a mint (b) a toffee or chocolate
Example 2: In a poker hand consisting of 5 cards, find the probability of holding 2 aces and 3 jacks
Example 3: Suppose we have 6 balls in the box, consist 3 red balls, 2 blue balls, 1 black balls. If we take randomly 2 balls from the box, compute probability that blue balls are taken.
4.2 Probability of an Event
+Today’s Dialogue
4.0. Counting Sample Points 4.1. Events 4.2. Probability of an Event 4.3. Conditional probability and independence 4.4. Rules for calculating probability
+4.3 Conditional probability and independence
The probability of an event A, given that an event B has occurred, is called the conditional probability of B given A and denoted by the symbol P(B|A)
Two events A and B are independent if and only if
Otherwise A and B are dependent
P(B | A) = P(A∩ B)P(A)
, if P(A) > 0
P(B | A) = P(B)P(A | B) = P(A)
+
Employed Unemployed Total
Male 460 40 500
Female 140 260 400
Total 600 300 900
4.3 Conditional probability and independence
Example 1: Sample space S is the population of adults in small town who have completed the requirements for a college degree. One of these individuals is to be selected at random for a tour throughout the country to publicize the advantages of establishing new industries in the town. We shall be concerned with the following events:
M : a man is chosen E: the one chosen is employed
Find P(M | E)!
+
Example 2: Consider the experiment of tossing a fair dice and define the following events: A = {Observe an even number of dots} B = {Observe a number of dots less or equal to 4} Are events A and B independent ?
4.3 Conditional probability and independence
+Today’s Dialogue
4.0. Counting Sample Points 4.1. Events 4.2. Probability of an Event 4.3. Conditional probability and independence 4.4. Rules for calculating probability
4.4 Rules for calculating probability
Rules & formula
Bayes’s Formula
Total probability
Multiplicative rule
Addition rule
+Addition rules If A and B are any two events, then
If A and B are mutually exclusive, then
If A1, A2, A3, ……….., An are mutually exclusive, then
If A1, A2, A3, ……….., An is a partition of a sample space S, then
For three events A, B, and C
P(A∪ B) = P(A) + P(B) − P(A∩ B)
P(A∪ B) = P(A) + P(B)
P(A1∪ A2 ∪ .....∪ An ) = P(A1) + P(A2 ) + ....+ P(An )
P(A1∪ A2 ∪ .....∪ An ) = P(A1) + P(A2 ) + ....+ P(An ) = P(S) = 1
P(A∪ B∪C) = P(A) + P(B) + P(C) − P(A∩ B) − P(A∩C) − P(B∩C) + P(A + B + C)
+Multiplicative rule
For any two events A and B from the same field of events there holds the formula
If these events are independent then
P(A∩ B) = P(A)P(B | A) = P(B)P(A | B)
P(A∩ B) = P(A)P(B)
+Total probability
If the event B may occur together with one and only one of n mutually exclusive events A1, A2, ..., An then:
Example 1: There are 5 boxes of lamps: 3 boxes with the content A1 with 9 good lamps and 1 defective lamp. 2 boxes with the content A2 with 4 good lamps and 2 defective lamps. At random, select one box and from this box, get one lamp. Find the probability that the lamp is defective (event B)!
P(B) = P(Aj )P(B | Aj )j=1
n
∑ = P(A1)P(B | A1) + P(A2 )P(B | A2 ) + ......+ P(An )P(B | An )
Bayes’ formula
If the event B may occur together with one and only one of n mutually exclusive events A1, A2, ..., An then:
Bayes’ Formula is sometimes called the formula of probabilities of hypotheses or the aposteriori probability
Example 2: There are 5 boxes of lamps: 3 boxes with the content A1 with 9 good lamps and 1 defective lamp. 2 boxes with the content A2 with 4 good lamps and 2 defective lamps. At random, select one box and from this box, get one lamp. It turns out to be a defective lamp (event B). What is the probability, after the experiment has been performed, that the lamp was taken from a box of content A1 ?
P(Ak | B) =P(Ak )P(B | Ak )
P(B)= P(Ak )P(B | Ak )
P(Aj )P(B | Aj )j=1
n
∑
+
Lihat ebook Walpole, buka halaman 72 (nomer halaman ada di kanan atas).
Kerjakan latihan no: No. 2.101 (kasus kanker)
No. 2.109 (kasus truth serum)
No. 2.127 (kasus electronic components)
Kerjakan dengan tulisan yang jelas, bila diperlukan, tambahkan ilustrasi pada jawaban Anda.
Batas waktu pengumpulan, hari Senin 14 Maret 2011, pkl. 12.00 WIB (siang), di lab SE (ketemu Pak Sunu / Pak Nardi)
Jangan lupa cantumkan NAMA dan NIM Anda.
TUGAS (individu)