Professional Documents
Culture Documents
SLOT:D2+TD2
FACULTY:PURUSOTHAM S
EXPERIMENT-5
1.
> x = c(63,59)
> n = c(100,125)
> prop.test(x,n,alternative = "greater",correct = FALSE)
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)
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
3.
4
> x = c(42,18)
> y = c(200,100)
> prop.test(x,y,alternative ="greater",correct = FALSE)
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)
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
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