• Latest
  • Trending
ANOVA and the Bonferroni Correction

ANOVA and the Bonferroni Correction

November 22, 2021
Inaugural AfCFTA Conference on Women and Youth in Trade

Inaugural AfCFTA Conference on Women and Youth in Trade

September 6, 2022
Instagram fined €405m over children’s data privacy

Instagram fined €405m over children’s data privacy

September 6, 2022
8 Most Common Causes of a Data Breach

5.7bn data entries found exposed on Chinese VPN

August 18, 2022
Fibre optic interconnection linking Cameroon and Congo now operational

Fibre optic interconnection linking Cameroon and Congo now operational

July 15, 2022
Ericsson and MTN Rwandacell Discuss their Long-Term Partnership

Ericsson and MTN Rwandacell Discuss their Long-Term Partnership

July 15, 2022
Airtel Africa Purchases $42M Worth of Additional Spectrum

Airtel Africa Purchases $42M Worth of Additional Spectrum

July 15, 2022
Huawei steps up drive for Kenyan talent

Huawei steps up drive for Kenyan talent

July 15, 2022
TSMC predicts Q3 revenue boost thanks to increased iPhone 13 demand

TSMC predicts Q3 revenue boost thanks to increased iPhone 13 demand

July 15, 2022
Facebook to allow up to five profiles tied to one account

Facebook to allow up to five profiles tied to one account

July 15, 2022
Top 10 apps built and managed in Ghana

Top 10 apps built and managed in Ghana

July 15, 2022
MTN Group to Host the 2nd Edition of the MoMo API Hackathon

MTN Group to Host the 2nd Edition of the MoMo API Hackathon

July 15, 2022
KIOXIA Introduce JEDEC XFM Removable Storage with PCIe/NVMe Spec

KIOXIA Introduce JEDEC XFM Removable Storage with PCIe/NVMe Spec

July 15, 2022
  • Consumer Watch
  • Kids Page
  • Directory
  • Events
  • Reviews
Tuesday, 7 February, 2023
  • Login
itechnewsonline.com
  • Home
  • Tech
  • Africa Tech
  • InfoSEC
  • Data Science
  • Data Storage
  • Business
  • Opinion
Subscription
Advertise
No Result
View All Result
itechnewsonline.com
No Result
View All Result

ANOVA and the Bonferroni Correction

by ITECHNEWS
November 22, 2021
in Data Science
0 0
0
ANOVA and the Bonferroni Correction

Performing a hypothesis test comes with the risk of obtaining either a Type 1 or Type 2 error.

  • Type 1 error: Rejecting a true null hypothesis
  • Type 2 error: Accepting a false null hypothesis

When analysing different groups, a one-way ANOVA can tell us if there is a statistically significant difference between those groups.

YOU MAY ALSO LIKE

5.7bn data entries found exposed on Chinese VPN

Introduction to Google Firebase: Firestore using Python

However, it cannot tell us which group is different from another. Moreover, when performing multiple hypothesis tests at once, the probability of obtaining a Type 1 error increases.

In statistics, this is known as the family-wise error rate, which measures the probability that a Type 1 error will be made across any particular hypothesis test.

It is calculated as follows:

1 — (1-α)^n

where:

α = the significance level for a given hypothesis test

n = total number of tests

For instance, if we are using a significance level of 0.05 and we conduct three hypothesis tests, the probability of making a Type 1 error increases to 14.26%, i.e. 1-(1–0.05)³ = 0.1426.

To guard against such a Type 1 error (and also to concurrently conduct pairwise t-tests between each group), a Bonferroni correction is used whereby the significance level is adjusted to reduce the probability of committing a Type 1 error. However, a downside of this test is that the probability of committing a Type 2 error also increases.

Hotel Revenue: Analysing Average Daily Rates Across Distribution Channels

For this example, let us consider a hotel that has collected data on the average daily rate for each of its customers, i.e. the average price that the customer pays per day to stay at the hotel.

