-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDA 22-23 seminar 22.R
72 lines (60 loc) · 1.23 KB
/
DA 22-23 seminar 22.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#question 1
#a
alpha=5/100
sigma_sample=0.45/sqrt(25)
qnorm(alpha/2)
2.9-0.09*qnorm(0.025) #right boundary
2.9+0.09*qnorm(0.025) #left boundary
#b
(2.81-2.9)/(0.45/sqrt(25))
(2.99-2.9)/(0.45/sqrt(25))
pnorm(1)-pnorm(-1)
#question 2
0.01/2
qnorm(0.005)
0.12/sqrt(16)
4.07-0.03*(-2.575)
4.07+0.03*(-2.575)
#question 3
x<-c(18.2, 13.7, 15.9, 17.4, 21.8, 16.6, 12.3, 18.8, 16.2)
mean(x)
qnorm(0.1/2)
16.76-3.8*(-1.64)/sqrt(9)
16.76+3.8*(-1.64)/sqrt(9)
#question 4
#a
20/100
qnorm(0.1)
187.9-32.4*qnorm(0.1)/sqrt(9)
187.9+32.4*qnorm(0.1)/sqrt(9)
#b
(210-187.9)/(32.4/sqrt(9))
(165.8-187.9)/(32.4/sqrt(9))
pnorm(2.04)-pnorm(-2.04)
#question 5
qnorm(0.025)
3.92+1.57/sqrt(1562)*(-1.96)
3.92-1.57/sqrt(1562)*(-1.96)
#question 6
qnorm(0.05)
3.81+(-1.6448)*1.34/sqrt(541)
3.81-(-1.6448)*1.34/sqrt(541)
#question 7
qnorm(0.05)
60.41+(-1.6448)*11.28/sqrt(352)
60.41-(-1.6448)*11.28/sqrt(352)
#question 8
(6.16-6.06)/(1.43/sqrt(174))
(5.96-6.06)/(1.43/sqrt(174))
pnorm(0.92)-pnorm(-0.92)
#question 9
qt(0.025,8)
157.82+(-2.306)*38.89/sqrt(9)
157.82-(-2.306)*38.89/sqrt(9)
#question 10
x<-c(18.2, 25.9, 6.3, 11.8, 15.4, 20.3, 16.8, 19.5, 12.3, 17.2)
mean(x)
sqrt(var(x))
qt(0.005,9)
16.37+(-3.249)*5.37/sqrt(10)
16.37-(-3.249)*5.37/sqrt(10)