TO BE DONE IN R A dealer in recycled paper places empty trailers at various site
ID: 3298920 • Letter: T
Question
TO BE DONE IN R
A dealer in recycled paper places empty trailers at various sites. The trailers are gradually filled by individuals who bring in old newspapers and magazines, and are picked up on several schedules. One such schedule involves pickup every second week. This schedule is desirable if the average amount of recycled paper is more than 1600 cubic feet per 2-week period. The dealer’s records for eighteen 2-week periods show the following volumes (in cubic feet) at a particular site:-
recycle=c(1660,1820,1590,1440,1730,1680,1750,1720,1900,1570,1700,1900,1800,1770,2010,1580,1620,1690)
a. Calculate the following:-
i. mean
ii. median
iii. variance
iv. standard deviation
v. Q1
vi. Q3
vii. IQR
Explanation / Answer
First the array was inputted using the combination operator as:
> recycle=c(1660,1820,1590,1440,1730,1680,1750,1720,1900,1570,1700,1900,1800,1770,2010,1580,1620,1690)
a) The various characteristics are computed as:
i ) Mean
> mean(recycle)
[1] 1718.333
ii) Median
> median(recycle)
[1] 1710
iii) Variance
> var(recycle)
[1] 18979.41
iv) Standard deviation
> sd(recycle)
[1] 137.7658
v) Q1 that is the first quartile is computed as:
> quantile(recycle,0.25)
25%
1630
vi) Q3 that is the third quartile is computed as:
> quantile(recycle,0.75)
75%
1792.5
vii) IQR
> IQR(recycle)
[1] 162.5
Therefore the final answers are:
i) 1718.333
ii) 1710
iii) 18979.41
iv) 137.7658
v) 1630
vi) 1792.5
vii) 162.5
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.