SlideShare a Scribd company logo
1 of 22
Download to read offline
Statistical Inference
Week 4: Statistical power, ANOVA, and post hoc tests
Statistical Power
 Statistical power of a study (i.e., test of statistical significance)
− Probability that it will correctly reject a false null hypothesis
− Probability that it will correctly detect an effect/difference
 Why calculate statistical power?
− Perhaps you want to know in advance the minimum sample size
necessary to have a reasonable chance of detecting an effect
− Alternatively, if you found out that your (costly) study only had power =
0.3, would you proceed with the study?
Fail to reject 𝐻0 Reject 𝐻0
𝐻0 is True  Confidence Level Type I error (𝛼)
𝐻0 is False Type II error (𝛽)  Power
Calculating Statistical Power
 Power Calculator: http://www.statisticalsolutions.net/pss_calc.php
 You hypothesize that your weight loss drug helps people lose 2kg
over a month. Assuming 𝜎 = 8, 𝑝 = 0.05, and 𝑝𝑜𝑤𝑒𝑟 = 0.8, what
is the minimum sample size required to detect an effect?
 You realize that you only have budget for 30 participants to
conduct your trial. Assuming the same parameters as above and
with 𝑁 = 30, what is the power of your trial?
Parameters of Statistical Power
𝑆𝑖𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑛𝑐𝑒 𝐿𝑒𝑣𝑒𝑙 / 𝑝 − 𝑣𝑎𝑙𝑢𝑒 (𝛼) 𝑆𝑎𝑚𝑝𝑙𝑒 𝑆𝑖𝑧𝑒 (𝑁)
𝐸𝑓𝑓𝑒𝑐𝑡 𝑆𝑖𝑧𝑒 (𝐶𝑜ℎ𝑒𝑛′ 𝑠 𝑑) 𝐷𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑖𝑜𝑛 𝜎2
Tests with smaller p-values are more “rigorous” and
require more power.
− Increasing p-value from 0.01 to 0.1 means that you will
be rejecting 𝐻0 more often (99% vs 90%)
− There is a greater chance of accepting B relative to A
The bars show the 95% CI. In C, the sample sizes
are small and thus the CI is large; in contrast, D has
larger sample sizes and thus smaller CI.
As a result, it would be easier to detect the difference
in D relative to C.
DC
FE
Given that the size of difference (effect size) in F is
much larger than in E, a statistical test would find it
easier to detect the difference in F.
As the distribution of H has lesser variance than G,
there would be lesser overlap in their CIs. Thus, it
would be easier to detect the difference in H.
HG
BA 𝛼 = 0.01 𝛼 = 0.1
Comparing more than two means
 T-test
− Only two groups/levels are involved
− Dependent t-test: Whether McDonalds makes you gain weight (before vs. after)
− Independent t-test: Whether McDonalds or KFC makes you gain more weight
 What if we have more than two levels?
− Analysis of Variance (ANOVA)
Hypothesis testing for ANOVA
 Null hypothesis 𝐻0
− The mean outcome is the same across all categories
− 𝜇1 = 𝜇2 = … = 𝜇 𝑘
where 𝜇𝑖 = mean of the outcome for observations in category I
where 𝑘 = number of groups
 Alternative hypothesis (𝐻 𝑎)
− At least one pair of means are different from each other
 Is there a difference between the average weight gain from
consuming three types of fast foods
− Categories: (i) No fast food/control, (ii) McDonalds, (iii) KFC, (iv) Subway
Variability portioning in ANOVA
 ANOVA allows us to separate out variability due to
conditions/levels
Total variability in
weight gain
Between group variability:
variability due to food type
Within group variability:
variability due to other factors
t test vs. ANOVA
 t test
− Compare means from two groups
− Are they so far apart that the difference
cannot be attributed to sampling
variability (i.e., randomness)?
− 𝐻0: 𝜇1 = 𝜇2
 Test statistic
𝑡 =
𝑥1 − 𝑥2 − 𝜇1 − 𝜇2
𝑆𝐸( 𝑥1− 𝑥2)
 ANOVA
− Compare means from more than two
groups
− Are they so far apart that the difference
cannot be attributed to sampling
variability (i.e., randomness)?
− 𝐻0: 𝜇1 = 𝜇2 = ⋯ = 𝜇 𝑘
 Test statistic
𝐹 =
𝑣𝑎𝑟𝑖𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑔𝑟𝑜𝑢𝑝𝑠
𝑣𝑎𝑟𝑖𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑤𝑖𝑡ℎ𝑖𝑛 𝑔𝑟𝑜𝑢𝑝𝑠
 Large test statistics lead to small p-values
 If p-value is small enough, 𝐻0 is rejected and we conclude that that data provides evidence of a
difference in population means
F Distribution
 Probability distribution associated with the f statistic
− In order to be able to reject 𝐻0, we need a small p-value which requires a
large F statistic
− To get a large F statistic, variability between sample means needs to be
greater than variability within sample means
 p-value
− Probability of as large a ratio between the ‘between’ and ‘within’ group
variabilities, if in fact the means of all groups are equal
Accept 𝐻0
Reject 𝐻0
𝐹 =
𝑣𝑎𝑟𝑖𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑔𝑟𝑜𝑢𝑝𝑠
𝑣𝑎𝑟𝑖𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑤𝑖𝑡ℎ𝑖𝑛 𝑔𝑟𝑜𝑢𝑝𝑠
Interpreting the ANOVA table (sum of squares)
 Sum of squares (total)