The hotel also has information on the distribution channel pertaining to each customer, i.e. Corporate, Direct, and TA/TO. The goal of the analysis is to determine the differences across means in ADR for each of these three groups. The original data was sourced from Antonio, Almeida and Nunes (2019) as referenced below, and 100 samples from each distribution channel were randomly selected.

One-way ANOVA

Let’s start by conducting a one-way ANOVA in R.

> model <- aov(ADR ~ DistributionChannel, data = data)
> summary(model)
Df Sum Sq Mean Sq F value Pr(>F)
DistributionChannel 2 236636 118318 33.33 8.76e-14 ***
Residuals 297 1054469 3550
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

When analysing the results, we can see that the p-value is highly significant and virtually zero. This means we reject the null hypothesis that no significant differences exist between each group.

However, we can see that the ANOVA test merely indicates that a difference exists between the three distribution channels — it does not tell us anything about the nature of that difference.

Before performing the pairwise p-test, here is a boxplot illustrating the differences across the three groups:

Source: RStudio Output

From a visual glance, we can see that the mean ADR across the Direct and TA/TO distribution channels is higher than that of Corporate, and the dispersion across ADR is significantly greater.

Pairwise t-test with Bonferroni correction

However, we would like to analyse this in more detail using a pairwise t-test with a Bonferroni correction.

> pairwise.t.test(data$ADR, data$DistributionChannel, p.adjust.method="bonferroni")Pairwise comparisons using t tests with pooled SDdata:  data$ADR and data$DistributionChannel       Corporate Direct
Direct 4.6e-11 -
TA/TO 2.4e-11 1P value adjustment method: bonferroni

When looking at the adjusted p-values, we can see that the differences between Corporate and Direct, and Corporate and TA/TO are highly significant as the p-values are near zero. Given that the Bonferroni correction has been used to guard against Type 1 errors, we can be more confident in rejecting the null hypothesis of no significant differences across groups.

That said, we can see that there exists a p-value of 1 between the Direct and TA/TO groups, implying that we cannot reject the null hypothesis of no significant differences between these two groups.

Conclusion

This has been a short introduction to pairwise t-tests and specifically, the use of the Bonferroni correction to guard against Type 1 errors. You have seen:

  • The limitations of using a one-way ANOVA
  • How to calculate the family-wise error rate
  • How to conduct a pairwise t-test using a Bonferroni correction and interpret the results

Many thanks for your time, and any questions or feedback are greatly appreciated.

Michael Grogan Data Science Consultant with expertise in economics, time series analysis, and Bayesian methods

ShareTweetShare
Plugin Install : Subscribe Push Notification need OneSignal plugin to be installed.

Search

No Result
View All Result

Recent News

Inaugural AfCFTA Conference on Women and Youth in Trade

Inaugural AfCFTA Conference on Women and Youth in Trade

September 6, 2022
Instagram fined €405m over children’s data privacy

Instagram fined €405m over children’s data privacy

September 6, 2022
8 Most Common Causes of a Data Breach

5.7bn data entries found exposed on Chinese VPN

August 18, 2022

About What We Do

itechnewsonline.com

We bring you the best Premium Tech News.

Recent News With Image

Inaugural AfCFTA Conference on Women and Youth in Trade

Inaugural AfCFTA Conference on Women and Youth in Trade

September 6, 2022
Instagram fined €405m over children’s data privacy

Instagram fined €405m over children’s data privacy

September 6, 2022

Recent News

  • Inaugural AfCFTA Conference on Women and Youth in Trade September 6, 2022
  • Instagram fined €405m over children’s data privacy September 6, 2022
  • 5.7bn data entries found exposed on Chinese VPN August 18, 2022
  • Fibre optic interconnection linking Cameroon and Congo now operational July 15, 2022
  • Home
  • InfoSec
  • Opinion
  • Africa Tech
  • Data Storage

© 2021-2022 iTechNewsOnline.Com - Powered by BackUPDataSystems

No Result
View All Result
  • Home
  • Tech
  • Africa Tech
  • InfoSEC
  • Data Science
  • Data Storage
  • Business
  • Opinion

© 2021-2022 iTechNewsOnline.Com - Powered by BackUPDataSystems

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Go to mobile version