"""Chi-Square Test:
Hypothesis Question: Are there any significant differences between
the observed and expected frequencies in one or more categories?
Example: Is there a significant difference in the preferences for different
ice cream flavors among children?"""
# Python Code:
import scipy.stats as stats
# Observed frequencies for different categories
observed_freq = [...] # Insert observed frequencies
# Expected frequencies (if applicable)
expected_freq = [...] # Insert expected frequencies
# Perform chi-square test
chi2_statistic, p_value = stats.chisquare(observed_freq, expected_freq)
print("Chi-square statistic:", chi2_statistic)
print("P-value:", p_value)