Skip to content

Commit 657eb98

Browse files
authored
Merge pull request #110 from gperdrizet/dev
Added row merging for independent and dependent variable columns in t…
2 parents fca7f2e + 61c17f5 commit 657eb98

File tree

2 files changed

+128
-58
lines changed

2 files changed

+128
-58
lines changed

site/_data/statistics_tables.yml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -139,86 +139,86 @@ probability_distributions:
139139

140140
# Hypothesis Testing Table
141141
hypothesis_tests:
142+
- situation: "Comparing distributions of categorical variables"
143+
independent_var: "None"
144+
dependent_var: "Categorical"
145+
parametric_test: "Chi-square test"
146+
nonparametric_test: "Fisher's exact test (for small samples)"
147+
p_value_interpretation: "Low p-value: Observed distribution differs from expected"
148+
142149
- situation: "Comparing one sample to a known value"
143-
independent_var: "None (fixed value)"
150+
independent_var: "None"
144151
dependent_var: "Continuous"
145152
parametric_test: "One-sample T-test / Z-test"
146153
nonparametric_test: "Wilcoxon signed-rank test"
147154
p_value_interpretation: "Low p-value: Sample mean significantly differs from known value"
155+
156+
- situation: "Testing normality of data"
157+
independent_var: "None"
158+
dependent_var: "Continuous"
159+
parametric_test: "Shapiro-Wilk test"
160+
nonparametric_test: "Kolmogorov-Smirnov test"
161+
p_value_interpretation: "Low p-value: Data significantly deviates from normal distribution"
162+
163+
- situation: "Comparing sample distribution to theoretical distribution"
164+
independent_var: "None"
165+
dependent_var: "Continuous"
166+
parametric_test: "N/A"
167+
nonparametric_test: "Kolmogorov-Smirnov test"
168+
p_value_interpretation: "Low p-value: Sample distribution differs from theoretical distribution"
169+
170+
- situation: "Testing independence of two categorical variables"
171+
independent_var: "Categorical"
172+
dependent_var: "Categorical"
173+
parametric_test: "Chi-square test of independence"
174+
nonparametric_test: "Fisher's exact test"
175+
p_value_interpretation: "Low p-value: Variables are dependent (not independent)"
148176

149177
- situation: "Comparing two independent groups"
150-
independent_var: "Categorical (2 groups)"
178+
independent_var: "Categorical"
151179
dependent_var: "Continuous"
152180
parametric_test: "Independent samples T-test / Two-sample Z-test"
153181
nonparametric_test: "Mann-Whitney U test (Wilcoxon rank-sum test)"
154182
p_value_interpretation: "Low p-value: Significant difference between the two groups"
155183

156184
- situation: "Comparing two paired/dependent groups"
157-
independent_var: "Categorical (2 conditions)"
185+
independent_var: "Categorical"
158186
dependent_var: "Continuous"
159187
parametric_test: "Paired T-test"
160188
nonparametric_test: "Wilcoxon signed-rank test"
161189
p_value_interpretation: "Low p-value: Significant change between paired observations"
162190

163191
- situation: "Comparing three or more independent groups"
164-
independent_var: "Categorical (3+ groups)"
192+
independent_var: "Categorical"
165193
dependent_var: "Continuous"
166194
parametric_test: "One-way ANOVA"
167195
nonparametric_test: "Kruskal-Wallis H test"
168196
p_value_interpretation: "Low p-value: At least one group differs from the others"
169197

