Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stat 155, Section 2, Last Time Probability Theory

Similar presentations


Presentation on theme: "Stat 155, Section 2, Last Time Probability Theory"— Presentation transcript:

1 Stat 155, Section 2, Last Time Probability Theory
Foundations of Probability Events, Sample Space Probability Function Simple Random Sampling (count samples) Big Rules of Probability: Not Rule ( 1 – P{opposite}) Or Rule

2 Reading In Textbook Approximate Reading for Today’s Material:
Pages , Approximate Reading for Next Class: Pages ,

3 (Instead of Review Session)
Midterm I Coming up: Tuesday, Feb. 27 Material: HW Assignments 1 – 6 Extra Office Hours: Mon. Feb. 26, 8:30 – 12:00, 2:00 – 3:30 (Instead of Review Session) Bring Along: 1 8.5” x 11” sheet of paper with formulas

4 Midterm I How will I test for Excel skills? No computers allowed
Fill out menus with pencil Write Excel Commands with pencil Put Excel commands (& details) on your: 1 8.5” x 11” sheet of paper with formulas

5 Midterm I Example: What fraction of N(1,2) population is smaller than 0? Could ask you to fill out menu: You write: 1 2 true

6 Midterm I Example: What fraction of N(1,2) population is smaller than 0? Above results in: Note: “command line”

7 (suggestion: make early & use to study)
Midterm I Example: What fraction of N(1,2) population is smaller than 0? So could ask you to simply write: =NORMDIST(0,1,2,TRUE) Note that you need to know: Excel function names Which arguments go where So put all these on your sheet of formulas (suggestion: make early & use to study)

8 Big Rules of Probability
Not Rule: P{not A} = 1 – P{A} Or Rule: P{A or B} = P{A} + P{B} – P{A and B} Third rule? Symbolic logic is based on: and, or, not How about a rule for and?

9 Big Rules of Probability
Now head towards a rule for “and” Needs a new concept: Conditional Probability Idea: If event A is known to have occurred, what is chance of B? Note: “knowing A” means sample space is restricted to A

