SlideShare a Scribd company logo
HYPOTHESIS TESTING
HYPOTHESIS TESTING
1. Science and Falsification
2. Significance Testing
2.1. What is a p-value?
2.2. How to build a Null Hypothesis
3. How about the Alternative Hypothesis?
3.1. False Alarms and Power
FALSIFICATIONISM
● Denying the consequent (modum tollens)
((P → Q) ^ ¬Q) → ¬P
(model → data) ^ ¬data) → ¬model
● Models can only be disproven
● Not explicitly probabilistic
STATISTICAL FALSIFICATIONISM
● Data is a consequence of the true model
● That consequence is probabilistic
Likelihood (Model) = P(Data | Model)
● Model unlikely if data obtained would have low
probability under that model.
tHE LADY
DRINKING TEA
Does tea taste different when the milk, instead of the tea, is poured first?
TEST INGREDIENTS
● A hypothesis to reject: the null model (H0
)
● Some data
● A summary of the data: a statistic
● A way to calculate the probability
distribution of the statistic given H0
NULL HYPOTHESIS SIGNIFICANCE TESTING
NHST
Null model (H0
)
Parameter
Data (X)
Statistic
Probability
NHST
Null model (H0
)
Parameter
Data (X)
Statistic
Probability
Null model (H0
) Lady can’t tell the difference
Parameter Probability of mistake (pm
= 0.5)
Data (X) 1 mistake out of 10 (n = 10)
Statistic Proportion of mistakes (Pm
=0.1)
Probability What is the probability of 1/10 mistakes
if H0
is true and pm
= 0.5?
The BINOMIAL DISTRIBUTION
WHITEBOARD TIME!
pr
(1-p)n-rn!
r! (n-r)!P(r, n | p ) =
What is the probability of making
r mistakes out of n trials given p?
p = probability of mistake r = number of mistakes
n = number of trials
The BINOMIAL TEST
Probability of 1 or less
mistakes= 0.0107
IF H0
(pm
= 0.5)
p-value
0.0009
0.0098
0.0439
0.1171
0.2051
0.2461
0.1171
0.2051
0.0439
0.0098
0.0009
P-vALUES
● NOT the probability of the null hypothesis being true
P-vALUES
● NOT the probability of the null hypothesis being true
● NOT applicable to all distributions
P-vALUES
● NOT the probability of the null hypothesis being true
● NOT applicable to all distributions
● NOT a measure of effect size or importance
NHST
Null model (H0
) Lady can’t tell the difference
Parameter Probability of mistake (pm
= 0.5)
Data (X) 450 mistakes out of 1000 (n = 1000)
Statistic Proportion of mistakes (Pm
= 0.45)
P-value What is the probability of making
≤ 450/1000 mistakes if pm
= 0.5?
The BINOMIAL TEST
p = 0.0008
IF H0
(pm
= 0.5)
P-vALUES
● NOT the probability of the null hypothesis being true
● NOT applicable to all distributions
● NOT a measure of effect size or importance
● ANY effect will be significant given enough data
SIGNIFICANCE VS. MAGNITUDE
10% mistakes
p = 0.0008p = 0.0107
45% mistakes
How good is 0.45?
What would be the a
better null hypothesis?
NHST
Null model (H0
) One in three mistakes
Parameter Probability of mistake (pm
= 0.33)
Data (X) 1 mistake out of 10 (n = 10)
Statistic Proportion of mistakes (Pm
=0.1)
P-value What is the probability of making
≤1/10 mistakes if pm
= 0.33?
CHOOSING THE RIGHT NULL
p-value = 0.1812
IF pm
= 0.33
SAGUAROS
iN SPACE
Do individuals distribute randomly in space?
PLAY
TIME!
RANDOMIZATION
1. Draw a random sample
RANDOMIZATION
1. Draw a random sample
2. Calculate statistic
3. Do it many times
re
= 40.2 re
= 47.2 re
= 58.7 re
= 56.1 re
= 44.4 re
= 51.4
RANDOMIZATION
1. Draw a random sample
2. Calculate statistic
3. Do it many times
re
= 40.2 re
= 47.2 re
= 58.7 re
= 56.1 re
= 44.4 re
= 51.4
RANDOMIZATION
1. Draw a random sample
2. Calculate statistic
3. Do it many times
4. Distribution of those statistics
Distribution of the test statistic (re
)
under the NULL HYPOTHESIS
P-VALUE
p-value = 0.022
NON-PARAMETRICPARAMETRIC
● Null model defined by
functions & parameters
● Null model constructed
through algorithms
P-vALUES
● NOT the probability of the null hypothesis being true
● NOT applicable to all distributions
● NOT a measure of effect size or importance
● NOT appropriate for modeling rare events
What is the probability of a Scientist winning a (science)
Nobel Prize?
P(Nobel | Scientist) = 0.00001
Marie Curie won 2 Nobel Prizes
p-value = P(≥2 Nobel | Scientist) ≅ 0.00000000001
Therefore, Marie Curie is unlikely to be a Scientist?
WHY IS THIS WRONG?
CONSIDERING the ALTERNATIVE
Probability of a Scientist winning a Nobel Prize?
P(2 Nobel | Scientist) = 0.000012
P(2 Nobel |¬ Scientist) ≅ 0.000000000012
Likelihood of
being a scientist
Likelihood of
NOT being a scientist
LIKELIHOOD RATIO = = 1012
0.000000000012
0.000012
NULL vs. ALTERNATIVE
H0
is true Ha
is true
Accept H0 ✓ Type II error
Accept Ha
Type I error ✓
● Consider both a NULL and an ALTERNATIVE hypothesis
NULL vs. ALTERNATIVE
H0
is true Ha
is true
Accept H0
1 − α 1 − β
Accept Ha
α β
False Positives
You’re
pregnant
POWER
JEWEL WASP
{Nasonia vitripennis}
EXTREME
SEX RATIOS
Do jewel wasps differ from the Fisherian (1:1) sex ratio?
Null model (H0
)
Parameter
Data (X)
Statistic
Probability
inspired by
Hamilton 1967.
Science
Null model (H0
) Even sex ratio (1:1)
Parameter Probability of producing a male ( = 0.5)
Data (X) Number of males and females (n = 15)
Statistic Proportion of males
Probability
inspired by
Hamilton 1967.
Science
Null model (H0
) Even sex ratio (1:1)
Parameter Probability of producing a male ( = 0.5)
Data (X) Number of males and females (n = 15)
Statistic Proportion of males
Alternative (HA
)
Model
inspired by
Hamilton 1967.
Science
Null model (H0
) Even sex ratio (1:1)
Parameter Probability of producing a male ( = 0.5)
Data (X) Number of males and females (n = 15)
Statistic Proportion of males
Alternative (HA
) Biased sex ratio (1:2)
Model Probability of producing a male ( = 0.33)
inspired by
Hamilton 1967.
Science
NULL vs. ALTERNATIVE
NULL MODEL
( = 0.5)
Number of males
P(data|H0
)
NULL vs. ALTERNATIVE
α = 0.05
P(data|H0
)
critical
value
NULL MODEL
( = 0.5)
Number of males
Accept HA
Accept H0
NULL vs. ALTERNATIVE
α = 0.05
P(data|H0
)
NULL MODEL
( = 0.5)
power = 0.41
Number of males
ALTERNATIVE MODEL
( = 0.33)
Accept HA
Accept H0
P(data|HA
)
WHAT GIVES
POWER?
STATISTICAL POWER
power = 0.41
α = 0.05
STATISTICAL POWER
power = 0.22
● Significance level
α = 0.01
STATISTICAL POWER
power = 0.76
● Sample size
α = 0.05
STATISTICAL POWER
power = 0.98
● Effect size
α = 0.05
Type I errorp-value
● Refers to single test
● Data-based random value
● Property of the data
● Inductive evidence
● Refers to multiple tests
● Fixed quantity set a priori
● Property of the test
● Deductive assessment
FISHER’s APPROACH NEYMAN-PEARSON APPROACH
UNDERSTANDING TESTS
STATISTICAL TESTS
● Sign test
● Mann-Whitney’s U
● Wilcoxon signed-rank test
● Siegel-Tukey test
● Mantel Test
● Permutation Test
HOMEWORK
HOMEWORK
● Work in groups
● Read one of the assigned articles applying a
nonparametric test in biological research
● Try to understand the test in question
● Present your findings to the class
30.01.17
10:00h
QUESTIONS
1. What is the question? What is the purpose of the test?
2. What is the statistic and what does it measure?
3. How is the null hypothesis built and what does it assume?
4. How does the test answer the question?
5. Find out how to implement the test in R
6. What other applications could this test have?
PRESENTATIONS
6 questions = 6 slides = 6 minutes
EvALUATION
● Questions: Relate lecture concepts to the new test
● Delivery: Quality and clarity of the presentation
● Discussion: Both asking and answering questions
● Group-level AND individual-level
Group work ≠ Dividing tasks
(except in presenting)

