YouTip LogoYouTip

R Func Chisq Test

# Chi-square test result <-chisq.test(data_table) print(result)

Executing the above code produces:

 "Contingency Table:" Purchase Not PurchasedMale 40 20Female 30 30Pearson's Chi-squared test with Yates' continuity correction data: data_table X-squared = 3.2812, df = 1, p-value = 0.07008

p-value > 0.05, indicating that at the 0.05 significance level, there is no significant association between gender and purchasing behavior.

Image 4: R Language Examples R Language Examples

← R Func Colnames RownamesR Func Boxplot β†’