Sie sind auf Seite 1von 14

# n=40

> alpha=0.05

> sigma=5

> rata=98

> rata0=100

> Z=(rata-rata0)/(sigma/sqrt(n))

>Z

[1] -2.529822

> qnorm(1-alpha/2)

[1] 1.959964

> gnorm

> x=c(13,14,12,16,12,11)

> n=length(x)

>n

[1] 6

> mu0=12.3

> sd(x)

[1] 1.788854

> mean(x)

[1] 13

> t=(mean(x)-mu0)/(sd(x)/sqrt(n))

>t

[1] 0.9585145

> alpha=0.05
> qt=(1-alpha/2,n-1)

## Error: unexpected ',' in "qt=(1-alpha/2,"

> alpha=0.05

> qt=(1-alpha/2,5)

## Error: unexpected ',' in "qt=(1-alpha/2,"

> alpha=0.05

> qt(1-alpha/2,5)

[1] 2.570582

> alpha=0.05

> qt(1-alpha/2,n-1)

[1] 2.570582

> data

No.A.B

1 1,80,68

2 2,90,57

3 3,70,46

4 4,86,57

5 5,82,44
6 6,88,51

7 7,91,62

8 8,93,54

9 9,80,49

10 10,79,48

11 11,89,64

12 12,88,48

13 13,85,58

14 14,79,55

15 15,91,52

data: A and B

## t = 0.5955, df = 7.8063, p-value = 0.5684

alternative hypothesis: true difference in means is not equal to 0

## 95 percent confidence interval:

-21.8422 36.9622

sample estimates:

mean of x mean of y

32.74 25.18

> data

Sebelum Sesudah

1 76.85 76.22

2 77.95 77.89

3 78.65 79.02

4 79.25 80.21

5 82.65 82.65

6 88.15 82.53

7 92.54 92.56

8 96.25 92.33

9 84.56 85.12
10 88.25 84.56

Paired t-test

## 95 percent confidence interval:

-0.4495979 2.8515979

sample estimates:

## mean of the differences

1.201

>

> sebelum=c(6,8,7,10,9,7)

> sesudah=c(5,6,7,8,7,5)

> sebelum

[1] 6 8 7 10 9 7

> sesudah

[1] 5 6 7 8 7 5

Paired t-test

## data: sebelum and sesudah

t = 4.3916, df = 5, p-value = 0.007078

## 95 percent confidence interval:

0.6219791 2.3780209

sample estimates:

1.5

## > prop.test(165, 250, p = 0.65, alternative ="two.sided",

+ conf.level = 0.95)

## 95 percent confidence interval:

0.5972030 0.7177908

sample estimates:

0.66

> n=40

> alpha=0.05

> sigma=5
> rata=98

> rata0=100

> Z=(rata-rata0)/(sigma/sqrt(n))

>Z

[1] -2.529822

> qnorm(1-alpha/2)

[1] 1.959964

> gnorm

> x=c(13,14,12,16,12,11)

> n=length(x)

>n

[1] 6

> mu0=12.3

> sd(x)

[1] 1.788854

> mean(x)

[1] 13

> t=(mean(x)-mu0)/(sd(x)/sqrt(n))

>t

[1] 0.9585145

> alpha=0.05

> qt=(1-alpha/2,n-1)

## Error: unexpected ',' in "qt=(1-alpha/2,"

> alpha=0.05
> qt=(1-alpha/2,5)

## Error: unexpected ',' in "qt=(1-alpha/2,"

> alpha=0.05

> qt(1-alpha/2,5)

[1] 2.570582

> alpha=0.05

> qt(1-alpha/2,n-1)

[1] 2.570582

> data

No.A.B

1 1,80,68

2 2,90,57

3 3,70,46

4 4,86,57

5 5,82,44

6 6,88,51

7 7,91,62

8 8,93,54
9 9,80,49

10 10,79,48

11 11,89,64

12 12,88,48

13 13,85,58

14 14,79,55

15 15,91,52

data: A and B

## 95 percent confidence interval:

-21.8422 36.9622
sample estimates:

mean of x mean of y

32.74 25.18

> data

Sebelum Sesudah

1 76.85 76.22

2 77.95 77.89

3 78.65 79.02

4 79.25 80.21

5 82.65 82.65

6 88.15 82.53

7 92.54 92.56

8 96.25 92.33

9 84.56 85.12

10 88.25 84.56

## + var.equal = FALSE, conf.level = 0.95)

Error in t.test(Sebelum, Sesudah, alternative = "two.sided", mu = 0, paired = TRUE, :

Paired t-test

## 95 percent confidence interval:

-0.4495979 2.8515979

sample estimates:

## mean of the differences

1.201

>
> sebelum=c(6,8,7,10,9,7)

> sesudah=c(5,6,7,8,7,5)

> sebelum

[1] 6 8 7 10 9 7

> sesudah

[1] 5 6 7 8 7 5

Paired t-test

## 95 percent confidence interval:

0.6219791 2.3780209

sample estimates:

1.5

## > prop.test(165, 250, p = 0.65, alternative ="two.sided",

+ conf.level = 0.95)

## 95 percent confidence interval:

0.5972030 0.7177908

sample estimates:

0.66

>