More Related Content

What's hot

Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
Kaimrc_Rss_Jd
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
RuchiJainRuchiJain
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
Madhuranath R
 
Research methodology - Estimation Theory & Hypothesis Testing, Techniques of ...
Research methodology - Estimation Theory & Hypothesis Testing, Techniques of ...Research methodology - Estimation Theory & Hypothesis Testing, Techniques of ...
Research methodology - Estimation Theory & Hypothesis Testing, Techniques of ...
The Stockker
 
Hypothesis
HypothesisHypothesis
Hypothesis
Nilanjan Bhaumik
 
Basis of statistical inference
Basis of statistical inferenceBasis of statistical inference
Basis of statistical inferencezahidacademy
 
Presentation on Hypothesis Test by Ashik Amin Prem
Presentation on Hypothesis Test by Ashik Amin PremPresentation on Hypothesis Test by Ashik Amin Prem
Presentation on Hypothesis Test by Ashik Amin Prem
AshikAminPrem
 
Z test, f-test,etc
Z test, f-test,etcZ test, f-test,etc
Z test, f-test,etc
Juan Apolinario Reyes
 
Testing of hypotheses
Testing of hypothesesTesting of hypotheses
Testing of hypotheses
RajThakuri
 
Hypothesis testing1
Hypothesis testing1Hypothesis testing1
Hypothesis testing1
HanaaBayomy
 