170198
- situation: "Comparing three or more paired/dependent groups"
171-
independent_var: "Categorical (3+ conditions)"
199+
independent_var: "Categorical"
172200
dependent_var: "Continuous"
173201
parametric_test: "Repeated measures ANOVA"
174202
nonparametric_test: "Friedman test"
175203
p_value_interpretation: "Low p-value: Significant differences across repeated measurements"
176-
177-
- situation: "Testing relationship between two continuous variables"
178-
independent_var: "Continuous"
179-
dependent_var: "Continuous"
180-
parametric_test: "Pearson correlation"
181-
nonparametric_test: "Spearman rank correlation / Kendall's tau"
182-
p_value_interpretation: "Low p-value: Significant correlation exists between variables"
183-
184-
- situation: "Comparing distributions of categorical variables"
185-
independent_var: "None (comparing to expected)"
186-
dependent_var: "Categorical"
187-
parametric_test: "Chi-square test"
188-
nonparametric_test: "Fisher's exact test (for small samples)"
189-
p_value_interpretation: "Low p-value: Observed distribution differs from expected"
190-
191-
- situation: "Testing independence of two categorical variables"
192-
independent_var: "Categorical"
193-
dependent_var: "Categorical"
194-
parametric_test: "Chi-square test of independence"
195-
nonparametric_test: "Fisher's exact test"
196-
p_value_interpretation: "Low p-value: Variables are dependent (not independent)"
197-
198-
- situation: "Comparing variances between two groups"
199-
independent_var: "Categorical (2 groups)"
200-
dependent_var: "Continuous (variance)"
201-
parametric_test: "F-test (Levene's test)"
202-
nonparametric_test: "Levene's test / Fligner-Killeen test"
203-
p_value_interpretation: "Low p-value: Variances significantly differ between groups"
204-
204+
205205
- situation: "Testing effects of two or more factors"
206-
independent_var: "Categorical (2+ factors)"
206+
independent_var: "Categorical"
207207
dependent_var: "Continuous"
208208
parametric_test: "Two-way ANOVA / Factorial ANOVA"
209209
nonparametric_test: "Scheirer-Ray-Hare test"
210210
p_value_interpretation: "Low p-value: Significant main effects or interaction effects"
211-
212-
- situation: "Testing normality of data"
213-
independent_var: "None (single sample)"
211+
212+
- situation: "Comparing variances between two groups"
213+
independent_var: "Categorical"
214214
dependent_var: "Continuous"
215-
parametric_test: "Shapiro-Wilk test"
216-
nonparametric_test: "Kolmogorov-Smirnov test"
217-
p_value_interpretation: "Low p-value: Data significantly deviates from normal distribution"
218-
219-
- situation: "Comparing sample distribution to theoretical distribution"
220-
independent_var: "None (comparing distributions)"
215+
parametric_test: "F-test (Levene's test)"
216+
nonparametric_test: "Levene's test / Fligner-Killeen test"
217+
p_value_interpretation: "Low p-value: Variances significantly differ between groups"
218+
219+
- situation: "Testing relationship between two continuous variables"
220+
independent_var: "Continuous"
221221
dependent_var: "Continuous"
222-
parametric_test: "N/A"
223-
nonparametric_test: "Kolmogorov-Smirnov test"
224-
p_value_interpretation: "Low p-value: Sample distribution differs from theoretical distribution"
222+
parametric_test: "Pearson correlation"
223+
nonparametric_test: "Spearman rank correlation / Kendall's tau"
224+
p_value_interpretation: "Low p-value: Significant correlation exists between variables"

site/resource_pages/statistics.md

