SlideShare a Scribd company logo
1 of 10
Download to read offline
On construction of frequentist and Bayesian
ANOVA comparison
(STATS/CSE 780 course project)
Kyuson Lim
Department of Mathematics and Statistics
McMaster University
04/05/2022
Outline
I Motivation
I Data
I Exploratory Data Analysis (Summary)
I Exploratory Data Analysis (Data Visualization)
I Method
I Methods: Frequentist Anova
I Methods: Bayesian Anova
I Result
I Discussion
Motivation (Makowski et al., 2019)
I What is the problem?
I Reliance on the strict assumptions (normality, homogeneity of
variance, independence of samples).
I Frequentist framework: misuse of uniform p-values, changes by
sample size (Chambers et al., 2014).
I What are the two methods? (Andrews & Baguley, 2013)
I Baeysian ANOVA: use Bayes factor, BF12 = p(D|M1)
p(D|M2) from
p(M1|D)
p(M2|D) = p(D|M1)
p(D|M2) × p(M1)
p(M2) to provide the evidence.
I Frequentist ANOVA: use F-statistic given by F0 = MSR
MSE .
MSR = SSR/(k − 1) and MSE = SSE/(n − k) are mean sum
of squares between and within groups.
I Why does this problem important?
I Probability as a degree of belief: given the observed data
computed, posterior distribution is derived.
I Goal of presentation
I Apply Bayesian ANOVA and compare with frequentist ANOVA.
I Understand difference in two sample t-test.
Exploratory Data Analysis (Summary)
I Source: Glass Identification Data Set, UCI ML repository
I Observation (Spiehler, 1987):
I Total of 214 glass collected.
I 10 variables, 9 continuous variables, and 1 categorical variable.
I Outliers (82 values) are ommited by RI and Mg composition.
I Two types of 132 observations are compared against RI values.
I 67 building window glass types.
I 65 non-building window glass types.
I Results of exploratory analysis:
I All continuous variables are standardized (scaled).
I Non-window glass types contain considerable number of outliers.
I A classification is inappropriate by data visualization.
I A regression method is rejected by heterogeneity of glass types.
I Building window: correlation between Mg and RI is 0.42.
I Non-building window: correlation between Mg and RI is -0.39.
I Frequentist assumption:
I Shapiro-Wilk test: p-value (1.192e-07) < 0.1, violate normality.
I Bartlett’s test: p-value (0.08) < 0.1, violates homogeneity.
Exploratory Data Analysis (Data Visualization)
Figure 1: Source: Glass Identification Data Set, UCI ML repository
I Figure 1. considers classification and regression problems.
I Figure 3. shows the distribution differences for 1-way ANOVA.
Methods: Frequentist Anova (Dean et al., 1999)
I Purpose and reason for the comparison (1-way ANOVA)
I Frequentist: robust to 2-sample problem, limited hypothesis
testing, reproducibility issue, estimation for uncertainty.
I Bayesian: flexibility, consideration for prior odds to the posterior
odds, quantify relative support between competing hypothesis.
I Frquentist framework: F statistic compares the variability
between the groups to the variability within the groups.
I The H0 : µ1 = µ2 is rejected if F0 > Fα/2,k−1,n−k or p-value
P(F > F0)

