Untitled

Tests of Normality in R
 avatar
user_0512364
plain_text
7 months ago
1.1 kB
14
Indexable
# Load necessary library
library(stats)

# Define the data
google_bleu <- c(0.563, 0.083, 0.533, 0.627, 0.417, 0.413)
google_ter <- c(0.222, 0.45, 0.429, 0.167, 0.391, 0.435)

chatgpt_bleu <- c(0.076, 0.202, 0.366, 0.563, 0.077, 0.114)
chatgpt_ter <- c(0.556, 0.65, 0.571, 0.222, 0.609, 0.783)

# Perform Shapiro-Wilk Test for normality
shapiro_google_bleu <- shapiro.test(google_bleu)
shapiro_google_ter <- shapiro.test(google_ter)
shapiro_chatgpt_bleu <- shapiro.test(chatgpt_bleu)
shapiro_chatgpt_ter <- shapiro.test(chatgpt_ter)

# Display Shapiro-Wilk Test results
cat("Shapiro-Wilk Test Results:\n")
cat("Google BLEU: Statistic =", shapiro_google_bleu$statistic, ", p-value =", shapiro_google_bleu$p.value, "\n")
cat("Google TER: Statistic =", shapiro_google_ter$statistic, ", p-value =", shapiro_google_ter$p.value, "\n")
cat("ChatGPT BLEU: Statistic =", shapiro_chatgpt_bleu$statistic, ", p-value =", shapiro_chatgpt_bleu$p.value, "\n")
cat("ChatGPT TER: Statistic =", shapiro_chatgpt_ter$statistic, ", p-value =", shapiro_chatgpt_ter$p.value, "\n")
Editor is loading...
Leave a Comment