10 Conditional Probability
E.g. Roll a die, A = {even}, B = {1,2,3} P{B, when A is known} = ??? (i.e. Somebody rolls, and only tells you “even”. Note “<= 3” is no longer 50-50, Since fewer even #s are <= 3)

11 Conditional Probability
E.g. Roll a die, A = {even}, B = {1,2,3} P{B, when A is known} = ??? Try “equally likely”: CAREFUL: This is wrong!!! Problem: for B, should not include 1 or 3, since they are not even

12 Conditional Probability
E.g. Roll a die, A = {even}, B = {1,2,3} P{B, when A is known} = ??? Correct Answer: Makes sense, since chance should go down from ½.

13 Conditional Probability
General definition: Probability of B given A = Next, by multiplying by P{A}, get and rule of probability

14 And Rule of Probability
Big Rule III: P{A & B} = P{A|B} P{B} = P{B|A} P{A} Memory trick: like “canceling fractions”, but make bar vertical, not a fraction Note: 2 ways to do this. Good strategy: look at both, as one is often easier.

15 The And Rule of Probability
HW: 4.89, 4.91a 4.95 (see 4.92)

16 And now for something completely different
Recall Distribution of majors of students in this course:

17 And now for something completely different
Three nurses died & went to heaven where they were met at the Pearly Gates by St. Peter.

18 And now for something completely different
To the first, he asked, "What did you do on Earth and why should you go to heaven?" "I was a nurse in an inner city hospital," she replied. "I worked to bring healing and peace to the poor suffering city children." "Very noble," said St. Peter. "You may enter." And in through the gates she went.

19 And now for something completely different
To the next, he asked the same question, "So what did you do on Earth?" "I was a nurse at a missionary hospital in Africa," she replied. "For many years, I worked with a skeleton crew of doctors and nurses who tried to reach out to as many peoples and tribes with a hand of healing and with a message of God's love." "How touching," said St. Peter. "You too may enter." And in she went.

20 And now for something completely different
He then came to the last nurse, to whom he asked, "So, what did you do back on Earth?" After some hesitation, she explained, "I was just a nurse at an H.M.O." St. Peter pondered this for a moment, and then said, "Okay, you may enter also." "Whew!" said the nurse. "For a moment there, I thought you weren't going to let me in."

21 And now for something completely different
"Oh, you can come in," said St. Peter, "but you can only stay for three days..."

22 Big Rules of Probability
Example illustrating power (and use) of rules: Toss a Coin: if H take a ball from I: R R G G G if T take a ball from II: R R G Now study progressively harder problems…

23 Balls in Urns Example H  R R G G G T  R R G E.g. A: P{R | H} = 2/5
(chance of R, if know got H) Simple “equally likely” calculation (just counting) works here

24 Related HW HW: C13 A company makes 40% of its cars at factory A, and the rest at factory B. Factory A produces 10% lemons, and Factory B produces 5% lemons. A car is chosen at random. What is the probability that: It came from Factory A? (0.4) It is a lemon, if it came from Fact. A? (0.1)

25 Balls in Urns Example H  R R G G G T  R R G E.g. B: P{R & H} = ???
Try simple counting: P{R & H} = ??? Caution: This is wrong!!! Reason: balls are not equally likely.

26 Balls in Urns Example H  R R G G G T  R R G E.g. B: P{R & H} = ???
Correct Answer: P{R & H} = P{H | R} P{R} (OK, but hard) = P{R | H} P{H} = (2/5)(1/2) = 1/5 Note: < ¼ (from wrong answer above)

27 (think carefully about contrast with (b))
Related HW HW: C13 It is a lemon, from Factory A? (0.04) (think carefully about contrast with (b))

28 Balls in Urns Example H  R R G G G T  R R G E.g. C: P{R} = ???
Try simple counting: P{R} = ??? Caution: This is wrong!!! Reason: again balls are not equally likely.

29 Balls in Urns Example H  R R G G G T  R R G E.g. C: P{R} = ???
Note: now expect > ½, since R’s in II are more likely (thus get more weight) Need to take which urn into account, so write event in terms of the urn ball came from

30 Balls in Urns Example H  R R G G G T  R R G E.g. C: Correct Answer:
P{R} = P{(R & H) or (R & T)} = (“expand”) = P{R & H} + P{R & T} – 0 (or Rule) = 1/5 + P{R | T} P{T} = (from B) = 1/5 + (2/3)(1/2) = 8/15 Note: slightly > ½ (as expected)

31 Related HW HW: C13 It is a lemon? (0.07)

32 Balls in Urns Example H  R R G G G T  R R G E.g. D: P{H | R} = ???
Saved for last, since this is hardest Although only “turn around” of e.g. A This is common: One Cond. Prob. much easier than the reverse

33 Balls in Urns Example H  R R G G G T  R R G E.g. D: P{H | R} =
Makes sense: if see R, less likely from H

34 Related HW HW: C13 It came from Factory A, if it is a lemon? (4/7)
4.103 4.105

35 Plotting Bivariate Data
Recall Toy Example: (1,2) (3,1) (-1,0) (2,-1)

36 And now for something completely different
Viewing Higher Dimensional Data: Extend to higher dimensions E.g. replace pairs by triples Make “3-d scatterplot” As “points in space” Think about “point cloud”

37 And now for something completely different
Toy 3-d data set:

38 And now for something completely different
High Light One Point

39 And now for something completely different
X Coor of High Light

40 And now for something completely different
Coor of High Light

41 And now for something completely different
Z Coor of High Light

42 And now for something completely different
Proj- ection on X Axis

43 And now for something completely different
View: Proj- ection on X Axis

44 And now for something completely different
Proj- ection on Y Axis

45 And now for something completely different
View: Proj- ection on Y Axis

46 And now for something completely different
Proj- ection on Z Axis

47 And now for something completely different
View: Proj- ection on Z Axis

48 And now for something completely different
Proj- ection on X-Y Plane

49 And now for something completely different
Proj- ection on X-Y Plane rotated up

50 And now for something completely different
Proj- ection on X-Z Plane

51 And now for something completely different
Proj- ection on X-Z Plane rotated up

52 And now for something completely different
Proj- ection on Y-Z Plane

53 And now for something completely different
Proj- ection on Y-Z Plane rotated up

54 And now for something completely different
Look At All Three

55 And now for something completely different
Put Into Single Plot - 1d on Diagn’l

56 And now for something completely different
Put Into Single Plot - 2d off Diagn’l

57 And now for something completely different
Called Drafts- man’s Plot: (study 3d Objects In 2d)

58 Recall Above Example H  R R G G G T  R R G E.g. D: P{H | R} =
Note: have “turned around” Cond. Probs…

59 Bayes Rule Idea: Formal framework for turning around conditional probabilities IF events are mutually exclusive and include everything Set theoretically: intersections are empty union is sample space Called a “partition of the sample space”

60 Bayes Rule IF events are mutually exclusive and include everything
THEN: (decomposition of P{A} in terms of B’s) Usefulness: turns around Cond. Probs. So can write hard one in terms of easy ones

61 Bayes Rule E.g. Balls & Urns, part D, above: = Urn I (H) = Urn II (T)
A = R (red ball) Note: disjoint & includes everything

62 (about turning around cond. probs.)
Bayes Rule Example Disease Testing: Fundamental to modern medicine But most are not 100% accurate Study “Error Rate” Actually Error Rates, since 2 types of error Will see some surprises (about turning around cond. probs.)

63 Disease Testing Example
Suppose 1% of population has a disease. (fairly rare, but there are rarer diseases) Tests are calibrated by applying to known cases: Give test to 100 w/ Disease and 1000 Healthy Suppose 80 have + reactions & are + What is “error rate”? (how good is the test???)

64 Disease Testing Example
What is “error rate”? Note: 2 types of “error”: P{+ | H} = 50/1000 = 0.05 (Chance of healthy person called “sick”) P{- | D} = (100 – 80) / 100 = 0.20 (Chance of sick person called “healthy”) So “error rate” is ~ 20% or 5%? (or something in between???)

65 Disease Testing Example
Careful: We care about the opposite conditional probabilities (turned around) P{D | +} I.e. IF have a + reaction THEN what are chances of disease? Make much difference? Guess 80% or 95% (or in between)??? Sell belongings and move to Bahamas???

66 Disease Testing Example
Apply Bayes Rule to turn around cond. probs. Only ~14% !?! (what about 80% to 90%?)

67 Disease Testing Example
Error rate only ~14% (unlikely have disease?) Reason 1: Rarity of disease magnifies errors Reason 2: Test Population different from real population View Bayes Rule Calculation as adjustment for this

68 Bayes Rule HW C14: The workforce in a town has: (20%, 50%, 30%)
(20%, 50%, 30%) workers with (no HS, HS-no C, C) education. Past experience indicates that (10%, 30%, 90%) of workers with Education can perform a given task. Find the probability that a randomly chosen worker: Can perform the task (0.44) Is College educated if (s)he can perform the task (0.61)


Download ppt "Stat 155, Section 2, Last Time Probability Theory"

Similar presentations


Ads by Google