## Question

A certain manufacturing firm produces a product that is packaged under two brand names, for marketing purposes. These two brands serve as strata for estimating potential sales volume for the next quarter. A SRS of customers for each brand is contacted and asked to provide a potential sale figure y (in number of units) for the coming quarter. Last yearâ€™s true sales figure, for the same quarter, is available for each of the sampled customers and is denoted by x. The data are given in the accompanying table. The sample for brand I was taken from a list of 120 customers for whom the total sales in the same quarter of last year was 24,500 units. The brand II sample comes from 180 customers with a total quarterly sales last year of 21 200 units.

Brand I Brand II

xi yi xi yi

204 210 137 150

143 160 189 200

82 75 119 125

256 280 63 60

275 300 103 110

198 190 107 100

159 180

63 75

87 90

Use R to do the following questions. For each question, report the R code, the R output, and your answer.

(Part 1) Find a basic estimate (without auxiliary information) of the total potential sales. Estimate the variance of your estimator.

(Part 2) In this part, use the Separate Ratio Method (SR) to answer

(a) Find a ratio estimate of the total potential sales. Estimate the variance of your estimator.

(b)Find a regression estimate of the total potential sales. Estimate the variance of your estimator.

(c)Which of the methods in (Part 1), (Part 2, (a) and (b)) do you recommend?

(Part 3) In this part, use the Combined Ratio Estimator Method (CR) to answer the following questions:

(a)Find a ratio estimate of the mean potential sales. Estimate the variance of your estimator.

(b) Find a regression estimate of the total potential sales. Estimate the variance of your estimator.

(c) Which of the methods in (Part 1), (Part 3, (a) and (b)) would you suggest?

QUESTION 4

The data set StudentsMarks.csv contains the term test 1 and term test 2 marks for students. We consider term test 1 marks as the population of study. Use R to do the following questions below.

You can read the data file using the following R code:

mydata<-read.csv("StudentsMarks.csv")

# use x to record term test 1 marks,

# after removing students who missed the test.

x<-na.omit(mydata$Test.1) N<-length(x)

N

## [1] 312

For each question, report the R code, the R output, and your answer.

(a) Construct a histogram of population values. Find the mean and the standard deviation

(b) Take a single systematic sample of size 20. Treating this sample as a SRS, estimate the average mark of students. Place a 95% bound on the error of estimation, and give a 95% confidence interval.

(c) Select five repeated systematic samples of size 10 each. Estimate the average mark of students. Place a 95% bound on the error of estimation, and construct a 95% confidence interval.

(d)Which of the two methods in (b) and (c) do you prefer, and why?

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

Problem 3Part-1

# We have the following sample data

ya = c(210, 160, 75, 280, 300, 190)

yb <- c(150, 200, 125, 60, 110, 100, 180, 75, 90)

# Given population data

Na = 120; pop.mean.xa= 24500/Na

Nb =180; pop.mean.xb =21200/Nb

N = Na + Nb

# sample sizes

na = length(ya); nb = length(yb)

est.total = Na*mean(ya) + Nb*mean(yb)

est.variance = (Na^2)*(1-na/Na)*var(ya)/na + (Nb^2)*(1-nb/Nb)*var(yb)/nb

est.total

est.variance

> est.total

[1] 46100

> est.variance

[1] 23075975

# The basic estimate of the total potential sales is 46,100 units and its estimated variance is 23,075,975

Part-2

########### part2-a) #####################

# Let A denotes Brand I and B denotes brand II

# We have the following sample data

xa <- c(204, 143, 82, 256, 275, 198)

# true quarterly sales for each of the sampled customers for Brand I

ya = c(210, 160, 75, 280, 300, 190)

# potential sale figure for each of the sampled customers for Brand I

xb <- c(137, 189, 119, 63, 103, 107, 159, 63, 87)

yb <- c(150, 200, 125, 60, 110, 100, 180, 75, 90)

# Given population data

Na = 120; pop.mean.xa= 24500/Na

Nb =180; pop.mean.xb =21200/Nb

N = Na + Nb

# Ratio of sample means

ra = mean(ya)/mean(xa)

rb = mean(yb)/mean(xb)

# sample sizes

na = length(ya); nb = length(yb)

estimated.mean.y.rs = (Na/N)*ra*pop.mean.xa + (Nb/N)*rb*pop.mean.xb

# ratio estimate of the mean potential sales (above)

# Calculating sample standard deviations squared

s.ra.sq = sum((ya - ra*xa)^2)/(na-1)

s.rb.sq = sum((yb - rb*xb)^2)/(nb-1)

estimated.var.mean.y.rs =(Na/N)^2*(1-na/Na)*s.ra.sq/na + (Nb/N)^2*(1-nb/Nb)* s.rb.sq/nb...

By purchasing this solution you'll be able to access the following files:

Solution1.docx and Solution2.docx.