Statistic:68 85 74 88 63 78 90 80 58 63
Math: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,
pch=13,
col="black",
main ="統計與數學分數",
xlab="統計分數",
ylab="數學分數")
hist(Statistic,
col= "yellowgreen",
main ="統計與數學分數",
xlab ="統計分數",
ylab ="人數")
library(ggplot2)
data = data.frame(
社團類型=c("休閒娛樂","知識閱讀","體育競技","科學創新","公益活動"),
參加次數= c(185,82,36,28,25)
)
ggplot(data, aes(x=社團類型,y=參加次數)) +
geom_bar(stat="identity",width=.8,fill ="pink")
data<- c(185,82,36,28,25)
labels <- c("休閒娛樂","知識閱讀","體育競技","科學創新","公益活動")
pie(data,labels,main ="參加社團比率", col=terrain.colors(length(data)))
v<-c(84,63,61,49,89,51,59,53,79,91)
stem(v)
##
## The decimal point is 1 digit(s) to the right of the |
##
## 4 | 9
## 5 | 139
## 6 | 13
## 7 | 9
## 8 | 49
## 9 | 1
library(readr)
Data <-read_csv("C:/Users/user/Downloads/table1_1.csv")
## Rows: 10 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): Name
## dbl (5): Statistic, Math, Japanese, Management, Accounting
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
print(Data)
## # A tibble: 10 × 6
## Name Statistic Math Japanese Management Accounting
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 張青松 68 85 84 89 86
## 2 王奕翔 85 91 63 76 66
## 3 田新雨 74 74 61 80 69
## 4 徐麗娜 88 100 49 71 66
## 5 張志傑 63 82 89 78 80
## 6 趙穎睿 78 84 51 60 60
## 7 王智強 90 78 59 72 66
## 8 宋媛婷 80 100 53 73 70
## 9 袁四方 58 51 79 91 85
## 10 張建國 63 70 91 85 82
stem(Data$Japanese,scale = 2)
##
## The decimal point is 1 digit(s) to the right of the |
##
## 4 | 9
## 5 | 13
## 5 | 9
## 6 | 13
## 6 |
## 7 |
## 7 | 9
## 8 | 4
## 8 | 9
## 9 | 1
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)
Q1
## 25%
## 54.5
Q3 <- quantile(Data$Japanese, 3 / 4)
Q3
## 75%
## 82.75