Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Digital Assignment No.

5
MAT 2001 – Statistics for Engineers
EMBEDDED LAB – Programming with R

Name: Varnit Goel


Reg. No: 20BCE0662

Submitted to: Mr. Venkataraman B


INPUT

Brand1=c(10.62,10.58,10.33,10.72,10.44,10.74)
Brand2=c(10.50,10.52,10.58,10.62,10.55,10.51,10.53
) # α = 0.05

t.test(Brand1,Brand2,var.equal=TRUE,paired=FALSE,
conf.level = 0.05)
# α = 0.01

t.test(Brand1,Brand2,var.equal=TRUE,paired=FALSE,
conf.level = 0.01)
OUTPUT WINDOW
RESULT:-

• At α = 0.05, tcal = 0.4371, we know tα = 2.201,


We see that |tcal|< tα, therefore we have no evidence to
reject Null Hypothesis.

• At α = 0.01, tcal = 0.4371, we know tα = 3.106,


We see that |tcal|< tα ,therefore we have no evidence to
reject Null Hypothesis.

Or

Since the P value is 0.6705 which is greater than 0.05


and 0.01, hence we don’t have any evidence to reject Null
Hypothesis .Therefore we will accept Null Hypothesis.

“The mean viscosity of the two brands is equal.”


INPUT

Before=c(1280,1200,1050,1190,1250,1290,1220,1270,1
260)After=c(1380,1310,1090,1240,1290,1360,1270,133
0,1310) # α = 0.05
t.test(B,A,paired=TRUE,mu=50,conf.level = 0.05)
# α = 0.10
t.test(B,A,paired=TRUE,mu=50,conf.level = 0.10)
OUTPUT WINDOW
RESULT :-

• At α = 0.05, tcal = -13.336, we know tα = 1.860,


We see that |tcal|< tα, therefore we have no evidence to
reject Null Hypothesis.

• At α = 0.10, tcal = -13.336, we know tα = 1.369,


We see that |tcal|< tα ,therefore we have no evidence to
reject Null Hypothesis.

Or

Since the P value is 9.55 * 10^-7 which is very small than


0.05 and 0.10
,hence we have solid any evidence to reject Null Hypothesis
.Therefore we will accept Alternate Hypothesis.

“Average score has been raised by 50 points.”


INPUT
Coast1=c(18.8,20.5,20.0,21.0,17.8,18.2,17.8,19.5,20.0,18
.2,18.4,19.8,19.8, 20.3,19.0)
Coast2=c(19.8,21.0,20.0,19.5,18.9,18.0,18.5,18.2,20.2,19
.0,19.2,20.2,19.2, 17.0,18.8,17.6,18.3,19.6,20.2,18.4)
# α = 0.01
var.test(Coast1,Coast2,conf.level = 0.01)
# α = 0.05
var.test(Coast1,Coast2,conf.level = 0.05)
OUTPUT WINDOW
RESULT:-

• At α = 0.01, fcal = 1.0499, we know tα = 3.15,


We see that |tcal|< tα, therefore we have no evidence to
reject Null Hypothesis.

• At α = 0.05, fcal = 1.0499, we know tα = 2.23,


We see that |tcal|< tα ,therefore we have no evidence to
reject Null Hypothesis.

Or

Since the P value is 0.9031 which is greater than 0.05


and 0.01, hence we don’t have any evidence to reject Null
Hypothesis .Therefore we will accept Null Hypothesis.

“The variability in fish size at two coast A & B is same.”


INPUT

Newspaper=matrix(c(15,18,22,25,16,24,15,25,22,14,18,16,27,14
,15,14) ,ncol = 4,byrow = 1) Newspaper chisq.test(Newspaper)
OUTPUT WINDOW

χχ
RESULT :-

• At α = 0.01, 𝛘𝟐cal = 14.46, we know χ2α = 21.666,


We see that 𝛘𝟐cal < χ2α, therefore we have no evidence
to reject Null Hypothesis.

• At α = 0.05, 𝛘𝟐cal = 14.46, we know χ2α = 16.919,


We see that 𝛘𝟐cal < χ2α, therefore we have no evidence
to reject Null Hypothesis.

Or

Since the P value is 0.1172 which is greater than 0.05


and 0.01, hence we don’t have any evidence to reject Null
Hypothesis. Therefore we will accept Null Hypothesis.

“The Frequency of readership of Newspaper is depend on the


level of educational achievement”

You might also like