Hypothesis Testing

Machine Learning

Jesus A. Gonzalez

February 16, 2020

Hypothesis Testing

Hypothesis Testing

Hypothesis Testing - Example - Evaluating Medication

Hypothesis Testing - Example - Evaluating Medication

Hypothesis Testing - Example - Evaluating Medication

Hypothesis Testing - Example - Evaluating Medication

Hypothesis Testing

Statistical Significance

Type I and Type II errors

Type I and Type II errors

Type I and Type II errors

Type I and Type II errors

Type I and Type II errors

Type I and Type II errors

Type I and Type II errors

Confidence Intervals

Confidence Intervals

Confidence Intervals

p-Values

p-Values

p-Values

p-Values

The t-test

The t-test

The t Distribution

The t Distribution

The t Distribution

The t Distribution

The t Distribution

The t Distribution

The t Distribution

The t Distribution

The t Distribution

The One-Sample t-Test

The One-Sample t-Test

The One-Sample t-Test

The One-Sample t-Test

The One-Sample t-Test

Confidence Interval for the One-Sample t-Test

Confidence Interval for the One-Sample t-Test

Confidence Interval for the One-Sample t-Test

Confidence Interval for the One-Sample t-Test

The Paired t-Test

The Paired t-Test

The Paired t-Test

The Paired t-Test

The Paired t-Test

The Paired t-Test

The Paired t-Test

*http://www.statstutor.ac.uk/resources/uploaded/paired-t-test.pdf*

The Paired t-Test

The paired t-test in R

The paired t-test in R

The paired t-test in R

The paired t-test in R

a = c(12.9, 13.5, 12.8, 15.6, 17.2, 19.2, 12.6, 15.3, 14.4, 11.3)
b = c(12.7, 13.6, 12.0, 15.2, 16.8, 20.0, 12.0, 15.9, 16.0, 11.1)

ttest <- t.test(a,b, paired=TRUE)

The paired t-test in R

ttest
## 
##  Paired t-test
## 
## data:  a and b
## t = -0.21331, df = 9, p-value = 0.8358
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.5802549  0.4802549
## sample estimates:
## mean of the differences 
##                   -0.05

The paired t-test in R

The paired t-test in R

qt(0.975, 9)
## [1] 2.262157

The paired t-test in R

The paired t-test in R

The paired t-test in R

a = c(12.9, 13.5, 12.8, 15.6, 17.2, 19.2, 12.6, 15.3, 14.4, 11.3)
b = c(12.0, 12.2, 11.2, 13.0, 15.0, 15.8, 12.2, 13.4, 12.9, 11.0)

ttest <- t.test(a,b, paired=TRUE, alt="less")

The paired t-test in R

ttest
## 
##  Paired t-test
## 
## data:  a and b
## t = 5.2671, df = 9, p-value = 0.9997
## alternative hypothesis: true difference in means is less than 0
## 95 percent confidence interval:
##      -Inf 2.170325
## sample estimates:
## mean of the differences 
##                    1.61

The paired t-test in R

The paired t-test in R

The paired t-test in R

a = c(12.9, 13.5, 12.8, 15.6, 17.2, 19.2, 12.6, 15.3, 14.4, 11.3)
b = c(12.0, 12.2, 11.2, 13.0, 15.0, 15.8, 12.2, 13.4, 12.9, 11.0)

ttest <- t.test(a,b, paired=TRUE, alt="greater")

The paired t-test in R

ttest
## 
##  Paired t-test
## 
## data:  a and b
## t = 5.2671, df = 9, p-value = 0.0002579
## alternative hypothesis: true difference in means is greater than 0
## 95 percent confidence interval:
##  1.049675      Inf
## sample estimates:
## mean of the differences 
##                    1.61

The paired t-test in R

The Pearson Correlation Coeficient

Analysis of Variance (ANOVA)

The F-statistic

Post-Hoc Tests

References

  1. Statistics in a Nutshell
  2. Mathematics Learning Support Centre, Statistics: 1.1 Paired t-tests (http://www.statstutor.ac.uk/resources/uploaded/paired-t-test.pdf)
  3. Statistical tables (https://home.ubalt.edu/ntsbarsh/Business-stat/StatistialTables.pdf)
  4. R Bloggers (http://www.r-bloggers.com/paired-students-t-test/)