Skip to main content
improved formatting
Source Link
Stefan
  • 6.6k
  • 1
  • 24
  • 45

I'm trying to find whether there's a correlation between two variables using Chi Square test and Fisher's Exact test. I get two different p values when I run Chi Square test and Fisher's Exact test. Which value should I take? Take Chi squared p value and do not reject H0 or take Fisher's Exact p value ad reject H0? I ran Fisher's Exact test as well because I get the following error msg when I run Chi Squared test.

Contingency table

enter image description here

chisq.test(ebtable6)

> chisq.test(ebtable6)

    Pearson's Chi-squared test

data: ebtable6 X-squared = 7.3866, df = 2, p-value = 0.02489

Warning message: In chisq.test(ebtable6) : Chi-squared approximation may be incorrect

fisher.test(ebtable6)


data:  ebtable6
X-squared = 7.3866, df = 2, p-value = 0.02489

Warning message:
In chisq.test(ebtable6) : Chi-squared approximation may be incorrect

> fisher.test(ebtable6)

    Fisher's Exact Test for Count Data

data:  ebtable6
p-value = 0.05018
alternative hypothesis: two.sided

data: ebtable6 p-value = 0.05018 alternative hypothesis: two.sided

I'm trying to find whether there's a correlation between two variables using Chi Square test and Fisher's Exact test. I get two different p values when I run Chi Square test and Fisher's Exact test. Which value should I take? Take Chi squared p value and do not reject H0 or take Fisher's Exact p value ad reject H0? I ran Fisher's Exact test as well because I get the following error msg when I run Chi Squared test.

Contingency table

enter image description here

chisq.test(ebtable6)

Pearson's Chi-squared test

data: ebtable6 X-squared = 7.3866, df = 2, p-value = 0.02489

Warning message: In chisq.test(ebtable6) : Chi-squared approximation may be incorrect

fisher.test(ebtable6)

Fisher's Exact Test for Count Data

data: ebtable6 p-value = 0.05018 alternative hypothesis: two.sided

I'm trying to find whether there's a correlation between two variables using Chi Square test and Fisher's Exact test. I get two different p values when I run Chi Square test and Fisher's Exact test. Which value should I take? Take Chi squared p value and do not reject H0 or take Fisher's Exact p value ad reject H0? I ran Fisher's Exact test as well because I get the following error msg when I run Chi Squared test.

Contingency table

enter image description here

> chisq.test(ebtable6)

    Pearson's Chi-squared test

data:  ebtable6
X-squared = 7.3866, df = 2, p-value = 0.02489

Warning message:
In chisq.test(ebtable6) : Chi-squared approximation may be incorrect

> fisher.test(ebtable6)

    Fisher's Exact Test for Count Data

data:  ebtable6
p-value = 0.05018
alternative hypothesis: two.sided
Source Link
user147313
user147313

Different p-values for Chi squared and Fisher's Exact R

I'm trying to find whether there's a correlation between two variables using Chi Square test and Fisher's Exact test. I get two different p values when I run Chi Square test and Fisher's Exact test. Which value should I take? Take Chi squared p value and do not reject H0 or take Fisher's Exact p value ad reject H0? I ran Fisher's Exact test as well because I get the following error msg when I run Chi Squared test.

Contingency table

enter image description here

chisq.test(ebtable6)

Pearson's Chi-squared test

data: ebtable6 X-squared = 7.3866, df = 2, p-value = 0.02489

Warning message: In chisq.test(ebtable6) : Chi-squared approximation may be incorrect

fisher.test(ebtable6)

Fisher's Exact Test for Count Data

data: ebtable6 p-value = 0.05018 alternative hypothesis: two.sided