Statistic <- c(68, 85, 74, 88, 63, 78, 90, 80, 58, 63)
Math <- c(85, 91, 74, 100, 82, 84, 78, 100, 51, 70)
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 = "統計成績與數學成績之散佈圖",
     xlab = "統計成績",
     ylab = "數學成績",
     pch = 16,           
     col = "purple",  
     cex = 1.5)    

     hist(Math,
     main = "數學成績直方圖",
     xlab = "數學成績",
     ylab = "人數",
     col = "white",
     border = "pink")

     club_type <- c("娛樂休閒", "知識閱讀", "體育競技", "科學創新", "公益活動")
frequency <- c(185, 82, 36, 28, 25)
barplot(frequency,
        names.arg = club_type,
        main = ,
        xlab = ,
        ylab = ,
        col = "black",
        border = "pink")

data<- c(185,82,36,28,25)
labels<- c("5.娛樂休閒","4.知識閱讀","3.體育競技競技","2.科學創新","1.公益活動")
pie(data, labels, main="次數分配表", 
        col=heat.colors(length(data)))

library(ggplot2)

# Create data
data <- data.frame(type=c("娛樂休閒","知識閱讀","體育競技","科學創新","公益活動"), times=c(185,82,36,28,25))
 
# Plot
ggplot(data, aes(x=type, y=times)) +
  geom_point() + 
  geom_segment( aes(x=type, xend=type, y=0, yend=times))

Data<- read.csv("C:/Users/wenzao/Downloads/table1_1.csv")

mean(Data$Japanese)
## [1] 67.9
median(Data$Japanese)
## [1] 62
as.numeric(names(table(Data$Japanese)))[which.max(table(Data$Japanese))]
## [1] 49
sd(Data$Japanese)
## [1] 16.25115
var(Data$Japanese) 
## [1] 264.1
Q1 <- quantile(Data$Japanese, 1 / 4) 
Q2 <- quantile(Data$Japanese, 2 / 4) 
Q3 <- quantile(Data$Japanese, 3 / 4) 

P1 <- quantile(Data$Japanese, 1 / 4) 
P2 <- quantile(Data$Japanese, 2 / 4) 
P3 <-quantile(Data$Japanese, 3 / 4) 

P5 <- quantile(Data$Japanese, 5 / 10) 

Q1
##  25% 
## 54.5
Q3
##   75% 
## 82.75