Estimation and hypothesis
Estimation and hypothesisEstimation and hypothesis
Estimation and hypothesis
Junaid Ijaz
 
Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis Testingrishi.indian
 
8. testing of hypothesis for variable & attribute data
8. testing of hypothesis for variable & attribute  data8. testing of hypothesis for variable & attribute  data
8. testing of hypothesis for variable & attribute data
Hakeem-Ur- Rehman
 
Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Introduction to t-tests (statistics)
Introduction to t-tests (statistics)
Dr Bryan Mills
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
Shameer P Hamsa
 
P value part 1
P value part 1P value part 1
P value part 1
Mahfud Alatee
 
Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis Testing
Birinder Singh Gulati
 

What's hot (20)

Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis Testing
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Research methodology - Estimation Theory & Hypothesis Testing, Techniques of ...
Research methodology - Estimation Theory & Hypothesis Testing, Techniques of ...Research methodology - Estimation Theory & Hypothesis Testing, Techniques of ...
Research methodology - Estimation Theory & Hypothesis Testing, Techniques of ...
 
Hypothesis
HypothesisHypothesis
Hypothesis
 
Basis of statistical inference
Basis of statistical inferenceBasis of statistical inference
Basis of statistical inference
 
Presentation on Hypothesis Test by Ashik Amin Prem
Presentation on Hypothesis Test by Ashik Amin PremPresentation on Hypothesis Test by Ashik Amin Prem
Presentation on Hypothesis Test by Ashik Amin Prem
 
Z test, f-test,etc
Z test, f-test,etcZ test, f-test,etc
Z test, f-test,etc
 
Testing of hypotheses
Testing of hypothesesTesting of hypotheses
Testing of hypotheses
 
Hypothesis testing1
Hypothesis testing1Hypothesis testing1
Hypothesis testing1
 
Estimation and hypothesis
Estimation and hypothesisEstimation and hypothesis
Estimation and hypothesis
 
Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis Testing
 
8. testing of hypothesis for variable & attribute data
8. testing of hypothesis for variable & attribute  data8. testing of hypothesis for variable & attribute  data
8. testing of hypothesis for variable & attribute data
 
Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Introduction to t-tests (statistics)
Introduction to t-tests (statistics)
 
Chapter10
Chapter10Chapter10
Chapter10
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
P value part 1
P value part 1P value part 1
P value part 1
 
