Levene’s Test Example

x <- c(45, 42, 46, 44,45)
y <- c(34, 37,38, 40, 33)

# সব value একসাথে
z <- c(x,y)

# group তৈরি
group <- factor(c(rep(("x"),length(x)), rep(("y"), length(y))))

# Levene’s Test
leveneTest(z, group, center = median)
## Levene's Test for Homogeneity of Variance (center = median)
##       Df F value Pr(>F)
## group  1  1.7143 0.2268
##        8

👉 এখানে R output দিয়েছে:

এখন Critical Value Approach

qf(0.95, 1, 8)
## [1] 5.317655

👉 Decision rule:

দুই দিক থেকে একই সিদ্ধান্ত

👉 তাই null hypothesis reject করা যাচ্ছে না →
দুই গ্রুপের variance ≈ equal (কোনো significant difference নাই)।

✅ একদম textbook style:
“We cannot reject H₀ from two angles (p-value এবং F-critical comparison)।”