270 likes | 310 Views
Chapter 2 Probability. Motivation. We need concept of probability to make judgments about our hypotheses in the scientific method. Is the data consistent with our hypotheses? Example:
E N D
Motivation • We need concept of probability to make judgments about our hypotheses in the scientific method. Is the data consistent with our hypotheses? • Example: Suppose an old drug cures 50 percent of the time. Our new drug cures 6 out of 10 patients. Is our new drug better ?
Probabilities… • The probability of any outcome of a random phenomenon is the proportion of times the outcome would occur in a very long series of repetitions. • Probability is a long-term frequency. • List the outcomes of a random experiment…
Randomness • …a random experiment is an action or process that leads to one of several possible outcomes. • Example 1:
Ex2 Probability Trees : Flip a coin Heads P(HH) = 1/4 .5 .5 P(HT) = 1/4 Heads Tails .5 .5 P(TH) = 1/4 Heads .5 Tails .5 P(TT) = 1/4 Tails
Ex3. Two Coin Flips • P(No Heads) = P(TT) = ¼ • P(One Head) = P(HT) + P(TH) = 1/4 +1/4= 1/2 • P(Two Heads) = P(HH) = 1/4
Example • This list must be exhaustive, i.e. ALL possible outcomes included. Ex : Die roll {1,2,3,4,5} Die roll {1,2,3,4,5,6} • The list must be mutually exclusive, i.e. no two outcomes can occur at the same time: Ex : Die roll {odd number or even number} Die roll{ number less than 4 or even number}
Sample Space & Event • Set of all possible outcomes is called the sample space, S. Ex : Coin toss: S={H, T}, Die toss: S={1, 2, 3, 4, 5, 6} Toss coin twice: S={HH, TT, HT, TH} • An individual outcome of a sample space is called a simple event • An event is a collection or set of one or more simple events in a sample space. • Example : Roll of a die: S = {1, 2, 3, 4, 5, 6} Simple event: the number “3” will be rolled Event: an even number (one of 2, 4, or 6) will be rolled
Properties of Probabilities… • The probability of any outcome is between 0 and 1 0 ≤ P(Oi) ≤ 1 for each i, and • The sum of the probabilities of all the outcomes equals 1 P(O1) + P(O2) + … + P(Ok) = 1 P(Oi) represents the probability of outcome i
Events & Probabilities… • The probability of an event is the sum of the probabilities of the simple events that constitute the event. • Ex : (assuming a fair die) S = {1, 2, 3, 4, 5, 6} and P(1) = P(2) = P(3) = P(4) = P(5) = P(6) = 1/6 Then: P(EVEN) = P(2) + P(4) + P(6) = 1/6 + 1/6 + 1/6 = 3/6 = 1/2
Equally Likely Outcomes • Probabilities under equally likely outcome case is simply the number of outcomes making up the event, divided by the number of outcomes in S. • Example: A die toss, A={2, 4, 6}, so P(A) = 3/ 6 = 1/2 = .5 • Example: Coin toss, A={H}, P(A) = 1/2= .5
Classical Approach… • If an experiment has n possible outcomes, this method would assign a probability of 1/n to each outcome. • Example : Experiment: Rolling a die Sample Space: S = {1, 2, 3, 4, 5, 6} Probabilities: Each sample point has a 1/6 chance of occurring.
Experiment: Rolling dice Sample Space: S = {2, 3, …, 12} Probability Examples: P(2) = 1/36 P(7) = 6/36 P(10) = 3/36
Bits & Bytes Computer Shop tracks the number of desktop computer systems it sells over a month (30 days): • For example, 10 days out of 30 2 desktops were sold. From this we can construct the probabilities of an event
Relative Frequency Approach… “There is a 40% chance Bits & Bytes will sell 3 desktops on any given day”
Conditional Probability… • Conditional probability is used to determine how two events are related; that is, we can determine the probability of one event given the occurrence of another related event. • Conditional probabilities are written as P(A | B) and read as “the probability of A given B” and is calculated as:
Again, the probability of an event given that another event has occurred is called a conditional probability… Note how “A given B” and “B given A” are related…
Conditional Probability • Example: Die toss, A={1, 2, 3}, B={2, 4, 6}. P(A | B) = P(A and B) / P(B) = (1/6) / (3/6) = 1/3.
Example Why are some mutual fund managers more successful than others? One possible factor is where the manager earned his or her MBA. The following table compares mutual fund performance against the ranking of the school where the fund manager earned their MBA: E.g. This is the probability that a mutual fund outperforms AND the manager was in a top-20 MBA program; it’s a joint probability.
Alternatively, we could introduce shorthand notation to represent the events: • A1 = Fund manager graduated from a top-20 MBA program • A2 = Fund manager did not graduate from a top-20 MBA program • B1 = Fund outperforms the market • B2 = Fund does not outperform the market Ex : P(A2 and B1) = .06 = the probability a fund outperforms the market and the manager isn’t from a top-20 school.
Example : What’s the probability that a fund will outperform the market given that the manager graduated from a top-20 MBA program? Recall: A1 = Fund manager graduated from a top-20 MBA program A2 = Fund manager did not graduate from a top-20 MBA program B1 = Fund outperforms the market B2 = Fund does not outperform the market • Thus, we want to know “what is P(B1| A1) ?”
We want to calculate P(B1 | A1) Thus, there is a 27.5% chance that that a fund will outperform the market given that the manager graduated from a top-20 MBA program.
Marginal Probabilities… • Marginal probabilities are computed by adding across rows and down columns; that is they are calculated in the margins of the table: P(A2) = .06 + .54 “what’s the probability a fund manager isn’t from a top school?” P(B1) = .11 + .06 BOTH margins must add to 1 (useful error check) “what’s the probability a fund outperforms the market?”
Probability Problems • P(Married) = 59,920/103,870 • P(Married | 18-29) = 7842/ 22,512
Independence… • One of the objectives of calculating conditional probability is to determine whether two events are related. • In particular, we would like to know whether they are independent, that is, if the probability of one event is not affectedby the occurrence of the other event. • Two events A and B are said to be independent if P(A|B) = P(A) or P(B|A) = P(B)
Independence • Events A and B are independent if: P(A|B) = P(A), that is, if the additional knowledge of B does not change the probability of A happening. • On the marriage problem, the events Marriage and 18-29 are dependent because P(Marriage|18-29) does not equal P(Marriage), so these events are dependent. • In die tossing, event roll a 3 on roll 2 is independent of roll a 6 on roll 1. P(3 | 6) =1/6 =P(3) = 1/6.
Independence… • For example, we saw that P(B1| A1) = .275 The marginal probability for B1 is: P(B1) = 0.17 • Since P(B1|A1) ≠ P(B1), B1 and A1 are not independent events. • Stated another way, they are dependent. That is, the probability of one event (B1) is affected by the occurrence of the other event (A1).