Hypothesis Testing
Hypothesis TestingHypothesis Testing
Hypothesis Testing
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 

Similar to Foundations of Statistics for Ecology and Evolution. 2. Hypothesis Testing

HypothesisTesting_HANDOUT.pdf
HypothesisTesting_HANDOUT.pdfHypothesisTesting_HANDOUT.pdf
HypothesisTesting_HANDOUT.pdf
Jorge Vega Rodríguez
 
01 unidad i ho p
01 unidad i   ho p01 unidad i   ho p
01 unidad i ho p
RonaldElvisEspinozaR1
 
Topic 7 stat inference
Topic 7 stat inferenceTopic 7 stat inference
Topic 7 stat inferenceSizwan Ahammed
 
Statistical tests of significance and Student`s T-Test
Statistical tests of significance and Student`s T-TestStatistical tests of significance and Student`s T-Test
Statistical tests of significance and Student`s T-Test
VasundhraKakkar
 
Proportion test using Chi square
Proportion test using Chi squareProportion test using Chi square
Proportion test using Chi square
Parag Shah
 
Testing a claim about a mean
Testing a claim about a mean  Testing a claim about a mean
Testing a claim about a mean
Long Beach City College
 
2013.03.26 An Introduction to Modern Statistical Analysis using Bayesian Methods
2013.03.26 An Introduction to Modern Statistical Analysis using Bayesian Methods2013.03.26 An Introduction to Modern Statistical Analysis using Bayesian Methods
2013.03.26 An Introduction to Modern Statistical Analysis using Bayesian Methods
NUI Galway
 
2013.03.26 Bayesian Methods for Modern Statistical Analysis
2013.03.26 Bayesian Methods for Modern Statistical Analysis2013.03.26 Bayesian Methods for Modern Statistical Analysis
2013.03.26 Bayesian Methods for Modern Statistical AnalysisNUI Galway
 
Lesson05_Static11
Lesson05_Static11Lesson05_Static11
Lesson05_Static11thangv
 
08 test of hypothesis large sample.ppt
08 test of hypothesis large sample.ppt08 test of hypothesis large sample.ppt
08 test of hypothesis large sample.pptPooja Sakhla
 
Categorical data analysis full lecture note PPT.pptx
Categorical data analysis full lecture note  PPT.pptxCategorical data analysis full lecture note  PPT.pptx
Categorical data analysis full lecture note PPT.pptx
MinilikDerseh1
 
Testing a claim about a standard deviation or variance
Testing a claim about a standard deviation or variance  Testing a claim about a standard deviation or variance
Testing a claim about a standard deviation or variance
Long Beach City College
 
HYPOTHESIS TESTING.ppt
HYPOTHESIS TESTING.pptHYPOTHESIS TESTING.ppt
HYPOTHESIS TESTING.ppt
sadiakhan783184
 
Testing of Hypothesis, p-value, Gaussian distribution, null hypothesis
Testing of Hypothesis, p-value, Gaussian distribution, null hypothesisTesting of Hypothesis, p-value, Gaussian distribution, null hypothesis
Testing of Hypothesis, p-value, Gaussian distribution, null hypothesis
svmmcradonco1
 
Hypothesis Testing techniques in social research.ppt
Hypothesis Testing techniques in social research.pptHypothesis Testing techniques in social research.ppt
Hypothesis Testing techniques in social research.ppt
Solomonkiplimo
 

Similar to Foundations of Statistics for Ecology and Evolution. 2. Hypothesis Testing (20)

HypothesisTesting_HANDOUT.pdf
HypothesisTesting_HANDOUT.pdfHypothesisTesting_HANDOUT.pdf
HypothesisTesting_HANDOUT.pdf
 
01 unidad i ho p
01 unidad i   ho p01 unidad i   ho p
01 unidad i ho p
 
Topic 7 stat inference
Topic 7 stat inferenceTopic 7 stat inference
Topic 7 stat inference
 
Statistical tests of significance and Student`s T-Test
Statistical tests of significance and Student`s T-TestStatistical tests of significance and Student`s T-Test
Statistical tests of significance and Student`s T-Test
 
Proportion test using Chi square
Proportion test using Chi squareProportion test using Chi square
Proportion test using Chi square
 
P value
P valueP value
P value
 
Testing a claim about a mean
Testing a claim about a mean  Testing a claim about a mean
Testing a claim about a mean
 
