CH 5

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

Chapter 5

A random sample of 50 observations on the waiting time in seconds of customer before speaking to
a representative at a call centre is as follow:

33.2 29.4 36.5 38.1 30


29.1 32.2 29.5 36.0 31.5
34.5 33.6 27.4 30.4 28.4
32.6 30.4 31.8 29.8 34.6
30.7 31.9 32.3 28.2 27.5
34.9 32.8 27.7 28.4 28.8
30.2 26.8 27.8 30.5 28.5
31.8 29.2 28.6 27.5 28.5
30.8 31.8 29.1 26.9 34.2
33.5 27.4 28.5 34.8 30.5

a) Construct a histogram .
b) What assumption are necessary to test if mean waiting time is less than 32 seconds?
c) Test to determine if mean waiting time is less than 32 seconds. Use alpha = 0.5.
d) Find 90% confidence interval for variance of waiting time.

CODE :
data<-
c(33.2,29.4,36.5,38.1,30,29.1,32.2,29.5,36,31.5,34.5,33.6,27.4,30.4,28.4,32.6,30.4,31.8,29.8,34.6,30.7,31.9,32.3,28.2,27.5,34.9,32.8,27.7,2
8.4,28.8,30.2,26.8,27.8,30.5,28.5,31.8,29.2,28.6,27.5,28.5,30.8,31.8,29.1,26.9,34.2,33.5,27.4,28.5,34.8,30.5)

hist(data)

t.test(data,mu = 32,alternative = "less")

x<-mean(data)

y<-var(data)

print(y)

a<-qchisq(0.05,df = 49,lower.tail=FALSE)

b<-qchisq(0.05,df = 49,lower.tail=TRUE)

u_limit<-49*y/b

l_limit<-49*y/a

print(u_limit)

print(l_limit)

RESULT:
Chapter 5

xn

COMMENT:
b)Assumption necessary are that the distribution should be normal and random and independent samples are selected.

c)As the value of p(=0.001535)<0.05 we can reject the null hypothesis of mean time being equal to 32 second and accept the alternate
hypothesis that mean time is less then 32 second.

d) The 90% confidence interval of variance is (5.6460,11.0389)


Chapter 5

The impact of three different advertising techniques is being studied by a marketing firm. Sales in
thousand dollars, categorized in four groups are shown for each advertising technique for 200
randomly selected customers exposed to each technique in table. Can we conclude that the
advertising technique has an impact on sales? Use alpha = 0.1.What is the p-value?

Sales Technique Technique Technique


1 2 2
0-99 60 40 75
100-199 85 30 70
200-299 20 70 30
300-399 35 60 25

CODE:
table<-matrix(c(40,3,0,0,0,1,30,8,6,5,2,5,49,15,45,0,6,33,45,60,0,12,15,50,70),nrow=5,ncol=5,byrow=T)

rownames(table)<-c(1,2,3,4,5)

colnames(table)<-c(1,2,3,4,5)

print(table)

chisq<-chisq.test(table)

table1<-matrix(c(50,40,110,15,45,90),nrow=2,ncol=3,byrow=T)

rownames(table1)<-c("last year","current year")

colnames(table1)<-c("plan 1","paln 2","paln 3")

print(table1)

chisq<-chisq.test(table1)

qchisq(p = 0.05,df = 2,lower.tail = FALSE)

table3<-matrix(c(60,40,75,85,30,70,20,70,30,35,60,25),nrow=4,ncol=3,byrow=T)

rownames(table3)<-c("0-99","100-199","200-299","300-399")

colnames(table3)<-c("tech 1","tech 2","tech 3")

chisq<-chisq.test(table3)

qchisq(p = 0.05,df = 6,lower.tail= FALSE)


Chapter 5

RESULT:

COMMENTS:
𝐻 = 𝑠𝑎𝑙𝑒𝑠 𝑖𝑠 𝑖𝑛𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑡 𝑜𝑓 𝑎𝑑𝑣𝑒𝑟𝑡𝑖𝑠𝑖𝑛𝑔 𝑡𝑒𝑐ℎ𝑛𝑖𝑞𝑢𝑒.

𝐻 = 𝑠𝑎𝑙𝑒𝑠 𝑖𝑠 𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑡 𝑜𝑛 𝑎𝑑𝑣𝑒𝑟𝑡𝑖𝑠𝑖𝑛𝑔 𝑡𝑒𝑐ℎ𝑛𝑖𝑞𝑢𝑒

Here p-value(2.2e-16)<alpha(0.1) we can reject our null hypothesis and cam conclude that the advertising technique has an impact of
sales.

p-value = 2.2e-16 = 0

You might also like