Skip to content

Q1 t-test independent #1

@toncho11

Description

@toncho11

Hi,

Thank you for your wonderful tutorial on hypothesis testing with Python.

I have a suggestion to use the latest version of stats.ttest_ind and set the alternative hypothesis to 'greater' instead of dividing the p-value. Dividing the p-value of a two sided t-test might not be so accurate as using a one-sided t-test. Below is the updated code.

ttest,p_value = stats.ttest_ind(sync, asyncr , alternative = 'greater')
print("p value:%.8f" % p_value)

if p_value < 0.05:
    print("Reject null hypothesis")
else:
    print("Fail to reject null hypothesis") 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions