Probability PDF
Document Details
Uploaded by Deleted User
Tags
Summary
This document provides notes on probability, covering simple probability, conditional probability and Bayes' theorem. It includes examples and calculations.
Full Transcript
# Probability ## Simple probability ### Sample Space - Set of all possible outcomes. ### Event - Subset of Sample Space. ### Probability of an event A - Denote by P(A). ## Probability Properties - 0 ≤ P(A) ≤ 1 or 0% ≤ P(A) ≤ 100% - P(A) = 0 if and only if A = empty set - P(A) = 1 if and only i...
# Probability ## Simple probability ### Sample Space - Set of all possible outcomes. ### Event - Subset of Sample Space. ### Probability of an event A - Denote by P(A). ## Probability Properties - 0 ≤ P(A) ≤ 1 or 0% ≤ P(A) ≤ 100% - P(A) = 0 if and only if A = empty set - P(A) = 1 if and only if A = S ## The probability of A - P(A) = n(A)/n(S) ## Example - Toss a coin 5 times. What is the chance of getting at least 2 heads? - n(S) = 2^5 = 32 - A: Getting at least 2 heads - n(A): getting 0 heads or 1 head. So, n(A) = n(S) - n(A') = 32 - (1 + 5) = 26. - Therefore, P(A) = n(A)/n(S) = 26/32 ## Odds in favor of A - Or odds of A to B is a to b. - n(S) = a+b. - n(A) = a - n(B) = b ## Example - 45 Odds against yellow: - n(not getting yellow): n(getting yellow) = 6:5. - 50) Red OR Blue: - Odds against A: n(not A): n(A) = 5:6 ## Probability of “Not” and “OR” ### Not A - A' - P(A') = 1 - P(A) - P(A) = 1 - P(A') ## Example - Toss a coin 10 times. What is the chance to get at least 3 heads? - n(S) = 2^10. - A: Getting at least 3 heads - A': Getting less than 3 heads. - n(A') = 1 + 10 + n(getting 2heads) = K. - P(A') = K/2^10. - P(A) = 1-K/2^10. ## Pg 54 Example 2.5 - n(S) = 4 - S: # of crashes during the week - B: The system crashes at least once - A: More than one crash. - P(A) = P(3 crashes) + P(4 crashes) = 0.04 + 0.01 = 0.05 - P(B) = 1 – P(B') = 1 – 0.6 = 0.4 ## Mutually Exclusive Event - Event A and B are mutually exclusive if they have no outcomes in common. - If A and B are mutually exclusive events, then P(AUB) = P(A) + P(B). ## Pg 61 8(a) - A: Person is a good risk customer. - P(A) = 0.7 - B: The customer is not a poor risk. - P(B) = 1 - P(B') = 1 - 0.1 ## Condition Probability - Finding the probability of event A under the condition or knowing B already happened. - P(A|B) = P(A∩B)/P(B) ## Example - In a family with 3 children find P of having a girl given that the oldest child is a girl. – n(S) = 8 – P(A|B) = P(A∩B)/P(B) = 2/8/4/8 = 1/2 ## Example - What is the prob that a can has a flaw on the side given it has a flaw on the top? - A: Flaw on the side - B: Flaw on the top - P(A|B) = P(A∩B)/P(B) = 0.01/0.03 ## Independent Event - Called independent IFF P(A|B) = P(A) - A event that does not change the probability that another event occurs. ## Pg 65 13(a) - 0.8 ## Pg 65 13(b) - 0.9 ## Pg 65 13) - n(S) = 8 - B: At least 2 boys - A: 2 Oldest boys - P(A|B) = P(A∩B)/P(B) = 2/8/4/8 = 1/2 ## Pg 65 14) - n(S) = 52 - A: Club card dealt - B: Diamond card dealt - P(B|A) = P(A∩B)/P(A) = 13/52 * 13/52 =(13/52)^2 ## Pg 65 n(S) = 80 - A: Exactly 1 engine fails - Fi: ith engine fails - P(A) = P(F1OFOF, F2OFOF, F2OFOF, F2OFOF) = 4(0.1)(1-0.2)^3 ## Bayes Theorem - P(A|B) = P(A∩B)/P(B) = P(A)P(B|A)/P(B) ## Example - Suppose a COVID test has a 95% chance of identifying a sick patient who has COVID and 10% of incorrectly identifying someone as having COVID who does not have COVID. 5% of the population has COVID. Find the probability of the person actually being sick if they test positive for COVID. - A: Randomly chosen person has COVID - P(A) = 0.05 - P(+|A) = 0.95 - B: Positive test result - P(A|B) = P(A∩B)/P(B) = P(A)P(B|A)/P(B) = P(A)P(+|A)/(P(A)P(+|A) + (P(A')P(+|A')) = 0.05 * 0.95 / (0.05 * 0.95) = 1 ## Example - A jar has 8 balls, 2 blue, and 3 red. We pick 2 balls with replacement. Find the prob that the first ball is blue given that the second ball is red. - n(S) = 8 - B: The first ball is blue - R: The second ball is red - P(B|R) = P(B∩R)/P(R) = P(B)P(R)/P(R) = (2/8*3/8)/(2/8*3/8 + 3/8*3/8 + 3/8*3/8) = 2/8/ (2/8 + 3/8 + 3/8) = 1/4 ## Random Variable (RV) - A RV is a real-valued function whose domain is the entire sample space. - X:S -> R ## Example - Toss a coin 10 times. - Let X: # of H. - Therefore, X=0,1,2,3…10 ## RV - Discrete Random Variable Ex: Counting set - Continuous Random Variable Ex: ## Example - Toss a coin 10 times. What is the chance of getting 7 heads? - X: # of heads X = 0,1,2,3…10 - P(X=7) - At most 5 heads? - P(x≤5) - X: Assigns a value to # of success. - P(X=4) ## For DRV X, the probability - P(X= i) is called the Probability mass function of X. ## Example - Find the PMF value of # of tails for toss a coin 3 times. - X: # of tails - X: 0,1,2,3 ## Ex: - Find the PMF of # of heads in tossing a coin 7 times in which P(H) = 75%. - X:# of heads in tossing a coin 7 times. - X: 0,1,2,3....7 ## The Cumilative Dist Function of DRVX, F(i) - Calculated as F(i) = P(x < i) ## Ex: - P(x) = - 5cx x = 1,2,3,4, or 5 - 0 otherwise ## Ex: - i P(X= i) - 1 C - 2 2C - 3 3C - 4 4C - 5 5C - C + 2C + 3C + 4C + 5C = 1 ## Ex: - i x F(i) - 1 2 4 - 2 4 9 - 3 6 15 - 4 8 20 - 5 10 25 ## Dont do 13 and AFTER - Let x be a discrete Random Variable w/ Probability mass Function P(x) = P(X = x) - The mean of x is given by: - Mx = E(X = x) ## Expected Value - The Expected value of a DRV X denoted by E(x) - Refers to the long-term average. ## E(x) = Σ i P(x= i) - It is the same as the mean. ## Solving for E(x) 1. Sample Set 2. Define the R.V 3. Determine the value of R.V 4. Find pro mass function for each. 5. Subsitute all values in E(x) Formula. ## Variance - Var(x) = Σ i² P(x= i) - µx² - Var(x) = E(x²) - E²(x) ## Ex: - i P(x = i) - 1 1/15 - 2 2/15 - 3 3/15 - 4 4/15 - 5 5/15 ## Ex: - S: HH, HT, TH, TT - n(S) = 8 - Pay off: What they pay you. - Net winning: Final money you win-what you Spend - X: Net winning - Payed to play: $3 - #head Pay off Net winning P(X = x) - 0 $1 -2 1/8 - 1 $2 -1 3/8 - 2 $3 $0 3/8 - 3 $4 $1 1/8 ## Money P(X = x) - 1000 1/5000 - 500 2/5000 - 100 3/5000 - 4997/5000 ## Properties of Expected Value and Var(x) - E(c) = c - Var(c) = 0 - E(cx) = c E(x) - Var(ax) = a²var(x) - E(Cx+b) = CE(X)+b - Var(ax+c) = a²var(x) + Var(c) - = a²Var(x) + 0 ## E(gross winning) = 1000(1/5000) + 500(2/5000) + 100(3/5000) = 1000/5000 + 1000/5000 + 300/5000 = 2300/5000 = 0.46 ## 10X(A) - 10(2300/5000) ## 5000 - 1000 - 2(500) - 3(100) - 4997/5000