Discussion8%20Solutions

# Discussion8%20Solutions - IE 300/GE 331 Discussion Problem...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: IE 300/GE 331 Discussion Problem Set 8 Using the data in 6-22, calculate the sample mean, sample standard deviation, sample median, first and third quartiles, sample range and IQR in R. Save the data in 6-22 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 70-61=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

{[ snackBarMessage ]}

Ask a homework question - tutors are online