import pandas as pd import seaborn as sns import statsmodels.api as sm from statsmodels.formula.api import ols tips=sns.load_dataset('tips') tips model=ols('total_bill~day',data=tips).fit() one_anova_table=sm.stats.anova_lm(model,typ=1) print("\n One way anova result based on day and time:") print(one_anova_table) p_val=0.042454 if p_val1>0.05: print('Accept H0') else: print('Reject H0')
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter