MAT 2001 Programming With R: WINTER SEMESTER-2020-2021 Lab Fat - Statistics For Engineers Embedded Lab
MAT 2001 Programming With R: WINTER SEMESTER-2020-2021 Lab Fat - Statistics For Engineers Embedded Lab
LAB FAT
MAT 2001 – Statistics for Engineers
EMBEDDED LAB – Programming with R
POLYGON
h=hist(classinterval,breaks = 10)
lines(c(min(h$breaks),h$mids,max(h$breaks)),c(0,h$counts,0),typ
e = "l",col="blue")
text(h$mids,h$counts,labels = h$counts)
b)
PROGRAMMING IN R-CODE
2)
R-Code
Mu=0.5
SD=0.05
x1=0.62
PROGRAMMING CODE
N1=1-(pnorm(x1,Mu,SD))
N1
x1=0.47
x2=0.63
N2=pnorm(x2,Mu,SD)-pnorm(x1,Mu,SD)
N2
3)
#company A
m=45 , xbar=63.5 ,s1=5.4
#company B
n=60 , ybar=66.2 ,s2=5.8
zsum.test(mean.x = 63.5,sigma.x=5.4,n.x=45,
mean.y = 66.2,sigma.y = 5.8 ,n.y=60,alternative
= "less",conf.level =0.95)
zsum.test(mean.x =63.5,sigma.x=5.4,n.x=45,mean.y
= 66.2,sigma.y = 5.8,n.y = 60,alternative =
"less",conf.level =0.90)
RESULT:-
Zcal = - 2.4559
| Zcal | > | Z α | (at 10 % & 5%)
Test Statistics is greater than 1.644 and 1.28,
therefore we reject Null Hypothesis
Hence, we accept the Alternate Hypothesis that
u1>u2
Or
Since the P value = 0.007027 which is less
than 0.05 and 0.1 Hence, we have solid
evidence to reject Null Hypothesis.