You are on page 1of 3

PRACTICAL 3

Testing and C.I for single population mean and single population proportion

Q1: Test whether the average score of students is higher than 610 in the exam or not. We have the
information that the standard deviation for students’ scores is 100. So, we collect the data of 32
students by using random samples and gets following data:

670,730,540,670,480,800,690,560,590,620,700,660,640,710,650,490,800
,600,560,700,680,550,580,700,705,690,520,650,660,790

Assume that the score follows a normal distribution. Test at 5% level of significance.

ANS 1: INPUT:

# define

install.packages("BSDA")

# define given dataset

dataset <- c(670,730,540,670,480,800,690,560,590,620,700,660,640,710,650,490,

800,600,560,700,680,550,580,700,705,690,520,650,660,790)

z.test(x=dataset,mu=610,alternative="two.sided",sigma.x=100)

# ans. H0 is rejected.

Q 2: Suppose the IQ in a certain population is normally distributed with a mean of μ = 100 and
standard deviation of σ = 15. A scientist wants to know if a new medication affects IQ levels, so she
recruits 20 patients to use it for one month and records their IQ levels at the end of the month.

The dataset is given by

88, 92, 94, 94, 96, 97, 97, 97, 99, 99,105, 109, 109, 109, 110, 112, 112, 113, 114, 115

ANS 2: INPUT:

dataset = c(88,92,94,94,96,97,97,97,99,99,105,109,109,109,110,112,112,113,114,115)

z.test(x=dataset,mu=100,alternative="two.sided",sigma.x=15)

# ans. H0 is rejected, 95% confidence interval= 96.47608 109.62392


Q3: In a sample of 49 adolescents who served as subject in an immunologic study, one variable of
interest was the diameter of skin test reaction to an antigen. The sample mean and standard
deviation were 39 and 11 respectively. Can it be concluded from these data that population mean is
greater than 30 mm?

ANS 3: INPUT:

n=49

x=39

mu=30

s=11

z=(x-mu)/(s/sqrt(n))

# ans. za=1.645, z is greater, we reject H0.

Q4: A sample of 50 patients suffering from homozygous sickle-cell disease yielded the following ages
(in years) at death.

15.5,2.0,45.1,1.7,0.8,1.1,18.2,9.7,28.1,18.2,27.6,45.0, 1.0, 66.4, 2.0, 67.4, 2.5, 61.7 16.2, 31.7, 6.9,
13.5, 1.9, 31.2, 9.0, 2.6, 14.4, 20.7, 30.9, 36.6, 1.1, 23.6, 0.9, 7.6, 23.5, 6.3, 40.2, 23.7, 4.8, 33.2, 27.1,
36.7, 3.2, 38.0, 3.5, 21.8, 2.4.

Can we conclude that the mean age at death of patients with homozygous sickle cell disease is less
than 30 years ?

ANS:

dataset <- c(15.5,2.0,45.1,1.7,0.8,1.1,18.2,9.7,28.1,18.2,27.6,45.0,1.0,66.4,2.0, 67.4, 2.5, 61.7 , 16.2,


31.7, 6.9, 13.5, 1.9, 31.2, 9.0, 2.6, 14.4, 20.7, 30.9, 36.6, 1.1, 23.6, 0.9, 7.6, 23.5, 6.3, 40.2, 23.7, 4.8,
33.2, 27.1, 36.7, 3.2, 38.0, 3.5, 21.8, 2.4)

y=sd(dataset)

z.test(x=dataset,mu=30,alternative="less",sigma.x=19.0456)

Q5: In a lake pollution study , the concentration of lead in the upper sedimentary layer of lake
bottom is measured from 36 sediment sample of 1000 cubic centimetres each. The sample mean and
sd are found to be 0.38 and 0.06 respectively. Test the hypothesis that the mean concentration of
lead in the upper sedimentary layer of the lake bottom is 0.34 per 1000 cubic centimetres.

ANS:

n=36

x=0.38
s=0.06

mu=0.34

z=(x-mu)/(s/sqrt(n))

# ans. za=1.96 < statistic. We reject H0.

Q6: A company manufactures rope whose breaking strengths have a mean of 300 with a standard
deviation of 24 in some units. It is believed that a newly developed process can increase the mean
breaking strengths. state a decision rule in terms of mean of the random sample taken from the new
process, for rejecting the old process at the 1% level of significance.it is agreed to test 64 ropes. if
such a random sample yielded mean of 310, what is the decision ?

ANS:

x=300

s=24

n=64

mu=310

z=(x-mu)/(s/sqrt(n))

# ans. H0 is rejected.

Q7. The population of mice containing half male and have female (p = 0.5 = 50%). Some of these
mice have cancer. Out of 160 mice 95 are having cancer.

Test whether the cancer affects more male than female?

ANS:

n=160

x=95

p=0.5

correct = FALSE

res <- prop.test(x=95,n=160,p=0.5,alternative="greater",correct=FALSE)

res

# ans. We reject H0

You might also like