2013.03.26 An Introduction to Modern Statistical Analysis using Bayesian Methods
2013.03.26 An Introduction to Modern Statistical Analysis using Bayesian Methods2013.03.26 An Introduction to Modern Statistical Analysis using Bayesian Methods
2013.03.26 An Introduction to Modern Statistical Analysis using Bayesian Methods
 
2013.03.26 Bayesian Methods for Modern Statistical Analysis
2013.03.26 Bayesian Methods for Modern Statistical Analysis2013.03.26 Bayesian Methods for Modern Statistical Analysis
2013.03.26 Bayesian Methods for Modern Statistical Analysis
 
Nonparametric and Distribution- Free Statistics _contd
Nonparametric and Distribution- Free Statistics _contdNonparametric and Distribution- Free Statistics _contd
Nonparametric and Distribution- Free Statistics _contd
 
Lesson05_Static11
Lesson05_Static11Lesson05_Static11
Lesson05_Static11
 
Nonparametric and Distribution- Free Statistics
Nonparametric and Distribution- Free Statistics Nonparametric and Distribution- Free Statistics
Nonparametric and Distribution- Free Statistics
 
08 test of hypothesis large sample.ppt
08 test of hypothesis large sample.ppt08 test of hypothesis large sample.ppt
08 test of hypothesis large sample.ppt
 
Categorical data analysis full lecture note PPT.pptx
Categorical data analysis full lecture note  PPT.pptxCategorical data analysis full lecture note  PPT.pptx
Categorical data analysis full lecture note PPT.pptx
 
Testing a claim about a standard deviation or variance
Testing a claim about a standard deviation or variance  Testing a claim about a standard deviation or variance
Testing a claim about a standard deviation or variance
 
HYPOTHESIS TESTING.ppt
HYPOTHESIS TESTING.pptHYPOTHESIS TESTING.ppt
HYPOTHESIS TESTING.ppt
 
Testing of Hypothesis, p-value, Gaussian distribution, null hypothesis
Testing of Hypothesis, p-value, Gaussian distribution, null hypothesisTesting of Hypothesis, p-value, Gaussian distribution, null hypothesis
Testing of Hypothesis, p-value, Gaussian distribution, null hypothesis
 
Lund 2009
Lund 2009Lund 2009
Lund 2009
 
Hypothesis Testing techniques in social research.ppt
Hypothesis Testing techniques in social research.pptHypothesis Testing techniques in social research.ppt
Hypothesis Testing techniques in social research.ppt
 
Inferential Statistics
Inferential StatisticsInferential Statistics
Inferential Statistics
 

More from Andres Lopez-Sepulcre

Foundations of Statistics in Ecology and Evolution. 8. Bayesian Statistics
Foundations of Statistics in Ecology and Evolution. 8. Bayesian StatisticsFoundations of Statistics in Ecology and Evolution. 8. Bayesian Statistics
Foundations of Statistics in Ecology and Evolution. 8. Bayesian Statistics
Andres Lopez-Sepulcre
 
Foundations in Statistics for Ecology and Evolution. 7. Variance Structures
Foundations in Statistics for Ecology and Evolution. 7. Variance StructuresFoundations in Statistics for Ecology and Evolution. 7. Variance Structures
Foundations in Statistics for Ecology and Evolution. 7. Variance Structures
Andres Lopez-Sepulcre
 
Foundations of Statistics for Ecology and Evolution. 6. Response Variables
Foundations of Statistics for Ecology and Evolution. 6. Response VariablesFoundations of Statistics for Ecology and Evolution. 6. Response Variables
Foundations of Statistics for Ecology and Evolution. 6. Response Variables
Andres Lopez-Sepulcre
 
Foundations of Statistics for Ecology and Evolution. 5. Linear Models
Foundations of Statistics for Ecology and Evolution. 5. Linear ModelsFoundations of Statistics for Ecology and Evolution. 5. Linear Models
Foundations of Statistics for Ecology and Evolution. 5. Linear Models
Andres Lopez-Sepulcre
 
Foundations of Statistics for Ecology and Evolution. 4. Maximum Likelihood
Foundations of Statistics for Ecology and Evolution. 4. Maximum LikelihoodFoundations of Statistics for Ecology and Evolution. 4. Maximum Likelihood
Foundations of Statistics for Ecology and Evolution. 4. Maximum Likelihood
Andres Lopez-Sepulcre
 