is less than α.
I Welch’s t-test: t = X̄1−X̄2
sp
p 1
n1
+ 1
n2
or t =
¯
X1− ¯
X2
√
s2
1 /n1+s2
2 /n2
.
I Frequentist ANOVA (aov): fit an ANOVA Model
(generalization of two-sample t-test).
I t-test (t.test): compute independent t-test.
Methods: Bayesian Anova (Rouder et al., 2009)
I Bayesian framework: Bayes Factor quantifies relative
probability of the observed data under each of the two models,
which is transitive BF12 = p(D|M1)
p(D|M2) = p(D|M1)/p(D|M0)
p(D|M2)/p(D|M0) = BF10
BF20
.
I Model comparison very flexible and robust to choice of prior.
I Bayesian t-test compares models, yi ∼ N(µ ± α
2 , σ2
) with δ ∼
Cauchy and non-informative prior on σ2
, p(σ2
) = 1
σ2 ,p(µ) = 1.
I Bayesian ANOVA (anovaBF): compute Bayes factors for
ANOVA designs (Morey et al., 2015).
I Model: y = µ + x1θ1 + , θ1 ∼ N(0, g1σ2
)
I Jeffrey’s prior places on µ, σ2
, scaled-Inv χ2
(1) prior on g1.
I Bayes factors are computed by integrating the likelihood.
I The integration of g1 is performed through Monte Carlo
sampling (Rouder et al., 2012).
I t-test (ttestBF): allows us to perform model comparison
(same result in two-sample case to anovaBF).
I Inclusion Bayes factors (BMA): examines the term’s inclusion
Bayes factor (Hinne et al., 2019).
Results
I Frequentist ANOVA (aov): exists significant difference
between glass types for an equality for means of RI.
I t-test (ttest): agrees with result of 1-way ANOVA.
I Bayesian ANOVA (BF): with uniform (0,1) prior, there is a
posterior probability of 0.99 on statistical difference.
I Bayesian Model Averaging (anovaBF): model with term on
average, 0.143 ( 1
7.01 ) less supported than model without term.
I t-test (ttestBF): strong evidence (1110 times) for alternative
over null (µ1 − µ2 = 0) hypothesis (Makowski et al.,2019).
Discussion
I Limitation: performance with number of samples .
I Frequentist approach: robust with violation of assumptions,
changes by sample size from formula (Maarten, 2021).
I Bayesian approach: ANOVA is restricted to classification
difference, accurate with small samples (Kruschke et al., 2012).
I Interpretablity:
I Frequentist approach: overstate the evidence against a null
hypothesis by the p-value.
I Bayesian: simply describe the posterior distribution of the
effect, widely use for Bayesian (Kruschke, 2010).
I Reproducibility:
I Frequentist: Rejection regions are not suitable for
underpowered experiments (Maarten, 2021).
I Stability:
I Frequentist: return a point-estimate, estimate the real effect
(correlation between variables) (Dudek, 2021).
I Bayesian: no assumption, returns posterior of the effect that is
compatible with the observed data (Wagenmakers et al., 2018).
References
I Makowski, D., Ben-Shachar, M. S.,  Lüdecke, D. (2019). bayestestR: Describing effects and their
uncertainty, existence and significance within the Bayesian framework. Journal of Open Source Software,
4(40), 1541.
I Morey, R. D., Rouder, J. N., Jamil, T.,  Morey, M. R. D. (2015). Package ‘bayesfactor’. URLh
http://cran/r-projectorg/web/packages/BayesFactor/BayesFactor pdf i (accessed 1006 15).
I Chambers, C. D., Feredoes, E., Muthukumaraswamy, S. D.,  Etchells, P. (2014). Instead of” playing the
game” it is time to change the rules: Registered Reports at AIMS Neuroscience and beyond. AIMS
Neuroscience, 1(1), 4-17.
I Rouder, J. N., Speckman, P. L., Sun, D., Morey, R. D.,  Iverson, G. (2009). Bayesian t tests for accepting
and rejecting the null hypothesis. Psychonomic bulletin  review, 16(2), 225-237.
I Rouder, J. N., Morey, R. D., Speckman, P. L., Province, J. M., (2012) Default Bayes Factors for ANOVA
Designs. Journal of Mathematical Psychology. 56. p. 356-374.
I Etz, A.,  Vandekerckhove, J. (2016). A Bayesian perspective on the reproducibility project: Psychology.
PloS one, 11(2), e0149794.
I Get started with bayesian analysis. bayestestR. (2019). Retrieved April 5, 2022, from
https://easystats.github.io/bayestestR/articles/bayestestR.html
I Andrews, M.,  Baguley, T. (2013). Prior approval: The growth of bayesian methods in psychology. British
Journal of Mathematical and Statistical Psychology, 66(1), 1–7.
I Dudek, B. (2021). One Way ANOVA with R. Retrieved April 5, 2022, URLh
https://bcdudek.net/anova/bayesian-inference-for-1-way-anovas.html
I Maarten, S. (2021). An R companion to statistics: Data Analysis and modelling. Statistics: Data analysis
and modelling . Retrieved April 5, 2022, from
https://mspeekenbrink.github.io/sdam-r-companion/index.html
I Kruschke, J. K. (2010). What to believe: Bayesian methods for data analysis. Trends in Cognitive Sciences,
14(7), 293–300.
I Kruschke, J. K., Aguinis, H.,  Joo, H. (2012). The time has come: Bayesian methods for data analysis in
the organizational sciences. Organizational Research Methods, 15(4), 722–752.
I Wagenmakers, E. J., Marsman, M., Jamil, T., Ly, A., Verhagen, J., Love, J., . . .  Morey, R. D. (2018).
Bayesian inference for psychology. Part I: Theoretical advantages and practical ramifications. Psychonomic
bulletin  review, 25(1), 35-57.
I Hinne, M., Gronau, Q. F., van den Bergh, D., and Wagenmakers, E. (2019). A conceptual introduction to
Bayesian Model Averaging. doi: 10.31234/osf.io/wgb64
I Dean, A., Voss, D. and Draguljic, D. (1999). Design and analysis of experiments. New York: Springer.
I Spiehler, V. (1987). Glass Identification Data Set. UCI Machine Learning Repository: Glass identification
data set. from https://archive.ics.uci.edu/ml/datasets/glass+identification

