Unformatted text preview: IE 300/GE 331 Discussion Problem Set 8 Using the data in 622, calculate the sample mean, sample standard deviation, sample median, first and third quartiles, sample range and IQR in R. Save the data in 622 in a text file (e.g. chap6.txt) in your working directory. > height < read.table("chap6.txt", header=T) Alternatively, one can use > height < c(62,68,69, ... ) In the following, we assume the previous method > mean(height) Height 65.81081 > sd(height) Height 2.106047 > quantile(height$Height) 0% 25% 50% 75% 100% 61 65 66 67 70
First quartile: 65, sample median=66, third quartile: 67 Sample range 7061=9 > IQR(height$Height) [1] 2 The sample variance of x1,..., xn is defined by 2 = 1 (  )2 , where is the sample =1
mean. Prove that 2 can also be computed by 2 = (  =1 )2 = 2 + 2  22 = 2  2 =1 =1 = ( +  2 ) = +  2 =1 2 2 =1 2 =1 2 1 1 ( 2  2 ). =1 1 =1 ...
View
Full Document
 Spring '09
 NegarKayavash
 Standard Deviation, Height, Interquartile range, Quartile, 622

Click to edit the document details