Lines changed: 81 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -246,25 +246,95 @@ Before conducting any statistical test, verify the following assumptions:
246246
<table>
247247
<thead>
248248
<tr>
249-
<th><strong>Situation</strong></th>
250249
<th><strong>Independent Variable Type</strong></th>
251250
<th><strong>Dependent Variable Type</strong></th>
251+
<th><strong>Situation</strong></th>
252252
<th><strong>Parametric Test</strong></th>
253253
<th><strong>Non-Parametric Test</strong></th>
254254
<th><strong>P-value Interpretation</strong></th>
255255
</tr>
256256
</thead>
257257
<tbody>
258-
{% for test in site.data.statistics_tables.hypothesis_tests %}
259-
<tr>
260-
<td><strong>{{ test.situation }}</strong></td>
261-
<td>{{ test.independent_var }}</td>
262-
<td>{{ test.dependent_var }}</td>
263-
<td>{{ test.parametric_test }}</td>
264-
<td>{{ test.nonparametric_test }}</td>
265-
<td>{{ test.p_value_interpretation }}</td>
266-
</tr>
267-
{% endfor %}
258+
<tr>
259+
<td rowspan="4">None</td>
260+
<td rowspan="3">Continuous</td>
261+
<td>Comparing one sample to a known value</td>
262+
<td>One-sample T-test / Z-test</td>
263+
<td>Wilcoxon signed-rank test</td>
264+
<td>Low p-value: Sample mean significantly differs from known value</td>
265+
</tr>
266+
<tr>
267+
<td>Testing normality of data</td>
268+
<td>Shapiro-Wilk test</td>
269+
<td>Kolmogorov-Smirnov test</td>
270+
<td>Low p-value: Data significantly deviates from normal distribution</td>
271+
</tr>
272+
<tr>
273+
<td>Comparing sample distribution to theoretical distribution</td>
274+
<td>N/A</td>
275+
<td>Kolmogorov-Smirnov test</td>
276+
<td>Low p-value: Sample distribution differs from theoretical distribution</td>
277+
</tr>
278+
<tr>
279+
<td>Categorical</td>
280+
<td>Comparing distributions of categorical variables</td>
281+
<td>Chi-square test</td>
282+
<td>Fisher's exact test (for small samples)</td>
283+
<td>Low p-value: Observed distribution differs from expected</td>
284+
</tr>
285+
<tr>
286+
<td rowspan="7">Categorical</td>
287+
<td rowspan="6">Continuous</td>
288+
<td>Comparing two independent groups</td>
289+
<td>Independent samples T-test / Two-sample Z-test</td>
290+
<td>Mann-Whitney U test (Wilcoxon rank-sum test)</td>
291+
<td>Low p-value: Significant difference between the two groups</td>
292+
</tr>
293+
<tr>
294+
<td>Comparing two paired/dependent groups</td>
295+
<td>Paired T-test</td>
296+
<td>Wilcoxon signed-rank test</td>
297+
<td>Low p-value: Significant change between paired observations</td>
298+
</tr>
299+
<tr>
300+
<td>Comparing three or more independent groups</td>
301+
<td>One-way ANOVA</td>
302+
<td>Kruskal-Wallis H test</td>
303+
<td>Low p-value: At least one group differs from the others</td>
304+
</tr>
305+
<tr>
306+
<td>Comparing three or more paired/dependent groups</td>
307+
<td>Repeated measures ANOVA</td>
308+
<td>Friedman test</td>
309+
<td>Low p-value: Significant differences across repeated measurements</td>
310+
</tr>
311+
<tr>
312+
<td>Testing effects of two or more factors</td>
313+
<td>Two-way ANOVA / Factorial ANOVA</td>
314+
<td>Scheirer-Ray-Hare test</td>
315+
<td>Low p-value: Significant main effects or interaction effects</td>
316+
</tr>
317+
<tr>
318+
<td>Comparing variances between two groups</td>
319+
<td>F-test (Levene's test)</td>
320+
<td>Levene's test / Fligner-Killeen test</td>
321+
<td>Low p-value: Variances significantly differ between groups</td>
322+
</tr>
323+
<tr>
324+
<td>Categorical</td>
325+
<td>Testing independence of two categorical variables</td>
326+
<td>Chi-square test of independence</td>
327+
<td>Fisher's exact test</td>
328+
<td>Low p-value: Variables are dependent (not independent)</td>
329+
</tr>
330+
<tr>
331+
<td rowspan="1">Continuous</td>
332+
<td rowspan="1">Continuous</td>
333+
<td>Testing relationship between two continuous variables</td>
334+
<td>Pearson correlation</td>
335+
<td>Spearman rank correlation / Kendall's tau</td>
336+
<td>Low p-value: Significant correlation exists between variables</td>
337+
</tr>
268338
</tbody>
269339
</table>
270340

0 commit comments

Comments
 (0)