More Related Content

Similar to STATS 780 (Bayesian 1 way anova comparison).pdf

Analyzing experimental research data
Analyzing experimental research dataAnalyzing experimental research data
Analyzing experimental research dataAtula Ahuja
 
ISBA 2022 Susie Bayarri lecture
ISBA 2022 Susie Bayarri lectureISBA 2022 Susie Bayarri lecture
ISBA 2022 Susie Bayarri lecturePierre Jacob
 
International Journal of Mathematics and Statistics Invention (IJMSI)
International Journal of Mathematics and Statistics Invention (IJMSI) International Journal of Mathematics and Statistics Invention (IJMSI)
International Journal of Mathematics and Statistics Invention (IJMSI) inventionjournals
 
因果関係の推論
因果関係の推論因果関係の推論
因果関係の推論Kevin No
 
Statistical Modelling For Heterogeneous Dataset
Statistical Modelling For Heterogeneous DatasetStatistical Modelling For Heterogeneous Dataset
Statistical Modelling For Heterogeneous Datasetinventionjournals
 
MANOVA (July 2014 updated)
MANOVA (July 2014 updated)MANOVA (July 2014 updated)
MANOVA (July 2014 updated)Michael Ling
 
Accounting for variance in machine learning benchmarks
Accounting for variance in machine learning benchmarksAccounting for variance in machine learning benchmarks
Accounting for variance in machine learning benchmarksDevansh16
 
Analyzing experimental research data
Analyzing experimental research dataAnalyzing experimental research data
Analyzing experimental research dataAtula Ahuja
 
Testing Mediation and regression analysis
Testing Mediation and regression analysisTesting Mediation and regression analysis
Testing Mediation and regression analysisOsama Yousaf
 
Inductive Classification through Evidence-based Models and Their Ensemble
Inductive Classification through Evidence-based Models and Their EnsembleInductive Classification through Evidence-based Models and Their Ensemble
Inductive Classification through Evidence-based Models and Their EnsembleGiuseppe Rizzo
 
Statistical tools in research 1
Statistical tools in research 1Statistical tools in research 1
Statistical tools in research 1ashish7sattee
 
Running head LOGISTIC REGRESSION .docx
Running head LOGISTIC REGRESSION                                 .docxRunning head LOGISTIC REGRESSION                                 .docx
Running head LOGISTIC REGRESSION .docxwlynn1
 
La statistique et le machine learning pour l'intégration de données de la bio...
La statistique et le machine learning pour l'intégration de données de la bio...La statistique et le machine learning pour l'intégration de données de la bio...
La statistique et le machine learning pour l'intégration de données de la bio...tuxette
 
applied multivariate statistical techniques in agriculture and plant science 2
applied multivariate statistical techniques in agriculture and plant science 2applied multivariate statistical techniques in agriculture and plant science 2
applied multivariate statistical techniques in agriculture and plant science 2amir rahmani
 
artigo correlação policorica x correlaçãoperson pdf
artigo correlação policorica x correlaçãoperson pdfartigo correlação policorica x correlaçãoperson pdf
artigo correlação policorica x correlaçãoperson pdflarissaxavier60
 
Reviewing quantitative articles_and_checklist
Reviewing quantitative articles_and_checklistReviewing quantitative articles_and_checklist
Reviewing quantitative articles_and_checklistLasse Torkkeli
 
Machine Learning and Causal Inference
Machine Learning and Causal InferenceMachine Learning and Causal Inference
Machine Learning and Causal InferenceNBER
 
'ACCOST' for differential HiC analysis
'ACCOST' for differential HiC analysis'ACCOST' for differential HiC analysis
'ACCOST' for differential HiC analysistuxette
 

Similar to STATS 780 (Bayesian 1 way anova comparison).pdf (20)

