Skip to content

Commit

Permalink
Merge pull request #48 from karenstemartins/bug_fisher_chi2
Browse files Browse the repository at this point in the history
bug in hypothesis definition fisher and chi2
  • Loading branch information
barbarasilveiraf authored Sep 14, 2021
2 parents d77b637 + 7fcbfc3 commit 67d9dfc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ def fisher_exact_test(df, sample1, sample2, alpha=0.05,
pd.DataFrame
"""
hypothesis = {
'two-sided_H0': "the samples are dependent",
'two-sided_H1': "the samples are independent",
'two-sided_H0': "the samples are independent",
'two-sided_H1': "the samples are dependent",
}
table = pd.crosstab(df[sample1], df[sample2])
statistic, p_value = fisher_exact(table, 'two-sided')
Expand Down Expand Up @@ -252,8 +252,8 @@ def chi2_test(df, sample1, sample2, correction=True, alpha=0.05,
pd.DataFrame
"""
hypothesis = {
'two-sided_H0': "the samples are dependent",
'two-sided_H1': "the samples are independent"
'two-sided_H0': "the samples are independent",
'two-sided_H1': "the samples are dependent"
}
expected, observed, stats = pg.chi2_independence(df, sample1, sample2,
correction)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ def fisher_exact_test(df, sample1, sample2, alpha=0.05,
pd.DataFrame
"""
hypothesis = {
'two-sided_H0': "the samples are dependent",
'two-sided_H1': "the samples are independent",
'two-sided_H0': "the samples are independent",
'two-sided_H1': "the samples are dependent",
}
table = pd.crosstab(df[sample1], df[sample2])
statistic, p_value = fisher_exact(table, 'two-sided')
Expand Down Expand Up @@ -252,8 +252,8 @@ def chi2_test(df, sample1, sample2, correction=True, alpha=0.05,
pd.DataFrame
"""
hypothesis = {
'two-sided_H0': "the samples are dependent",
'two-sided_H1': "the samples are independent"
'two-sided_H0': "the samples are independent",
'two-sided_H1': "the samples are dependent"
}
expected, observed, stats = pg.chi2_independence(df, sample1, sample2,
correction)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ def fisher_exact_test(df, sample1, sample2, alpha=0.05,
pd.DataFrame
"""
hypothesis = {
'two-sided_H0': "the samples are dependent",
'two-sided_H1': "the samples are independent",
'two-sided_H0': "the samples are independent",
'two-sided_H1': "the samples are dependent",
}
table = pd.crosstab(df[sample1], df[sample2])
statistic, p_value = fisher_exact(table, 'two-sided')
Expand Down Expand Up @@ -252,8 +252,8 @@ def chi2_test(df, sample1, sample2, correction=True, alpha=0.05,
pd.DataFrame
"""
hypothesis = {
'two-sided_H0': "the samples are dependent",
'two-sided_H1': "the samples are independent"
'two-sided_H0': "the samples are independent",
'two-sided_H1': "the samples are dependent"
}
expected, observed, stats = pg.chi2_independence(df, sample1, sample2,
correction)
Expand Down

0 comments on commit 67d9dfc

Please sign in to comment.