You are on page 1of 6

1

MAT2001:STATISTICS FOR ENGINEERS

SLOT:D2+TD2
FACULTY:PURUSOTHAM S

EXPERIMENT-5

SHREY SAMIR SAXENA


17BEC0069
2

1.

> x = c(63,59)
> n = c(100,125)
> prop.test(x,n,alternative = "greater",correct = FALSE)

2-sample test for equality of proportions without


continuity correction

data: x out of n
X-squared = 5.5874, df = 1, p-value = 0.009045
alternative hypothesis: greater
95 percent confidence interval:
0.04983004 1.00000000
sample estimates:
prop 1 prop 2
0.630 0.472

As our calculated value that is our p value (0.009045) is less than the L.O.S (0.05) so we accept
the null hypothesis.

2.
3

> x = c(20,10)
> y = c(200,150)
> prop.test(x,y,alternative = "greater",correct = FALSE)

2-sample test for equality of proportions without


continuity correction

data: x out of y
X-squared = 1.2153, df = 1, p-value = 0.1351
alternative hypothesis: greater
95 percent confidence interval:
-0.01503808 1.00000000
sample estimates:
prop 1 prop 2
0.10000000 0.06666667

Since p value(0.1351) is greater than L.O.S(0.05 ) we reject the null hypothesis.

3.
4

> x = c(42,18)
> y = c(200,100)
> prop.test(x,y,alternative ="greater",correct = FALSE)

2-sample test for equality of proportions without


continuity correction

data: x out of y
X-squared = 0.375, df = 1, p-value = 0.2701
alternative hypothesis: greater
95 percent confidence interval:
-0.04897867 1.00000000
sample estimates:
prop 1 prop 2
0.21 0.18
Since p value(0.2701) is greater than L.O.S(0.05) we reject the null hypothesis.

4.

> x=c(15,10,13,7,9,8,21,9,14,8)
> y=c(15,14,12,8,14,7,16,10,15,2)
> t.test(x,y,alt="less",var.equal=TRUE)

Two Sample t-test

data: x and y
t = 0.050529, df = 18, p-value = 0.5199
alternative hypothesis: true difference in means is less than 0
95 percent confidence interval:
-Inf 3.531811
sample estimates:
5

mean of x mean of y
11.4 11.3

> qt(c(0.025,0.975),df=18)
[1] -2.100922 2.100922

In this we reject the null hypothesis since p Value(0.5199)


is greater than L.O.S.(0.05)

5 .

> regular=c(16,20,21,22,23,22,27,25,27)
> premium=c(19,22,24,24,25,25,26,26,28)
> t.test(regular,premium,paired=TRUE)

Paired t-test

data: regular and premium


t = -4.0972, df = 8, p-value = 0.00345
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-2.7783593 -0.7771962
sample estimates:
mean of the differences
-1.777778

Here we accept the null hypothesis as p value(0.003451) is smaller than L.O.S(0.05) .


6

You might also like