Analyzing experimental research data
Analyzing experimental research dataAnalyzing experimental research data
Analyzing experimental research data
 
ISBA 2022 Susie Bayarri lecture
ISBA 2022 Susie Bayarri lectureISBA 2022 Susie Bayarri lecture
ISBA 2022 Susie Bayarri lecture
 
International Journal of Mathematics and Statistics Invention (IJMSI)
International Journal of Mathematics and Statistics Invention (IJMSI) International Journal of Mathematics and Statistics Invention (IJMSI)
International Journal of Mathematics and Statistics Invention (IJMSI)
 
因果関係の推論
因果関係の推論因果関係の推論
因果関係の推論
 
Statistical Modelling For Heterogeneous Dataset
Statistical Modelling For Heterogeneous DatasetStatistical Modelling For Heterogeneous Dataset
Statistical Modelling For Heterogeneous Dataset
 
MANOVA (July 2014 updated)
MANOVA (July 2014 updated)MANOVA (July 2014 updated)
MANOVA (July 2014 updated)
 
Accounting for variance in machine learning benchmarks
Accounting for variance in machine learning benchmarksAccounting for variance in machine learning benchmarks
Accounting for variance in machine learning benchmarks
 
Analyzing experimental research data
Analyzing experimental research dataAnalyzing experimental research data
Analyzing experimental research data
 
Testing Mediation and regression analysis
Testing Mediation and regression analysisTesting Mediation and regression analysis
Testing Mediation and regression analysis
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Inductive Classification through Evidence-based Models and Their Ensemble
Inductive Classification through Evidence-based Models and Their EnsembleInductive Classification through Evidence-based Models and Their Ensemble
Inductive Classification through Evidence-based Models and Their Ensemble
 
Statistical tools in research 1
Statistical tools in research 1Statistical tools in research 1
Statistical tools in research 1
 
Running head LOGISTIC REGRESSION .docx
Running head LOGISTIC REGRESSION                                 .docxRunning head LOGISTIC REGRESSION                                 .docx
Running head LOGISTIC REGRESSION .docx
 
Rodriguez_NRMC_Presentation
Rodriguez_NRMC_PresentationRodriguez_NRMC_Presentation
Rodriguez_NRMC_Presentation
 
La statistique et le machine learning pour l'intégration de données de la bio...
La statistique et le machine learning pour l'intégration de données de la bio...La statistique et le machine learning pour l'intégration de données de la bio...
La statistique et le machine learning pour l'intégration de données de la bio...
 
applied multivariate statistical techniques in agriculture and plant science 2
applied multivariate statistical techniques in agriculture and plant science 2applied multivariate statistical techniques in agriculture and plant science 2
applied multivariate statistical techniques in agriculture and plant science 2
 
artigo correlação policorica x correlaçãoperson pdf
artigo correlação policorica x correlaçãoperson pdfartigo correlação policorica x correlaçãoperson pdf
artigo correlação policorica x correlaçãoperson pdf
 
Reviewing quantitative articles_and_checklist
Reviewing quantitative articles_and_checklistReviewing quantitative articles_and_checklist
Reviewing quantitative articles_and_checklist
 
Machine Learning and Causal Inference
Machine Learning and Causal InferenceMachine Learning and Causal Inference
Machine Learning and Causal Inference
 
'ACCOST' for differential HiC analysis
'ACCOST' for differential HiC analysis'ACCOST' for differential HiC analysis
'ACCOST' for differential HiC analysis
 

Recently uploaded

Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINsankalpkumarsahoo174
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfSumit Kumar yadav
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)Areesha Ahmad
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencySheetal Arora
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsSérgio Sacani
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfSumit Kumar yadav
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsSumit Kumar yadav
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Lokesh Kothari
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡anilsa9823
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxgindu3009
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfrohankumarsinghrore1
 

Recently uploaded (20)

Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
 
Botany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdfBotany 4th semester file By Sumit Kumar yadav.pdf
Botany 4th semester file By Sumit Kumar yadav.pdf
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdf
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questions
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 