− Measures the total variability
− Calculated very similarly to variance
except not scaled by sample size
 Sum of squares (group)
− Measures variability between
groups
− Deviation of group mean from
overall mean, weighted by sample
size
 Sum of squares (error)
− Measures the variability within
groups
− Unexplained by the group variable
Total 119 501.9
Interpreting the ANOVA table (degrees of freedom)
 Degrees of freedom (total)
− n - 1
− Where n = number of observations
 Degrees of freedom (group)
− k – 1
− Where k = number of groups
 Degrees of freedom (error)
− Degrees of freedom total – degrees
of freedom group
Total 119 501.9
Interpreting the ANOVA table (mean squares)
 Mean squares (group)
− Average variability between groups
− Total variability (sum sq) scaled by
the associated df
− Mean square (group) / degrees of
freedom (group)
 Mean squares (error)
− Average variability within groups
− Total variability (sum sq) scaled by
the associated df
− Mean square (error) / degrees of
freedom (error)
Total 119 501.9
Interpreting the ANOVA table (F statistics & p)
 F statistic
− Ration of the between group and
within group variability
− Mean square (group) / mean
square (error)
 p-value
− Probability of as large a ratio
between the ‘between’ and ‘within’
group variabilities, if in fact the
means of all groups are equal
Total 119 501.9
Interpreting the ANOVA table (p-value)
 If p-value is small (less than 𝛼),
reject 𝐻0
− The data provides evidence that
at least one pair of means
different from each other
− But we can’t tell which pair
 If p-value is large (more than 𝛼),
fail to reject 𝐻0
− The data does not provide
evidence that one pair of means
are different from each other
− The observed differences could
be due to chance
Total 119 501.9
Conditions for ANOVA
 Independence
− Within groups: sampled observations must be independent
− Between groups: groups must be independent of each other
 Approximate normality
− Within each group, distributions should be nearly normal
 Equal variance (homoscedasticity)
− Groups should have roughly equal variability
So how do we find out which means differ?
 We conduct independent t tests for differences between each
possible pair of groups (multiple comparisons)
− However, with multiple t test, there could be an inflated Type I error rate
 Thus, we use a modified significance level, which ranges from the
most liberal to the most conservative
− Most liberal: no correction
− Most conservative: Bonferronni correction
Bonferroni correction
 The Bonferroni correction suggests that a more stringent
significance level is more appropriate for multiple corrections
− Thus, we adjust 𝛼 by the number of comparisons considered
𝑎∗ =
𝛼
𝐾
Where 𝐾: number of comparisons, i.e.,
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑔𝑟𝑜𝑢𝑝𝑠 (𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑔𝑟𝑜𝑢𝑝𝑠 −1)
2
Bonferroni Correction
 In our example, the fast food variable has 4 level: (i) control, (ii)
McDonalds, (iii) KFC, (iv) Subway. If 𝛼 = 0.05, what should the
modified significance level be?
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑙𝑒𝑣𝑒𝑙𝑠 𝑘 = 4
𝐾 =
4 ×(4−1)
2
= 6
𝑎∗ =
𝛼
𝐾
=
0.05
6
≈ 0.0083
Types of ANOVA
 One-way ANOVA
− Between-groups
− Repeated measures
 Factorial ANOVA
− Two or more independent variables
− Allows for examination of interaction effects
 The t-test should suffice for most of your hypothesis testing needs
− For our understanding though, what other forms of hypothesis tests are there?
− Chi-Square
− Independent variable: Gender (proportion in general population)
− Dependent variable: Gender (proportion in engineering faculty)
− Linear Regression
− Independent variable: Age
− Dependent variable: Income
− Logistic Regression
− Independent variable: Age
− Dependent variable: Marital status
What other kinds of statistical tests are there?
Dependent Variable
Continuous Categorical
Independent
Variable
Continuous
Categorical t-test
Linear Regression Logistic Regression
Chi-square test
Time for practice
 In this lab session we will cover:
− ANOVA
− Bonferroni Correction
 GitHub repository: https://github.com/eugeneyan/Statistical-Inference
Thank you for your attention!
Eugene Yan

More Related Content

What's hot

Data Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVAData Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVADr Ali Yusob Md Zain
 
One-Sample Hypothesis Tests
One-Sample Hypothesis TestsOne-Sample Hypothesis Tests
One-Sample Hypothesis TestsSr Edith Bogue
 
Chapter 3 Confidence Interval
Chapter 3 Confidence IntervalChapter 3 Confidence Interval
Chapter 3 Confidence Intervalghalan
 
Chi square tests using spss
Chi square tests using spssChi square tests using spss
Chi square tests using spssParag Shah
 
T test, independant sample, paired sample and anova
T test, independant sample, paired sample and anovaT test, independant sample, paired sample and anova
T test, independant sample, paired sample and anovaQasim Raza
 
Basis of statistical inference
Basis of statistical inferenceBasis of statistical inference
Basis of statistical inferencezahidacademy
 
Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis TestingKen Plummer
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testingSumit Sharma
 
