feb 20 bayes rule expectation and variance how we design
play

Feb 20: Bayes' Rule, Expectation and Variance How we design this - PowerPoint PPT Presentation

Feb 20: Bayes' Rule, Expectation and Variance How we design this course 1. Learning goals 2. Homework that tests learning goals 3. Lectures and sessions that provide tools to do homework that tests learning goals if something seems hard,


  1. Feb 20: Bayes' Rule, Expectation and Variance

  2. How we design this course 1. Learning goals 2. Homework that tests learning goals 3. Lectures and sessions that provide tools to do homework that tests learning goals if something seems hard, look for the hidden clues! Source: Nintendo, shacknews.com

  3. How to stay out of trouble on homework Integrity: ... You may discuss homework problems, but you have to write your own answers by yourself. You may consult online forums or look at examples, but you cannot copy text or code from them. You are not helping your friend by allowing them to not learn. ...

  4. Contingency tables red blue circle square

  5. Normalize to joint probability P(Shape, Color) red blue red blue circle circle 1/3 1/4 square square 1/6 1/4

  6. Normalize to joint probability P(Shape, Color) red blue red blue circle circle 1/3 1/4 square square 1/6 1/4 "Normali{e" = Divide everything by the total sum

  7. Normalization loses information red blue circle 1/3 1/4 square 1/6 1/4

  8. Normalization loses information red blue red blue circle circle 1/3 1/4 square square 1/6 1/4

  9. Normalization loses information red blue red blue circle circle 1/3 1/4 square square 1/6 1/4

  10. Normalization loses information red blue red blue circle circle 1/3 1/4 square square 1/6 1/4 Tiree free Four free parameters parameters

  11. Marginal probabilities sum over one axis Axis 1 P(S,C) red blue P(S) Axis 0 circle circle 7/12 square square 5/12 P(C) red blue 6/12 6/12

  12. Divide joint by marginal to get conditionals red blue circle 1/3 1/4 square 1/6 1/4 / red blue 1/2 1/2 = red blue cir 2/3 cir 1/2 cle cle "Normali{e" = Divide everything by the total sum squ 1/3 squ 1/2 are are

  13. Divide joint by marginal to get conditionals red blue circle 1/3 1/4 P(Shape, Color) square 1/6 1/4 / P(Color) red blue = 1/2 1/2 = red blue P(Shape | Color) cir 2/3 cir 1/2 cle cle "Given" squ 1/3 squ 1/2 are are

  14. Which is larger? P(Shape=square, Color=blue) or P(Shape=square | Color=blue)

  15. Multiply conditionals by marginal to get joint red blue P(Shape, Color) circle 1/3 1/4 square 1/6 1/4 = = red blue 1/2 1/2 P(Shape | Color) P(Color) * red blue cir 2/3 cir 1/2 cle cle squ 1/3 squ 1/2 are are

  16. Divide by marginal going the other way red blue red blue = circle 1/3 1/4 circle 7/12 circle 4/7 3/7 / square 5/12 square 1/6 1/4 red blue square 2/5 3/5

  17. Divide by marginal going the other way red blue red blue = circle 1/3 1/4 circle 7/12 circle 4/7 3/7 / square 5/12 square 1/6 1/4 red blue square 2/5 3/5 P(Shape, Color) = P(Color | Shape) P(Shape)

  18. Bayes' Rule! red blue red blue = circle 1/3 1/4 circle 7/12 circle 4/7 3/7 / square 5/12 square 1/6 1/4 red blue = square 2/5 3/5 red blue 1/2 1/2 P(Shape | Color) P(Color) * P(Shape) red blue cir 2/3 cir 1/2 = P(Color | Shape) cle cle squ 1/3 squ 1/2 are are

  19. What we did to load section data Read multiple files from CSV Extract values from filenames with regular expressions Change variable types (int -> string) Extract new variables from existing variables with regular expressions Recode four-value variable to two values Count co-occurrences of two variables (section, grade level)

  20. What does it feel like to have a bug in code? Strange things keep happening, but you will ofuen be able to "explain away" results. At first. TRUST YOUR GUT. BE VIRTUOUS. BE PARANOID.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend