-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtaks19.R
21 lines (17 loc) · 990 Bytes
/
taks19.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
healthy <- c(0.5, 0.7, 0.7, 1, 1, 1.2, 1.4, 1.4, 1.6, 1.6, 1.7, 2.2)
ill <- c(1.2, 1.4, 1.6, 1.7, 1.7, 1.8, 2.2, 2.3, 2.4, 6.4, 19, 23.6)
# length(healthy) - 12
# length(ill) - 12
# Критическое значение - 37
# U1 = n1n2 + n1*(n1+1)/2 - R1
# U2 = n1n2 + n2*(n2+1)/2 - R2
# sort(healthy) 0.5 0.7 0.7 1.0 1.0 1.2 1.4 1.4 1.6 1.6 1.7 2.2
# sort(ill) 1.2 1.4 1.6 1.7 1.7 1.8 2.2 2.3 2.4 6.4 19.0 23.6
# sort(c(healthy,ill))
# 0.5 0.7 0.7 1.0 1.0 %1.2 1.2 %1.4 1.4 1.4 %1.6 1.6 1.6 %1.7 1.7% 1.7 %1.8 %2.2 2.2 %2.3 %2.4 %6.4 %19.0 %23.6
# 1 2 3 4.5 4.5 6.5 6.5 9 9 9 12 12 12 15 15 15 17 18.5 18.5 20 21 22 23 24
R1 <- 1 + 2 + 3 + 4.5 + 4.5 + 6.5 + 9 + 9 + 12 + 12 + 15 + 18.5
R2 <- 6.5 + 9 + 12 + 15 + 15 + 17 + 18.5 + 20 + 21 + 22 + 23 + 24
(U1 <- length(healthy)*length(ill) + length(healthy)*(length(ill)+1)/2 - R1)
(U2 <- length(healthy)*length(ill) + length(healthy)*(length(ill)+1)/2 - R2)
U2