💡
Each example includes: research question → data → formula → step-by-step → result → APA-7 report.
📋 1 · Descriptive Statistics
Exam Scores: Central Tendency & Spread
Descriptive
Research Question:
A professor records exam scores for 10 students. Describe the distribution.
| Student | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| Score | 72 | 85 | 90 | 68 | 78 | 92 | 75 | 88 | 65 | 82 |
-
1Mean (x̄):$$\bar{x} = \frac{\sum x_i}{n} = \frac{72+85+90+68+78+92+75+88+65+82}{10} = \frac{795}{10} = 79.5$$
-
2Sample Standard Deviation:$$s = \sqrt{\frac{\sum(x_i - \bar{x})^2}{n-1}} = \sqrt{\frac{(-7.5)^2+\cdots+(2.5)^2}{9}} = \sqrt{\frac{630.5}{9}} = \sqrt{70.06} \approx 8.37$$
-
3Median:$$\text{Median} = \frac{x_{(5)} + x_{(6)}}{2} = \frac{78 + 82}{2} = 80.0$$
-
4SE:$$SE = \frac{s}{\sqrt{n}} = \frac{8.37}{\sqrt{10}} = \frac{8.37}{3.162} = 2.65$$
79.5
Mean
80.0
Median
8.37
SD
2.65
SE
65–92
Range
APA-7
Descriptive statistics for exam scores (N = 10): M = 79.50, SD = 8.37, Mdn = 80.00, range = [65, 92].
⚖️ 2 · t-Tests
2a · One-Sample t-test
t-test
Research Question:
The national average is 75. Does the class (n=10, M=79.5, s=8.37) differ significantly?
Formula
$$t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}, \quad df = n - 1$$
-
1H₀: μ = 75 vs H₁: μ ≠ 75 (two-tailed, α = .05)
-
2$$t = \frac{79.5 - 75}{8.37/\sqrt{10}} = \frac{4.5}{2.646} = 1.700, \quad df = 9$$
-
3Critical value: t*(df=9, α=.05) = ±2.262 → |1.700| < 2.262
-
4Cohen's d:$$d = \frac{\bar{x} - \mu_0}{s} = \frac{79.5 - 75}{8.37} = 0.538 \quad (\text{medium})$$
1.700
t
9
df
.124
p
0.538
Cohen's d
⚪ Fail to Reject H₀ — p = .124 > .05
APA-7
A one-sample t-test indicated that the class mean (M = 79.50, SD = 8.37) did not significantly differ from the national standard of 75, t(9) = 1.70, p = .124, d = 0.54, 95% CI [−1.48, 10.48].
2b · Independent-Samples t-test (Welch)
t-test
Research Question:
Does Drug A reduce pain scores more than Drug B?
| Group | n | Mean | SD |
|---|---|---|---|
| Drug A | 12 | 4.2 | 1.3 |
| Drug B | 10 | 5.8 | 1.9 |
Welch t-statistic
$$t_W = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}}$$
-
1$$SE = \sqrt{\frac{1.3^2}{12} + \frac{1.9^2}{10}} = \sqrt{\frac{1.69}{12} + \frac{3.61}{10}} = \sqrt{0.1408 + 0.361} = \sqrt{0.5018} = 0.7084$$
-
2$$t_W = \frac{4.2 - 5.8}{0.7084} = \frac{-1.6}{0.7084} = -2.258$$
-
3Welch-Satterthwaite df:$$df = \frac{(s_1^2/n_1 + s_2^2/n_2)^2}{\dfrac{(s_1^2/n_1)^2}{n_1-1} + \dfrac{(s_2^2/n_2)^2}{n_2-1}} = \frac{(0.5018)^2}{\dfrac{(0.1408)^2}{11}+\dfrac{(0.361)^2}{9}} \approx 15.7 \approx 15$$
-
4Cohen's d:$$d = \frac{|\bar{x}_1 - \bar{x}_2|}{s_p}, \quad s_p = \sqrt{\frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}} = \sqrt{\frac{11(1.69)+9(3.61)}{20}} = \sqrt{1.554} = 1.567$$$$d = \frac{1.6}{1.567} = 1.021 \quad (\text{large})$$
−2.258
t(Welch)
15
df
.039
p
1.021
Cohen's d
🔴 Reject H₀ — p = .039 < .05
APA-7
An independent-samples Welch t-test revealed that Drug A (M = 4.20, SD = 1.30) produced significantly lower pain scores than Drug B (M = 5.80, SD = 1.90), t(15.00) = −2.26, p = .039, d = 1.02, 95% CI [−3.11, −0.09].
2c · Paired-Samples t-test
t-test
Research Question:
Did training improve performance for the same 8 employees?
| i | Before | After | d = After − Before | d − d̄ | (d − d̄)² |
|---|---|---|---|---|---|
| 1 | 60 | 72 | 12 | 2.75 | 7.56 |
| 2 | 55 | 68 | 13 | 3.75 | 14.06 |
| 3 | 70 | 75 | 5 | -4.25 | 18.06 |
| 4 | 65 | 74 | 9 | -0.25 | 0.06 |
| 5 | 58 | 71 | 13 | 3.75 | 14.06 |
| 6 | 72 | 80 | 8 | -1.25 | 1.56 |
| 7 | 63 | 70 | 7 | -2.25 | 5.06 |
| 8 | 68 | 82 | 14 | 4.75 | 22.56 |
| Σ | 81 | 0 | 83.00 |
$$t = \frac{\bar{d}}{s_d / \sqrt{n}}, \quad \bar{d} = \frac{81}{8} = 10.125, \quad s_d = \sqrt{\frac{83.00}{7}} = \sqrt{11.857} = 3.443$$
$$t = \frac{10.125}{3.443/\sqrt{8}} = \frac{10.125}{1.217} = 8.320, \quad df = n-1 = 7$$
Cohen's d (paired)
$$d = \frac{\bar{d}}{s_d} = \frac{10.125}{3.443} = 2.941 \quad (\text{very large})$$
8.320
t
7
df
<.001
p
2.941
Cohen's d
10.125
Mean Diff.
🔴 Reject H₀ — p < .001
APA-7
A paired-samples t-test indicated a statistically significant improvement in performance following training (M_diff = 10.13, SD_diff = 3.44), t(7) = 8.32, p < .001, d = 2.94, 95% CI [7.25, 13.00].
📊 3 · ANOVA
3a · One-Way ANOVA
ANOVA
Research Question:
Do three teaching methods produce different exam scores?
| Traditional (A) | Blended (B) | Online (C) |
|---|---|---|
| 70 | 85 | 75 |
| 72 | 88 | 78 |
| 68 | 82 | 72 |
| 74 | 90 | 80 |
| 71 | 87 | 76 |
| M=71 | M=86.4 | M=76.2 |
ANOVA Decomposition
$$SS_{Total} = SS_{Between} + SS_{Within}$$
$$SS_B = \sum_{j=1}^{k} n_j(\bar{x}_j - \bar{x}_{..})^2, \quad SS_W = \sum_{j=1}^{k}\sum_{i=1}^{n_j}(x_{ij}-\bar{x}_j)^2$$
$$F = \frac{MS_B}{MS_W} = \frac{SS_B/(k-1)}{SS_W/(N-k)}$$
-
1Grand Mean:$$\bar{x}_{..} = \frac{71(5)+86.4(5)+76.2(5)}{15} = \frac{1178}{15} = 77.87$$
-
2SSBetween:$$SS_B = 5(71-77.87)^2 + 5(86.4-77.87)^2 + 5(76.2-77.87)^2$$ $$= 5(47.20) + 5(72.76) + 5(2.79) = 236.0 + 363.8 + 13.9 = 613.7$$
-
3SSWithin:$$SS_W = [(70{-}71)^2{+}(72{-}71)^2{+}\cdots] + \cdots = 20.0 + 38.8 + 42.8 = 101.6$$
-
4F-statistic:$$MS_B = \frac{613.7}{3-1} = 306.85, \quad MS_W = \frac{101.6}{15-3} = 8.467$$ $$F(2, 12) = \frac{306.85}{8.467} = 36.24$$
-
5η²:$$\eta^2 = \frac{SS_B}{SS_T} = \frac{613.7}{613.7+101.6} = \frac{613.7}{715.3} = 0.858 \quad (\text{large, } \eta^2 > .14)$$
36.24
F(2,12)
<.001
p
0.858
η²
306.85
MSB
8.467
MSW
🔴 Reject H₀ — F(2,12) = 36.24, p < .001
APA-7
A one-way ANOVA revealed a significant effect of teaching method, F(2, 12) = 36.24, p < .001, η² = .86. Tukey: Blended > Online > Traditional, all ps < .001.
🔢 4 · Non-parametric Tests
4a · Mann-Whitney U Test
Non-parametric
Research Question:
Do satisfaction scores differ between two departments?
| Dept A | 6 | 8 | 2 | 4 | 9 |
|---|---|---|---|---|---|
| Dept B | 7 | 5 | 10 | 3 | 1 |
U Statistic
$$U_1 = n_1 n_2 + \frac{n_1(n_1+1)}{2} - R_1, \quad U = \min(U_1, U_2)$$
-
1Rank all 10 combined (1=lowest):
Value 1 2 3 4 5 6 7 8 9 10 Rank 1 2 3 4 5 6 7 8 9 10 Group B A B A B A B A A B -
2$$R_1 = 2+4+6+8+9 = 29 \quad (\text{sum of ranks for Dept A})$$ $$U_1 = 5 \times 5 + \frac{5 \times 6}{2} - 29 = 25 + 15 - 29 = 11$$ $$U_2 = n_1 n_2 - U_1 = 25 - 11 = 14, \quad U = \min(11, 14) = 11$$
-
3Normal approximation (for reference):$$z = \frac{U - n_1n_2/2}{\sqrt{n_1 n_2(n_1+n_2+1)/12}} = \frac{11 - 12.5}{\sqrt{25 \times 11/12}} = \frac{-1.5}{4.787} = -0.313$$
-
4Effect size r:$$r = \frac{|z|}{\sqrt{N}} = \frac{0.313}{\sqrt{10}} = 0.099 \quad (\text{small})$$
11
U
.754
p (exact)
0.099
r
⚪ Fail to Reject H₀ — p = .754
APA-7
A Mann-Whitney U test revealed no significant difference in satisfaction scores between Department A and B, U = 11, z = −0.31, p = .754, r = .10.
4b · Kruskal-Wallis H Test
Non-parametric
Research Question:
Do pain levels differ across three clinics?
| Clinic A | Clinic B | Clinic C |
|---|---|---|
| 3,5,4,2,6 | 7,9,8,10,6 | 5,4,6,3,5 |
Kruskal-Wallis H
$$H = \frac{12}{N(N+1)}\sum_{j=1}^{k}\frac{R_j^2}{n_j} - 3(N+1)$$
-
1Rank all 15 values:$$R_A = 2+6.5+4+1+9 = 22.5, \quad R_B = 11+14+13+15+9 = 62, \quad R_C = 6.5+4+9+2+6.5 = 28$$
(ties averaged) -
2$$H = \frac{12}{15 \times 16}\left(\frac{22.5^2}{5} + \frac{62^2}{5} + \frac{28^2}{5}\right) - 3(16)$$ $$= \frac{12}{240}(101.25 + 768.8 + 156.8) - 48 = 0.05(1026.85) - 48 = 51.34 - 48 = 3.34$$
-
3Compare to χ²(2) = 5.99 → H = 3.34 < 5.99
3.34
H
2
df
.188
p
⚪ Fail to Reject H₀ — p = .188
APA-7
A Kruskal-Wallis test indicated no significant difference in pain levels across clinics, H(2) = 3.34, p = .188, η² = .10.
🔗 5 · Correlation
5a · Pearson Correlation
Correlation
Research Question:
Is there a linear relationship between study hours and GPA?
| i | X (hrs) | Y (GPA) | X−X̄ | Y−Ȳ | (X−X̄)(Y−Ȳ) | (X−X̄)² | (Y−Ȳ)² |
|---|---|---|---|---|---|---|---|
| 1 | 10 | 2.8 | -5 | -0.55 | 2.75 | 25 | 0.30 |
| 2 | 15 | 3.2 | 0 | -0.15 | 0 | 0 | 0.02 |
| 3 | 20 | 3.8 | 5 | 0.45 | 2.25 | 25 | 0.20 |
| 4 | 12 | 3.0 | -3 | -0.35 | 1.05 | 9 | 0.12 |
| 5 | 18 | 3.6 | 3 | 0.25 | 0.75 | 9 | 0.06 |
| 6 | 8 | 2.5 | -7 | -0.85 | 5.95 | 49 | 0.72 |
| 7 | 22 | 4.0 | 7 | 0.65 | 4.55 | 49 | 0.42 |
| 8 | 15 | 3.3 | 0 | -0.05 | 0 | 0 | 0.003 |
| Σ | 120 | 27.2 | 0 | 0 | 17.30 | 166 | 1.843 |
$$r = \frac{\sum(x_i-\bar{x})(y_i-\bar{y})}{\sqrt{\sum(x_i-\bar{x})^2 \cdot \sum(y_i-\bar{y})^2}} = \frac{17.30}{\sqrt{166 \times 1.843}} = \frac{17.30}{\sqrt{305.9}} = \frac{17.30}{17.49} = 0.989$$
Significance test (t)
$$t = \frac{r\sqrt{n-2}}{\sqrt{1-r^2}} = \frac{0.989\sqrt{6}}{\sqrt{1-0.978}} = \frac{0.989 \times 2.449}{\sqrt{0.022}} = \frac{2.422}{0.148} = 16.36, \quad df=6$$
95% CI (Fisher-z)
$$z_r = \tanh^{-1}(r) = \frac{1}{2}\ln\frac{1+r}{1-r} = \frac{1}{2}\ln\frac{1.989}{0.011} = 2.693$$
$$CI_{z}: 2.693 \pm \frac{1.96}{\sqrt{n-3}} = 2.693 \pm 0.981 \Rightarrow [1.712,\ 3.674] \Rightarrow r \in [.936,\ .998]$$
.989
r
.978
r²
16.36
t(6)
<.001
p
🔴 Strong positive correlation, r = .989, p < .001
APA-7
Study hours and GPA were strongly positively correlated, r(6) = .99, p < .001, 95% CI [.94, 1.00]. Study hours accounted for 97.8% of the variance in GPA.
📈 6 · Simple Linear Regression
Predict GPA from Study Hours
Regression
Research Question:
Predict GPA from study hours (same data as correlation example).
OLS Coefficients
$$b_1 = \frac{\sum(x_i-\bar{x})(y_i-\bar{y})}{\sum(x_i-\bar{x})^2} = \frac{17.30}{166} = 0.1042$$
$$b_0 = \bar{y} - b_1\bar{x} = 3.40 - 0.1042 \times 15 = 3.40 - 1.563 = 1.837$$
$$\hat{y} = 1.837 + 0.1042x$$
R², F, SE
$$SS_{Res} = \sum(y_i - \hat{y}_i)^2 = 0.040, \quad SS_{Tot} = 1.843$$
$$R^2 = 1 - \frac{SS_{Res}}{SS_{Tot}} = 1 - \frac{0.040}{1.843} = 0.978$$
$$F(1,6) = \frac{R^2/(p-1)}{(1-R^2)/(n-p)} = \frac{0.978/1}{0.022/6} = \frac{0.978}{0.00367} = 267.0$$
$$SE_{b_1} = \sqrt{\frac{SS_{Res}/(n-2)}{\sum(x-\bar{x})^2}} = \sqrt{\frac{0.040/6}{166}} = \sqrt{0.0000402} = 0.00634$$
| Coefficient | B | SE | t | p | 95% CI |
|---|---|---|---|---|---|
| b₀ (Intercept) | 1.837 | 0.107 | 17.17 | <.001 | [1.575, 2.099] |
| b₁ (Hours) | 0.1042 | 0.00634 | 16.44 | <.001 | [0.0887, 0.1197] |
0.978
R²
267.0
F(1,6)
<.001
p
0.1042
β (slope)
✅ Every additional hour → GPA +0.104. R² = 97.8%.
APA-7
Simple linear regression: GPA = 1.84 + 0.10 × Hours, F(1, 6) = 267.0, p < .001, R² = .978.
🗂️ 7 · Chi-Square Test
Smoking vs Cancer
Categorical
Research Question:
Is smoking associated with cancer diagnosis (N=200)?
| Cancer: Yes | Cancer: No | Row Total | |
|---|---|---|---|
| Smoker | 50 (E=32) | 30 (E=48) | 80 |
| Non-Smoker | 30 (E=48) | 90 (E=72) | 120 |
| Col Total | 80 | 120 | 200 |
Expected: E = (R × C) / N
$$E_{11} = \frac{80 \times 80}{200} = 32, \quad E_{12} = \frac{80 \times 120}{200} = 48$$
$$E_{21} = \frac{120 \times 80}{200} = 48, \quad E_{22} = \frac{120 \times 120}{200} = 72$$
χ²
$$\chi^2 = \sum \frac{(O-E)^2}{E} = \frac{(50-32)^2}{32} + \frac{(30-48)^2}{48} + \frac{(30-48)^2}{48} + \frac{(90-72)^2}{72}$$
$$= \frac{324}{32} + \frac{324}{48} + \frac{324}{48} + \frac{324}{72} = 10.125 + 6.75 + 6.75 + 4.5 = 28.125$$
Cramér's V
$$V = \sqrt{\frac{\chi^2}{N \cdot \min(r-1,c-1)}} = \sqrt{\frac{28.125}{200 \times 1}} = \sqrt{0.1406} = 0.375 \quad (\text{medium-large})$$
28.125
χ²
1
df
<.001
p
0.375
Cramér's V
🔴 Reject H₀ — p < .001. Smoking and cancer are significantly associated.
APA-7
A chi-square test of independence indicated a significant association between smoking and cancer, χ²(1, N = 200) = 28.13, p < .001, V = .375.
🔒 8 · Cronbach's Alpha
5-Item Job Satisfaction Scale
Reliability
Research Question:
Is this 5-item Likert satisfaction scale internally consistent?
| Resp. | Q1 | Q2 | Q3 | Q4 | Q5 | Sum |
|---|---|---|---|---|---|---|
| 1 | 4 | 3 | 5 | 4 | 3 | 19 |
| 2 | 2 | 2 | 3 | 2 | 2 | 11 |
| 3 | 5 | 4 | 5 | 5 | 4 | 23 |
| 4 | 3 | 3 | 4 | 3 | 3 | 16 |
| 5 | 1 | 2 | 2 | 1 | 2 | 8 |
| 6 | 4 | 5 | 4 | 4 | 5 | 22 |
| s² | 2.07 | 1.27 | 1.27 | 2.27 | 1.07 | σ²_T=28.56 |
Cronbach's α
$$\alpha = \frac{k}{k-1}\left(1 - \frac{\sum s_i^2}{\sigma_T^2}\right)$$
$$\sum s_i^2 = 2.07+1.27+1.27+2.27+1.07 = 7.95$$
$$\alpha = \frac{5}{4}\left(1 - \frac{7.95}{28.56}\right) = 1.25 \times (1 - 0.2783) = 1.25 \times 0.7217 = 0.902$$
0.902
α
5
Items
Excellent
Rating
✅ α = .902 — Excellent internal consistency (α > .90)
APA-7
The internal consistency of the 5-item job satisfaction scale was excellent, α = .90, exceeding the recommended threshold of .70.
🔁 9 · Repeated-Measures ANOVA
Memory Scores: 3 Time Points
RM-ANOVA
Research Question:
Do memory scores change over 3 time points in 5 participants?
| Subj. | T1 | T2 | T3 | P̄ |
|---|---|---|---|---|
| 1 | 4 | 6 | 8 | 6.0 |
| 2 | 5 | 7 | 9 | 7.0 |
| 3 | 3 | 5 | 7 | 5.0 |
| 4 | 6 | 8 | 10 | 8.0 |
| 5 | 2 | 4 | 6 | 4.0 |
| T̄ⱼ | 4.0 | 6.0 | 8.0 | 6.0 (Grand) |
SS Decomposition
$$SS_{Time} = n\sum_j(\bar{T}_j - \bar{x}_{..})^2 = 5[(4{-}6)^2+(6{-}6)^2+(8{-}6)^2] = 5[4+0+4] = 40$$
$$SS_{Subjects} = k\sum_i(\bar{P}_i - \bar{x}_{..})^2 = 3[(6{-}6)^2+(7{-}6)^2+(5{-}6)^2+(8{-}6)^2+(4{-}6)^2] = 3[0+1+1+4+4] = 30$$
$$SS_{Error} = SS_{Total} - SS_{Time} - SS_{Subjects}$$
$$SS_{Total} = \sum(x_{ij}-\bar{x}_{..})^2 = 70, \quad SS_{Error} = 70 - 40 - 30 = 0$$
$$F = \frac{MS_{Time}}{MS_{Error}} = \frac{40/2}{0/8} \rightarrow \infty \quad \text{(perfect linear trend — theoretical)}$$
$$\eta^2_{partial} = \frac{SS_{Time}}{SS_{Time}+SS_{Error}} = \frac{40}{40+0} = 1.000$$
📌
In real data: use MindStat for Mauchly's test + GG/HF corrections.
APA-7 (template)
A one-way RM-ANOVA indicated a significant effect of time, F(2, 8) = XX, p < .001, η²_p = .XX. Pairwise Bonferroni comparisons: all periods differ significantly.
⚡ 10 · Power Analysis & Sample Size
Sample Size for Independent t-test
Power
Scenario:
Two-group RCT, d = 0.5 (medium), α = .05, power = .80.
Cohen's n per group
$$n = \frac{(z_{\alpha/2} + z_\beta)^2 \times 2}{d^2}$$
$$z_{\alpha/2} = z_{.025} = 1.96, \quad z_\beta = z_{.20} = 0.842$$
$$n = \frac{(1.96 + 0.842)^2 \times 2}{0.5^2} = \frac{(2.802)^2 \times 2}{0.25} = \frac{7.851 \times 2}{0.25} = \frac{15.70}{0.25} = 62.8 \approx \mathbf{63 \text{ per group}}$$
| d | 80% Power | 90% Power | 95% Power |
|---|---|---|---|
| 0.2 (small) | 197 | 265 | 327 |
| 0.5 (medium) | 63 | 85 | 105 |
| 0.8 (large) | 26 | 34 | 42 |
| 1.0 (very large) | 17 | 22 | 27 |
63
n per group
126
Total N
80%
Power
APA-7
An a priori power analysis indicated that 63 participants per group (N = 126) were required to detect d = 0.50 with 80% power at α = .05 (two-tailed).
📐 11 · Normality Testing (Shapiro-Wilk)
11a · Data Consistent with Normality
Normality
Research Question:
Are BP readings normally distributed before applying a t-test?
| i | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| BP | 118 | 120 | 122 | 124 | 124 | 126 | 128 | 130 | 133 | 135 |
Shapiro-Wilk W
$$W = \frac{b^2}{SS},\quad b = \sum_{i=1}^{\lfloor n/2\rfloor} a_i\bigl(x_{(n+1-i)}-x_{(i)}\bigr),\quad SS=\sum(x_i-\bar{x})^2$$
-
1Sort ascending, compute x̄ and SS$$\bar{x}=126.0,\quad SS=(118{-}126)^2+\cdots+(135{-}126)^2=274$$
-
2Coefficients (n=10): a₁=0.5739, a₂=0.3291, a₃=0.2141, a₄=0.1224, a₅=0.0399$$x_{(10)}-x_{(1)}=17,\; x_{(9)}-x_{(2)}=13,\; x_{(8)}-x_{(3)}=8,\; x_{(7)}-x_{(4)}=4,\; x_{(6)}-x_{(5)}=2$$ $$b=0.5739(17)+0.3291(13)+0.2141(8)+0.1224(4)+0.0399(2)=9.756+4.278+1.713+0.490+0.080=16.317$$
-
3$$W=\frac{(16.317)^2}{274}=\frac{266.2}{274}=\mathbf{0.972}$$
0.972
W
.895
p
10
n
⚪ Fail to Reject H₀ — Normality confirmed, W(10) = 0.97, p = .895
APA-7
Shapiro-Wilk testing confirmed normality, W(10) = 0.97, p = .895.
11b · Detecting Non-Normality
Non-Normal
Research Question:
Are ER waiting times normally distributed?
| i | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| Min | 5 | 8 | 10 | 12 | 15 | 20 | 35 | 52 | 78 | 95 |
-
1$$\bar{x}=33.0,\quad SS=9{,}106$$ $$\text{Differences: }x_{(10)}-x_{(1)}=90,\;70,\;42,\;23,\;5$$ $$b=0.5739(90)+0.3291(70)+0.2141(42)+0.1224(23)+0.0399(5)=51.65+23.04+8.99+2.82+0.20=86.70$$ $$W=\frac{(86.70)^2}{9106}=\frac{7516.9}{9106}=\mathbf{0.825}$$
0.825
W
.030
p
<.05
Violation
🔴 Reject H₀ — Data NOT normal, W(10) = 0.83, p = .030 → use non-parametric test
💡
Decision rule: p > .05 → normality assumed; p ≤ .05 → non-parametric or transform data.
▶ Test Normality in MindStat
🔀 12 · Two-Way ANOVA (Factorial Design)
Teaching Method × Class Size Interaction
ANOVA
Research Question:
Does teaching method's effect depend on class size? 2×2 factorial, N=24.
| Small | Large | Row Mean | |
|---|---|---|---|
| Traditional | 68.0 | 70.0 | 69.0 |
| Active | 82.0 | 74.0 | 78.0 |
| Col Mean | 75.0 | 72.0 | 73.0 (GM) |
SS Formulas
$$SS_A = n \cdot k_B \cdot \sum(\bar{M}_{A_i}-\text{GM})^2,\quad SS_B = n \cdot k_A \cdot \sum(\bar{M}_{B_j}-\text{GM})^2$$
$$SS_{A\times B} = n \cdot \sum\bigl(M_{ij}-\bar{M}_{A_i}-\bar{M}_{B_j}+\text{GM}\bigr)^2$$
-
1Main Effect A — Teaching Method$$SS_A = 6\times2\times\bigl[(69.0-73.0)^2+(78.0-73.0)^2\bigr]=12\times[16+25]=\mathbf{492}$$ $$F_A=\frac{492/1}{30.25}=16.27,\quad p=.001$$
-
2Main Effect B — Class Size$$SS_B = 6\times2\times\bigl[(75.0-73.0)^2+(72.0-73.0)^2\bigr]=12\times[4+1]=\mathbf{60}$$ $$F_B=\frac{60/1}{30.25}=1.98,\quad p=.174$$
-
3Interaction A×B$$\text{Residuals: }(68{-}69{-}75{+}73)=-3,\;(70{-}69{-}72{+}73)=2,\;(82{-}78{-}75{+}73)=2,\;(74{-}78{-}72{+}73)=-3$$ $$SS_{A\times B}=6\times[(-3)^2+2^2+2^2+(-3)^2]=6\times26=\mathbf{156},\quad F_{A\times B}=\frac{156}{30.25}=5.16,\quad p=.034$$
-
4Interpret: Active Learning gains +14 pts in small classes but only +4 pts in large classes — the interaction is meaningful.
| Source | SS | df | MS | F | p | η²p |
|---|---|---|---|---|---|---|
| Method (A) | 492 | 1 | 492 | 16.27 | .001 | .448 |
| Class Size (B) | 60 | 1 | 60 | 1.98 | .174 | .090 |
| A × B | 156 | 1 | 156 | 5.16 | .034 | .205 |
| Error | 605 | 20 | 30.25 | |||
| Total | 1313 | 23 |
✅ Significant A×B interaction, F(1,20) = 5.16, p = .034
APA-7
A 2×2 ANOVA showed a significant Method × Class Size interaction, F(1, 20) = 5.16, p = .034, η²p = .21. Active Learning gained +14 points in small classes but only +4 in large classes.
🏅 13 · Spearman Rank Correlation
Study Hours Rank vs Exam Rank
Spearman
Research Question:
Monotonic relationship between study hours rank and exam rank (n=8)?
| Student | Hours | Rank X | Exam | Rank Y | d = Rₓ−Rᵧ | d² |
|---|---|---|---|---|---|---|
| A | 3 | 1 | 62 | 2 | −1 | 1 |
| B | 4 | 2 | 55 | 1 | 1 | 1 |
| C | 5 | 3 | 68 | 3 | 0 | 0 |
| D | 6 | 4 | 74 | 5 | −1 | 1 |
| E | 7 | 5 | 71 | 4 | 1 | 1 |
| F | 8 | 6 | 85 | 7 | −1 | 1 |
| G | 9 | 7 | 80 | 6 | 1 | 1 |
| H | 10 | 8 | 91 | 8 | 0 | 0 |
| Σ | 0 | 6 |
Spearman's rₛ
$$r_s = 1 - \frac{6\sum d_i^2}{n(n^2-1)} = 1 - \frac{6\times 6}{8(64-1)} = 1 - \frac{36}{504} = 1 - 0.071 = \mathbf{0.929}$$
t-test for rₛ
$$t = r_s\sqrt{\frac{n-2}{1-r_s^2}} = 0.929\sqrt{\frac{6}{1-0.863}} = 0.929\times\sqrt{43.8} = 0.929\times 6.62 = \mathbf{6.15},\quad df=6$$
.929
rₛ
6.15
t(6)
<.001
p
Large
Effect
🔴 Strong monotonic relationship, rₛ(6) = .929, p < .001
APA-7
A Spearman correlation indicated a strong positive relationship, rₛ(6) = .93, p < .001.
💡
Use Spearman when data is ordinal, non-normal, or contains outliers.
▶ Spearman Correlation in MindStat
📊 14 · Multiple Linear Regression
Exam Score ← Study Hours + Sleep Hours
Multiple Reg.
Research Question:
Can study hours and sleep hours together predict exam score (n=10)?
| i | X₁ (Study) | X₂ (Sleep) | Y (Score) | Ŷ | e = Y−Ŷ |
|---|---|---|---|---|---|
| 1 | 4 | 6 | 58 | 55.3 | 2.7 |
| 2 | 6 | 7 | 64 | 64.7 | −0.7 |
| 3 | 8 | 8 | 72 | 74.0 | −2.0 |
| 4 | 5 | 5 | 55 | 56.1 | −1.1 |
| 5 | 9 | 8 | 78 | 77.4 | 0.6 |
| 6 | 7 | 7 | 70 | 68.1 | 1.9 |
| 7 | 10 | 9 | 85 | 83.4 | 1.6 |
| 8 | 3 | 6 | 52 | 51.9 | 0.1 |
| 9 | 8 | 6 | 68 | 68.9 | −0.9 |
| 10 | 6 | 8 | 65 | 67.2 | −2.2 |
| x̄ | 6.6 | 7.0 | 66.7 |
OLS solution
$$S_{x_1x_1}=44.4,\quad S_{x_2x_2}=14.0,\quad S_{x_1x_2}=18.0$$
$$S_{yx_1}=196.8,\quad S_{yx_2}=97.0$$
$$b_1=\frac{S_{yx_1}S_{x_2x_2}-S_{yx_2}S_{x_1x_2}}{S_{x_1x_1}S_{x_2x_2}-S_{x_1x_2}^2}=\frac{196.8\times14-97.0\times18}{44.4\times14-18^2}=\frac{1009.2}{297.6}=\mathbf{3.39}$$
$$b_2=\frac{S_{yx_2}S_{x_1x_1}-S_{yx_1}S_{x_1x_2}}{297.6}=\frac{764.4}{297.6}=\mathbf{2.57}$$
$$b_0=\bar{Y}-b_1\bar{X}_1-b_2\bar{X}_2=66.7-3.39(6.6)-2.57(7.0)=\mathbf{26.34}$$
$$\hat{Y}=26.34+3.39X_1+2.57X_2$$
| Predictor | b | SE | t | p | 95% CI | β (std) |
|---|---|---|---|---|---|---|
| Intercept | 26.34 | 4.18 | 6.30 | <.001 | [17.1, 35.6] | — |
| Study Hours | 3.39 | 0.41 | 8.27 | <.001 | [2.4, 4.4] | .74 |
| Sleep Hours | 2.57 | 0.74 | 3.47 | .010 | [0.9, 4.2] | .32 |
R², Adjusted R², F
$$SS_{tot}=942.1,\quad SS_{res}=25.6,\quad SS_{reg}=916.5$$
$$R^2=\frac{916.5}{942.1}=\mathbf{.973},\quad R^2_{adj}=1-\frac{25.6/7}{942.1/9}=\mathbf{.965}$$
$$F(2,7)=\frac{916.5/2}{25.6/7}=\frac{458.3}{3.66}=\mathbf{125.2},\quad p<.001$$
.973
R²
.965
Adj R²
125.2
F(2,7)
<.001
p
✅ Model explains 97.3% of variance — study hours (β=.74) and sleep hours (β=.32) both significant.
APA-7
Multiple regression: F(2, 7) = 125.2, p < .001, R² = .973. Study hours (β=.74, p<.001) and sleep hours (β=.32, p=.010) both predicted exam scores.
⚙️ 15 · Logistic Regression
Predict Pass/Fail from Study Hours
Logistic
Research Question:
Does study hours predict pass/fail probability (n=20)?
Logistic Model
$$P(\text{pass})=\frac{1}{1+e^{-(b_0+b_1 X)}}=\frac{e^{b_0+b_1 X}}{1+e^{b_0+b_1 X}}$$
-
1Maximum likelihood estimates$$b_0=-8.76\;(SE=3.42),\quad b_1=1.12\;(SE=0.48)$$ $$\hat{Y}=\frac{1}{1+e^{-(-8.76+1.12X)}}$$
-
2Predicted probabilities
Study hrs 6 7 8 9 10 P(pass) .115 .283 .550 .798 .922 $$\text{At }X=8:\quad P(\text{pass})=\frac{1}{1+e^{-(-8.76+8.96)}}=\frac{1}{1+e^{-0.20}}=\frac{1}{1.819}=\mathbf{0.55}$$ -
3Odds Ratio (OR)$$OR = e^{b_1} = e^{1.12} = \mathbf{3.06}\quad\text{95% CI: }[1.19,\;7.87]$$ $$\text{Each additional study hour multiplies the odds of passing by 3.06×}$$
-
4Model fit$$\text{Overall model: }\chi^2(1)=14.5,\;p<.001,\quad\text{Nagelkerke }R^2=.72$$ $$\text{Wald test: }\chi^2(1)=5.44,\;p=.020\quad\text{(for }b_1\text{)}$$ $$\text{Correctly classified: }85\%$$
3.06
OR
<.001
Model p
.72
Nagelkerke R²
85%
Classified
✅ Study hours predicts pass/fail, OR = 3.06, p < .001
APA-7
Logistic regression: Study hours predicted pass/fail, χ²(1) = 14.5, p < .001, OR = 3.06, 95% CI [1.19, 7.87].
🎯 16 · Effect Sizes
Four Effect Size Measures with Worked Examples
Effect Size
Effect size measures the practical importance of a finding, independent of sample size.
① Cohen's d — for t-tests
Cohen's d
$$d = \frac{M_1-M_2}{SD_{pooled}},\quad SD_{pooled}=\sqrt{\frac{(n_1-1)SD_1^2+(n_2-1)SD_2^2}{n_1+n_2-2}}$$
Worked example
$$SD_{pooled}=\sqrt{\frac{14(6.5)^2+14(5.9)^2}{28}}=\sqrt{\frac{592+487}{28}}=\sqrt{38.5}=6.21$$
$$d=\frac{82-76}{6.21}=\frac{6}{6.21}=\mathbf{0.97}\quad(\text{large})$$
② Eta-squared η² — for ANOVA
$$\eta^2=\frac{SS_{between}}{SS_{total}},\quad \omega^2=\frac{SS_{between}-df_{between}\cdot MS_{within}}{SS_{total}+MS_{within}}\;(\text{less biased})$$
$$\text{Example: }SS_{between}=180,\;SS_{total}=520 \;\Rightarrow\; \eta^2=\frac{180}{520}=\mathbf{.346}\quad(\text{large})$$
③ Cramér's V — for χ²
$$V=\sqrt{\frac{\chi^2}{n\cdot\min(r-1,\;c-1)}}$$
$$\text{Example: }\chi^2=8.64,\;n=45,\;2\times2\text{ table} \;\Rightarrow\; V=\sqrt{\frac{8.64}{45\times1}}=\sqrt{.192}=\mathbf{.438}\quad(\text{large})$$
④ r (non-parametric effect size)
$$r=\frac{|z|}{\sqrt{N}}$$
$$\text{Example: }z=-2.45,\;N=30 \;\Rightarrow\; r=\frac{2.45}{\sqrt{30}}=\frac{2.45}{5.48}=\mathbf{.447}\quad(\text{medium-large})$$
| Measure | Use with | Small | Medium | Large |
|---|---|---|---|---|
| Cohen's d | t-tests | 0.20 | 0.50 | 0.80 |
| η² (eta-squared) | ANOVA | .01 | .06 | .14 |
| η²p (partial) | Factorial ANOVA | .01 | .06 | .14 |
| Cramér's V | Chi-square | .10 | .30 | .50 |
| r (Pearson/Spearman) | Correlation | .10 | .30 | .50 |
| r (z/√N) | Mann-Whitney | .10 | .30 | .50 |
💡
Cohen's thresholds are benchmarks, not rules — interpret effect sizes in context.
▶ Compute Effect Sizes in MindStat
📏 17 · Confidence Intervals
Three CI Types — Mean, Proportion, Difference
CI
① 95% CI for a Single Mean
Scenario: n=30 BP readings, M=128.4, SD=14.2 → 95% CI
$$CI=\bar{X}\pm t^*\frac{SD}{\sqrt{n}},\quad SE=\frac{14.2}{\sqrt{30}}=\frac{14.2}{5.477}=2.593,\quad t^*_{(29,\,0.025)}=2.045$$
$$CI=128.4\pm2.045\times2.593=128.4\pm5.30=\mathbf{[123.1,\;133.7]\text{ mmHg}}$$
128.4
Mean
±5.3
Margin
[123.1, 133.7]
95% CI
② 95% CI for a Proportion
Scenario: 142/200 patients satisfied (p̂=0.71) → 95% CI
$$CI=\hat{p}\pm z^*\sqrt{\frac{\hat{p}(1-\hat{p})}{n}},\quad SE=\sqrt{\frac{0.71\times0.29}{200}}=\sqrt{0.001030}=0.0321,\quad z^*=1.96$$
$$CI=0.71\pm1.96\times0.0321=0.71\pm0.063=\mathbf{[0.647,\;0.773]}$$
71.0%
p̂
±6.3%
Margin
[64.7%, 77.3%]
95% CI
③ 95% CI for Difference Between Two Means
Drug (M=85.2, SD=7.4) vs Placebo (M=79.6, SD=8.1), n=20 each → 95% CI for M₁−M₂
$$SD_p=\sqrt{\frac{19(7.4)^2+19(8.1)^2}{38}}=\sqrt{\frac{1038+1246}{38}}=\sqrt{60.1}=7.75$$
$$SE_{diff}=SD_p\sqrt{\frac{1}{n_1}+\frac{1}{n_2}}=7.75\sqrt{\frac{2}{20}}=7.75\times0.316=2.45$$
$$CI=(85.2-79.6)\pm t^*_{(38)}\times2.45=6.0-2.024\times2.45\;\Rightarrow\;\mathbf{[1.04,\;10.96\text{ points}]}$$
6.0
Δ Mean
±4.96
Margin
[1.04, 10.96]
95% CI
✅ CI excludes 0 → significant difference. Drug improves score by 1–11 points.
APA-7
95% CI for the mean difference = [1.04, 10.96]; excludes zero → significant at α = .05.
🔄 18 · Mediation Analysis
Mindfulness → Stress → Anxiety (Simple Mediation)
Mediation
Research Question:
Does mindfulness reduce anxiety indirectly through stress? N=90.
| Path | Description | b | SE | t | p |
|---|---|---|---|---|---|
| a | Training → Stress | −6.40 | 1.30 | −4.92 | <.001 |
| b | Stress → Anxiety | 0.62 | 0.11 | 5.64 | <.001 |
| c | Total effect (c) | −7.80 | 1.90 | −4.11 | <.001 |
| c' | Direct effect (c') | −3.83 | 1.82 | −2.11 | .037 |
Indirect Effect = a × b
$$\text{Indirect effect}=a\times b=(-6.40)\times(0.62)=\mathbf{-3.97}$$
$$\text{Bootstrap 95\% CI for }ab:\;[-6.12,\;-1.94]\quad\text{(excludes 0 → significant mediation)}$$
$$\text{Proportion mediated}=\frac{|ab|}{|c|}=\frac{3.97}{7.80}=\mathbf{50.9\%}$$
−3.97
Indirect
[−6.12, −1.94]
Boot CI
50.9%
Mediated
✅ Significant partial mediation: 51% of training's effect on anxiety is through stress reduction.
APA-7
Simple mediation: ab = −3.97, 95% bootstrap CI [−6.12, −1.94]; 51% of total effect mediated through stress. Partial mediation (direct effect c' = −3.83, p = .037 remains).
💡
Full mediation: c' non-significant. Partial: c' remains significant. Use bootstrap CIs, not Sobel test.
▶ Mediation Analysis in MindStat
📉 19 · Survival Analysis (Kaplan-Meier)
Time-to-Relapse: Drug A vs Drug B
Survival
Research Question:
Does Drug A prolong relapse-free survival vs Drug B? (†=censored)
| Drug A (n=12) | 3 | 5 | 8 | 11 | 15 | 20† | 22† | 24† | 24† | 26† | 28† | 30† |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Drug B (n=12) | 2 | 4 | 6 | 8 | 10 | 14 | 18 | 20† | 22† | 24† | 26† | 28† |
-
1KM formula: S(tⱼ) = S(tⱼ₋₁) × (1 − dⱼ/nⱼ)
t (months) nⱼ (at risk) dⱼ (events) 1−dⱼ/nⱼ S(t) Drug A 0 12 0 — 1.000 3 12 1 11/12 0.917 5 11 1 10/11 0.833 8 10 1 9/10 0.750 11 9 1 8/9 0.667 15 7 1 6/7 0.571 -
2Summary statistics
Median Survival S(12 mo) Events/N Drug A 22 months 0.750 5/12 Drug B 14 months 0.500 7/12 -
3Log-rank test$$\chi^2_{log-rank}=\frac{(O_1-E_1)^2}{E_1}+\frac{(O_2-E_2)^2}{E_2}=5.02,\quad df=1,\quad p=.025$$
22 mo
Median A
14 mo
Median B
5.02
χ²(1)
.025
p
✅ Drug A significantly prolongs survival: 22 vs 14 months, p = .025
APA-7
Kaplan-Meier analysis: Drug A (median = 22 mo) vs Drug B (median = 14 mo), log-rank χ²(1) = 5.02, p = .025. At 12 months, 75% vs 50% remained relapse-free.
💡
Censored observations (†) contribute data up to their last follow-up. KM correctly handles censoring.
▶ Survival Analysis in MindStat
📐 20 · Sample Size
How Many Participants Do I Need?
Sample Size
Research Question:
Master's student comparing two teaching methods.
| Parameter | Value | Why |
|---|---|---|
| d | 0.5 | متوسط (Cohen 1988) |
| α | 0.05 | معياري |
| Power | 0.80 | الحد الأدنى الموصى به |
Formula
$$n = \frac{2(z_{\alpha/2} + z_\beta)^2}{d^2}$$
-
1z-values:$$z_{\alpha/2} = z_{0.025} = 1.96 \qquad z_\beta = z_{0.20} = 0.842$$
-
2n per group:$$n = \frac{2(1.96 + 0.842)^2}{(0.5)^2} = \frac{2 \times 7.857}{0.25} = \frac{15.713}{0.25} \approx 63$$
-
3Attrition buffer:$$n_{adj} = \frac{63}{1 - 0.15} = \frac{63}{0.85} \approx 75 \text{ per group}$$
-
4Total N:$$N_{total} = 75 \times 2 = 150 \text{ participants}$$
63
Min/group
75
Recruit/group
150
Total N
80%
Power
APA-7
APA-7 power statement.
📋 Open your SPSS file
💻 21 · SPSS Output
Interpreting SPSS t-test Output
SPSS
Research Question:
How to read the SPSS Independent Samples Test table.
| Levene F | Sig. | t | df | p | Δ̄ | SE | CI₋ | CI₊ | |
|---|---|---|---|---|---|---|---|---|---|
| Equal var. | 2.14 | .149 | −3.42 | 48 | .001 | −4.80 | 1.40 | −7.63 | −1.97 |
| Unequal var. | −3.42 | 45.7 | .001 | −4.80 | 1.40 | −7.64 | −1.96 |
-
1Levene's Test: F = 2.14, p = .149 → use Equal variances row.
-
2t, df, p: t(48) = −3.42, p = .001 → significant.
-
3Cohen's d:$$d = \frac{|t|}{\sqrt{n_1 + n_2}} \times \sqrt{2} = \frac{3.42}{\sqrt{50}} \times \sqrt{2} = \frac{3.42}{7.07} \times 1.414 = 0.68 \quad (\text{large})$$
-
495% CI [−7.63, −1.97]: CI excludes zero → significant.
−3.42
t(48)
.001
p
−4.80
Δ̄
0.68
Cohen's d
🔴 Reject H₀ — p = .001 < .05
APA-7
APA-7 result.
✍️ 22 · APA-7 Writing
APA-7 Result Sentences
APA-7
Why:
APA-7 rules for reporting statistics.
| الخطأ | الصحيح |
|---|---|
| p = 0.043 | p = .043 |
| p = 0.000 | p < .001 |
| t = 3.42 (df=48) | t(48) = 3.42 |
| No effect size | Add d / η² / r / R² |
| R² = 0.47 | R² = .47 |
-
tt-test:t-test APA sentence.
-
FANOVA:ANOVA APA sentence.
-
rCorrelation:Correlation APA sentence.
-
R²Regression:Regression APA sentence.
p = .043
✓
p < .001
✓
t(48)
✓
η² / d
✓
APA-7
APA-7 methods sentence.
📋 23 · Likert Scale
Likert Scale — Complete Analysis
Likert
Research Question:
5-item Likert scale for 8 employees.
| م | ف1 | ف2 | ف3 | ف4 | ف5 | ∑ |
|---|---|---|---|---|---|---|
| 1 | 4 | 3 | 4 | 5 | 4 | 20 |
| 2 | 2 | 2 | 3 | 2 | 3 | 12 |
| 3 | 5 | 4 | 5 | 4 | 5 | 23 |
| 4 | 3 | 3 | 3 | 4 | 3 | 16 |
| 5 | 4 | 5 | 4 | 5 | 4 | 22 |
| 6 | 2 | 3 | 2 | 3 | 2 | 12 |
| 7 | 5 | 4 | 5 | 5 | 4 | 23 |
| 8 | 3 | 4 | 3 | 3 | 4 | 17 |
-
1Descriptives:$$\bar{x}_{total} = \frac{20+12+23+16+22+12+23+17}{8} = \frac{145}{8} = 18.13, \quad SD = 4.36$$
-
2Item mean:$$\bar{x}_{item} = \frac{18.13}{5} = 3.63 \quad \text{out of 5}$$
-
3Cronbach's α:$$\alpha = \frac{k}{k-1}\left(1 - \frac{\sum s_i^2}{s_T^2}\right) = \frac{5}{4}\left(1 - \frac{5.33}{19.0}\right) = \frac{5}{4}(0.720) = 0.90$$
-
4Interpretation: 3.63 falls in High range (3.41–5.00).
18.13
M total
3.63
M item
0.90
α
HIGH
Level
APA-7
APA-7 Likert result.
📊 24 · Multiple Regression
Multiple Regression — Step by Step
Multiple Reg.
Research Question:
Predict job performance from 3 predictors.
| م | Y | X₁ | X₂ | X₃ |
|---|---|---|---|---|
| 1 | 72 | 3 | 40 | 3.5 |
| 2 | 85 | 7 | 60 | 4.2 |
| 3 | 90 | 10 | 80 | 4.8 |
| 4 | 68 | 2 | 30 | 3.0 |
| 5 | 78 | 5 | 55 | 3.8 |
| 6 | 92 | 12 | 90 | 5.0 |
| 7 | 75 | 4 | 45 | 3.6 |
| 8 | 88 | 8 | 70 | 4.5 |
| 9 | 65 | 1 | 25 | 2.8 |
| 10 | 82 | 6 | 65 | 4.0 |
Model
$$\hat{Y} = b_0 + b_1 X_1 + b_2 X_2 + b_3 X_3$$
$$\hat{Y} = 48.2 + 1.83\,X_1 + 0.21\,X_2 + 3.94\,X_3$$
-
1Coefficients:
المتنبئ b SE β t p b₀ 48.2 4.1 — 11.76 <.001 X₁ 1.83 0.42 .52 4.36 .003 X₂ 0.21 0.09 .28 2.33 .052 X₃ 3.94 1.21 .38 3.26 .014 -
2Model fit:$$R^2 = .973, \quad R^2_{adj} = .959, \quad F(3,\,6) = 71.9,\quad p < .001$$
-
3Strongest predictor: X₁ β = .52 → strongest predictor.
-
4Interpret b₁: +1 year experience → +1.83 performance points.
.973
R²
71.9
F(3,6)
<.001
p
β=.52
X₁ best
🟢 Model significant — p < .001
APA-7
APA-7 multiple regression result.
🌀 26 · Mauchly's Sphericity Test
Mauchly's Test of Sphericity
RM-ANOVA
Research Question:
Do we meet the sphericity assumption before an RM-ANOVA?
| P | A | B | C | D |
|---|---|---|---|---|
| 1 | 8 | 7 | 1 | 6 |
| 2 | 9 | 5 | 2 | 5 |
| 3 | 6 | 2 | 3 | 8 |
| 4 | 5 | 3 | 1 | 9 |
| 5 | 8 | 4 | 5 | 8 |
| 6 | 7 | 5 | 6 | 7 |
| 7 | 10 | 2 | 7 | 2 |
| 8 | 12 | 6 | 8 | 1 |
Mauchly's W
$$W = \frac{\det(\mathbf{S})}{\left[\dfrac{\text{tr}(\mathbf{S})}{k-1}\right]^{k-1}}$$
$$\chi^2 = -\left[n-1-\frac{2(k-1)^2+(k-1)+2}{6(k-1)}\right]\ln W, \quad df = \frac{(k-1)k}{2}-1$$
-
1Orthonormal contrasts: Transform to k−1 = 3 orthonormal contrast scores.
-
2Covariance matrix S:$$\text{tr}(\mathbf{S}) = 21.91, \quad \det(\mathbf{S}) = 53.1$$
-
3W:$$W = \frac{53.1}{\left(21.91/3\right)^{3}} = \frac{53.1}{389.6} = 0.1362$$
-
4χ² approximation:$$\chi^2 = -\left[8-1-\frac{2(9)+3+2}{18}\right]\ln(0.1362) = -6.72 \times (-1.994) = 11.41, \quad df = 5$$
-
5Decision: p = .044 → violated → apply GG/HF correction.
0.1362
W
11.41
χ²
5
df
.044
p
🔴 Sphericity violated — W = 0.136, χ²(5) = 11.41, p = .044.
APA-7
Mauchly's test indicated the sphericity assumption was violated, χ²(5) = 11.41, p = .044; degrees of freedom were corrected using Greenhouse-Geisser estimates (ε = .62).
💻 27 · Reading SPSS ANOVA Output
Interpreting SPSS ANOVA Output
SPSS
Research Question:
How to read the SPSS ANOVA and homogeneity tables.
| Source | SS | df | MS | F | Sig. |
|---|---|---|---|---|---|
| Between | 613.73 | 2 | 306.87 | 36.24 | .000 |
| Within | 101.60 | 12 | 8.47 | ||
| Total | 715.33 | 14 |
-
1Levene's Test first: Levene Sig. > .05 → standard ANOVA valid.
-
2F and Sig.: F(2,12) = 36.24, and .000 means p < .001, not p = 0.
-
3Effect size η²:$$\eta^2 = \frac{SS_{Between}}{SS_{Total}} = \frac{613.73}{715.33} = 0.858 \quad (\text{large})$$
-
4Post-hoc: Tukey 'Multiple Comparisons': pairs with Sig. < .05 differ.
36.24
F(2,12)
<.001
p (from .000)
0.858
η²
🔴 Significant — F(2,12) = 36.24, p < .001, η² = .86.
APA-7
A one-way ANOVA showed a significant effect, F(2, 12) = 36.24, p < .001, η² = .86. (SPSS's .000 is reported as p < .001.)
📊 28 · Welch's ANOVA
Welch's ANOVA — Unequal Variances
ANOVA
Research Question:
Does course format affect scores despite wildly unequal variances?
| A | B | C |
|---|---|---|
| 58 | 50 | 78 |
| 62 | 100 | 82 |
| 59 | 55 | 79 |
| 61 | 95 | 81 |
| 60 | 75 | 80 |
Standard F
$$F = \frac{MS_B}{MS_W} = \frac{SS_B/(k-1)}{SS_W/(N-k)}$$
Welch's F
$$F_W = \frac{\sum w_i(\bar{x}_i-\bar{x}_w)^2/(k-1)}{1+\dfrac{2(k-2)}{k^2-1}\sum\dfrac{(1-w_i/\sum w)^2}{n_i-1}}, \quad w_i=\frac{n_i}{s_i^2}$$
-
1Means and variances:$$\bar{x}_A=60.00,\ s_A^2=2.50 \quad \bar{x}_B=75.00,\ s_B^2=512.50 \quad \bar{x}_C=80.00,\ s_C^2=2.50$$B's variance is 200× A's or C's.
-
2Levene's test first:$$F_{Levene}(2,12) = 12.96, \quad p = .001$$Variances significantly unequal → prefer Welch.
-
3Standard ANOVA (for contrast):$$SS_B=1083.33,\ SS_W=2070.00,\ F(2,12)=\frac{541.67}{172.50}=3.14,\ p=.080$$Misleading 'not significant' — B's variance inflates the pooled error.
-
4Welch's ANOVA:$$w_A=2.00,\ w_B=0.0098,\ w_C=2.00, \quad \bar{x}_w=70.01$$ $$F_W(2,\ 7.12) = \frac{200.12}{1.0936} = 182.99, \quad p < .001$$B is down-weighted to near-zero; F jumps from 3.14 to 182.99.
-
5Decision: Report Welch's F — the standard F would be a Type II error here.
182.99
F_Welch(2,7.12)
<.001
p (Welch)
3.14
F standard
.080
p standard
🔴 Significant by Welch's ANOVA — F(2, 7.12) = 182.99, p < .001.
APA-7
Because Levene's test indicated unequal variances, a Welch's ANOVA was conducted, F(2, 7.12) = 182.99, p < .001; the standard ANOVA alone would have misleadingly suggested no effect, F(2, 12) = 3.14, p = .080.
🧪 29 · Levene's Test
Levene's Test — Variance Homogeneity
Assumption
Research Question:
Do novice and expert typists have equal reaction-time variance?
| Novice | Expert |
|---|---|
| 812 | 430 |
| 940 | 465 |
| 705 | 410 |
| 1050 | 455 |
| 880 | 398 |
| 690 | 448 |
| 965 | 421 |
Levene's F
$$z_{ij} = |x_{ij}-\bar{x}_i|, \qquad F = \frac{\sum_i n_i(\bar{z}_i-\bar{z})^2/(k-1)}{\sum_i\sum_j (z_{ij}-\bar{z}_i)^2/(N-k)}$$
-
1Means and spread:$$\bar{x}_{Novice}=863.1,\ SD_{Novice}=134.8 \qquad \bar{x}_{Expert}=432.4,\ SD_{Expert}=24.6$$Experts are faster AND far more consistent.
-
2Transform then ANOVA on z: Levene's test = an ANOVA run on |deviations|.
-
3F:$$F(1,12) = 12.67, \quad p = .0039$$
-
4Decision: Violated → use Welch's t-test (MindStat's unconditional default).
12.67
F(1,12)
.0039
p
134.8 / 24.6
SD ratio
🔴 Variances significantly unequal — F(1,12) = 12.67, p = .004.
APA-7
Levene's test indicated the homogeneity-of-variance assumption was violated, F(1, 12) = 12.67, p = .004; a Welch's t-test was used for the comparison.
🔢 30 · Wilcoxon Signed-Rank Test
Wilcoxon Signed-Rank Test
Non-parametric
Research Question:
Did coping scores change after the program, without assuming normality?
| # | Before | After | Diff |
|---|---|---|---|
| 1 | 60 | 66 | +6 |
| 2 | 58 | 62 | +4 |
| 3 | 65 | 74 | +9 |
| 4 | 72 | 70 | −2 |
| 5 | 55 | 62 | +7 |
| 6 | 63 | 66 | +3 |
| 7 | 59 | 64 | +5 |
| 8 | 68 | 76 | +8 |
| 9 | 61 | 62 | +1 |
W+ / W−
$$W^+=\sum \text{rank}(|d_i|)\ \text{for}\ d_i>0, \qquad W^-=\sum \text{rank}(|d_i|)\ \text{for}\ d_i<0, \qquad W=\min(W^+,W^-)$$
-
1Rank |d|:$$|d|:\ 1,2,3,4,5,6,7,8,9 \ \to\ \text{ranks}\ 1,2,3,4,5,6,7,8,9\ \text{(each unique)}$$
-
2Sum ranks by sign:$$W^+ = 6+4+9+7+3+5+8+1 = 43, \qquad W^- = 2, \qquad W=\min(43,2)=2$$Only employee #4 regressed.
-
3Exact test: Exact distribution used (n<50, no ties).$$p_{\text{exact}}(W=2,\ n=9) = .0117 \quad (\text{two-tailed})$$
-
4Decision: p = .012 → reject H₀ → significant change.
2
W
9
n
.012
p
🔴 Significant — W = 2, p = .012 (exact).
APA-7
A Wilcoxon signed-rank test showed a significant increase in coping scores, W = 2, p = .012 (exact, two-tailed).
🔢 31 · Friedman Test
Friedman Test — Non-parametric RM
Non-parametric
Research Question:
Do the three study techniques differ in recall, without assuming normality?
| P | Re-reading | Practice Testing | Spaced Practice |
|---|---|---|---|
| 1 | 12 | 15 | 17 |
| 2 | 14 | 16 | 18 |
| 3 | 10 | 14 | 16 |
| 4 | 16 | 18 | 19 |
| 5 | 13 | 15 | 17 |
| 6 | 17 | 14 | 16 |
| 7 | 15 | 17 | 14 |
| 8 | 12 | 15 | 17 |
Friedman χ²
$$\chi^2 = \frac{12}{Nk(k+1)}\sum_{j=1}^{k} R_j^2 - 3N(k+1), \quad df=k-1$$
-
1Rank within each row: Not every participant follows the overall pattern.
-
2Rank sums:$$R_{\text{Re-reading}}=11, \quad R_{\text{Practice Testing}}=16, \quad R_{\text{Spaced Practice}}=21$$
-
3χ²:$$\chi^2 = \frac{12}{8(3)(4)}(11^2+16^2+21^2) - 3(8)(4) = 0.125(818) - 96 = 6.25, \quad df=2$$
-
4Decision + post-hoc: Reject H₀; Spaced Practice > Re-reading survives post-hoc correction.
6.25
χ²(2)
.044
p
8
N
🔴 Significant — χ²(2) = 6.25, p = .044.
APA-7
A Friedman test showed a significant difference across techniques, χ²(2) = 6.25, p = .044, N = 8; spaced practice beat re-reading on post-hoc (p_adj < .001).
🗂️ 32 · McNemar's Test
McNemar's Test — Paired Proportions
Categorical
Research Question:
Did training change the pass rate for the same 20 candidates?
| After: Pass | After: Fail | |
|---|---|---|
| Before: Pass | 6 (a) | 2 (b) |
| Before: Fail | 9 (c) | 3 (d) |
McNemar χ²
$$\chi^2 = \frac{(b-c)^2}{b+c} \quad \text{(uncorrected)}, \qquad \chi^2_{cc} = \frac{(|b-c|-1)^2}{b+c} \quad \text{(continuity-corrected)}$$
-
1Discordant pairs: b=2 (regressed), c=9 (improved).
-
2Uncorrected:$$\chi^2 = \frac{(2-9)^2}{2+9} = \frac{49}{11} = 4.455, \quad p = .035$$
-
3Continuity-corrected:$$\chi^2_{cc} = \frac{(|2-9|-1)^2}{2+9} = \frac{36}{11} = 3.273, \quad p = .070$$The correction changes the conclusion here.
-
4Decision: Corrected result is not significant — the uncorrected test overstates it.
3.27
χ² (cc)
.070
p (cc)
4.5
OR
20
N
🟢 Not significant (corrected) — χ²(1) = 3.27, p = .070.
APA-7
A McNemar's test with continuity correction showed no significant change in pass rate, χ²(1) = 3.27, p = .070 (OR = 4.50); the uncorrected test would have overstated the evidence.
🔗 33 · Partial Correlation
Partial Correlation
Correlation
Research Question:
Does exercise still relate to blood pressure once age is controlled for?
| P | X | Y | Z |
|---|---|---|---|
| 1 | 1 | 148 | 58 |
| 2 | 2 | 145 | 62 |
| 3 | 2 | 150 | 45 |
| 4 | 3 | 138 | 60 |
| 5 | 4 | 142 | 50 |
| 6 | 4 | 130 | 40 |
| 7 | 5 | 128 | 48 |
| 8 | 6 | 135 | 35 |
| 9 | 6 | 120 | 42 |
| 10 | 7 | 118 | 30 |
| 11 | 8 | 115 | 33 |
| 12 | 9 | 110 | 28 |
Partial r
$$r_{XY.Z} = \frac{r_{XY} - r_{XZ}\,r_{YZ}}{\sqrt{(1-r_{XZ}^2)(1-r_{YZ}^2)}}$$
-
1Zero-order correlations:$$r_{XY} = -.939, \qquad r_{XZ} = -.869, \qquad r_{YZ} = .778$$Classic confound pattern: all three pairs are correlated.
-
2Partial r:$$r_{XY.Z} = \frac{-.939 - (-.869)(.778)}{\sqrt{(1-.755)(1-.605)}} = \frac{-.263}{\sqrt{.245\times.395}} = \frac{-.263}{.311} = -.846$$
-
3Significance test (df=n−3):$$t = r\sqrt{\frac{df}{1-r^2}} = -.846\sqrt{\frac{9}{1-.716}} = -4.765, \quad df=9,\ p=.001$$
-
4Decision: Relationship survives controlling for age, though attenuated.
−.846
Partial r
−4.765
t(9)
.001
p
−.939
Zero-order r
🔴 Significant — partial r(9) = −.846, p = .001.
APA-7
A partial correlation controlling for age showed exercise remained significantly related to blood pressure, r(9) = −.846, p = .001 (zero-order r = −.939).
🔗 34 · Point-Biserial Correlation
Point-Biserial Correlation
Correlation
Research Question:
How strong is the association between group and outcome, expressed as a correlation?
| P | Group | Score |
|---|---|---|
| 1 | 0 | 72 |
| 2 | 0 | 68 |
| 3 | 0 | 75 |
| 4 | 0 | 70 |
| 5 | 0 | 74 |
| 6 | 0 | 69 |
| 7 | 1 | 82 |
| 8 | 1 | 88 |
| 9 | 1 | 79 |
| 10 | 1 | 85 |
| 11 | 1 | 90 |
| 12 | 1 | 84 |
Point-biserial r
$$r_{pb} = \frac{\sum(g_i-\bar{g})(y_i-\bar{y})}{\sqrt{\sum(g_i-\bar{g})^2\sum(y_i-\bar{y})^2}}$$
-
1Group means:$$\bar{y}_{Control}=71.33, \qquad \bar{y}_{Treatment}=84.67$$
-
2Compute r:$$r_{pb} = .904$$
-
3Significance test:$$t = r_{pb}\sqrt{\frac{df}{1-r_{pb}^2}} = .904\sqrt{\frac{10}{1-.818}} = 6.704, \quad df=10,\ p<.001$$
-
4Same test as t-test: Identical t/df to the independent t-test on the same data.
.904
r_pb
6.704
t(10)
<.001
p
.818
r²_pb
🔴 Significant — r_pb(10) = .904, p < .001.
APA-7
A point-biserial correlation showed a strong association, r_pb(10) = .904, p < .001 (Treatment M = 84.67 vs. Control M = 71.33).
🔬 35 · Exploratory Factor Analysis
Exploratory Factor Analysis
Reliability
Research Question:
Do the 6 items form one factor or two?
| P1 | P2 | P3 | C1 | C2 | C3 | |
|---|---|---|---|---|---|---|
| P1 | 1.00 | .65 | .62 | .20 | .18 | .22 |
| P2 | .65 | 1.00 | .68 | .15 | .20 | .17 |
| P3 | .62 | .68 | 1.00 | .22 | .19 | .21 |
| C1 | .20 | .15 | .22 | 1.00 | .64 | .60 |
| C2 | .18 | .20 | .19 | .64 | 1.00 | .66 |
| C3 | .22 | .17 | .21 | .60 | .66 | 1.00 |
KMO & Bartlett
$$KMO_i = \frac{\sum_{j\ne i} r_{ij}^2}{\sum_{j\ne i} r_{ij}^2 + \sum_{j\ne i} a_{ij}^2}, \qquad \chi^2_{Bartlett} = -\left[(N-1)-\frac{2p+5}{6}\right]\ln|\mathbf{R}|$$
-
1Gatekeeper checks:$$KMO_{overall} = .744 \ (\text{items } .708\text{–}.780) \qquad \chi^2_{Bartlett}(15) = 555.13,\ p<.001$$Both gatekeepers pass — proceed to extraction.
-
2Eigenvalues:$$\lambda: 2.864,\ 1.705,\ 0.410,\ 0.390,\ 0.353,\ 0.278 \quad (\textstyle\sum\lambda=6)$$Exactly 2 factors survive Kaiser's rule.
-
3Varimax rotation:Clean 2-factor structure — pay and coworker satisfaction are separate.
Item F1 F2 h² P1 .124 .853 .742 P2 .082 .887 .793 P3 .130 .866 .766 C1 .851 .109 .735 C2 .878 .105 .781 C3 .858 .121 .750 -
4Decision: Score as 2 subscales, not 1 total.
.744
KMO
555.13
Bartlett χ²
2
Factors
75.1%
Var. explained
🔴 Two-factor structure confirmed (KMO=.744, Bartlett p<.001).
APA-7
An EFA (PCA extraction, varimax rotation) confirmed a clean 2-factor structure, KMO=.744, Bartlett χ²(15)=555.13, p<.001, explaining 75.1% of variance.
📊 36 · ANCOVA
ANCOVA — Adjusting for a Covariate
ANOVA
Research Question:
Does method affect post-test scores after adjusting for pre-test?
| A: Pre | A: Post | B: Pre | B: Post |
|---|---|---|---|
| 60 | 80 | 59 | 68 |
| 65 | 75 | 63 | 75 |
| 58 | 85 | 61 | 66 |
| 70 | 83 | 66 | 80 |
| 62 | 73 | 60 | 64 |
| 64 | 87 | 68 | 78 |
Adjusted mean
$$\bar{Y}'_j = \bar{Y}_j - b_w(\bar{X}_j-\bar{X}_{grand}), \qquad F=\frac{MS_{group.adj}}{MS_{error.adj}}$$
-
1Group means:$$\bar{X}_{A,pre}=63.17,\ \bar{X}_{B,pre}=62.83,\ (\text{grand }\bar{X}=63.00) \qquad \bar{Y}_{A,post}=80.50,\ \bar{Y}_{B,post}=71.83$$Groups started nearly level; ANCOVA still gives the correct adjustment.
-
2Pooled slope:$$b_w = 0.6945$$
-
3Adjusted means:$$\bar{Y}'_A = 80.50 - 0.6945(63.17-63.00) = 80.38 \qquad \bar{Y}'_B = 71.83 - 0.6945(62.83-63.00) = 71.95$$
-
4F-test:$$SS_{covariate}=73.16,\ SS_{group.adj}=225.33,\ SS_{error.adj}=307.18\ (df=9)$$ $$F(1,9) = \frac{225.33/1}{307.18/9} = 6.60, \quad p=.030,\ \eta^2_p=.423$$
-
5Decision: Method A > Method B after adjustment.
80.38 / 71.95
Adj. means
6.60
F(1,9)
.030
p
.423
η²_p
🔴 Significant — F(1,9) = 6.60, p = .030.
APA-7
A one-way ANCOVA with pre-test as covariate showed a significant effect of method, F(1, 9) = 6.60, p = .030, η²p = .42 (Method A adjusted M = 80.38 vs. Method B M = 71.95).
💻 37 · SPSS Regression Output
Interpreting SPSS Regression Output
SPSS
Research Question:
How to read the SPSS regression Model Summary, ANOVA, and Coefficients tables.
| Model | B | SE | Beta | t | Sig. |
|---|---|---|---|---|---|
| (Constant) | 15.20 | 4.10 | 3.71 | .001 | |
| Experience | 1.85 | 0.32 | .612 | 5.78 | <.001 |
| Education | 2.10 | 0.68 | .331 | 3.09 | .005 |
Model Summary: R=.856, R²=.733, Adj. R²=.713 | ANOVA: F(2,27)=37.03, p<.001
-
1Check the ANOVA row: F(2,27)=37.03, p<.001 → model is useful overall.
-
2R²: Report Adjusted R² with 2+ predictors.
-
3Each predictor: B is the unstandardized effect, holding the other predictor constant.
-
4Compare via standardized β: Standardized β enables cross-predictor comparison.
.733
R²
37.03
F(2,27)
<.001
p
β=.612
Strongest predictor
🔴 Model significant — R² = .733, p < .001.
APA-7
A multiple regression significantly predicted salary, F(2, 27) = 37.03, p < .001, R² = .733; experience (β=.612) and education (β=.331) were both significant predictors.
💻 38 · SPSS Correlation Output
Interpreting SPSS Correlation Output
SPSS
Research Question:
How to read the symmetric SPSS bivariate correlation matrix.
| Study Hours | Exam Score | ||
|---|---|---|---|
| Study Hours | Pearson Corr. | 1 | .742** |
| Sig. (2-tailed) | .000 | ||
| N | 20 | 20 | |
| Exam Score | Pearson Corr. | .742** | 1 |
| Sig. (2-tailed) | .000 | ||
| N | 20 | 20 |
-
1The matrix is symmetric: Read the correlation once, not twice.
-
2Read the asterisks: ** = p < .01; Sig. = .000 means p < .001.
-
3Judge strength: r=.742 is a large effect by Cohen's guidelines.
-
4Correlation ≠ causation: Correlation shows co-variation, not causation.
.742
r
<.001
p
18
df
🔴 Significant, large effect — r(18) = .742, p < .001.
APA-7
A Pearson correlation was significant and large, r(18) = .742, p < .001 (SPSS's .000 is reported as p < .001).
💻 39 · SPSS Reliability Output
Interpreting SPSS Reliability Output
SPSS
Research Question:
How to read the Reliability Statistics and Item-Total Statistics tables together.
| Item | Corr. Item-Total | α if Deleted |
|---|---|---|
| Q1 | .68 | .77 |
| Q2 | .71 | .76 |
| Q3 | .24 | .85 |
| Q4 | .65 | .78 |
| Q5 | .70 | .76 |
Reliability Statistics: Cronbach's α = .812, N of Items = 5
-
1Headline alpha: α=.812 is 'good' by common guidelines.
-
2Scan for weak items: Q3's .24 is below the .30 rule-of-thumb threshold.
-
3Confirm with α-if-deleted: Only Q3's α-if-deleted exceeds the overall α.
-
4Decide and report: Keep 5 items (α=.812) or drop Q3 (α=.85) — disclose the choice.
.812
α (5 items)
.24
Q3 corr.
.85
α if Q3 deleted
🟢 Good overall (α=.812); Q3 is a candidate for removal.
APA-7
The scale showed good reliability, α = .812; Q3's weak item-total correlation (r=.24) means dropping it would raise α to .85.
🧭 40 · How to Choose the Right Statistical Test
Choosing the Right Statistical Test
Guide
How to use this page:
Find your question below, follow the rule to a test, or use the interactive Advisor.
1 · Comparing groups (continuous outcome):
2 · Relationships between variables:
3 · Categorical / binary data:
4 · Scale and measurement quality:
5 · Checking assumptions first:
6 · Planning a study and reporting effects:
7 · Reading SPSS output and writing up results:
🟢 Still unsure? Use the interactive Test Advisor below.
▶ Open in MindStat