Untitled

 avatar
unknown
plain_text
4 months ago
667 B
2
Indexable
import numpy as np
from scipy.stats import f_oneway

# Data for the two groups
low = np.array([41.67, 73.33, 60, 61.67, 53.33, 63.33, 66.67, 88, 76, 60])
high = np.array([70, 88, 48, 69.17, 35, 58.33, 66.67, 31.67, 48.33, 26.67])

# Perform one-way ANOVA
f_statistic, p_value = f_oneway(low, high)

# Output the results
print(f"F-statistic: {f_statistic:.4f}")
print(f"P-value: {p_value:.4f}")

# Determine significance
alpha = 0.05
if p_value < alpha:
    print("Reject the null hypothesis: There is a significant difference between the groups.")
else:
    print("Fail to reject the null hypothesis: No significant difference between the groups.")
Editor is loading...
Leave a Comment