Stat 31, Section 1, Last Time - PowerPoint PPT Presentation

1 / 61
About This Presentation
Title:

Stat 31, Section 1, Last Time

Description:

Big Rules of Probability. Now head towards a rule for 'and' Needs a new concept: ... time and thought maybe a preview to the UNC Men's basketball games would be fun. ... – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 62
Provided by: stato
Learn more at: https://sites.unc.edu
Category:
Tags: basketball | cars | cool | draw | evens | last | rules | section | stat | time

less

Transcript and Presenter's Notes

Title: Stat 31, Section 1, Last Time


1
Stat 31, Section 1, Last Time
  • Foundations of Probability
  • Events, Sample Space
  • Probability Function
  • Big Rules of Probability
  • The not rule
  • Pnot A 1 PA
  • The or rule
  • PA or B PA PB PA and B

2
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

3
Conditional Probability
  • E.g. Roll a die, A even, B 1,2,3
  • PB, when A is known ???
  • (i.e. Somebody rolls, and only tells you even.
    Note lt 3 is no longer 50-50,
  • Since fewer evens are lt 3)

4
Conditional Probability
  • E.g. Roll a die, A even, B 1,2,3
  • PB, when A is known ???
  • Try equally likely
  • CAREFUL This is wrong!!!
  • Problem for B, should not include 4 or 6

5
Conditional Probability
  • E.g. Roll a die, A even, B 1,2,3
  • PB, when A is known ???
  • Correct Answer
  • Makes sense, since chance should go down from ½.

6
Conditional Probability
  • General definition
  • Probability of B given A
  • Next, by multiplying by PA, get and rule of
    probability

7
And Rule of Probability
  • Big Rule III
  • PA B PAB PB PBA PA
  • 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.

8
The And Rule of Probability
  • HW
  • 4.93
  • 4.95
  • 4.100 (ignore tree diagram, 0.44)

9
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

10
Balls in Urns Example
  • H ? R R G G G T ? R R G
  • E.g. A
  • PR I 2/5
  • (chance of R, if know from Urn 1)
  • Simple equally likely calculation (just
    counting) works here

11
Related HW
  • HW C11
  • 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)

12
Balls in Urns Example
  • H ? R R G G G T ? R R G
  • E.g. B PR I ???
  • Try simple counting
  • PR I
    ???
  • Caution This is wrong!!!
  • Reason balls are not equally likely.

13
Balls in Urns Example
  • H ? R R G G G T ? R R G
  • E.g. B PR I ???
  • Correct Answer
  • PR I PI R PR (OK, but hard)
  • PR I PI (2/5)(1/2) 1/5
  • Note lt ¼ (from wrong answer above)

14
Related HW
  • HW C11
  • It is a lemon, from Factory A? (0.04)
  • (think carefully about contrast with (b))

15
Balls in Urns Example
  • H ? R R G G G T ? R R G
  • E.g. C PR ???
  • Try simple counting
  • PR ???
  • Caution This is wrong!!!
  • Reason again balls are not equally likely.

16
Balls in Urns Example
  • H ? R R G G G T ? R R G
  • E.g. C PR ???
  • Note now expect gt ½, since Rs 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

17
Balls in Urns Example
  • H ? R R G G G T ? R R G
  • E.g. C Correct Answer
  • PR P(R I) or (R II) (expand)
  • PR I PR II 0 (or
    Rule)
  • 1/5 PR II PII
    (from B)
  • 1/5 (2/3)(1/2) 8/15
  • Note slightly gt ½ (as expected)

18
Related HW
  • HW C11
  • It is a lemon? (0.07)

19
Balls in Urns Example
  • H ? R R G G G T ? R R G
  • E.g. D PI 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

20
Balls in Urns Example
  • H ? R R G G G T ? R R G
  • E.g. D PI R
  • Makes sense if see R, less likely from I

21
Related HW
  • HW C11
  • It came from Factory A, if it is a lemon?
    (4/7)
  • 4.101
  • 4.103

