Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -85,7 +85,8 @@ def plot_and_analyze_categorical(dataframe, category_col, score_col='average_sco
|
|
| 85 |
group1 = dataframe[dataframe[category_col] == dataframe[category_col].unique()[0]][score_col]
|
| 86 |
group2 = dataframe[dataframe[category_col] == dataframe[category_col].unique()[1]][score_col]
|
| 87 |
t_stat, p_val = stats.ttest_ind(group1, group2)
|
| 88 |
-
|
|
|
|
| 89 |
st.write(f" t-statistic = {t_stat:.3f}, p-value = {p_val:.3f}")
|
| 90 |
if p_val < 0.05:
|
| 91 |
st.success(" **Conclusion: Statistically significant difference between groups (p < 0.05).**")
|
|
|
|
| 85 |
group1 = dataframe[dataframe[category_col] == dataframe[category_col].unique()[0]][score_col]
|
| 86 |
group2 = dataframe[dataframe[category_col] == dataframe[category_col].unique()[1]][score_col]
|
| 87 |
t_stat, p_val = stats.ttest_ind(group1, group2)
|
| 88 |
+
# Corrected line with single quotes for replace arguments
|
| 89 |
+
st.write(f"Independent t-test between **{dataframe[category_col].unique()[0]}** and **{dataframe[category_col].unique()[1]}** for {score_col.replace('_', ' ')}:")
|
| 90 |
st.write(f" t-statistic = {t_stat:.3f}, p-value = {p_val:.3f}")
|
| 91 |
if p_val < 0.05:
|
| 92 |
st.success(" **Conclusion: Statistically significant difference between groups (p < 0.05).**")
|