Hypothesis testing an introduction
Hypothesis testing an introductionHypothesis testing an introduction
Hypothesis testing an introductionGeetika Gulyani
 
The t Test for Two Independent Samples
The t Test for Two Independent SamplesThe t Test for Two Independent Samples
The t Test for Two Independent Samplesjasondroesch
 
Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hyp...
Chapter 6 part2-Introduction to Inference-Tests of Significance,  Stating Hyp...Chapter 6 part2-Introduction to Inference-Tests of Significance,  Stating Hyp...
Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hyp...nszakir
 
Inferential Statistics
Inferential StatisticsInferential Statistics
Inferential Statisticsewhite00
 
One Sample T Test
One Sample T TestOne Sample T Test
One Sample T Testshoffma5
 

What's hot (20)

Data Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVAData Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVA
 
One-Sample Hypothesis Tests
One-Sample Hypothesis TestsOne-Sample Hypothesis Tests
One-Sample Hypothesis Tests
 
Chapter 3 Confidence Interval
Chapter 3 Confidence IntervalChapter 3 Confidence Interval
Chapter 3 Confidence Interval
 
Confidence interval
Confidence intervalConfidence interval
Confidence interval
 
Chi square tests using spss
Chi square tests using spssChi square tests using spss
Chi square tests using spss
 
Significance test
Significance testSignificance test
Significance test
 
Data analysis with spss anova
Data analysis with spss anovaData analysis with spss anova
Data analysis with spss anova
 
T test, independant sample, paired sample and anova
T test, independant sample, paired sample and anovaT test, independant sample, paired sample and anova
T test, independant sample, paired sample and anova
 
Basis of statistical inference
Basis of statistical inferenceBasis of statistical inference
Basis of statistical inference
 
Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis Testing
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Hypothesis testing an introduction
Hypothesis testing an introductionHypothesis testing an introduction
Hypothesis testing an introduction
 
z-test
z-testz-test
z-test
 
Confidence Intervals
Confidence IntervalsConfidence Intervals
Confidence Intervals
 
The t Test for Two Independent Samples
The t Test for Two Independent SamplesThe t Test for Two Independent Samples
The t Test for Two Independent Samples
 
Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hyp...
Chapter 6 part2-Introduction to Inference-Tests of Significance,  Stating Hyp...Chapter 6 part2-Introduction to Inference-Tests of Significance,  Stating Hyp...
Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hyp...
 
Inferential Statistics
Inferential StatisticsInferential Statistics
Inferential Statistics
 
One Sample T Test
One Sample T TestOne Sample T Test
One Sample T Test
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
 
Testing Hypothesis
Testing HypothesisTesting Hypothesis
Testing Hypothesis
 

Viewers also liked

Statistical inference: Probability and Distribution
Statistical inference: Probability and DistributionStatistical inference: Probability and Distribution
Statistical inference: Probability and DistributionEugene Yan Ziyou
 
Lecture 4: Statistical Inference
Lecture 4: Statistical InferenceLecture 4: Statistical Inference
Lecture 4: Statistical InferenceMarina Santini
 
Lecture slides stats1.13.l16.air
Lecture slides stats1.13.l16.airLecture slides stats1.13.l16.air
Lecture slides stats1.13.l16.airatutor_te
 
Statistical inference: Hypothesis Testing and t-tests
Statistical inference: Hypothesis Testing and t-testsStatistical inference: Hypothesis Testing and t-tests
Statistical inference: Hypothesis Testing and t-testsEugene Yan Ziyou
 
Unit 6 lesson 2
Unit 6 lesson 2Unit 6 lesson 2
Unit 6 lesson 2VMRoberts
 
Commonly used statistical tests in research
Commonly used statistical tests in researchCommonly used statistical tests in research
Commonly used statistical tests in researchNaqeeb Ullah Khan
 
Choosing appropriate statistical test RSS6 2104
Choosing appropriate statistical test RSS6 2104Choosing appropriate statistical test RSS6 2104
Choosing appropriate statistical test RSS6 2104RSS6
 
What's Significant? Hypothesis Testing, Effect Size, Confidence Intervals, & ...
What's Significant? Hypothesis Testing, Effect Size, Confidence Intervals, & ...What's Significant? Hypothesis Testing, Effect Size, Confidence Intervals, & ...
What's Significant? Hypothesis Testing, Effect Size, Confidence Intervals, & ...Pat Barlow
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesisJags Jagdish
 
Statistical inference
Statistical inferenceStatistical inference
Statistical inferenceJags Jagdish
 
Power Analysis and Sample Size Determination
Power Analysis and Sample Size DeterminationPower Analysis and Sample Size Determination
Power Analysis and Sample Size DeterminationAjay Dhamija
 
Writing up your results – apa style guidelines
Writing up your results – apa style guidelinesWriting up your results – apa style guidelines
Writing up your results – apa style guidelinesMarialena Kostouli
 
Statistical tests
Statistical testsStatistical tests
Statistical testsmartyynyyte
 
Parametric vs Nonparametric Tests: When to use which
Parametric vs Nonparametric Tests: When to use whichParametric vs Nonparametric Tests: When to use which
Parametric vs Nonparametric Tests: When to use whichGönenç Dalgıç
 
Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Sneh Kumari
 