STATS 780 (Bayesian 1 way anova comparison).pdf

  • 1. On construction of frequentist and Bayesian ANOVA comparison (STATS/CSE 780 course project) Kyuson Lim Department of Mathematics and Statistics McMaster University 04/05/2022
  • 2. Outline I Motivation I Data I Exploratory Data Analysis (Summary) I Exploratory Data Analysis (Data Visualization) I Method I Methods: Frequentist Anova I Methods: Bayesian Anova I Result I Discussion
  • 3. Motivation (Makowski et al., 2019) I What is the problem? I Reliance on the strict assumptions (normality, homogeneity of variance, independence of samples). I Frequentist framework: misuse of uniform p-values, changes by sample size (Chambers et al., 2014). I What are the two methods? (Andrews & Baguley, 2013) I Baeysian ANOVA: use Bayes factor, BF12 = p(D|M1) p(D|M2) from p(M1|D) p(M2|D) = p(D|M1) p(D|M2) × p(M1) p(M2) to provide the evidence. I Frequentist ANOVA: use F-statistic given by F0 = MSR MSE . MSR = SSR/(k − 1) and MSE = SSE/(n − k) are mean sum of squares between and within groups. I Why does this problem important? I Probability as a degree of belief: given the observed data computed, posterior distribution is derived. I Goal of presentation I Apply Bayesian ANOVA and compare with frequentist ANOVA. I Understand difference in two sample t-test.
  • 4. Exploratory Data Analysis (Summary) I Source: Glass Identification Data Set, UCI ML repository I Observation (Spiehler, 1987): I Total of 214 glass collected. I 10 variables, 9 continuous variables, and 1 categorical variable. I Outliers (82 values) are ommited by RI and Mg composition. I Two types of 132 observations are compared against RI values. I 67 building window glass types. I 65 non-building window glass types. I Results of exploratory analysis: I All continuous variables are standardized (scaled). I Non-window glass types contain considerable number of outliers. I A classification is inappropriate by data visualization. I A regression method is rejected by heterogeneity of glass types. I Building window: correlation between Mg and RI is 0.42. I Non-building window: correlation between Mg and RI is -0.39. I Frequentist assumption: I Shapiro-Wilk test: p-value (1.192e-07) < 0.1, violate normality. I Bartlett’s test: p-value (0.08) < 0.1, violates homogeneity.
  • 5. Exploratory Data Analysis (Data Visualization) Figure 1: Source: Glass Identification Data Set, UCI ML repository I Figure 1. considers classification and regression problems. I Figure 3. shows the distribution differences for 1-way ANOVA.
  • 6. Methods: Frequentist Anova (Dean et al., 1999) I Purpose and reason for the comparison (1-way ANOVA) I Frequentist: robust to 2-sample problem, limited hypothesis testing, reproducibility issue, estimation for uncertainty. I Bayesian: flexibility, consideration for prior odds to the posterior odds, quantify relative support between competing hypothesis. I Frquentist framework: F statistic compares the variability between the groups to the variability within the groups. I The H0 : µ1 = µ2 is rejected if F0 > Fα/2,k−1,n−k or p-value P(F > F0) is less than α. I Welch’s t-test: t = X̄1−X̄2 sp p 1 n1 + 1 n2 or t = ¯ X1− ¯ X2 √ s2 1 /n1+s2 2 /n2 . I Frequentist ANOVA (aov): fit an ANOVA Model (generalization of two-sample t-test). I t-test (t.test): compute independent t-test.
  • 7. Methods: Bayesian Anova (Rouder et al., 2009) I Bayesian framework: Bayes Factor quantifies relative probability of the observed data under each of the two models, which is transitive BF12 = p(D|M1) p(D|M2) = p(D|M1)/p(D|M0) p(D|M2)/p(D|M0) = BF10 BF20 . I Model comparison very flexible and robust to choice of prior. I Bayesian t-test compares models, yi ∼ N(µ ± α 2 , σ2 ) with δ ∼ Cauchy and non-informative prior on σ2 , p(σ2 ) = 1 σ2 ,p(µ) = 1. I Bayesian ANOVA (anovaBF): compute Bayes factors for ANOVA designs (Morey et al., 2015). I Model: y = µ + x1θ1 + , θ1 ∼ N(0, g1σ2 ) I Jeffrey’s prior places on µ, σ2 , scaled-Inv χ2 (1) prior on g1. I Bayes factors are computed by integrating the likelihood. I The integration of g1 is performed through Monte Carlo sampling (Rouder et al., 2012). I t-test (ttestBF): allows us to perform model comparison (same result in two-sample case to anovaBF). I Inclusion Bayes factors (BMA): examines the term’s inclusion Bayes factor (Hinne et al., 2019).
  • 8. Results I Frequentist ANOVA (aov): exists significant difference between glass types for an equality for means of RI. I t-test (ttest): agrees with result of 1-way ANOVA. I Bayesian ANOVA (BF): with uniform (0,1) prior, there is a posterior probability of 0.99 on statistical difference. I Bayesian Model Averaging (anovaBF): model with term on average, 0.143 ( 1 7.01 ) less supported than model without term. I t-test (ttestBF): strong evidence (1110 times) for alternative over null (µ1 − µ2 = 0) hypothesis (Makowski et al.,2019).
  • 9. Discussion I Limitation: performance with number of samples . I Frequentist approach: robust with violation of assumptions, changes by sample size from formula (Maarten, 2021). I Bayesian approach: ANOVA is restricted to classification difference, accurate with small samples (Kruschke et al., 2012). I Interpretablity: I Frequentist approach: overstate the evidence against a null hypothesis by the p-value. I Bayesian: simply describe the posterior distribution of the effect, widely use for Bayesian (Kruschke, 2010). I Reproducibility: I Frequentist: Rejection regions are not suitable for underpowered experiments (Maarten, 2021). I Stability: I Frequentist: return a point-estimate, estimate the real effect (correlation between variables) (Dudek, 2021). I Bayesian: no assumption, returns posterior of the effect that is compatible with the observed data (Wagenmakers et al., 2018).
  • 10. References I Makowski, D., Ben-Shachar, M. S., Lüdecke, D. (2019). bayestestR: Describing effects and their uncertainty, existence and significance within the Bayesian framework. Journal of Open Source Software, 4(40), 1541. I Morey, R. D., Rouder, J. N., Jamil, T., Morey, M. R. D. (2015). Package ‘bayesfactor’. URLh http://cran/r-projectorg/web/packages/BayesFactor/BayesFactor pdf i (accessed 1006 15). I Chambers, C. D., Feredoes, E., Muthukumaraswamy, S. D., Etchells, P. (2014). Instead of” playing the game” it is time to change the rules: Registered Reports at AIMS Neuroscience and beyond. AIMS Neuroscience, 1(1), 4-17. I Rouder, J. N., Speckman, P. L., Sun, D., Morey, R. D., Iverson, G. (2009). Bayesian t tests for accepting and rejecting the null hypothesis. Psychonomic bulletin review, 16(2), 225-237. I Rouder, J. N., Morey, R. D., Speckman, P. L., Province, J. M., (2012) Default Bayes Factors for ANOVA Designs. Journal of Mathematical Psychology. 56. p. 356-374. I Etz, A., Vandekerckhove, J. (2016). A Bayesian perspective on the reproducibility project: Psychology. PloS one, 11(2), e0149794. I Get started with bayesian analysis. bayestestR. (2019). Retrieved April 5, 2022, from https://easystats.github.io/bayestestR/articles/bayestestR.html I Andrews, M., Baguley, T. (2013). Prior approval: The growth of bayesian methods in psychology. British Journal of Mathematical and Statistical Psychology, 66(1), 1–7. I Dudek, B. (2021). One Way ANOVA with R. Retrieved April 5, 2022, URLh https://bcdudek.net/anova/bayesian-inference-for-1-way-anovas.html I Maarten, S. (2021). An R companion to statistics: Data Analysis and modelling. Statistics: Data analysis and modelling . Retrieved April 5, 2022, from https://mspeekenbrink.github.io/sdam-r-companion/index.html I Kruschke, J. K. (2010). What to believe: Bayesian methods for data analysis. Trends in Cognitive Sciences, 14(7), 293–300. I Kruschke, J. K., Aguinis, H., Joo, H. (2012). The time has come: Bayesian methods for data analysis in the organizational sciences. Organizational Research Methods, 15(4), 722–752. I Wagenmakers, E. J., Marsman, M., Jamil, T., Ly, A., Verhagen, J., Love, J., . . . Morey, R. D. (2018). Bayesian inference for psychology. Part I: Theoretical advantages and practical ramifications. Psychonomic bulletin review, 25(1), 35-57. I Hinne, M., Gronau, Q. F., van den Bergh, D., and Wagenmakers, E. (2019). A conceptual introduction to Bayesian Model Averaging. doi: 10.31234/osf.io/wgb64 I Dean, A., Voss, D. and Draguljic, D. (1999). Design and analysis of experiments. New York: Springer. I Spiehler, V. (1987). Glass Identification Data Set. UCI Machine Learning Repository: Glass identification data set. from https://archive.ics.uci.edu/ml/datasets/glass+identification