title: “1111212050期中” output: html_document date: “2025-11-16”
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="數學成績",
pch=19,
col="blue")
hist(Statistic,
main="統計直方圖",
xlab="統計成績",
col="lightgreen",
border="white")
categories <- c("知識閱讀", "體育競技", "科學創新", "公益活動", "娛樂休閒")
counts <- c(50, 20, 10, 5, 100)
barplot(counts,
names.arg = categories,
main = "長條圖",
col = "orange",
ylab = "次數")
pie(counts, labels = categories, main="圓餅圖",
col = c("green","black","purple","gold","blue"))
plot(counts, type="h", lwd=10, col="pink",
main="棒棒糖圖",
xlab="類別", ylab="頻數")
points(counts, pch=19, col="black")
axis(1, at=1:length(categories), labels=categories)
data <- read.csv("table1_1.csv")
japanese_data <- data$Japanese
mean(japanese_data)
## [1] 67.9
median(japanese_data)
## [1] 62
sd(japanese_data)
## [1] 16.25115
var(japanese_data)
## [1] 264.1
quantile(japanese_data, 0.25)
## 25%
## 54.5