22
And now for something completely different
  • Travis Boyer Suggestion
  • I was thinking about something to do for your
    "something completely different" time and thought
    maybe a preview to the UNC Mens basketball games
    would be fun. You could use comparative
    histograms to compare us with our opponents stats
    like points, rebounds, wins, and many more, or
    look at the Vegas betting odds to tie in the
    probability aspects.
  • Cool Idea, but I need a partner.

23
Plotting Bivariate Data
  • Recall
  • Toy Example
  • (1,2)
  • (3,1)
  • (-1,0)
  • (2,-1)

24
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

25
And now for something completely different
  • Toy
  • 3-d
  • data
  • set

26
And now for something completely different
  • High
  • Light
  • One
  • Point

27
And now for something completely different
  • X
  • Coor
  • of
  • High
  • Light

28
And now for something completely different
  • Y
  • Coor
  • of
  • High
  • Light

29
And now for something completely different
  • Z
  • Coor
  • of
  • High
  • Light

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

31
And now for something completely different
  • 1-d
  • View
  • Proj-
  • ection
  • on
  • X
  • Axis

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

33
And now for something completely different
  • 1-d
  • View
  • Proj-
  • ection
  • on
  • Y
  • Axis

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

35
And now for something completely different
  • 1-d
  • View
  • Proj-
  • ection
  • on
  • Z
  • Axis

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

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

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

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

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

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

42
And now for something completely different
  • Now
  • Look
  • At
  • All
  • Three

43
And now for something completely different
  • Put
  • Into
  • Single
  • Plot -
  • 1d on
  • Diagnl

44
And now for something completely different
  • Put
  • Into
  • Single
  • Plot -
  • 2d off
  • Diagnl

45
And now for something completely different
  • Called
  • Drafts-
  • mans
  • Plot
  • (study
  • 3d
  • Objects
  • In 2d)

46
Recall Above Example
  • H ? R R G G G T ? R R G
  • E.g. D PI R
  • Note have turned around Cond. Probs

47
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

48
Bayes Rule
  • IF events are mutually
    exclusive and include everything
  • THEN
  • (decomposition of PA in terms of
    Bs)
  • Usefulness turns around Cond. Probs.
  • So can write hard one in terms of easy ones

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

50
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.)

51
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 50 are
  • What is error rate? (how good is the test???)

52
Disease Testing Example
  • What is error rate?
  • Note 4 types of error
  • P H 50/1000 0.05
  • (Chance of healthy person called sick)
  • P- D (100 80) / 100 0.20
  • (Chance of healthy person called sick)
  • So error rate is 20 or 5?
  • (or something in between???)

53
Disease Testing Example
  • Careful We care about the opposite conditional
    probabilities (turned around)
  • PD
  • I.e. IF have a reaction
  • THEN what are chances of disease?
  • Make much difference?
  • Guess 80 or 95 (or in between)???
  • Sell house and move to Bahamas???

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

55
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

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

57
Independence
  • (Need one more major concept at this level)
  • An event A does not depend on B, when
  • Knowledge of B does not change
  • chances of A
  • PA B PA

58
Independence
  • E.g. I Toss a Coin, and somebody on South Pole
    does too.
  • PH(me) T(SP) PH(me) ½.
  • (now way that can matter, i.e. independent)

59
Independence
  • E.g. I Toss a Coin twice
  • (toss number indicated with subscript)
  • Is it lt ½?
  • What if have 5 Heads in a row?
  • (isnt it more likely to get a Tail?)
  • (Wanna bet?!?)

60
Independence
  • E.g. I Toss a Coin twice,
  • Rational approach
  • Look at Sample Space
  • Model all as equally likely
  • Then
  • So independence is good model for coin tosses

61
New Ball Urn Example
  • H ? R R R R G G T ? R R G
  • Again toss coin, and draw ball
  • Same, so R I are independent events
  • Not true above, but works here, since proportions
    of R G are same
Write a Comment
User Comments (0)
About PowerShow.com