Foundations of Statistics for Ecology and Evolution. 3. Normality
Foundations of Statistics for Ecology and Evolution. 3. NormalityFoundations of Statistics for Ecology and Evolution. 3. Normality
Foundations of Statistics for Ecology and Evolution. 3. Normality
Andres Lopez-Sepulcre
 
Foundations of Statistics for Ecology and Evolution. 1 Introduction.
Foundations of Statistics for Ecology and Evolution. 1 Introduction.Foundations of Statistics for Ecology and Evolution. 1 Introduction.
Foundations of Statistics for Ecology and Evolution. 1 Introduction.
Andres Lopez-Sepulcre
 
Beyond Lifetime Reproductive Success: The posthumous reproductive dynamics of...
Beyond Lifetime Reproductive Success: The posthumous reproductive dynamics of...Beyond Lifetime Reproductive Success: The posthumous reproductive dynamics of...
Beyond Lifetime Reproductive Success: The posthumous reproductive dynamics of...
Andres Lopez-Sepulcre
 

More from Andres Lopez-Sepulcre (8)

Foundations of Statistics in Ecology and Evolution. 8. Bayesian Statistics
Foundations of Statistics in Ecology and Evolution. 8. Bayesian StatisticsFoundations of Statistics in Ecology and Evolution. 8. Bayesian Statistics
Foundations of Statistics in Ecology and Evolution. 8. Bayesian Statistics
 
Foundations in Statistics for Ecology and Evolution. 7. Variance Structures
Foundations in Statistics for Ecology and Evolution. 7. Variance StructuresFoundations in Statistics for Ecology and Evolution. 7. Variance Structures
Foundations in Statistics for Ecology and Evolution. 7. Variance Structures
 
Foundations of Statistics for Ecology and Evolution. 6. Response Variables
Foundations of Statistics for Ecology and Evolution. 6. Response VariablesFoundations of Statistics for Ecology and Evolution. 6. Response Variables
Foundations of Statistics for Ecology and Evolution. 6. Response Variables
 
Foundations of Statistics for Ecology and Evolution. 5. Linear Models
Foundations of Statistics for Ecology and Evolution. 5. Linear ModelsFoundations of Statistics for Ecology and Evolution. 5. Linear Models
Foundations of Statistics for Ecology and Evolution. 5. Linear Models
 
Foundations of Statistics for Ecology and Evolution. 4. Maximum Likelihood
Foundations of Statistics for Ecology and Evolution. 4. Maximum LikelihoodFoundations of Statistics for Ecology and Evolution. 4. Maximum Likelihood
Foundations of Statistics for Ecology and Evolution. 4. Maximum Likelihood
 
Foundations of Statistics for Ecology and Evolution. 3. Normality
Foundations of Statistics for Ecology and Evolution. 3. NormalityFoundations of Statistics for Ecology and Evolution. 3. Normality
Foundations of Statistics for Ecology and Evolution. 3. Normality
 
Foundations of Statistics for Ecology and Evolution. 1 Introduction.
Foundations of Statistics for Ecology and Evolution. 1 Introduction.Foundations of Statistics for Ecology and Evolution. 1 Introduction.
Foundations of Statistics for Ecology and Evolution. 1 Introduction.
 
Beyond Lifetime Reproductive Success: The posthumous reproductive dynamics of...
Beyond Lifetime Reproductive Success: The posthumous reproductive dynamics of...Beyond Lifetime Reproductive Success: The posthumous reproductive dynamics of...
Beyond Lifetime Reproductive Success: The posthumous reproductive dynamics of...
 

Recently uploaded

Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 

Recently uploaded (20)

Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 

