Statistic <- c(68, 85, 74, 88, 63, 78, 90, 80, 58, 63)
Math <- c(85, 91, 74, 100, 82, 84, 78, 100, 51, 70)
plot(Statistic, Math, main="統計成績 vs 數學成績", xlab="統計成績", ylab="數學成績", col="blue", pch=19)

hist(Statistic, main="統計成績直方圖", xlab="統計成績", col="lightblue", border="black")

hist(Math, main="數學成績直方圖", xlab="數學成績", col="lightgreen", border="black")

categories <- c("A", "B", "C", "D")
counts <- c(10, 20, 30, 40)
barplot(counts, names.arg=categories, main="長條圖", col="lightcoral", border="black")

pie(counts, labels=categories, main="圓餅圖", col=c("red", "blue", "green", "yellow"))

plot(counts, type="h", lwd=10, col="purple", main="棒棒糖圖", ylab="頻數", xlab="類別")
points(counts, pch=19, col="red")

data <- read.csv("D:/table.csv")
japanese_data <- data$Japanese
mean_japanese <- mean(japanese_data)
median_japanese <- median(japanese_data)
sd_japanese <- sd(japanese_data)
var_japanese <- var(japanese_data)
q1_japanese <- quantile(japanese_data, 0.25)
cat("平均數: ", mean_japanese, "\n")
## 平均數:  67.9
cat("中位數: ", median_japanese, "\n")
## 中位數:  62
cat("標準差: ", sd_japanese, "\n")
## 標準差:  16.25115
cat("變異數: ", var_japanese, "\n")
## 變異數:  264.1
cat("Q1 (25%): ", q1_japanese, "\n")
## Q1 (25%):  54.5