Introduction to statistics...ppt rahul
Introduction to statistics...ppt rahulIntroduction to statistics...ppt rahul
Introduction to statistics...ppt rahulRahul Dhaker
 
Introduction To Statistics
Introduction To StatisticsIntroduction To Statistics
Introduction To Statisticsalbertlaporte
 

Viewers also liked (20)

Statistical inference: Probability and Distribution
Statistical inference: Probability and DistributionStatistical inference: Probability and Distribution
Statistical inference: Probability and Distribution
 
Lecture 4: Statistical Inference
Lecture 4: Statistical InferenceLecture 4: Statistical Inference
Lecture 4: Statistical Inference
 
Lecture slides stats1.13.l16.air
Lecture slides stats1.13.l16.airLecture slides stats1.13.l16.air
Lecture slides stats1.13.l16.air
 
Statistical inference: Hypothesis Testing and t-tests
Statistical inference: Hypothesis Testing and t-testsStatistical inference: Hypothesis Testing and t-tests
Statistical inference: Hypothesis Testing and t-tests
 
Unit 6 lesson 2
Unit 6 lesson 2Unit 6 lesson 2
Unit 6 lesson 2
 
Commonly used statistical tests in research
Commonly used statistical tests in researchCommonly used statistical tests in research
Commonly used statistical tests in research
 
Choosing appropriate statistical test RSS6 2104
Choosing appropriate statistical test RSS6 2104Choosing appropriate statistical test RSS6 2104
Choosing appropriate statistical test RSS6 2104
 
What's Significant? Hypothesis Testing, Effect Size, Confidence Intervals, & ...
What's Significant? Hypothesis Testing, Effect Size, Confidence Intervals, & ...What's Significant? Hypothesis Testing, Effect Size, Confidence Intervals, & ...
What's Significant? Hypothesis Testing, Effect Size, Confidence Intervals, & ...
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
 
Statistical inference
Statistical inferenceStatistical inference
Statistical inference
 
Stat topics
Stat topicsStat topics
Stat topics
 
Power Analysis and Sample Size Determination
Power Analysis and Sample Size DeterminationPower Analysis and Sample Size Determination
Power Analysis and Sample Size Determination
 
Writing up your results – apa style guidelines
Writing up your results – apa style guidelinesWriting up your results – apa style guidelines
Writing up your results – apa style guidelines
 
Statistical tests
Statistical testsStatistical tests
Statistical tests
 
Parametric vs Nonparametric Tests: When to use which
Parametric vs Nonparametric Tests: When to use whichParametric vs Nonparametric Tests: When to use which
Parametric vs Nonparametric Tests: When to use which
 
Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)
 
Introduction to statistics...ppt rahul
Introduction to statistics...ppt rahulIntroduction to statistics...ppt rahul
Introduction to statistics...ppt rahul
 
Statistical ppt
Statistical pptStatistical ppt
Statistical ppt
 
Introduction To Statistics
Introduction To StatisticsIntroduction To Statistics
Introduction To Statistics
 
P value
P valueP value
P value
 

Similar to Statistical inference: Statistical Power, ANOVA, and Post Hoc tests

Statistical Tools
Statistical ToolsStatistical Tools
Statistical ToolsZyrenMisaki
 
12-5-03.ppt
12-5-03.ppt12-5-03.ppt
12-5-03.pptMUzair21
 
Assessment 4 ContextRecall that null hypothesis tests are of.docx
Assessment 4 ContextRecall that null hypothesis tests are of.docxAssessment 4 ContextRecall that null hypothesis tests are of.docx
Assessment 4 ContextRecall that null hypothesis tests are of.docxfestockton
 
Assessment 4 ContextRecall that null hypothesis tests are of.docx
Assessment 4 ContextRecall that null hypothesis tests are of.docxAssessment 4 ContextRecall that null hypothesis tests are of.docx
Assessment 4 ContextRecall that null hypothesis tests are of.docxgalerussel59292
 
REVISION SLIDES 2.pptx
REVISION SLIDES 2.pptxREVISION SLIDES 2.pptx
REVISION SLIDES 2.pptxssuser0bb1f22
 
Introduction to ANOVA
Introduction to ANOVAIntroduction to ANOVA
Introduction to ANOVAAKASH GHANATE
 
Parametric Test by Vikramjit Singh
Parametric Test  by  Vikramjit SinghParametric Test  by  Vikramjit Singh
Parametric Test by Vikramjit SinghVikramjit Singh
 
8 a class slides one way anova part 1
8 a class slides   one way anova part 18 a class slides   one way anova part 1
8 a class slides one way anova part 1mjb70
 
inferentialstatistics-210411214248.pdf
inferentialstatistics-210411214248.pdfinferentialstatistics-210411214248.pdf
inferentialstatistics-210411214248.pdfChenPalaruan
 
Anova (f test) and mean differentiation
Anova (f test) and mean differentiationAnova (f test) and mean differentiation
Anova (f test) and mean differentiationSubramani Parasuraman
 
Analysis of Variance
Analysis of VarianceAnalysis of Variance
Analysis of VarianceMichael770443
 
Statistical Significance Tests.pptx
Statistical Significance Tests.pptxStatistical Significance Tests.pptx
Statistical Significance Tests.pptxAldofChrist
 

Similar to Statistical inference: Statistical Power, ANOVA, and Post Hoc tests (20)

