* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download probability - ellenmduffy
Dempster–Shafer theory wikipedia , lookup
Probability box wikipedia , lookup
History of randomness wikipedia , lookup
Indeterminism wikipedia , lookup
Infinite monkey theorem wikipedia , lookup
Inductive probability wikipedia , lookup
Birthday problem wikipedia , lookup
Risk aversion (psychology) wikipedia , lookup
Ars Conjectandi wikipedia , lookup
PROBABILITY Basic Concepts So simple . . . Figure these out Take a blank piece of paper and write down your own answers before they show up on the slides. At the Bus Stop N 20 N 30 N 40 Chance that the next bus is N 30? THE RULE If events are equally likely • Count the total number of possible events • Count the total number of successful events • P(success) = # successful events # total possible events BUT … Suppose we know that there are three times more N40 than N20 or N30 N20, N30, N40, N40, N40 Probability that the next bus is N30? 1/5 1 out of 5 20% Take “weight” into consideration Probability that the next bus will be N40 (N20), (N30) and (N40 X3) 3/5 60% Note: this result is exactly the same as counting all possibilities. Definitions These definitions make it possible to use some shortcuts rather than always counting individual events DECK OF CARDS This traditional deck of cards is also called a Poker Deck. (There are others, e.g. a Pinochle Deck.) • 52 cards • 13 each: Clubs Diamonds Hearts Spades • 4 each: A 1 2 3 4 5 6 7 8 9 10 J Q K Chance that the next card is 4◊ 1/52 Chance that the next card is both 4◊ and A IMPOSSIBLE!! Cannot be both!! Mutually Exclusive Events Mutually Exclusive Events Both cannot occur together. They cannot occur as a single event. Not Mutually Exclusive Chance of a card being a Can pick a Or a 7 Or a 7 and a 7. Chance of a 7 = 1/52 OR Chance of a 7 = 1/13 Chance of a heart = ¼ Chance of both together = 1/13 X ¼ = 1/52 2 or more events not mutually exclusive Probability that BOTH will occur equals the product of the probability of each occurring Mary and Tom’s Baby What is the chance that the baby will be a boy? What is the chance that the baby will have blond hair? What is the chance that the baby will be a boy and have blond hair? Chance that either one of two or more events will occur The shortcut depends on whether events are mutually exclusive or not mutually exclusive To get to my house, I can take either the N20 or the N30 bus • There are three buses with an equal chance of arriving on this route N20, N30, N40. • What is the chance that the next bus will be either N20 or N30? • Count them: answer is … 2/3 Are the two events mutually exclusive? Yes. The bus can’t be both N20 and N30. The shortcut to get the answer is called the “Addition Rule”. The chance that the bus will be either N20 or N30 is the sum of the probability of N20 and the probability of N30. Sum of the Probabilities P(N20) = 1/3 P(N30) = 1/3 P(N20 or N30) = Sum = 1/3 + 1/3 = 2/3 Shortcuts or rules always have the same answer as the count-up. Either a 7 or a Are they mutually exclusive? No Can we still use the addition rule? Yes, a more general form of the addition rule Either a 7 or a Chance of a 7 = 1/13 = 4/52 Chance of a = 1/4 = 13/52 Chance of either a 7 or a Wrong!!! = 4/52 + 13/52 Can be a 7 or a or both There is one card that we have counted twice. The 7 was counted in the 7’s and in the ‘s. We have to subtract one of these times from the total. P(7 or ) = 4/52 + 13/52 – 1/52 Chance of either this event or that event • If mutually exclusive, just add the individual probabilities. Addition Rule • If not mutually exclusive, add the individual probabilities and subtract the probability that both will occur. Generalized Addition Rule. Why call it the Generalized Addition Rule • It applies to non-mutually exclusive events • Does it apply to mutually exclusive events? • Try it for the buses: P(N20 or N30) P(either N20 or N30) = P(N20) + P(N30) – P(both) = 1/3 + 1/3 – 0 = 2/3 Yes, the general rule applies to both Mutually exclusive just gives us another shortcul. Multiplication Rule This applies to the chance that 2 or more events will both occur. What is the probability of the 10 ◊ ? P (10) = 1/13 P (◊) = ¼ P (10 and ◊) = 1/13 X ¼ = 1/52 Same answer as counting-up. Requirements for the Multiplication Rule Are the events independent or conditional? The occurrence of a 10 and a ◊ are independent of each other. We can use the multiplication rule. Mary & Tom’s Baby • What is the chance that it will be a boy and be blond? Are they independent events? P = p(boy) X p(blond) • Two years later They have the first child and are now expecting a second. What is the chance that this child will be a boy? Is it affected by the fact that the first child was a boy? Probability of two boys • If we ask the question before they have any children P(2boys) = ½ X ½ = ¼ • If we ask the question after they already have one boy P(2nd boy) = 1/2 Conditional Events • Class of 10 • 6 little boys: 2 blond, 1 black-haired, 3 brown-haired • 4 little girls: 2 blond, 2 black hair Principal asks me to send down one boy. What is the chance that the child will have blond hair? 2/6 = 1/3 Conditional Events cont’d If the principal had asked me to send down one child, What is the probability that the child will be blond? 4/10 Conditional Defined • The chance of an event is dependent on some other pre-existing condition, e.g. the gender in this particular case determines the probability of a hair color. Chance that “both” events will occur The principal has asked that I send down a child • Chance that the child picked will be a boy and blond. • P(boy & blond) = P(boy) X P(blond|boy) • P(blond|boy) reads “probability that the child will be blond given that the child is a boy”. P(blond boy) from this class • P(boy) = 6/10 • P(blond|boy) = 2/6 • P(blond boy) = 6/10 X 2/6 = 2/10 = 20% • Look back and do count-up. There are 2 blond boys out of the 10 children. P of a blond boy = 2/10 = 1/5 Another View Boys Girls Total Blond 2 2 4 Black hair 1 2 3 Brown hair 3 0 3 Total 6 4 10 Shortcuts & Definitions Using a Table All names in a hat Probability of picking a girl = 4/10 This is called a Marginal Probability. Look back at table. What’s the chance of picking a child with black hair? 3/10 Is that a marginal probability? Yes Conditional Probability cont’d • Use the table to find the probability of choosing a brown-haired child from among the girls 0/4 = 0 •Find the probability of choosing a brown-haired child, given that the child is a boy 3/6 = 2/3 Using the table just makes life easier Theoretical vs Experiential • When we did chance of a boy in Mary and Tom’s family, we used a theoretical probability: 1 out of 2. • When we did the class, we used an experiential situation. Mathematical Terms • Union symbolizes either. It uses the Addition Rule U is the symbol for union • Intersection symbolizes both. It uses the Multiplication Rule ∩ is the symbol for intersection Sum of the probabilities • If we ask the probability that the next bus will be either N20 or N30 or N40, the probability will be 1/3 + 1/3 + 1/3 = 1. • This is always the case. The total of the probabilities is always 1. Complementary • Ask the probability that the next card is not a 10 of diamonds. • The probability that it is the 10 of diamonds is 1/52 so the probability that it is not the 10 of diamonds is 1 minus 1/52 = 51/52. • That it is not the 10 of diamonds is the complement of being the 10 of diamonds. Replacement or Not Replacement • We take a card and it is the 6 of spades. • If we take a second card, the probability that it will be the 4 of clubs depends on whether we replace the first card or do not replace it before the 2nd pick. • With replacement, the chance of a 4 of clubs is 1/52. Independent Events • Without replacement, the chance of a 4 of clubs is 1/51. Conditional Event. Clinical Applications • We can use our shortcuts to look at the usefulness of a diagnostic test. • Look at sensitivity and specificity Diagnostic Test Test Result Disease Present Disease Absent Total Positive 436 5 441 Negative 14 495 509 Total 450 500 950 Sensitivity • This is a conditional probability • Given the presence of the disease, what is the probability that the test will be positive P = 436/450 Specificity • This is a conditional probability • Given that the disease is not present, what is the probability that the test will be negative P = 495/500 Diagnostic Tests cont’d • When someone has a positive result from a screening test, what is it that they really want to know. • “Doc, I have a positive result, what does this mean. Does it mean that I definitely have the disease? If not, what is the probability that I have the disease? • In Statistics, this is called Predictive Value Positive. Predictive Value Positive • Use Bayes’ Theorem to calculate it. • Requires the conditional probabilities used for specificity and sensitivity • Also requires the prevalence of the disease in the general population Calculate D1 = probability that an individual has the disease D2 = the complement T* = test is positive P(D1|T*) = P(D1∩T*) P(T*) Equals P(D1)P(T*|D1) P(D1)P(T*|D1) + P(D2)P(T*|D2) OOOPS! The table doesn’t give us P(D1); have to get that from the population Something we don’t know!!! P(D1) is the rate of the disease in the general population, Called the prevalence of the disease, We don’t get this from the table because it only contains info on those tested not the whole population. Example: probability that a woman has cervical cancer In a certain year was 83 per million = 0.000083 The End of Power Pt 1, Probability Now, try some of the problems together. Go to end of Ch. 6