METHODSDUMMIES BAYES FOR BEGINNERS. Any given Monday at 12.31 pm “I’m sure this makes sense, but you lost me about here…”

Slides:



Advertisements
Similar presentations
Hierarchical Models and
Advertisements

Inferential Statistics and t - tests
1 COMM 301: Empirical Research in Communication Lecture 15 – Hypothesis Testing Kwan M Lee.
Bayesian models for fMRI data
Statistics.  Statistically significant– When the P-value falls below the alpha level, we say that the tests is “statistically significant” at the alpha.
Psychology 290 Special Topics Study Course: Advanced Meta-analysis April 7, 2014.
Testing Hypotheses About Proportions Chapter 20. Hypotheses Hypotheses are working models that we adopt temporarily. Our starting hypothesis is called.
Section 9.1 ~ Fundamentals of Hypothesis Testing Introduction to Probability and Statistics Ms. Young.
Bayesian inference Gil McVean, Department of Statistics Monday 17 th November 2008.
One way-ANOVA Analysis of Variance Let’s say we conduct this experiment: effects of alcohol on memory.
Bayesian models for fMRI data
07/01/15 MfD 2014 Xin You Tai & Misun Kim
Bayesian models for fMRI data Methods & models for fMRI data analysis 06 May 2009 Klaas Enno Stephan Laboratory for Social and Neural Systems Research.
Chapter Seventeen HYPOTHESIS TESTING
1 Hypothesis Testing In this section I want to review a few things and then introduce hypothesis testing.
Review of Stats Fundamentals
Lecture 9: p-value functions and intro to Bayesian thinking Matthew Fox Advanced Epidemiology.
Estimating the Transfer Function from Neuronal Activity to BOLD Maria Joao Rosa SPM Homecoming 2008 Wellcome Trust Centre for Neuroimaging.
Confidence Intervals and Hypothesis Testing
ANOVA Greg C Elvers.
Copyright © Cengage Learning. All rights reserved. 10 Inferences Involving Two Populations.
CHAPTER 16: Inference in Practice. Chapter 16 Concepts 2  Conditions for Inference in Practice  Cautions About Confidence Intervals  Cautions About.
Bayes for Beginners Presenters: Shuman ji & Nick Todd.
Estimating parameters in a statistical model Likelihood and Maximum likelihood estimation Bayesian point estimates Maximum a posteriori point.
Chapter 9 Power. Decisions A null hypothesis significance test tells us the probability of obtaining our results when the null hypothesis is true p(Results|H.
10.2 Tests of Significance Use confidence intervals when the goal is to estimate the population parameter If the goal is to.
Bayes for Beginners Reverend Thomas Bayes ( ) Velia Cardin Marta Garrido.
Inference We want to know how often students in a medium-size college go to the mall in a given year. We interview an SRS of n = 10. If we interviewed.
Corinne Introduction/Overview & Examples (behavioral) Giorgia functional Brain Imaging Examples, Fixed Effects Analysis vs. Random Effects Analysis Models.
CHAPTER 16: Inference in Practice ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture Presentation.
Inference and Inferential Statistics Methods of Educational Research EDU 660.
I. Statistical Tests: A Repetive Review A.Why do we use them? Namely: we need to make inferences from incomplete information or uncertainty þBut we want.
STT 315 Ashwini Maurya Acknowledgement: Author is indebted to Dr. Ashok Sinha, Dr. Jennifer Kaplan and Dr. Parthanil Roy for allowing him to use/edit many.
Bayesian Inference and Posterior Probability Maps Guillaume Flandin Wellcome Department of Imaging Neuroscience, University College London, UK SPM Course,
The binomial applied: absolute and relative risks, chi-square.
Maximum Likelihood - "Frequentist" inference x 1,x 2,....,x n ~ iid N( ,  2 ) Joint pdf for the whole random sample Maximum likelihood estimates.
5.1 Chapter 5 Inference in the Simple Regression Model In this chapter we study how to construct confidence intervals and how to conduct hypothesis tests.
Chapter 20 Testing Hypothesis about proportions
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 22 Comparing Two Proportions.
Statistical Inference for the Mean Objectives: (Chapter 9, DeCoursey) -To understand the terms: Null Hypothesis, Rejection Region, and Type I and II errors.
DCM – the theory. Bayseian inference DCM examples Choosing the best model Group analysis.
3-1 MGMG 522 : Session #3 Hypothesis Testing (Ch. 5)
"Classical" Inference. Two simple inference scenarios Question 1: Are we in world A or world B?
Bayesian models for fMRI data Methods & models for fMRI data analysis November 2011 With many thanks for slides & images to: FIL Methods group, particularly.
Simple examples of the Bayesian approach For proportions and means.
Bayes Theorem. Prior Probabilities On way to party, you ask “Has Karl already had too many beers?” Your prior probabilities are 20% yes, 80% no.
Statistical Analysis II Lan Kong Associate Professor Division of Biostatistics and Bioinformatics Department of Public Health Sciences December 15, 2015.
Spatial Smoothing and Multiple Comparisons Correction for Dummies Alexa Morcom, Matthew Brett Acknowledgements.
G. Cowan Lectures on Statistical Data Analysis Lecture 8 page 1 Statistical Data Analysis: Lecture 8 1Probability, Bayes’ theorem 2Random variables and.
AP Statistics Chapter 21 Notes
Section 10.2: Tests of Significance Hypothesis Testing Null and Alternative Hypothesis P-value Statistically Significant.
Hypothesis Testing. Statistical Inference – dealing with parameter and model uncertainty  Confidence Intervals (credible intervals)  Hypothesis Tests.
Guillaume Flandin Wellcome Trust Centre for Neuroimaging University College London SPM Course Zurich, February 2008 Bayesian Inference.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
Hypothesis Tests for 1-Proportion Presentation 9.
Bayes for Beginners Anne-Catherine Huys M. Berk Mirza Methods for Dummies 20 th January 2016.
Bayesian Inference in SPM2 Will Penny K. Friston, J. Ashburner, J.-B. Poline, R. Henson, S. Kiebel, D. Glaser Wellcome Department of Imaging Neuroscience,
Chapter 11: Categorical Data n Chi-square goodness of fit test allows us to examine a single distribution of a categorical variable in a population. n.
Statistics 22 Comparing Two Proportions. Comparisons between two percentages are much more common than questions about isolated percentages. And they.
FIXETH LIKELIHOODS this is correct. Bayesian methods I: theory.
More about Posterior Distributions
Statistical inference
'Linear Hierarchical Models'
I. Statistical Tests: Why do we use them? What do they involve?
SPM2: Modelling and Inference
Hierarchical Models and
Bayes for Beginners Luca Chech and Jolanda Malamud
Bayesian inference J. Daunizeau
Bayesian Inference in SPM2
Statistical inference
Presentation transcript:

METHODSDUMMIES BAYES FOR BEGINNERS

Any given Monday at pm “I’m sure this makes sense, but you lost me about here…”

Bayes for Beginners What can Bayes do for you? Conditional Probability What is Bayes Theorem? Bayes in SPM2

What can Bayes do for you? Problems with classical statistics approach –All inferences relate to disproving the null hypothesis –Never fully reject H 0, only say that the effect you see is unlikely to occur by chance –Corrections for multiple comparisons –Very small effects can be declared significant with enough data Bayesian Inference offers a solution

What can Bayes’ do for you? Classical –‘What is the likelihood of getting these data given no activation occurred (  ?’ –p(y|  ) Bayesian –‘What is the chance of getting these parameters, given these data?’ –p(  |y) p(  |y) ≠ p(y|  )

Conditional Probability Last year you were at a conference in Japan You happen to notice that rather a lot of the professors smoke At one of socials you met someone at the bar & had a few drinks The next morning you wake up & it dawns on you that you told the person you were talking to in the bar something rather indiscrete about you supervisor You remember that the person you were talking kept stealing your cigarettes, and you are start to worry that they might have been a professor (and therefore a friend of your supervisor) You decide to do a calculation to work out what the chances are that the person you were talking to is a professor, given that you know they are a smoker. You phone the hotel reception & they give you the following information: –100 delegates –40 requested non-smoking rooms –10 professors –4 requested non-smoking rooms

p(P) = 0.1 p(P’) = 0.9 Given that the person you were talking to last night was a smoker, what is the probability of them being a professor? p(S|P) = 0.6 p(S’|P) = 0.4 p(S|P’) = 0.6 p(S’|P’) = 0.4 p(P|S) = p(P and S) p(S) p(S) = p(S and P) or p(S and P’) ‘AND’ = multiply ‘OR’ = add p(S and P) = p(S|P)*p(P) = 0.06 p(S and P’) = p(S|P’)*p(P’) p(P|S) = p(S|P)*p(P) p(S) = 0.06/0.6 p(P|S) = 0.1 p(S) = 0.6* *0.9 = delegates 40 non-smokers 10 professors 4 non-smokers

The following night you are introduced to a professor who you would very much like to work for after you have finished your PhD. You want to make a good impression. Given that this person is a professor, what are the chances that they are also a smoker, in which case offering them a cigarette won’t harm your career prospects? p(P) = 0.1 p(P’) = 0.9 p(S|P) = 0.6 p(S’|P) = 0.4 p(S|P’) = 0.6 p(S’|P’) = 0.4 p(P|S) ≠ p(S|P) p(S|P) = p(S and P) p(P) = 0.6 * 0.1 / 0.1 = 0.6 p(P|S) = p(S|P)*p(P) p(S) = 0.06/0.6 = 0.1

What is Bayes Theorem? p(P|S) = p(S|P)*p(P) / p(S) Posterior = Likelihood * Prior / Evidence p(P|S) –Degree of belief in ‘P’, given the data ‘S’ depends on what the data tell you ‘p(S|P  ’ and any prior information ‘p(P  ’

100 participants 80 non-smokers 10 professors 4 non-smokers This year, the conference is held in New York where smokers have to pay extra. This doesn’t deter the professors, but lots of the other participants decide to give up for the week! If you repeat your indiscretion this year, what are the chances of the smoker at the bar being a professor? p(P|S) = p(S|P)*p(P) p(S) = 0.06/0.234 = 0.25 p(P) = 0.1 p(P’) = 0.9 p(S|P) = 0.6 p(S’|P) = 0.4 p(S|P’) = 0.2 p(S’|P’) = 0.8 p(P|S) = p(P and S) p(S) p(S) = p(S and P) or p(S and P’) ‘AND’ = multiply ‘OR’ = add p(S and P) = p(S|P)*p(P) p(S and P’) = p(S|P’)*p(P’) p(S) = 0.6* *0.9 = 0.234

Bayes in SPM2 p(  y  p(y|  *p(  p(y) p(  y  p(y|  *p(  Posterior Probability Map (PPM) –Posterior Distribution –Likelihood Function (equivalent to normal SPM) –Prior Probabilities of parameters PPM = SPM * priors

Bayes in SPM2 Deciding on the priors –Fully specified priors in DCM –Estimating priors in PEB Computing the Posterior Distribution Making inferences –Shrinkage priors –Thresholds

Priors Everyone has prior beliefs about their data In Bayesian Framework priors are formally tested Bayesian Inference Full Bayes Previous empirical data eg biophysics of haemodynamic response Empirical Bayes Mean & Variance of priors estimated from the data Hierarchical model: Parameters from one level become the priors at next level Between voxel variance over all voxels used as prior on variance at each voxel PPMs: 1 st Level = within voxel of interest 2 nd Level = between all brain voxels

y =  + eLikelihood:p(y|  ) =  (M d, d -1 )  =  + zPrior:p(  ) =  (M p, p -1 ) Posterior: p(  y) = p(y|  )*  p(  ) =  (M post, post -1 ) MpMp p -1 M post post -1 d -1 MdMd post = d + p M post = d M d + p M p post post Computing the Posterior Probability Distribution

The effects of different precisions p = d p < d p > d p ≈ 0

Multivariate Distributions

Shrinkage Priors Small, variable effect Large, variable effect Small, consistent effect Large, consistent effect

Reporting PPMs Posterior Distribution describes probability of getting an effect, given the data Posterior distribution is different for every voxel Size of effect (Mean) & Variability (Precision) 2 Steps –Decide what size of effect is physiologically relevant –Each voxel 95% certain that the effect size is greater than threshold Special extension of Bayesian Inference for PPMs

Thresholding Small, variable effect Large, variable effect Small, consistent effect Large, consistent effect p(  | y) = 0.95    

Bayesian Inference in SPM2 Bayesian Inference offers a solution –All inferences relate to disproving the null hypothesis There is no null hypothesis Different hypotheses can be tested formally –Multiple Comparisons & False Positives Voxel wise inferences are independent P-values don’t change with search volume Use of shrinkage priors –Very small effects can be declared significant with enough data Thresholding of effect size

With thanks to Klaas & Will