Statistical Tools
Statistical ToolsStatistical Tools
Statistical Tools
 
12-5-03.ppt
12-5-03.ppt12-5-03.ppt
12-5-03.ppt
 
12-5-03.ppt
12-5-03.ppt12-5-03.ppt
12-5-03.ppt
 
Assessment 4 ContextRecall that null hypothesis tests are of.docx
Assessment 4 ContextRecall that null hypothesis tests are of.docxAssessment 4 ContextRecall that null hypothesis tests are of.docx
Assessment 4 ContextRecall that null hypothesis tests are of.docx
 
Assessment 4 ContextRecall that null hypothesis tests are of.docx
Assessment 4 ContextRecall that null hypothesis tests are of.docxAssessment 4 ContextRecall that null hypothesis tests are of.docx
Assessment 4 ContextRecall that null hypothesis tests are of.docx
 
ANOVA Parametric test: Biostatics and Research Methodology
ANOVA Parametric test: Biostatics and Research MethodologyANOVA Parametric test: Biostatics and Research Methodology
ANOVA Parametric test: Biostatics and Research Methodology
 
REVISION SLIDES 2.pptx
REVISION SLIDES 2.pptxREVISION SLIDES 2.pptx
REVISION SLIDES 2.pptx
 
mean comparison.pptx
mean comparison.pptxmean comparison.pptx
mean comparison.pptx
 
mean comparison.pptx
mean comparison.pptxmean comparison.pptx
mean comparison.pptx
 
Parametric tests
Parametric  testsParametric  tests
Parametric tests
 
Introduction to ANOVA
Introduction to ANOVAIntroduction to ANOVA
Introduction to ANOVA
 
Parametric Test by Vikramjit Singh
Parametric Test  by  Vikramjit SinghParametric Test  by  Vikramjit Singh
Parametric Test by Vikramjit Singh
 
8 a class slides one way anova part 1
8 a class slides   one way anova part 18 a class slides   one way anova part 1
8 a class slides one way anova part 1
 
Bus 173_4.pptx
Bus 173_4.pptxBus 173_4.pptx
Bus 173_4.pptx
 
inferentialstatistics-210411214248.pdf
inferentialstatistics-210411214248.pdfinferentialstatistics-210411214248.pdf
inferentialstatistics-210411214248.pdf
 
Inferential statistics
Inferential statisticsInferential statistics
Inferential statistics
 
Anova (f test) and mean differentiation
Anova (f test) and mean differentiationAnova (f test) and mean differentiation
Anova (f test) and mean differentiation
 
One_-ANOVA.ppt
One_-ANOVA.pptOne_-ANOVA.ppt
One_-ANOVA.ppt
 
Analysis of Variance
Analysis of VarianceAnalysis of Variance
Analysis of Variance
 
Statistical Significance Tests.pptx
Statistical Significance Tests.pptxStatistical Significance Tests.pptx
Statistical Significance Tests.pptx
 

More from Eugene Yan Ziyou

System design for recommendations and search
System design for recommendations and searchSystem design for recommendations and search
System design for recommendations and searchEugene Yan Ziyou
 
Recommender Systems: Beyond the user-item matrix
Recommender Systems: Beyond the user-item matrixRecommender Systems: Beyond the user-item matrix
Recommender Systems: Beyond the user-item matrixEugene Yan Ziyou
 
Predicting Hospital Bills at Pre-admission
Predicting Hospital Bills at Pre-admissionPredicting Hospital Bills at Pre-admission
Predicting Hospital Bills at Pre-admissionEugene Yan Ziyou
 
OLX Group Prod Tech 2019 Keynote: Asia's Tech Giants
OLX Group Prod Tech 2019 Keynote: Asia's Tech GiantsOLX Group Prod Tech 2019 Keynote: Asia's Tech Giants
OLX Group Prod Tech 2019 Keynote: Asia's Tech GiantsEugene Yan Ziyou
 
