welcome to the co u rse
play

Welcome to the co u rse ! FU N DAME N TAL S OF BAYE SIAN DATA AN - PowerPoint PPT Presentation

Welcome to the co u rse ! FU N DAME N TAL S OF BAYE SIAN DATA AN ALYSIS IN R Rasm u s Bth Data Scientist FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R 1 h ps :// commons .w ikimedia . org /w


  1. Welcome to the co u rse ! FU N DAME N TAL S OF BAYE SIAN DATA AN ALYSIS IN R Rasm u s Bååth Data Scientist

  2. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  3. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  4. 1 h � ps :// commons .w ikimedia . org /w iki / File : Enigma _08. jpg FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  5. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  6. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  7. Ba y esian inference in a n u tshell A method for � g u ring o u t u nobser v able q u antities gi v en kno w n facts that u ses probabilit y to describe the u ncertaint y o v er w hat the v al u es of the u nkno w n q u antities co u ld be . FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  8. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  9. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  10. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  11. Ba y esian data anal y sis The u se of Ba y esian inference to learn from data . Can be u sed for h y pothesis testing , linear regression , etc . Is � e x ible and allo w s y o u to constr u ct problem - speci � c models . FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  12. Co u rse o v er v ie w Chapter 1 : A small Ba y esian anal y sis . Chapter 2 : Ho w Ba y esian inference w orks . Chapter 3 : Wh y y o u w o u ld w ant to u se Ba y esian data anal y sis ? Chapter 4 : Ba y esian inference w ith Ba y es theorem . Chapter 5 : Wrapping u p + a practical tool for Ba y esian Data Anal y sis in R . FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  13. Ba y esian Data anal y sis : a tool to make sense of y o u r data . FU N DAME N TAL S OF BAYE SIAN DATA AN ALYSIS IN R

  14. A little bit of backgro u nd FU N DAME N TAL S OF BAYE SIAN DATA AN ALYSIS IN R Rasm u s Bååth Data Scientist

  15. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  16. Probabilit y A n u mber bet w een 0 and 1. A statement abo u t certaint y / u ncertaint y. 1 is complete certaint y something is the case . 0 is complete certaint y something is not the case . Not onl y abo u t y es / no e v ents . FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  17. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  18. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  19. The role of probabilit y distrib u tions in Ba y esian data anal y sis is to represent u ncertaint y, and the role of Ba y esian inference is to u pdate probabilit y distrib u tions to re � ect w hat has been learned from data . FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  20. A Ba y esian model for the proportion of s u ccess prop_model(data) The data is a v ector of s u ccesses and fail u res represented b y 1 s and 0 s . There is an u nkno w n u nderl y ing proportion of s u ccess . If data point is a s u ccess is onl y a � ected b y this proportion . Prior to seeing an y data , an y u nderl y ing proportion of s u ccess is eq u all y likel y. The res u lt is a probabilit y distrib u tion that represents w hat the model kno w s abo u t the u nderl y ing proportion of s u ccess . FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  21. Tr y ing o u t prop _ model data <- c() prop_model(data) FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  22. Tr y ing o u t prop _ model data <- c(0) prop_model(data) FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  23. Tr y ing o u t prop _ model data <- c(0, 1) prop_model(data) FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  24. Tr y ing o u t prop _ model data <- c(0, 1, 0) prop_model(data) FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  25. Tr y ing o u t prop _ model data <- c(0, 1, 0, 0) prop_model(data) FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  26. Tr y ing o u t prop _ model data <- c(0, 1, 0, 0, 0) prop_model(data) FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  27. Tr y ing o u t prop _ model data <- c(0, 1, 0, 0, 0, 1) prop_model(data) FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  28. No w, y o u tr y o u t prop _ model ! FU N DAME N TAL S OF BAYE SIAN DATA AN ALYSIS IN R

  29. Yo u j u st did some Ba y esian data anal y sis ! FU N DAME N TAL S OF BAYE SIAN DATA AN ALYSIS IN R Rasm u s Bååth Data Scientist

  30. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  31. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  32. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  33. Priors & Posteriors A prior is a probabilit y distrib u tion that represents w hat the model kno w s before seeing the data . A posterior is a probabilit y distrib u tion that represents w hat the model kno w s a � er ha v ing seen the data . FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  34. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  35. The probabilit y distrib u tion o v er the n u mber of 6' s w hen rolling 5 dice 5 ) 6 1 x 1 ( x 5− x p(x) = ( ) (1 − ( )) 6 FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  36. number_of_sixes 1 1 0 0 1 0 1 2 0 1 0 0 1 0 0 0 0 0 1 1 1 0 1 1 0 0 2 0 0 1 0 0 1 0 0 1 0 1 2 0 1 0 0 0 1 2 1 2 0 0 1 1 3 3 0 0 1 1 1 1 1 0 0 1 2 0 1 3 1 1 1 0 1 0 1 2 0 1 1 0 1 1 1 0 2 1 0 4 0 1 2 1 1 1 2 0 1 0 1 1 0 0 2 0 0 0 0 0 1 1 0 1 0 0 0 0 2 0 0 0 0 0 1 1 0 0 2 1 1 1 0 2 1 1 1 0 0 1 1 1 ... mean(number_of_sixes) 0.83 FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  37. posterior <- prop_model(data) print(posterior) 0.23 0.36 0.20 0.21 0.12 0.10 0.03 0.16 0.09 0.14 0.23 0.05 0.15 0.26 0.22 ... FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  38. Finish off the Zombie dr u g anal y sis ! FU N DAME N TAL S OF BAYE SIAN DATA AN ALYSIS IN R

  39. Wrapping u p the z ombie anal y sis FU N DAME N TAL S OF BAYE SIAN DATA AN ALYSIS IN R Rasm u s Bååth Data Scientist

  40. The res u lt of the z ombie anal y sis data = c(1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0) posterior <- prop_model(data) median(posterior) 0.19 quantile(posterior, c(0.05, 0.95)) 5% 95% 0.06 0.39 sum(posterior > 0.07) / length(posterior) 0.93 FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  41. The res u lt in a jo u rnal FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  42. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  43. FUNDAMENTALS OF BAYESIAN DATA ANALYSIS IN R

  44. Ne x t u p : Ho w does Ba y es w ork ? FU N DAME N TAL S OF BAYE SIAN DATA AN ALYSIS IN R

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