Foundations of Statistics for Ecology and Evolution. 2. Hypothesis Testing

  • 2. HYPOTHESIS TESTING 1. Science and Falsification 2. Significance Testing 2.1. What is a p-value? 2.2. How to build a Null Hypothesis 3. How about the Alternative Hypothesis? 3.1. False Alarms and Power
  • 3. FALSIFICATIONISM ● Denying the consequent (modum tollens) ((P → Q) ^ ¬Q) → ¬P (model → data) ^ ¬data) → ¬model ● Models can only be disproven ● Not explicitly probabilistic
  • 4. STATISTICAL FALSIFICATIONISM ● Data is a consequence of the true model ● That consequence is probabilistic Likelihood (Model) = P(Data | Model) ● Model unlikely if data obtained would have low probability under that model.
  • 5. tHE LADY DRINKING TEA Does tea taste different when the milk, instead of the tea, is poured first?
  • 6. TEST INGREDIENTS ● A hypothesis to reject: the null model (H0 ) ● Some data ● A summary of the data: a statistic ● A way to calculate the probability distribution of the statistic given H0 NULL HYPOTHESIS SIGNIFICANCE TESTING
  • 7. NHST Null model (H0 ) Parameter Data (X) Statistic Probability
  • 8. NHST Null model (H0 ) Parameter Data (X) Statistic Probability Null model (H0 ) Lady can’t tell the difference Parameter Probability of mistake (pm = 0.5) Data (X) 1 mistake out of 10 (n = 10) Statistic Proportion of mistakes (Pm =0.1) Probability What is the probability of 1/10 mistakes if H0 is true and pm = 0.5?
  • 11. pr (1-p)n-rn! r! (n-r)!P(r, n | p ) = What is the probability of making r mistakes out of n trials given p? p = probability of mistake r = number of mistakes n = number of trials
  • 12. The BINOMIAL TEST Probability of 1 or less mistakes= 0.0107 IF H0 (pm = 0.5) p-value 0.0009 0.0098 0.0439 0.1171 0.2051 0.2461 0.1171 0.2051 0.0439 0.0098 0.0009
  • 13. P-vALUES ● NOT the probability of the null hypothesis being true
  • 14. P-vALUES ● NOT the probability of the null hypothesis being true ● NOT applicable to all distributions
  • 15. P-vALUES ● NOT the probability of the null hypothesis being true ● NOT applicable to all distributions ● NOT a measure of effect size or importance
  • 16. NHST Null model (H0 ) Lady can’t tell the difference Parameter Probability of mistake (pm = 0.5) Data (X) 450 mistakes out of 1000 (n = 1000) Statistic Proportion of mistakes (Pm = 0.45) P-value What is the probability of making ≤ 450/1000 mistakes if pm = 0.5?
  • 17. The BINOMIAL TEST p = 0.0008 IF H0 (pm = 0.5)
  • 18. P-vALUES ● NOT the probability of the null hypothesis being true ● NOT applicable to all distributions ● NOT a measure of effect size or importance ● ANY effect will be significant given enough data
  • 19. SIGNIFICANCE VS. MAGNITUDE 10% mistakes p = 0.0008p = 0.0107 45% mistakes How good is 0.45? What would be the a better null hypothesis?
  • 20. NHST Null model (H0 ) One in three mistakes Parameter Probability of mistake (pm = 0.33) Data (X) 1 mistake out of 10 (n = 10) Statistic Proportion of mistakes (Pm =0.1) P-value What is the probability of making ≤1/10 mistakes if pm = 0.33?
  • 21. CHOOSING THE RIGHT NULL p-value = 0.1812 IF pm = 0.33
  • 22. SAGUAROS iN SPACE Do individuals distribute randomly in space?
  • 24. RANDOMIZATION 1. Draw a random sample
  • 25. RANDOMIZATION 1. Draw a random sample 2. Calculate statistic 3. Do it many times re = 40.2 re = 47.2 re = 58.7 re = 56.1 re = 44.4 re = 51.4
  • 26. RANDOMIZATION 1. Draw a random sample 2. Calculate statistic 3. Do it many times re = 40.2 re = 47.2 re = 58.7 re = 56.1 re = 44.4 re = 51.4
  • 27. RANDOMIZATION 1. Draw a random sample 2. Calculate statistic 3. Do it many times 4. Distribution of those statistics Distribution of the test statistic (re ) under the NULL HYPOTHESIS
  • 29. NON-PARAMETRICPARAMETRIC ● Null model defined by functions & parameters ● Null model constructed through algorithms
  • 30. P-vALUES ● NOT the probability of the null hypothesis being true ● NOT applicable to all distributions ● NOT a measure of effect size or importance ● NOT appropriate for modeling rare events
  • 31. What is the probability of a Scientist winning a (science) Nobel Prize? P(Nobel | Scientist) = 0.00001 Marie Curie won 2 Nobel Prizes p-value = P(≥2 Nobel | Scientist) ≅ 0.00000000001 Therefore, Marie Curie is unlikely to be a Scientist? WHY IS THIS WRONG?
  • 32. CONSIDERING the ALTERNATIVE Probability of a Scientist winning a Nobel Prize? P(2 Nobel | Scientist) = 0.000012 P(2 Nobel |¬ Scientist) ≅ 0.000000000012 Likelihood of being a scientist Likelihood of NOT being a scientist LIKELIHOOD RATIO = = 1012 0.000000000012 0.000012
  • 33. NULL vs. ALTERNATIVE H0 is true Ha is true Accept H0 ✓ Type II error Accept Ha Type I error ✓ ● Consider both a NULL and an ALTERNATIVE hypothesis
  • 34. NULL vs. ALTERNATIVE H0 is true Ha is true Accept H0 1 − α 1 − β Accept Ha α β False Positives You’re pregnant POWER
  • 35. JEWEL WASP {Nasonia vitripennis} EXTREME SEX RATIOS Do jewel wasps differ from the Fisherian (1:1) sex ratio?
  • 36. Null model (H0 ) Parameter Data (X) Statistic Probability inspired by Hamilton 1967. Science
  • 37. Null model (H0 ) Even sex ratio (1:1) Parameter Probability of producing a male ( = 0.5) Data (X) Number of males and females (n = 15) Statistic Proportion of males Probability inspired by Hamilton 1967. Science
  • 38. Null model (H0 ) Even sex ratio (1:1) Parameter Probability of producing a male ( = 0.5) Data (X) Number of males and females (n = 15) Statistic Proportion of males Alternative (HA ) Model inspired by Hamilton 1967. Science
  • 39. Null model (H0 ) Even sex ratio (1:1) Parameter Probability of producing a male ( = 0.5) Data (X) Number of males and females (n = 15) Statistic Proportion of males Alternative (HA ) Biased sex ratio (1:2) Model Probability of producing a male ( = 0.33) inspired by Hamilton 1967. Science
  • 40. NULL vs. ALTERNATIVE NULL MODEL ( = 0.5) Number of males P(data|H0 )
  • 41. NULL vs. ALTERNATIVE α = 0.05 P(data|H0 ) critical value NULL MODEL ( = 0.5) Number of males Accept HA Accept H0
  • 42. NULL vs. ALTERNATIVE α = 0.05 P(data|H0 ) NULL MODEL ( = 0.5) power = 0.41 Number of males ALTERNATIVE MODEL ( = 0.33) Accept HA Accept H0 P(data|HA )
  • 44. STATISTICAL POWER power = 0.41 α = 0.05
  • 45. STATISTICAL POWER power = 0.22 ● Significance level α = 0.01
  • 46. STATISTICAL POWER power = 0.76 ● Sample size α = 0.05
  • 47. STATISTICAL POWER power = 0.98 ● Effect size α = 0.05
  • 48. Type I errorp-value ● Refers to single test ● Data-based random value ● Property of the data ● Inductive evidence ● Refers to multiple tests ● Fixed quantity set a priori ● Property of the test ● Deductive assessment FISHER’s APPROACH NEYMAN-PEARSON APPROACH
  • 50. STATISTICAL TESTS ● Sign test ● Mann-Whitney’s U ● Wilcoxon signed-rank test ● Siegel-Tukey test ● Mantel Test ● Permutation Test
  • 52. HOMEWORK ● Work in groups ● Read one of the assigned articles applying a nonparametric test in biological research ● Try to understand the test in question ● Present your findings to the class 30.01.17 10:00h
  • 53. QUESTIONS 1. What is the question? What is the purpose of the test? 2. What is the statistic and what does it measure? 3. How is the null hypothesis built and what does it assume? 4. How does the test answer the question? 5. Find out how to implement the test in R 6. What other applications could this test have?
  • 54. PRESENTATIONS 6 questions = 6 slides = 6 minutes
  • 55. EvALUATION ● Questions: Relate lecture concepts to the new test ● Delivery: Quality and clarity of the presentation ● Discussion: Both asking and answering questions ● Group-level AND individual-level Group work ≠ Dividing tasks (except in presenting)