Data Science Challenges and Impact at Lazada (Big Data and Analytics Innovati...
Data Science Challenges and Impact at Lazada (Big Data and Analytics Innovati...Data Science Challenges and Impact at Lazada (Big Data and Analytics Innovati...
Data Science Challenges and Impact at Lazada (Big Data and Analytics Innovati...Eugene Yan Ziyou
 
INSEAD Sharing on Lazada Data Science and my Journey
INSEAD Sharing on Lazada Data Science and my JourneyINSEAD Sharing on Lazada Data Science and my Journey
INSEAD Sharing on Lazada Data Science and my JourneyEugene Yan Ziyou
 
SMU BIA Sharing on Data Science
SMU BIA Sharing on Data ScienceSMU BIA Sharing on Data Science
SMU BIA Sharing on Data ScienceEugene Yan Ziyou
 
Culture at Lazada Data Science
Culture at Lazada Data ScienceCulture at Lazada Data Science
Culture at Lazada Data ScienceEugene Yan Ziyou
 
Competition Improves Performance: Only when Competition Form matches Goal Ori...
Competition Improves Performance: Only when Competition Form matches Goal Ori...Competition Improves Performance: Only when Competition Form matches Goal Ori...
Competition Improves Performance: Only when Competition Form matches Goal Ori...Eugene Yan Ziyou
 
How Lazada ranks products to improve customer experience and conversion
How Lazada ranks products to improve customer experience and conversionHow Lazada ranks products to improve customer experience and conversion
How Lazada ranks products to improve customer experience and conversionEugene Yan Ziyou
 
Sharing about my data science journey and what I do at Lazada
Sharing about my data science journey and what I do at LazadaSharing about my data science journey and what I do at Lazada
Sharing about my data science journey and what I do at LazadaEugene Yan Ziyou
 
AXA x DSSG Meetup Sharing (Feb 2016)
AXA x DSSG Meetup Sharing (Feb 2016)AXA x DSSG Meetup Sharing (Feb 2016)
AXA x DSSG Meetup Sharing (Feb 2016)Eugene Yan Ziyou
 
Garuda Robotics x DataScience SG Meetup (Sep 2015)
Garuda Robotics x DataScience SG Meetup (Sep 2015)Garuda Robotics x DataScience SG Meetup (Sep 2015)
Garuda Robotics x DataScience SG Meetup (Sep 2015)Eugene Yan Ziyou
 
DataKind SG sharing of our first DataDive
DataKind SG sharing of our first DataDiveDataKind SG sharing of our first DataDive
DataKind SG sharing of our first DataDiveEugene Yan Ziyou
 
Social network analysis and growth recommendations for DataScience SG community
Social network analysis and growth recommendations for DataScience SG communitySocial network analysis and growth recommendations for DataScience SG community
Social network analysis and growth recommendations for DataScience SG communityEugene Yan Ziyou
 
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learnt
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learntKaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learnt
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learntEugene Yan Ziyou
 
Nielsen x DataScience SG Meetup (Apr 2015)
Nielsen x DataScience SG Meetup (Apr 2015)Nielsen x DataScience SG Meetup (Apr 2015)
Nielsen x DataScience SG Meetup (Apr 2015)Eugene Yan Ziyou
 
A Study on the Relationship between Education and Income in the US
A Study on the Relationship between Education and Income in the USA Study on the Relationship between Education and Income in the US
A Study on the Relationship between Education and Income in the USEugene Yan Ziyou
 
Diving into Twitter data on consumer electronic brands
Diving into Twitter data on consumer electronic brandsDiving into Twitter data on consumer electronic brands
Diving into Twitter data on consumer electronic brandsEugene Yan Ziyou
 

More from Eugene Yan Ziyou (19)

System design for recommendations and search
System design for recommendations and searchSystem design for recommendations and search
System design for recommendations and search
 
Recommender Systems: Beyond the user-item matrix
Recommender Systems: Beyond the user-item matrixRecommender Systems: Beyond the user-item matrix
Recommender Systems: Beyond the user-item matrix
 
Predicting Hospital Bills at Pre-admission
Predicting Hospital Bills at Pre-admissionPredicting Hospital Bills at Pre-admission
Predicting Hospital Bills at Pre-admission
 
OLX Group Prod Tech 2019 Keynote: Asia's Tech Giants
OLX Group Prod Tech 2019 Keynote: Asia's Tech GiantsOLX Group Prod Tech 2019 Keynote: Asia's Tech Giants
OLX Group Prod Tech 2019 Keynote: Asia's Tech Giants
 
Data Science Challenges and Impact at Lazada (Big Data and Analytics Innovati...
Data Science Challenges and Impact at Lazada (Big Data and Analytics Innovati...Data Science Challenges and Impact at Lazada (Big Data and Analytics Innovati...
Data Science Challenges and Impact at Lazada (Big Data and Analytics Innovati...
 
INSEAD Sharing on Lazada Data Science and my Journey
INSEAD Sharing on Lazada Data Science and my JourneyINSEAD Sharing on Lazada Data Science and my Journey
INSEAD Sharing on Lazada Data Science and my Journey
 
SMU BIA Sharing on Data Science
SMU BIA Sharing on Data ScienceSMU BIA Sharing on Data Science
SMU BIA Sharing on Data Science
 
Culture at Lazada Data Science
Culture at Lazada Data ScienceCulture at Lazada Data Science
Culture at Lazada Data Science
 
Competition Improves Performance: Only when Competition Form matches Goal Ori...
Competition Improves Performance: Only when Competition Form matches Goal Ori...Competition Improves Performance: Only when Competition Form matches Goal Ori...
Competition Improves Performance: Only when Competition Form matches Goal Ori...
 
How Lazada ranks products to improve customer experience and conversion
How Lazada ranks products to improve customer experience and conversionHow Lazada ranks products to improve customer experience and conversion
How Lazada ranks products to improve customer experience and conversion
 
Sharing about my data science journey and what I do at Lazada
Sharing about my data science journey and what I do at LazadaSharing about my data science journey and what I do at Lazada
Sharing about my data science journey and what I do at Lazada
 
AXA x DSSG Meetup Sharing (Feb 2016)
AXA x DSSG Meetup Sharing (Feb 2016)AXA x DSSG Meetup Sharing (Feb 2016)
AXA x DSSG Meetup Sharing (Feb 2016)
 
Garuda Robotics x DataScience SG Meetup (Sep 2015)
Garuda Robotics x DataScience SG Meetup (Sep 2015)Garuda Robotics x DataScience SG Meetup (Sep 2015)
Garuda Robotics x DataScience SG Meetup (Sep 2015)
 
DataKind SG sharing of our first DataDive
DataKind SG sharing of our first DataDiveDataKind SG sharing of our first DataDive
DataKind SG sharing of our first DataDive
 
Social network analysis and growth recommendations for DataScience SG community
Social network analysis and growth recommendations for DataScience SG communitySocial network analysis and growth recommendations for DataScience SG community
Social network analysis and growth recommendations for DataScience SG community
 
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learnt
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learntKaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learnt
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learnt
 
Nielsen x DataScience SG Meetup (Apr 2015)
Nielsen x DataScience SG Meetup (Apr 2015)Nielsen x DataScience SG Meetup (Apr 2015)
Nielsen x DataScience SG Meetup (Apr 2015)
 
A Study on the Relationship between Education and Income in the US
A Study on the Relationship between Education and Income in the USA Study on the Relationship between Education and Income in the US
A Study on the Relationship between Education and Income in the US
 
Diving into Twitter data on consumer electronic brands
Diving into Twitter data on consumer electronic brandsDiving into Twitter data on consumer electronic brands
Diving into Twitter data on consumer electronic brands
 

Recently uploaded

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 

Statistical inference: Statistical Power, ANOVA, and Post Hoc tests

  • 1. Statistical Inference Week 4: Statistical power, ANOVA, and post hoc tests
  • 2. Statistical Power  Statistical power of a study (i.e., test of statistical significance) − Probability that it will correctly reject a false null hypothesis − Probability that it will correctly detect an effect/difference  Why calculate statistical power? − Perhaps you want to know in advance the minimum sample size necessary to have a reasonable chance of detecting an effect − Alternatively, if you found out that your (costly) study only had power = 0.3, would you proceed with the study? Fail to reject 𝐻0 Reject 𝐻0 𝐻0 is True  Confidence Level Type I error (𝛼) 𝐻0 is False Type II error (𝛽)  Power
  • 3. Calculating Statistical Power  Power Calculator: http://www.statisticalsolutions.net/pss_calc.php  You hypothesize that your weight loss drug helps people lose 2kg over a month. Assuming 𝜎 = 8, 𝑝 = 0.05, and 𝑝𝑜𝑤𝑒𝑟 = 0.8, what is the minimum sample size required to detect an effect?  You realize that you only have budget for 30 participants to conduct your trial. Assuming the same parameters as above and with 𝑁 = 30, what is the power of your trial?
  • 4. Parameters of Statistical Power 𝑆𝑖𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑛𝑐𝑒 𝐿𝑒𝑣𝑒𝑙 / 𝑝 − 𝑣𝑎𝑙𝑢𝑒 (𝛼) 𝑆𝑎𝑚𝑝𝑙𝑒 𝑆𝑖𝑧𝑒 (𝑁) 𝐸𝑓𝑓𝑒𝑐𝑡 𝑆𝑖𝑧𝑒 (𝐶𝑜ℎ𝑒𝑛′ 𝑠 𝑑) 𝐷𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑖𝑜𝑛 𝜎2 Tests with smaller p-values are more “rigorous” and require more power. − Increasing p-value from 0.01 to 0.1 means that you will be rejecting 𝐻0 more often (99% vs 90%) − There is a greater chance of accepting B relative to A The bars show the 95% CI. In C, the sample sizes are small and thus the CI is large; in contrast, D has larger sample sizes and thus smaller CI. As a result, it would be easier to detect the difference in D relative to C. DC FE Given that the size of difference (effect size) in F is much larger than in E, a statistical test would find it easier to detect the difference in F. As the distribution of H has lesser variance than G, there would be lesser overlap in their CIs. Thus, it would be easier to detect the difference in H. HG BA 𝛼 = 0.01 𝛼 = 0.1
  • 5. Comparing more than two means  T-test − Only two groups/levels are involved − Dependent t-test: Whether McDonalds makes you gain weight (before vs. after) − Independent t-test: Whether McDonalds or KFC makes you gain more weight  What if we have more than two levels? − Analysis of Variance (ANOVA)
  • 6. Hypothesis testing for ANOVA  Null hypothesis 𝐻0 − The mean outcome is the same across all categories − 𝜇1 = 𝜇2 = … = 𝜇 𝑘 where 𝜇𝑖 = mean of the outcome for observations in category I where 𝑘 = number of groups  Alternative hypothesis (𝐻 𝑎) − At least one pair of means are different from each other  Is there a difference between the average weight gain from consuming three types of fast foods − Categories: (i) No fast food/control, (ii) McDonalds, (iii) KFC, (iv) Subway
  • 7. Variability portioning in ANOVA  ANOVA allows us to separate out variability due to conditions/levels Total variability in weight gain Between group variability: variability due to food type Within group variability: variability due to other factors
  • 8. t test vs. ANOVA  t test − Compare means from two groups − Are they so far apart that the difference cannot be attributed to sampling variability (i.e., randomness)? − 𝐻0: 𝜇1 = 𝜇2  Test statistic 𝑡 = 𝑥1 − 𝑥2 − 𝜇1 − 𝜇2 𝑆𝐸( 𝑥1− 𝑥2)  ANOVA − Compare means from more than two groups − Are they so far apart that the difference cannot be attributed to sampling variability (i.e., randomness)? − 𝐻0: 𝜇1 = 𝜇2 = ⋯ = 𝜇 𝑘  Test statistic 𝐹 = 𝑣𝑎𝑟𝑖𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑔𝑟𝑜𝑢𝑝𝑠 𝑣𝑎𝑟𝑖𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑤𝑖𝑡ℎ𝑖𝑛 𝑔𝑟𝑜𝑢𝑝𝑠  Large test statistics lead to small p-values  If p-value is small enough, 𝐻0 is rejected and we conclude that that data provides evidence of a difference in population means
  • 9. F Distribution  Probability distribution associated with the f statistic − In order to be able to reject 𝐻0, we need a small p-value which requires a large F statistic − To get a large F statistic, variability between sample means needs to be greater than variability within sample means  p-value − Probability of as large a ratio between the ‘between’ and ‘within’ group variabilities, if in fact the means of all groups are equal Accept 𝐻0 Reject 𝐻0 𝐹 = 𝑣𝑎𝑟𝑖𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑔𝑟𝑜𝑢𝑝𝑠 𝑣𝑎𝑟𝑖𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑤𝑖𝑡ℎ𝑖𝑛 𝑔𝑟𝑜𝑢𝑝𝑠
  • 10. Interpreting the ANOVA table (sum of squares)  Sum of squares (total) − Measures the total variability − Calculated very similarly to variance except not scaled by sample size  Sum of squares (group) − Measures variability between groups − Deviation of group mean from overall mean, weighted by sample size  Sum of squares (error) − Measures the variability within groups − Unexplained by the group variable Total 119 501.9
  • 11. Interpreting the ANOVA table (degrees of freedom)  Degrees of freedom (total) − n - 1 − Where n = number of observations  Degrees of freedom (group) − k – 1 − Where k = number of groups  Degrees of freedom (error) − Degrees of freedom total – degrees of freedom group Total 119 501.9
  • 12. Interpreting the ANOVA table (mean squares)  Mean squares (group) − Average variability between groups − Total variability (sum sq) scaled by the associated df − Mean square (group) / degrees of freedom (group)  Mean squares (error) − Average variability within groups − Total variability (sum sq) scaled by the associated df − Mean square (error) / degrees of freedom (error) Total 119 501.9
  • 13. Interpreting the ANOVA table (F statistics & p)  F statistic − Ration of the between group and within group variability − Mean square (group) / mean square (error)  p-value − Probability of as large a ratio between the ‘between’ and ‘within’ group variabilities, if in fact the means of all groups are equal Total 119 501.9
  • 14. Interpreting the ANOVA table (p-value)  If p-value is small (less than 𝛼), reject 𝐻0 − The data provides evidence that at least one pair of means different from each other − But we can’t tell which pair  If p-value is large (more than 𝛼), fail to reject 𝐻0 − The data does not provide evidence that one pair of means are different from each other − The observed differences could be due to chance Total 119 501.9
  • 15. Conditions for ANOVA  Independence − Within groups: sampled observations must be independent − Between groups: groups must be independent of each other  Approximate normality − Within each group, distributions should be nearly normal  Equal variance (homoscedasticity) − Groups should have roughly equal variability
  • 16. So how do we find out which means differ?  We conduct independent t tests for differences between each possible pair of groups (multiple comparisons) − However, with multiple t test, there could be an inflated Type I error rate  Thus, we use a modified significance level, which ranges from the most liberal to the most conservative − Most liberal: no correction − Most conservative: Bonferronni correction
  • 17. Bonferroni correction  The Bonferroni correction suggests that a more stringent significance level is more appropriate for multiple corrections − Thus, we adjust 𝛼 by the number of comparisons considered 𝑎∗ = 𝛼 𝐾 Where 𝐾: number of comparisons, i.e., 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑔𝑟𝑜𝑢𝑝𝑠 (𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑔𝑟𝑜𝑢𝑝𝑠 −1) 2
  • 18. Bonferroni Correction  In our example, the fast food variable has 4 level: (i) control, (ii) McDonalds, (iii) KFC, (iv) Subway. If 𝛼 = 0.05, what should the modified significance level be? 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑙𝑒𝑣𝑒𝑙𝑠 𝑘 = 4 𝐾 = 4 ×(4−1) 2 = 6 𝑎∗ = 𝛼 𝐾 = 0.05 6 ≈ 0.0083
  • 19. Types of ANOVA  One-way ANOVA − Between-groups − Repeated measures  Factorial ANOVA − Two or more independent variables − Allows for examination of interaction effects
  • 20.  The t-test should suffice for most of your hypothesis testing needs − For our understanding though, what other forms of hypothesis tests are there? − Chi-Square − Independent variable: Gender (proportion in general population) − Dependent variable: Gender (proportion in engineering faculty) − Linear Regression − Independent variable: Age − Dependent variable: Income − Logistic Regression − Independent variable: Age − Dependent variable: Marital status What other kinds of statistical tests are there? Dependent Variable Continuous Categorical Independent Variable Continuous Categorical t-test Linear Regression Logistic Regression Chi-square test
  • 21. Time for practice  In this lab session we will cover: − ANOVA − Bonferroni Correction  GitHub repository: https://github.com/eugeneyan/Statistical-Inference
  • 22. Thank you for your attention! Eugene Yan